gitnexus 1.6.11-rc.8 → 1.6.11
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 +95 -26
- package/dist/_shared/graph/types.d.ts +81 -2
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/integrations/circuit-breaker.d.ts.map +1 -1
- package/dist/_shared/integrations/circuit-breaker.js.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.js.map +1 -1
- package/dist/_shared/language-detection.d.ts.map +1 -1
- package/dist/_shared/language-detection.js +2 -0
- package/dist/_shared/language-detection.js.map +1 -1
- package/dist/_shared/languages.d.ts +2 -1
- package/dist/_shared/languages.d.ts.map +1 -1
- package/dist/_shared/languages.js +1 -0
- package/dist/_shared/languages.js.map +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts +2 -2
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
- package/dist/_shared/lbug/schema-constants.js +4 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -1
- package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.js +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.d.ts +3 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.js +4 -0
- package/dist/_shared/scope-resolution/language-classification.js.map +1 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts +10 -0
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/field-registry.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/method-registry.js.map +1 -1
- package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/scope-tree.js.map +1 -1
- package/dist/_shared/scope-resolution/types.d.ts +15 -0
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +4 -0
- package/dist/cli/ai-context.js +90 -14
- package/dist/cli/analyze-config.js +14 -0
- package/dist/cli/analyze-options.d.ts +14 -0
- package/dist/cli/analyze-watch.d.ts +20 -0
- package/dist/cli/analyze-watch.js +434 -0
- package/dist/cli/analyze.js +27 -9
- package/dist/cli/auto-sync.d.ts +1 -0
- package/dist/cli/auto-sync.js +107 -0
- package/dist/cli/command-banner.d.ts +15 -0
- package/dist/cli/command-banner.js +42 -0
- package/dist/cli/detect-changes-format.js +21 -0
- package/dist/cli/doctor.d.ts +7 -0
- package/dist/cli/doctor.js +14 -0
- package/dist/cli/group.js +7 -1
- package/dist/cli/help-i18n.js +4 -0
- package/dist/cli/i18n/en.d.ts +18 -3
- package/dist/cli/i18n/en.js +18 -3
- package/dist/cli/i18n/resources.d.ts +33 -3
- package/dist/cli/i18n/zh-CN.d.ts +15 -0
- package/dist/cli/i18n/zh-CN.js +18 -3
- package/dist/cli/index.js +34 -7
- package/dist/cli/mcp.d.ts +15 -0
- package/dist/cli/mcp.js +44 -0
- package/dist/cli/optional-grammars.d.ts +3 -2
- package/dist/cli/optional-grammars.js +19 -3
- package/dist/cli/setup.js +41 -15
- package/dist/cli/update-notice.d.ts +34 -0
- package/dist/cli/update-notice.js +91 -0
- package/dist/cli/update.d.ts +21 -0
- package/dist/cli/update.js +93 -0
- package/dist/cli/watch.d.ts +1 -20
- package/dist/cli/watch.js +5 -371
- package/dist/core/analysis-feature-registry.d.ts +2 -0
- package/dist/core/analysis-feature-registry.js +15 -0
- package/dist/core/analyzer-identity.js +21 -3
- package/dist/core/auto-sync/analysis-worker-launch.d.ts +30 -0
- package/dist/core/auto-sync/analysis-worker-launch.js +166 -0
- package/dist/core/auto-sync/config.d.ts +33 -0
- package/dist/core/auto-sync/config.js +320 -0
- package/dist/core/auto-sync/index.d.ts +6 -0
- package/dist/core/auto-sync/index.js +6 -0
- package/dist/core/auto-sync/path-security.d.ts +9 -0
- package/dist/core/auto-sync/path-security.js +251 -0
- package/dist/core/auto-sync/repo.d.ts +1 -0
- package/dist/core/auto-sync/repo.js +6 -0
- package/dist/core/auto-sync/runner.d.ts +44 -0
- package/dist/core/auto-sync/runner.js +428 -0
- package/dist/core/auto-sync/starter.d.ts +50 -0
- package/dist/core/auto-sync/starter.js +497 -0
- package/dist/core/auto-sync/state.d.ts +37 -0
- package/dist/core/auto-sync/state.js +119 -0
- package/dist/core/group/config-parser.js +8 -1
- package/dist/core/group/cross-impact.d.ts +3 -0
- package/dist/core/group/cross-impact.js +36 -4
- package/dist/core/group/extractors/http-patterns/java.js +22 -8
- package/dist/core/group/extractors/http-patterns/kotlin.js +86 -31
- package/dist/core/group/extractors/http-patterns/node.js +145 -8
- package/dist/core/group/extractors/http-patterns/python.js +11 -7
- package/dist/core/group/extractors/http-route-extractor.js +63 -17
- package/dist/core/group/extractors/java-workspace-extractor.js +244 -31
- package/dist/core/group/group-lock.js +5 -6
- package/dist/core/group/normalization.d.ts +38 -1
- package/dist/core/group/normalization.js +59 -3
- package/dist/core/group/service.d.ts +11 -0
- package/dist/core/group/service.js +13 -1
- package/dist/core/group/storage.js +2 -2
- package/dist/core/group/sync.d.ts +24 -1
- package/dist/core/group/sync.js +46 -8
- package/dist/core/group/types.d.ts +13 -0
- package/dist/core/incremental/derived-writeback.d.ts +36 -0
- package/dist/core/incremental/derived-writeback.js +68 -0
- package/dist/core/incremental/spring-config-drift.d.ts +12 -0
- package/dist/core/incremental/spring-config-drift.js +46 -0
- package/dist/core/incremental/subgraph-extract.d.ts +7 -4
- package/dist/core/incremental/subgraph-extract.js +30 -5
- package/dist/core/ingestion/asyncapi/document.d.ts +226 -0
- package/dist/core/ingestion/asyncapi/document.js +758 -0
- package/dist/core/ingestion/asyncapi/protocol.d.ts +79 -0
- package/dist/core/ingestion/asyncapi/protocol.js +203 -0
- package/dist/core/ingestion/call-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/zig.js +4 -0
- package/dist/core/ingestion/call-extractors/zig-static-gating.d.ts +100 -0
- package/dist/core/ingestion/call-extractors/zig-static-gating.js +319 -0
- package/dist/core/ingestion/call-processor.js +3 -1
- package/dist/core/ingestion/class-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/zig.js +32 -0
- package/dist/core/ingestion/class-extractors/generic.js +4 -1
- package/dist/core/ingestion/class-types.d.ts +6 -2
- package/dist/core/ingestion/destination-key.d.ts +59 -0
- package/dist/core/ingestion/destination-key.js +61 -0
- package/dist/core/ingestion/entry-point-scoring.d.ts +6 -2
- package/dist/core/ingestion/entry-point-scoring.js +8 -44
- package/dist/core/ingestion/export-detection.d.ts +37 -0
- package/dist/core/ingestion/export-detection.js +60 -0
- package/dist/core/ingestion/field-extractors/configs/zig.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/zig.js +49 -0
- package/dist/core/ingestion/field-extractors/generic.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/generic.js +12 -1
- package/dist/core/ingestion/frameworks/spring/actuator-runtime.d.ts +26 -0
- package/dist/core/ingestion/frameworks/spring/actuator-runtime.js +843 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.d.ts +5 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.js +9 -0
- package/dist/core/ingestion/frameworks/spring/annotation-arguments.js +8 -1
- package/dist/core/ingestion/frameworks/spring/argument-facts.d.ts +80 -0
- package/dist/core/ingestion/frameworks/spring/argument-facts.js +85 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.d.ts +1 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.js +2 -1
- package/dist/core/ingestion/frameworks/spring/destinations.d.ts +539 -0
- package/dist/core/ingestion/frameworks/spring/destinations.js +840 -0
- package/dist/core/ingestion/frameworks/spring/dynamic-lookups.d.ts +22 -0
- package/dist/core/ingestion/frameworks/spring/dynamic-lookups.js +124 -0
- package/dist/core/ingestion/frameworks/spring/message-producers.d.ts +78 -0
- package/dist/core/ingestion/frameworks/spring/message-producers.js +90 -0
- package/dist/core/ingestion/frameworks/spring/non-http-handlers.d.ts +29 -0
- package/dist/core/ingestion/frameworks/spring/vendor-prefixes.d.ts +7 -0
- package/dist/core/ingestion/frameworks/spring/vendor-prefixes.js +22 -0
- package/dist/core/ingestion/import-resolvers/configs/zig.d.ts +13 -0
- package/dist/core/ingestion/import-resolvers/configs/zig.js +26 -0
- package/dist/core/ingestion/import-resolvers/zig.d.ts +34 -0
- package/dist/core/ingestion/import-resolvers/zig.js +193 -0
- package/dist/core/ingestion/language-config.d.ts +177 -0
- package/dist/core/ingestion/language-config.js +719 -0
- package/dist/core/ingestion/language-provider.d.ts +178 -1
- package/dist/core/ingestion/language-provider.js +22 -0
- package/dist/core/ingestion/languages/csharp/razor-view-components.d.ts +62 -0
- package/dist/core/ingestion/languages/csharp/razor-view-components.js +954 -0
- package/dist/core/ingestion/languages/csharp/resolution-config.d.ts +3 -0
- package/dist/core/ingestion/languages/csharp/resolution-config.js +6 -1
- package/dist/core/ingestion/languages/csharp/scope-resolver.js +8 -0
- package/dist/core/ingestion/languages/index.d.ts +1 -0
- package/dist/core/ingestion/languages/index.js +2 -0
- package/dist/core/ingestion/languages/java/analysis-features.d.ts +1 -1
- package/dist/core/ingestion/languages/java/analysis-features.js +14 -6
- package/dist/core/ingestion/languages/java/capture-side-channel.d.ts +8 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.js +34 -0
- package/dist/core/ingestion/languages/java/captures.js +22 -1
- package/dist/core/ingestion/languages/java/lombok-synthesizer.d.ts +42 -0
- package/dist/core/ingestion/languages/java/lombok-synthesizer.js +439 -0
- package/dist/core/ingestion/languages/java/scope-resolver.js +2 -0
- package/dist/core/ingestion/languages/java/spring-actuator.d.ts +2 -0
- package/dist/core/ingestion/languages/java/spring-actuator.js +62 -0
- package/dist/core/ingestion/languages/java/spring-di.d.ts +17 -1
- package/dist/core/ingestion/languages/java/spring-di.js +44 -2
- package/dist/core/ingestion/languages/java/spring-dynamic-lookup.d.ts +8 -0
- package/dist/core/ingestion/languages/java/spring-dynamic-lookup.js +62 -0
- package/dist/core/ingestion/languages/java/spring-message-producers.d.ts +20 -0
- package/dist/core/ingestion/languages/java/spring-message-producers.js +83 -0
- package/dist/core/ingestion/languages/java/spring-non-http-handlers.d.ts +11 -1
- package/dist/core/ingestion/languages/java/spring-non-http-handlers.js +13 -3
- package/dist/core/ingestion/languages/java.js +18 -8
- package/dist/core/ingestion/languages/jvm/accessor-synthesis.d.ts +99 -0
- package/dist/core/ingestion/languages/jvm/accessor-synthesis.js +173 -0
- package/dist/core/ingestion/languages/jvm/beanspec.d.ts +17 -0
- package/dist/core/ingestion/languages/jvm/beanspec.js +42 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +15 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +50 -0
- package/dist/core/ingestion/languages/kotlin/captures.js +24 -1
- package/dist/core/ingestion/languages/kotlin/lombok-synthesizer.d.ts +26 -0
- package/dist/core/ingestion/languages/kotlin/lombok-synthesizer.js +417 -0
- package/dist/core/ingestion/languages/kotlin/scope-resolver.js +4 -0
- package/dist/core/ingestion/languages/kotlin/spring-actuator.d.ts +4 -0
- package/dist/core/ingestion/languages/kotlin/spring-actuator.js +172 -0
- package/dist/core/ingestion/languages/kotlin/spring-config-bindings.d.ts +18 -0
- package/dist/core/ingestion/languages/kotlin/spring-config-bindings.js +411 -0
- package/dist/core/ingestion/languages/kotlin/spring-di.d.ts +51 -1
- package/dist/core/ingestion/languages/kotlin/spring-di.js +86 -6
- package/dist/core/ingestion/languages/kotlin/spring-dynamic-lookup.d.ts +8 -0
- package/dist/core/ingestion/languages/kotlin/spring-dynamic-lookup.js +77 -0
- package/dist/core/ingestion/languages/kotlin/spring-message-producers.d.ts +17 -0
- package/dist/core/ingestion/languages/kotlin/spring-message-producers.js +119 -0
- package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.d.ts +16 -0
- package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.js +77 -2
- package/dist/core/ingestion/languages/kotlin.js +24 -0
- package/dist/core/ingestion/languages/python.js +2 -0
- package/dist/core/ingestion/languages/rust/query.js +8 -8
- package/dist/core/ingestion/languages/zig/captures.d.ts +260 -0
- package/dist/core/ingestion/languages/zig/captures.js +2070 -0
- package/dist/core/ingestion/languages/zig/index.d.ts +4 -0
- package/dist/core/ingestion/languages/zig/index.js +4 -0
- package/dist/core/ingestion/languages/zig/interpret.d.ts +36 -0
- package/dist/core/ingestion/languages/zig/interpret.js +176 -0
- package/dist/core/ingestion/languages/zig/query.d.ts +3 -0
- package/dist/core/ingestion/languages/zig/query.js +426 -0
- package/dist/core/ingestion/languages/zig/range-binding.d.ts +37 -0
- package/dist/core/ingestion/languages/zig/range-binding.js +373 -0
- package/dist/core/ingestion/languages/zig/scope-resolver.d.ts +12 -0
- package/dist/core/ingestion/languages/zig/scope-resolver.js +58 -0
- package/dist/core/ingestion/languages/zig/simple-hooks.d.ts +25 -0
- package/dist/core/ingestion/languages/zig/simple-hooks.js +143 -0
- package/dist/core/ingestion/languages/zig.d.ts +32 -0
- package/dist/core/ingestion/languages/zig.js +130 -0
- package/dist/core/ingestion/method-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/zig.js +120 -0
- package/dist/core/ingestion/method-extractors/generic.js +16 -4
- package/dist/core/ingestion/method-types.d.ts +10 -4
- package/dist/core/ingestion/model/field-registry.d.ts +3 -3
- package/dist/core/ingestion/model/field-registry.js +11 -7
- package/dist/core/ingestion/model/method-registry.d.ts +3 -3
- package/dist/core/ingestion/model/method-registry.js +13 -8
- package/dist/core/ingestion/model/registration-table.js +3 -0
- package/dist/core/ingestion/model/type-registry.js +8 -4
- package/dist/core/ingestion/pipeline-phases/di.js +47 -14
- package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
- package/dist/core/ingestion/pipeline-phases/index.js +1 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +7 -1
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +79 -91
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +2 -1
- package/dist/core/ingestion/pipeline-phases/processes.js +39 -4
- package/dist/core/ingestion/pipeline-phases/routes.js +27 -18
- package/dist/core/ingestion/pipeline-phases/runner.d.ts +4 -1
- package/dist/core/ingestion/pipeline-phases/runner.js +34 -14
- package/dist/core/ingestion/pipeline-phases/scan.js +82 -1
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.d.ts +2 -0
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.js +8 -0
- package/dist/core/ingestion/pipeline-phases/spring-destinations.d.ts +123 -0
- package/dist/core/ingestion/pipeline-phases/spring-destinations.js +688 -0
- package/dist/core/ingestion/pipeline.d.ts +30 -1
- package/dist/core/ingestion/pipeline.js +52 -14
- package/dist/core/ingestion/resolve-references.js +5 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.d.ts +16 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.js +10 -0
- package/dist/core/ingestion/route-extractors/java-const-resolver.d.ts +27 -1
- package/dist/core/ingestion/route-extractors/java-const-resolver.js +161 -13
- package/dist/core/ingestion/route-extractors/kotlin-const-resolver.d.ts +12 -18
- package/dist/core/ingestion/route-extractors/kotlin-const-resolver.js +214 -33
- package/dist/core/ingestion/route-extractors/kotlin-spring.d.ts +13 -0
- package/dist/core/ingestion/route-extractors/kotlin-spring.js +259 -0
- package/dist/core/ingestion/route-extractors/python-decorator-handler.d.ts +6 -0
- package/dist/core/ingestion/route-extractors/python-decorator-handler.js +16 -0
- package/dist/core/ingestion/route-extractors/spring-shared.d.ts +30 -1
- package/dist/core/ingestion/route-extractors/spring-shared.js +77 -9
- package/dist/core/ingestion/route-extractors/spring.js +9 -5
- package/dist/core/ingestion/scope-extractor.js +8 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +62 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +4 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +2 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +28 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +11 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +23 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +24 -3
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.d.ts +11 -1
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.js +26 -6
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.d.ts +11 -0
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.js +29 -3
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +8 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +35 -9
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +1 -4
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +277 -9
- package/dist/core/ingestion/scope-resolution/pipeline/registry.js +2 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +7 -3
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +43 -9
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +71 -10
- package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -0
- package/dist/core/ingestion/tree-sitter-queries.js +161 -0
- package/dist/core/ingestion/type-extractors/zig.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/zig.js +17 -0
- package/dist/core/ingestion/utils/ast-helpers.d.ts +40 -1
- package/dist/core/ingestion/utils/ast-helpers.js +124 -6
- package/dist/core/ingestion/utils/callable-flow-captures.d.ts +9 -0
- package/dist/core/ingestion/utils/callable-flow-captures.js +75 -14
- package/dist/core/ingestion/utils/test-file-path.d.ts +28 -0
- package/dist/core/ingestion/utils/test-file-path.js +87 -0
- package/dist/core/ingestion/variable-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/zig.js +71 -0
- package/dist/core/ingestion/workers/parse-worker.js +85 -14
- package/dist/core/install-context.d.ts +4 -0
- package/dist/core/install-context.js +152 -0
- package/dist/core/lbug/csv-generator.d.ts +10 -1
- package/dist/core/lbug/csv-generator.js +92 -22
- package/dist/core/lbug/graph-emit-sink.d.ts +3 -2
- package/dist/core/lbug/graph-emit-sink.js +4 -2
- package/dist/core/lbug/lbug-adapter.d.ts +100 -5
- package/dist/core/lbug/lbug-adapter.js +236 -24
- package/dist/core/lbug/schema.d.ts +6 -5
- package/dist/core/lbug/schema.js +84 -22
- package/dist/core/net/url-guard.d.ts +6 -0
- package/dist/core/net/url-guard.js +147 -0
- package/dist/core/package-version.d.ts +5 -0
- package/dist/core/package-version.js +10 -0
- package/dist/core/run-analyze.d.ts +21 -4
- package/dist/core/run-analyze.js +426 -117
- package/dist/core/search/fts-indexes.d.ts +19 -1
- package/dist/core/search/fts-indexes.js +28 -1
- package/dist/core/tree-sitter/parser-loader.js +16 -0
- package/dist/core/update-cache.d.ts +39 -0
- package/dist/core/update-cache.js +141 -0
- package/dist/core/update-check.d.ts +31 -0
- package/dist/core/update-check.js +274 -0
- package/dist/mcp/local/local-backend.d.ts +27 -13
- package/dist/mcp/local/local-backend.js +148 -60
- package/dist/mcp/repository-policy.d.ts +5 -1
- package/dist/mcp/repository-policy.js +48 -4
- package/dist/mcp/resources.js +10 -1
- package/dist/mcp/server.js +8 -9
- package/dist/mcp/tools.js +32 -22
- package/dist/server/analyze-launch.d.ts +2 -0
- package/dist/server/analyze-launch.js +2 -0
- package/dist/server/analyze-worker-protocol.d.ts +6 -1
- package/dist/server/analyze-worker.d.ts +1 -0
- package/dist/server/analyze-worker.js +38 -20
- package/dist/server/api.d.ts +5 -1
- package/dist/server/api.js +105 -88
- package/dist/server/git-clone.d.ts +40 -16
- package/dist/server/git-clone.js +253 -199
- package/dist/server/grep-params.d.ts +18 -0
- package/dist/server/grep-params.js +83 -0
- package/dist/server/grep-scan.d.ts +23 -0
- package/dist/server/grep-scan.js +107 -0
- package/dist/server/grep-worker.d.ts +1 -0
- package/dist/server/grep-worker.js +12 -0
- package/dist/server/mcp-http.d.ts +8 -0
- package/dist/server/mcp-http.js +16 -1
- package/dist/server/update-controller.d.ts +29 -0
- package/dist/server/update-controller.js +82 -0
- package/dist/storage/file-lock.d.ts +15 -0
- package/dist/storage/file-lock.js +155 -0
- package/dist/storage/fs-atomic.d.ts +24 -0
- package/dist/storage/fs-atomic.js +86 -2
- package/dist/storage/global-dir.d.ts +2 -0
- package/dist/storage/global-dir.js +6 -0
- package/dist/storage/parse-cache.d.ts +45 -7
- package/dist/storage/parse-cache.js +189 -42
- package/dist/storage/parsedfile-store.d.ts +41 -60
- package/dist/storage/parsedfile-store.js +247 -171
- package/dist/storage/repo-manager.d.ts +10 -4
- package/dist/storage/repo-manager.js +35 -25
- package/dist/storage/repo-meta.d.ts +34 -0
- package/dist/storage/v8-sidecar.d.ts +48 -0
- package/dist/storage/v8-sidecar.js +347 -0
- package/dist/types/pipeline.d.ts +14 -0
- package/dist/utils/process-identity.d.ts +2 -0
- package/dist/utils/process-identity.js +35 -0
- package/package.json +10 -4
- package/scripts/assert-web-assets.mjs +35 -0
- package/scripts/build-web.js +72 -0
- package/scripts/build.js +31 -28
- package/scripts/cross-platform-tests.ts +5 -0
- package/skills/gitnexus-cli.md +5 -1
- package/web/assets/ProcessFlowModal-DAeX2BHW.js +24 -0
- package/web/assets/{abnfDiagram-QNN2D4NM-Cq2djWWe.js → abnfDiagram-PAR5IXJI-J3OdeHLl.js} +1 -1
- package/web/assets/{agent-BWAXPjC5.js → agent-BMRqXorA.js} +6 -4
- package/web/assets/architecture-7GRP2DOG-M7G3SWCO-G3sWyX6M.js +1 -0
- package/web/assets/architectureDiagram-2PNWDENW-ysKcRlGT.js +36 -0
- package/web/assets/blockDiagram-PUWGUBOA-oLXTa1lY.js +129 -0
- package/web/assets/c4Diagram-3NLNHZP5-D3iu4eC0.js +38 -0
- package/web/assets/{chunk-2SREHG4O-Dip42xOq.js → chunk-2NMSUPJH-B24w-wng.js} +1 -1
- package/web/assets/{chunk-VJFVEZTB-CX66F2ep.js → chunk-32MCUW2P-ByUyt0Sa.js} +3 -3
- package/web/assets/{chunk-4RFN2BYJ-DHHWuC-n.js → chunk-3NPNU5GP-DocZ07Sg.js} +1 -1
- package/web/assets/{chunk-XNMVGMAZ-Cg_LnPtj.js → chunk-3SMGFRGC-CAu4JRLv.js} +1 -1
- package/web/assets/{chunk-W44A43WB-BN8EQc_u.js → chunk-4CAJECRU-DRYMwG9z.js} +1 -1
- package/web/assets/chunk-4OADUZ5Q-CxrSvOwZ.js +10 -0
- package/web/assets/{chunk-DMV4VAQV-Bn6WXDSX.js → chunk-5IQCK5RY-CCMhl4so.js} +2 -2
- package/web/assets/{chunk-RRFMTAIC-CMN0wcYA.js → chunk-5MVFYWFU-Db9KvrYO.js} +1 -1
- package/web/assets/chunk-CLS4B6BI-Uvx5QNsu.js +168 -0
- package/web/assets/chunk-DZP67EKU-B3Mt380j.js +70 -0
- package/web/assets/{chunk-6L755F7B-CMhLBxi2.js → chunk-EICP7K5X-CqwE9hui.js} +1 -1
- package/web/assets/{chunk-BI6VK774-D0oaWk8V.js → chunk-GDY2UAB4-CtQQR0a8.js} +1 -1
- package/web/assets/chunk-H7VHZCWX-CE1nAmt6.js +1 -0
- package/web/assets/chunk-IJBDOHL6-BUKtY6oF.js +1 -0
- package/web/assets/{chunk-OIYT25JQ-CQ6KOZGX.js → chunk-JFFVMJIA-0fJenqia.js} +1 -1
- package/web/assets/{chunk-HNC4WDU7-DoU3KnA7.js → chunk-JZGDI5JK-BeTMSSkJ.js} +1 -1
- package/web/assets/{chunk-EQFTRU2I-1ix7TzW9.js → chunk-KD6SPIPN-Qp1Pflah.js} +1 -1
- package/web/assets/chunk-NF366YI6-CpSpya3n.js +231 -0
- package/web/assets/chunk-NUDPKBEF-CU1-BQIW.js +34 -0
- package/web/assets/{chunk-SATU7PGQ-B1zhgOvc.js → chunk-OJINMHTS-zOCQe4eI.js} +1 -1
- package/web/assets/{chunk-E5QJAATJ-dh-5CtIV.js → chunk-Q6NGPIAH-yyBomb63.js} +1 -1
- package/web/assets/chunk-QJSWEUOL-D_rf9gPD.js +128 -0
- package/web/assets/chunk-R7JDMUKV-CRoqKpD6.js +1 -0
- package/web/assets/{chunk-VE5CLXGZ-C1vB7wpY.js → chunk-RCXAM2GK-CUqrWQDV.js} +1 -1
- package/web/assets/{chunk-66DQ2XMT-CM0xjFAN.js → chunk-RT4MAWR3-zXy9-Lvt.js} +1 -1
- package/web/assets/{chunk-TZUXEDM2-B7p9AcTw.js → chunk-SFMINX4W-J2UrvMpD.js} +1 -1
- package/web/assets/{chunk-LORZLZWG-B57uGw2N.js → chunk-SLDQ463B-CHY6e_bQ.js} +2 -2
- package/web/assets/{chunk-FWYVLQTC-BgDItRzJ.js → chunk-TCEHX7R3-CXPDEVbm.js} +1 -1
- package/web/assets/{chunk-224SPVON-B8gxtXpy.js → chunk-VQC2EELJ-Dc8fIy4R.js} +1 -1
- package/web/assets/chunk-VRZKL3EH-DB3KixTQ.js +1 -0
- package/web/assets/{chunk-A7VWPJGB-B4O3oQdQ.js → chunk-VTHDQ7BV-b7FsPQZO.js} +1 -1
- package/web/assets/chunk-VY2OSTJR-Dkgc3Brg.js +2 -0
- package/web/assets/chunk-WUBWJARI-7FwILJ3k.js +2 -0
- package/web/assets/{chunk-D6VWDJW2-BxcBdZ9c.js → chunk-YBMQ5JGJ-BSnyWZmd.js} +1 -1
- package/web/assets/chunk-YDMLL4PJ-IHhMngTz.js +2 -0
- package/web/assets/chunk-Z6V44ARX-BjCEsF0Q.js +62 -0
- package/web/assets/chunk-ZJJ7VQJP-Dz089b-K.js +321 -0
- package/web/assets/chunk-ZNLK7HRR-B0iFpmW4.js +1 -0
- package/web/assets/chunk-ZQN7UHIL-Cy7KAjQt.js +1 -0
- package/web/assets/{chunk-L5GCOVLC-CE2w8Nm_.js → chunk-ZS6VBONO-DBjJO0w9.js} +2 -2
- package/web/assets/{chunk-NV3KIAZN-5yvcpMiu.js → chunk-ZUNWM646-DNRJyNPe.js} +1 -1
- package/web/assets/classDiagram-FGAMPOII-C5Ibyode.js +1 -0
- package/web/assets/classDiagram-v2-AI5RJEK4-C5Ibyode.js +1 -0
- package/web/assets/{cose-bilkent-RZA4XIPR-BHpK4Crp.js → cose-bilkent-Q72C2OJ3-DMeFXnK8.js} +1 -1
- package/web/assets/cynefin-OW5HDTMX-6OCTWOGG-vlqakYcO.js +1 -0
- package/web/assets/{cynefinDiagram-TR7LZUCG-C3Iar9lZ.js → cynefinDiagram-2OOWUY4M-BY6DZkTt.js} +1 -1
- package/web/assets/dagre-MPVFI544-DWO70fy_.js +4 -0
- package/web/assets/diagram-AE4NWXFW-f7JRVRUL.js +24 -0
- package/web/assets/{diagram-L7DVE3PN-GIRyVUtt.js → diagram-BUJID5UG-BXZv1rCS.js} +2 -2
- package/web/assets/{diagram-JCD7PQ7C-DC5-9FRr.js → diagram-C44CZ5NI-CRNfvjCq.js} +1 -1
- package/web/assets/diagram-EYOLEXXS-DZOjKQVE.js +30 -0
- package/web/assets/diagram-P7B6PWOJ-D3SQmw3_.js +3 -0
- package/web/assets/{ebnfDiagram-DRHRQJWO-D8_CI4ZF.js → ebnfDiagram-FTPZ3PV6-jKWpIDN2.js} +1 -1
- package/web/assets/erDiagram-H3ERR26V-BqJntEuJ.js +99 -0
- package/web/assets/eventmodeling-NTZA5JFV-WKSWQHFS-Bq4FqtBL.js +1 -0
- package/web/assets/flowDiagram-YHGXBVSY-Dnlk2bEu.js +1 -0
- package/web/assets/ganttDiagram-RWFTB7ED-Bl6Y1K5T.js +292 -0
- package/web/assets/gitGraph-4MIJSDKK-JH2HKYUO-B3yc4GkH.js +1 -0
- package/web/assets/gitGraphDiagram-MAR6GKOP-CkNvsrdw.js +106 -0
- package/web/assets/{index-CJDpyH-n.css → index-C2_aej58.css} +1 -1
- package/web/assets/{index-DDRie6_8.js → index-Dj3vQOHK.js} +51 -51
- package/web/assets/info-A6RAGUB7-3TX3OFWW-BM3N5_Dv.js +1 -0
- package/web/assets/infoDiagram-LV547AFH-COkFutAf.js +2 -0
- package/web/assets/{ishikawaDiagram-4JDSWWDM-DmqWtjkl.js → ishikawaDiagram-PUJQGNDS-Bb8FylSR.js} +2 -2
- package/web/assets/{journeyDiagram-QUS3FAKT-XAzVzrQW.js → journeyDiagram-EW5QJT4W-BzoHUBhM.js} +4 -4
- package/web/assets/{kanban-definition-D4L7SQKK-YurRnmYn.js → kanban-definition-JSQERAZB-Uy2Pi0yQ.js} +4 -4
- package/web/assets/katex-CZ4GXH2S-C0Fcou7U.js +257 -0
- package/web/assets/{mindmap-definition-66QP5TD6-ChrWWnil.js → mindmap-definition-VBJCLQLM-B-CnOnt_.js} +3 -3
- package/web/assets/packet-AYTQ26CC-MKII6P3Y-Bd52ZE3V.js +1 -0
- package/web/assets/{pegDiagram-YKIO5C6U-QGeQLEq2.js → pegDiagram-7WILOQTJ-D9sneKXg.js} +1 -1
- package/web/assets/pie-WAS4IAKB-6B4OPMJ5-DW5Xy69Z.js +1 -0
- package/web/assets/pieDiagram-EFA7CBSB-Dx2NQofL.js +39 -0
- package/web/assets/{quadrantDiagram-VO5QLCXA-B7098wSc.js → quadrantDiagram-WARVYA7P-DPKL9_0A.js} +3 -3
- package/web/assets/radar-RG4KPBEZ-UPTR3XUL-CkzibT2h.js +1 -0
- package/web/assets/railroad-74A4TZTK-MEFUPFMS-D9zF-mDN.js +1 -0
- package/web/assets/railroad-abnf-HS5TGJTU-R5YG2S5D-ruacjUbX.js +1 -0
- package/web/assets/railroad-ebnf-LZEXJU2U-G5QEX2L6-S1zc5OiO.js +1 -0
- package/web/assets/railroad-peg-WCYAUIDC-H5I2ZRY2-Cbcr0XzY.js +1 -0
- package/web/assets/{railroadDiagram-M77LTMSB-AXu4vxk_.js → railroadDiagram-5NIQVNLQ-DsweTo14.js} +1 -1
- package/web/assets/{requirementDiagram-RASO5HTO-B-l8InpK.js → requirementDiagram-SXREGOKZ-CXwdNSVR.js} +4 -4
- package/web/assets/{sankeyDiagram-F32LOJ6L-Kd7zjJgX.js → sankeyDiagram-VV74M2VP-CA6jtP9P.js} +3 -3
- package/web/assets/{sequenceDiagram-URATNSBD-BlcdY9DS.js → sequenceDiagram-52ZFIFDL-k_5rEbzm.js} +15 -15
- package/web/assets/src-Df5C1Nz4.js +1 -0
- package/web/assets/stateDiagram-3QAKPIVI-BejHTf31.js +1 -0
- package/web/assets/stateDiagram-v2-HN2P4RDZ-BrfoRuOc.js +1 -0
- package/web/assets/swimlanes-QLVP42QD-CQSVO5D6.js +1 -0
- package/web/assets/swimlanesDiagram-JKPDBFCN-DrWB9kcD.js +8 -0
- package/web/assets/{timeline-definition-WJXWRH4I-DUfp1R3E.js → timeline-definition-GS45XAXW-C0Ks8rPP.js} +4 -4
- package/web/assets/treeView-Q6P3EWNA-ZRJGANNQ-DmKOCo6L.js +1 -0
- package/web/assets/treemap-WGGIJYW6-K64VN5AS-DO3xY92U.js +1 -0
- package/web/assets/{vennDiagram-K3VCMQLI-Bj-FN-XS.js → vennDiagram-QIQU2ZRJ-rgPiS837.js} +3 -3
- package/web/assets/wardley-WFR3VGLG-D67OWCCH-DiDPBNft.js +1 -0
- package/web/assets/wardleyDiagram-U6YNM66N-DRVr7SPi.js +78 -0
- package/web/assets/{xychartDiagram-5VRUVLCW-CK_rbSWE.js → xychartDiagram-XJAZEDNM-COtlZzYb.js} +3 -3
- package/web/index.html +19 -17
- package/web/assets/ProcessFlowModal-Badh2Pbg.js +0 -24
- package/web/assets/architecture-TIHT7OUA-V6N4J3SY-fTePvLoe.js +0 -1
- package/web/assets/architectureDiagram-OT7VKSJ7-mKEXxkeF.js +0 -36
- package/web/assets/blockDiagram-54WLDVWM-Dg_hrRWE.js +0 -132
- package/web/assets/c4Diagram-X2LASM7V-CnhoT4aV.js +0 -10
- package/web/assets/chunk-2AEHWXPW-CV4r6-1I.js +0 -127
- package/web/assets/chunk-5VCL7Z4A-CQ-2dYWj.js +0 -1
- package/web/assets/chunk-6BELYETK-ChsYtfHW.js +0 -1
- package/web/assets/chunk-7CWYLC5S-DRgGkkpF.js +0 -2
- package/web/assets/chunk-7FYTHRHK-CsmYIswB.js +0 -32
- package/web/assets/chunk-KRXBNO2N-C-UNuKKf.js +0 -1
- package/web/assets/chunk-LAHSG3N2-Bz4hcn0N.js +0 -321
- package/web/assets/chunk-LIEV3EAG-pyKGssV3.js +0 -1
- package/web/assets/chunk-NLANEA3F-XpH_NPA5.js +0 -62
- package/web/assets/chunk-PE7DX7ZZ-CCvRVj43.js +0 -10
- package/web/assets/chunk-Q67WD55A-BWCH2SVz.js +0 -156
- package/web/assets/chunk-SZD42YQK-ijyKKVr1.js +0 -70
- package/web/assets/chunk-TFPGFQPA-Dj6a-0pC.js +0 -231
- package/web/assets/chunk-TGVD4F4B-BMc31Gj2.js +0 -2
- package/web/assets/chunk-UAT7B5JY-DW-A_fpI.js +0 -1
- package/web/assets/chunk-VY5UBI4V-yxPQAWxw.js +0 -1
- package/web/assets/chunk-WJBAP47W-BckNkuEN.js +0 -1
- package/web/assets/classDiagram-VPOSVPXH-BjOiXA_C.js +0 -1
- package/web/assets/classDiagram-v2-5VFNUXQA-BjOiXA_C.js +0 -1
- package/web/assets/cynefin-VYW2F7L2-2VAHYKR6-DAsF6GZv.js +0 -1
- package/web/assets/dagre-K64A6Z3X-CUwi79mA.js +0 -4
- package/web/assets/diagram-2TLGJV2N-C2F5Nfym.js +0 -30
- package/web/assets/diagram-KFBZAVDW-Dfmf_4ti.js +0 -3
- package/web/assets/diagram-YP3FGXHI-CyNFYtkd.js +0 -24
- package/web/assets/erDiagram-SZLJLQMB-CohQjznC.js +0 -85
- package/web/assets/eventmodeling-45OFAUF4-AOUJWSLX-BvTc6iQi.js +0 -1
- package/web/assets/flowDiagram-BWE6NHOH-B6RnEvD9.js +0 -1
- package/web/assets/ganttDiagram-2QTCJSNI-Cks_mEcF.js +0 -292
- package/web/assets/gitGraph-TEB2WS4Q-U5VWYIBC-Dy7CCSZ5.js +0 -1
- package/web/assets/gitGraphDiagram-VVZAVV5G-CG41cIVc.js +0 -106
- package/web/assets/info-DKCQHKI2-DX6KST54-BLJg1ikX.js +0 -1
- package/web/assets/infoDiagram-FY4PZKRE-BJ3vPVwW.js +0 -2
- package/web/assets/katex-C5OPUE3Q-Bnbavtmu.js +0 -257
- package/web/assets/packet-7NZHBO7P-5WG45QPS-KUxcuvaA.js +0 -1
- package/web/assets/pie-RZYD4A2V-2OCZ2VTD-DPs08kJY.js +0 -1
- package/web/assets/pieDiagram-YPY3TKG5-BuT3MYzm.js +0 -39
- package/web/assets/radar-I7S5WNFK-EPLSA35B-w5F0K3a7.js +0 -1
- package/web/assets/railroad-3IZDKUUU-PWFQV6Y6-Bu668yqY.js +0 -1
- package/web/assets/railroad-abnf-AHOZXSZD-JYYJX3BS-B6ghpETS.js +0 -1
- package/web/assets/railroad-ebnf-EBAXGLYW-RBZ4ONAP-D-XmHh3M.js +0 -1
- package/web/assets/railroad-peg-LSFZ7HO6-KHNPXGPG-mhkrhzEn.js +0 -1
- package/web/assets/src-C5sx_gMp.js +0 -1
- package/web/assets/stateDiagram-DODFXNG5-DTdHc-fF.js +0 -1
- package/web/assets/stateDiagram-v2-JNMM5JRA-DioNLDDo.js +0 -1
- package/web/assets/swimlanes-OSWOYLSK-CA0ofdwY.js +0 -2
- package/web/assets/swimlanesDiagram-RHGX2RDE-PkwUdckC.js +0 -8
- package/web/assets/treeView-QDETBFTQ-EHYTSQNO-C5lpBgPm.js +0 -1
- package/web/assets/treemap-6X3UGDF4-CCWCF7EK-BB0ZyO-B.js +0 -1
- package/web/assets/wardley-OPB4EBWU-6OWERDVT-CEA3Nq0j.js +0 -1
- package/web/assets/wardleyDiagram-XK6FUAWV-CVV0dHFr.js +0 -78
- /package/web/assets/{sizeCapture-5GORAGP4-BEqQzsxs.js → sizeCapture-FGA5AGYP-BEqQzsxs.js} +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { makeScopeId } from '../../../../_shared/index.js';
|
|
2
|
+
import { createSpringDynamicLookupMetadataAttacher, springDynamicLookupCardinality, } from '../../frameworks/spring/dynamic-lookups.js';
|
|
3
|
+
import { findAncestorBeforeBoundary, nodeToCapture, } from '../../utils/ast-helpers.js';
|
|
4
|
+
import { getJavaSpringDynamicLookupFacts } from './capture-side-channel.js';
|
|
5
|
+
const CALLABLE_NODE_TYPES = new Set([
|
|
6
|
+
'method_declaration',
|
|
7
|
+
'constructor_declaration',
|
|
8
|
+
'compact_constructor_declaration',
|
|
9
|
+
]);
|
|
10
|
+
const NO_CALLABLE_BOUNDARIES = new Set();
|
|
11
|
+
function classLiteralTypeName(argument) {
|
|
12
|
+
if (argument.type !== 'class_literal' || argument.namedChildCount !== 1)
|
|
13
|
+
return null;
|
|
14
|
+
return argument.namedChild(0)?.text.trim() ?? null;
|
|
15
|
+
}
|
|
16
|
+
/** Capture real Java method invocations; comments and literals are never visited as calls. */
|
|
17
|
+
export function captureJavaSpringDynamicLookupFact(node, filePath) {
|
|
18
|
+
if (node.type !== 'method_invocation')
|
|
19
|
+
return null;
|
|
20
|
+
const receiverName = node.childForFieldName('object')?.text.trim();
|
|
21
|
+
const methodName = node.childForFieldName('name')?.text.trim();
|
|
22
|
+
const argumentsNode = node.childForFieldName('arguments');
|
|
23
|
+
if (receiverName === undefined || methodName === undefined || argumentsNode === null)
|
|
24
|
+
return null;
|
|
25
|
+
if (springDynamicLookupCardinality(receiverName, methodName) === null)
|
|
26
|
+
return null;
|
|
27
|
+
const argumentsWithoutComments = argumentsNode.namedChildren.filter((child) => child.type !== 'line_comment' && child.type !== 'block_comment');
|
|
28
|
+
if (argumentsWithoutComments.length !== 1)
|
|
29
|
+
return null;
|
|
30
|
+
const argument = argumentsWithoutComments[0];
|
|
31
|
+
if (argument === undefined)
|
|
32
|
+
return null;
|
|
33
|
+
const targetTypeName = classLiteralTypeName(argument);
|
|
34
|
+
if (targetTypeName === null)
|
|
35
|
+
return null;
|
|
36
|
+
const owner = findAncestorBeforeBoundary(node, CALLABLE_NODE_TYPES, NO_CALLABLE_BOUNDARIES);
|
|
37
|
+
if (owner === null)
|
|
38
|
+
return null;
|
|
39
|
+
const ownerCapture = nodeToCapture('@spring-dynamic-lookup.owner', owner);
|
|
40
|
+
return {
|
|
41
|
+
ownerScopeId: makeScopeId({
|
|
42
|
+
filePath,
|
|
43
|
+
range: ownerCapture.range,
|
|
44
|
+
kind: 'Function',
|
|
45
|
+
}),
|
|
46
|
+
ownerRange: ownerCapture.range,
|
|
47
|
+
receiverName,
|
|
48
|
+
methodName,
|
|
49
|
+
targetTypeName,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/** Standalone extractor for focused tests; production reuses scope-query call nodes. */
|
|
53
|
+
export function captureJavaSpringDynamicLookupFacts(rootNode, filePath) {
|
|
54
|
+
return rootNode
|
|
55
|
+
.descendantsOfType('method_invocation')
|
|
56
|
+
.map((node) => captureJavaSpringDynamicLookupFact(node, filePath))
|
|
57
|
+
.filter((fact) => fact !== null);
|
|
58
|
+
}
|
|
59
|
+
/** Attach Java lookup facts for later resolution by the shared DI phase. */
|
|
60
|
+
export const attachJavaSpringDynamicLookup = createSpringDynamicLookupMetadataAttacher({
|
|
61
|
+
getFacts: getJavaSpringDynamicLookupFacts,
|
|
62
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type SpringMessageProducerFact } from '../../frameworks/spring/message-producers.js';
|
|
2
|
+
import { type SyntaxNode } from '../../utils/ast-helpers.js';
|
|
3
|
+
/**
|
|
4
|
+
* Capture one messaging-template publish from a Java call already surfaced by
|
|
5
|
+
* the scope query, without resolving the destination it names.
|
|
6
|
+
*
|
|
7
|
+
* The destination argument may be a literal, a reference to a constant that
|
|
8
|
+
* lives in another file, or a `${...}` placeholder resolved from configuration;
|
|
9
|
+
* all three are recorded as written and left to a later phase.
|
|
10
|
+
*
|
|
11
|
+
* A call whose argument list did not parse yields NO fact. The fact exists to
|
|
12
|
+
* carry a destination, and error recovery invents argument boundaries — an
|
|
13
|
+
* unterminated `send(TOPIC,` absorbs the next declaration's source and offers
|
|
14
|
+
* it as an argument. There is no state on this fact that means "published
|
|
15
|
+
* somewhere unreadable", so the choice is between silence and a plausible lie,
|
|
16
|
+
* and silence is recoverable: the file is re-captured when it parses.
|
|
17
|
+
*/
|
|
18
|
+
export declare function captureJavaSpringMessageProducerFact(node: SyntaxNode, filePath: string): SpringMessageProducerFact | null;
|
|
19
|
+
/** Standalone extractor for focused tests; production reuses scope-query call nodes. */
|
|
20
|
+
export declare function captureJavaSpringMessageProducerFacts(rootNode: SyntaxNode, filePath: string): SpringMessageProducerFact[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { makeScopeId } from '../../../../_shared/index.js';
|
|
2
|
+
import { normalizeSpringFactText, } from '../../frameworks/spring/argument-facts.js';
|
|
3
|
+
import { isSpringMessageProducerMethod, springMessageProducerTemplateOf, } from '../../frameworks/spring/message-producers.js';
|
|
4
|
+
import { findAncestorBeforeBoundary, hasRecoveredSyntax, nodeToCapture, } from '../../utils/ast-helpers.js';
|
|
5
|
+
const CALLABLE_NODE_TYPES = new Set([
|
|
6
|
+
'method_declaration',
|
|
7
|
+
'constructor_declaration',
|
|
8
|
+
'compact_constructor_declaration',
|
|
9
|
+
]);
|
|
10
|
+
/**
|
|
11
|
+
* A type body ends the search for the publishing callable.
|
|
12
|
+
*
|
|
13
|
+
* Without it the ancestor walk passes THROUGH the body of a class declared
|
|
14
|
+
* inside a method, so a publish in that class's field initializer is attributed
|
|
15
|
+
* to the enclosing method, which may never run it. The identical construct at
|
|
16
|
+
* the top level of a class already yields no fact — there is no enclosing
|
|
17
|
+
* callable to find — and the rule has to read the same at every depth.
|
|
18
|
+
*/
|
|
19
|
+
const TYPE_BODY_BOUNDARIES = new Set([
|
|
20
|
+
'class_body',
|
|
21
|
+
'interface_body',
|
|
22
|
+
'enum_body',
|
|
23
|
+
'enum_body_declarations',
|
|
24
|
+
'annotation_type_body',
|
|
25
|
+
]);
|
|
26
|
+
const COMMENT_NODE_TYPES = new Set(['line_comment', 'block_comment']);
|
|
27
|
+
/** Java has no named call arguments, so every argument is captured positionally. */
|
|
28
|
+
function javaCallArgumentFacts(argumentList) {
|
|
29
|
+
return argumentList.namedChildren
|
|
30
|
+
.filter((child) => !COMMENT_NODE_TYPES.has(child.type))
|
|
31
|
+
.map((child) => ({ text: normalizeSpringFactText(child.text) }));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Capture one messaging-template publish from a Java call already surfaced by
|
|
35
|
+
* the scope query, without resolving the destination it names.
|
|
36
|
+
*
|
|
37
|
+
* The destination argument may be a literal, a reference to a constant that
|
|
38
|
+
* lives in another file, or a `${...}` placeholder resolved from configuration;
|
|
39
|
+
* all three are recorded as written and left to a later phase.
|
|
40
|
+
*
|
|
41
|
+
* A call whose argument list did not parse yields NO fact. The fact exists to
|
|
42
|
+
* carry a destination, and error recovery invents argument boundaries — an
|
|
43
|
+
* unterminated `send(TOPIC,` absorbs the next declaration's source and offers
|
|
44
|
+
* it as an argument. There is no state on this fact that means "published
|
|
45
|
+
* somewhere unreadable", so the choice is between silence and a plausible lie,
|
|
46
|
+
* and silence is recoverable: the file is re-captured when it parses.
|
|
47
|
+
*/
|
|
48
|
+
export function captureJavaSpringMessageProducerFact(node, filePath) {
|
|
49
|
+
if (node.type !== 'method_invocation')
|
|
50
|
+
return null;
|
|
51
|
+
const methodName = node.childForFieldName('name')?.text.trim();
|
|
52
|
+
if (methodName === undefined || !isSpringMessageProducerMethod(methodName))
|
|
53
|
+
return null;
|
|
54
|
+
const receiverText = node.childForFieldName('object')?.text;
|
|
55
|
+
if (receiverText === undefined)
|
|
56
|
+
return null;
|
|
57
|
+
const receiverName = normalizeSpringFactText(receiverText);
|
|
58
|
+
const template = springMessageProducerTemplateOf(receiverName, methodName);
|
|
59
|
+
if (template === null)
|
|
60
|
+
return null;
|
|
61
|
+
const argumentList = node.childForFieldName('arguments');
|
|
62
|
+
if (argumentList !== null && hasRecoveredSyntax(argumentList))
|
|
63
|
+
return null;
|
|
64
|
+
const owner = findAncestorBeforeBoundary(node, CALLABLE_NODE_TYPES, TYPE_BODY_BOUNDARIES);
|
|
65
|
+
if (owner === null)
|
|
66
|
+
return null;
|
|
67
|
+
const ownerCapture = nodeToCapture('@spring-message-producer.owner', owner);
|
|
68
|
+
return {
|
|
69
|
+
ownerScopeId: makeScopeId({ filePath, range: ownerCapture.range, kind: 'Function' }),
|
|
70
|
+
ownerRange: ownerCapture.range,
|
|
71
|
+
template,
|
|
72
|
+
receiverName,
|
|
73
|
+
methodName,
|
|
74
|
+
...(argumentList === null ? {} : { args: javaCallArgumentFacts(argumentList) }),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** Standalone extractor for focused tests; production reuses scope-query call nodes. */
|
|
78
|
+
export function captureJavaSpringMessageProducerFacts(rootNode, filePath) {
|
|
79
|
+
return rootNode
|
|
80
|
+
.descendantsOfType('method_invocation')
|
|
81
|
+
.map((node) => captureJavaSpringMessageProducerFact(node, filePath))
|
|
82
|
+
.filter((fact) => fact !== null);
|
|
83
|
+
}
|
|
@@ -2,6 +2,16 @@ import { type SpringNonHttpHandlerFact } from '../../frameworks/spring/non-http-
|
|
|
2
2
|
import { type SyntaxNode } from '../../utils/ast-helpers.js';
|
|
3
3
|
import { type JavaAnnotationSyntaxFact } from './spring-di.js';
|
|
4
4
|
export type JavaSpringNonHttpHandlerFact = SpringNonHttpHandlerFact<JavaAnnotationSyntaxFact>;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Capture callable syntax while the Java class AST is already in hand.
|
|
7
|
+
*
|
|
8
|
+
* Annotation arguments are read in a second pass, only for callables that
|
|
9
|
+
* already carry a handler annotation, so the destination-bearing arguments
|
|
10
|
+
* (`topics`, `queues`, `destination`, `cron`) reach the fact without adding
|
|
11
|
+
* structured argument text to every annotation in the repository. Java can
|
|
12
|
+
* decide that on the simple name alone; Kotlin runs the same two passes but
|
|
13
|
+
* widens the first one with the file's import aliases, because a Kotlin handler
|
|
14
|
+
* annotation may be written under a name no list can contain.
|
|
15
|
+
*/
|
|
6
16
|
export declare function captureJavaSpringNonHttpHandlerFacts(classNode: SyntaxNode, filePath: string): JavaSpringNonHttpHandlerFact[];
|
|
7
17
|
export declare const attachJavaSpringNonHttpHandlerMetadata: (graph: import("../../../graph/types.js").KnowledgeGraph, parsedFiles: readonly import('../../../../_shared/index.js').ParsedFile[], nodeLookup: import("../../scope-resolution/graph-bridge/node-lookup.js").GraphNodeLookup, indexes: import("../../model/scope-resolution-indexes.js").ScopeResolutionIndexes) => void;
|
|
@@ -4,7 +4,17 @@ import { nodeToCapture } from '../../utils/ast-helpers.js';
|
|
|
4
4
|
import { getJavaSpringNonHttpHandlerFacts } from './capture-side-channel.js';
|
|
5
5
|
import { isJavaPackageSiblingVisibilityIncomplete } from './package-siblings.js';
|
|
6
6
|
import { javaSpringAnnotationFacts } from './spring-di.js';
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Capture callable syntax while the Java class AST is already in hand.
|
|
9
|
+
*
|
|
10
|
+
* Annotation arguments are read in a second pass, only for callables that
|
|
11
|
+
* already carry a handler annotation, so the destination-bearing arguments
|
|
12
|
+
* (`topics`, `queues`, `destination`, `cron`) reach the fact without adding
|
|
13
|
+
* structured argument text to every annotation in the repository. Java can
|
|
14
|
+
* decide that on the simple name alone; Kotlin runs the same two passes but
|
|
15
|
+
* widens the first one with the file's import aliases, because a Kotlin handler
|
|
16
|
+
* annotation may be written under a name no list can contain.
|
|
17
|
+
*/
|
|
8
18
|
export function captureJavaSpringNonHttpHandlerFacts(classNode, filePath) {
|
|
9
19
|
const facts = [];
|
|
10
20
|
const body = classNode.childForFieldName('body');
|
|
@@ -13,9 +23,9 @@ export function captureJavaSpringNonHttpHandlerFacts(classNode, filePath) {
|
|
|
13
23
|
for (const member of body.namedChildren) {
|
|
14
24
|
if (member.type !== 'method_declaration')
|
|
15
25
|
continue;
|
|
16
|
-
|
|
17
|
-
if (!hasSpringNonHttpHandlerRelevantAnnotation(annotations))
|
|
26
|
+
if (!hasSpringNonHttpHandlerRelevantAnnotation(javaSpringAnnotationFacts(member)))
|
|
18
27
|
continue;
|
|
28
|
+
const annotations = javaSpringAnnotationFacts(member, { includeArguments: true });
|
|
19
29
|
const ownerRange = nodeToCapture('@spring-non-http-handler.owner', member).range;
|
|
20
30
|
facts.push({
|
|
21
31
|
ownerScopeId: makeScopeId({ filePath, range: ownerRange, kind: 'Function' }),
|
|
@@ -13,7 +13,7 @@ import { defineLanguage } from '../language-provider.js';
|
|
|
13
13
|
import { createLeadingDocDescriptionExtractor } from '../utils/ast-helpers.js';
|
|
14
14
|
import { javaTypeConfig } from '../type-extractors/jvm.js';
|
|
15
15
|
import { extractSpringRoutes, extractSpringTypes } from '../route-extractors/spring.js';
|
|
16
|
-
import { extractJavaModuleConstants, foldJavaOperands, isJavaConstantFile, } from '../route-extractors/java-const-resolver.js';
|
|
16
|
+
import { extractJavaModuleConstants, foldJavaOperands, isJavaConstantFile, prepareJavaRouteConstants, } from '../route-extractors/java-const-resolver.js';
|
|
17
17
|
import { javaExportChecker } from '../export-detection.js';
|
|
18
18
|
import { createImportResolver } from '../import-resolvers/resolver-factory.js';
|
|
19
19
|
import { javaImportConfig } from '../import-resolvers/configs/jvm.js';
|
|
@@ -26,9 +26,11 @@ import { createVariableExtractor } from '../variable-extractors/generic.js';
|
|
|
26
26
|
import { javaVariableConfig } from '../variable-extractors/configs/jvm.js';
|
|
27
27
|
import { createJavaCfgVisitor } from '../cfg/visitors/java.js';
|
|
28
28
|
import { assertCloneable } from '../workers/clone-safety.js';
|
|
29
|
-
import { collectJavaCaptureSideChannel } from './java/capture-side-channel.js';
|
|
29
|
+
import { collectJavaCaptureSideChannel, getJavaSpringMessageProducerFacts, getJavaSpringNonHttpHandlerFacts, } from './java/capture-side-channel.js';
|
|
30
30
|
import { javaRecordMethodExtractor, shouldSkipJavaRecordComponentDefinition, } from './java/record-components.js';
|
|
31
|
+
import { synthesizeLombokAccessors } from './java/lombok-synthesizer.js';
|
|
31
32
|
import { emitJavaScopeCaptures, interpretJavaImport, interpretJavaTypeBinding, javaBindingScopeFor, javaImportOwningScope, javaMergeBindings, javaReceiverBinding, javaArityCompatibility, resolveJavaImportTarget, } from './java/index.js';
|
|
33
|
+
import { javaRuntimeSymbolStrategy } from './java/spring-actuator.js';
|
|
32
34
|
/**
|
|
33
35
|
* Java names the platform owns, matched against a BARE IDENTIFIER — a dropped
|
|
34
36
|
* receiver's chain base (`System` in `System.out.println(...)`) or the bare
|
|
@@ -167,6 +169,7 @@ export const javaProvider = defineLanguage({
|
|
|
167
169
|
shouldSkipDefinitionCapture: shouldSkipJavaRecordComponentDefinition,
|
|
168
170
|
variableExtractor: createVariableExtractor(javaVariableConfig),
|
|
169
171
|
classExtractor: createClassExtractor(javaClassConfig),
|
|
172
|
+
runtimeSymbolStrategy: javaRuntimeSymbolStrategy,
|
|
170
173
|
// ── Javadoc → description (issue #2270) ──
|
|
171
174
|
descriptionExtractor: createLeadingDocDescriptionExtractor(),
|
|
172
175
|
builtInNames: BUILT_INS,
|
|
@@ -187,6 +190,7 @@ export const javaProvider = defineLanguage({
|
|
|
187
190
|
// ── Route extraction ──
|
|
188
191
|
extractDecoratorRoutes: extractSpringRoutes,
|
|
189
192
|
extractRouteInheritanceTypes: extractSpringTypes,
|
|
193
|
+
synthesizeStructureMembers: synthesizeLombokAccessors,
|
|
190
194
|
// ── #2980: constant harvest + qualified-ref fold for non-literal mapping
|
|
191
195
|
// paths (`@PostMapping(ApiPaths.SAVE_V1)`) — kept behind provider hooks so
|
|
192
196
|
// the shared ingestion layers stay language-agnostic. The heuristic is
|
|
@@ -200,11 +204,17 @@ export const javaProvider = defineLanguage({
|
|
|
200
204
|
// INTERFACES on this side only, which cost the graph its Route nodes while
|
|
201
205
|
// the group still published the contract).
|
|
202
206
|
moduleConstantHeuristic: (content) => isJavaConstantFile(content) ||
|
|
203
|
-
//
|
|
204
|
-
// constant ref
|
|
205
|
-
//
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
/\bimport\s+(?:static\s+)?[\w.]+\s*;/.test(content),
|
|
207
|
+
// Class imports and static (including on-demand) imports can bind a
|
|
208
|
+
// constant ref. Ordinary `import a.b.*;` is not a Java type import and is
|
|
209
|
+
// not expanded by extractJavaModuleConstants, so it must not harvest.
|
|
210
|
+
/\bimport\s+(?:static\s+[\w.]+(?:\.\*)?|[\w.]+)\s*;/.test(content),
|
|
211
|
+
prepareRouteConstants: prepareJavaRouteConstants,
|
|
209
212
|
foldRoutePathOperands: foldJavaOperands,
|
|
213
|
+
// Async messaging facts for the `springDestinations` phase. Both stores are
|
|
214
|
+
// repopulated on the main thread by `applyJavaCaptureSideChannel`, so this
|
|
215
|
+
// answers for cache hits and misses alike.
|
|
216
|
+
getSpringMessagingFacts: (filePath) => ({
|
|
217
|
+
handlers: getJavaSpringNonHttpHandlerFacts(filePath),
|
|
218
|
+
producers: getJavaSpringMessageProducerFacts(filePath),
|
|
219
|
+
}),
|
|
210
220
|
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared planning orchestration and emission for synthetic JVM accessors.
|
|
3
|
+
*
|
|
4
|
+
* Language adapters discover accessor plans. This module owns method-collision
|
|
5
|
+
* policy, graph emission, and scope captures without naming any language.
|
|
6
|
+
*/
|
|
7
|
+
import type Parser from 'tree-sitter';
|
|
8
|
+
import type { CaptureMatch } from '../../../../_shared/index.js';
|
|
9
|
+
export type SyntheticVisibility = 'public' | 'protected' | 'private' | 'package';
|
|
10
|
+
export type MethodNameMatching = 'exact' | 'case-folded';
|
|
11
|
+
export interface ExistingMethodIndex {
|
|
12
|
+
readonly matching: MethodNameMatching;
|
|
13
|
+
readonly aritiesByName: Map<string, Set<number>>;
|
|
14
|
+
readonly arityRangesByName: Map<string, Array<{
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
}>>;
|
|
18
|
+
}
|
|
19
|
+
export declare function createExistingMethodIndex(matching: MethodNameMatching): ExistingMethodIndex;
|
|
20
|
+
export declare function rememberExistingMethod(index: ExistingMethodIndex, name: string, arity: number): void;
|
|
21
|
+
export declare function rememberExistingMethodRange(index: ExistingMethodIndex, name: string, min: number, max: number): void;
|
|
22
|
+
export declare function hasExistingMethod(index: ExistingMethodIndex, name: string, arity: number): boolean;
|
|
23
|
+
export interface SyntheticAccessorSymbol {
|
|
24
|
+
filePath: string;
|
|
25
|
+
name: string;
|
|
26
|
+
nodeId: string;
|
|
27
|
+
type: 'Method';
|
|
28
|
+
ownerId: string;
|
|
29
|
+
qualifiedName: string;
|
|
30
|
+
parameterCount: number;
|
|
31
|
+
requiredParameterCount: number;
|
|
32
|
+
parameterTypes: string[];
|
|
33
|
+
returnType: string;
|
|
34
|
+
visibility: SyntheticVisibility;
|
|
35
|
+
isStatic: boolean;
|
|
36
|
+
isAbstract: boolean;
|
|
37
|
+
isFinal: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface SyntheticAccessorNode {
|
|
40
|
+
id: string;
|
|
41
|
+
label: 'Method';
|
|
42
|
+
properties: {
|
|
43
|
+
name: string;
|
|
44
|
+
filePath: string;
|
|
45
|
+
startLine: number;
|
|
46
|
+
endLine: number;
|
|
47
|
+
language: string;
|
|
48
|
+
isExported: boolean;
|
|
49
|
+
synthetic: string;
|
|
50
|
+
visibility: SyntheticVisibility;
|
|
51
|
+
isStatic: boolean;
|
|
52
|
+
returnType: string;
|
|
53
|
+
parameterTypes: string[];
|
|
54
|
+
parameterCount: number;
|
|
55
|
+
qualifiedName: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface SyntheticAccessorRelationship {
|
|
59
|
+
id: string;
|
|
60
|
+
sourceId: string;
|
|
61
|
+
targetId: string;
|
|
62
|
+
type: 'HAS_METHOD';
|
|
63
|
+
confidence: number;
|
|
64
|
+
reason: string;
|
|
65
|
+
}
|
|
66
|
+
export interface SyntheticAccessorResult {
|
|
67
|
+
symbols: SyntheticAccessorSymbol[];
|
|
68
|
+
nodes: SyntheticAccessorNode[];
|
|
69
|
+
relationships: SyntheticAccessorRelationship[];
|
|
70
|
+
}
|
|
71
|
+
export interface PlannedJvmAccessor {
|
|
72
|
+
kind: 'getter' | 'setter';
|
|
73
|
+
name: string;
|
|
74
|
+
returnType: string;
|
|
75
|
+
parameterTypes: string[];
|
|
76
|
+
visibility: SyntheticVisibility;
|
|
77
|
+
isStatic: boolean;
|
|
78
|
+
isAbstract: boolean;
|
|
79
|
+
startLine: number;
|
|
80
|
+
endLine: number;
|
|
81
|
+
declaratorNode: Parser.SyntaxNode;
|
|
82
|
+
}
|
|
83
|
+
export interface PlannedJvmAccessorOwner {
|
|
84
|
+
node: Parser.SyntaxNode;
|
|
85
|
+
name: string;
|
|
86
|
+
accessors: readonly PlannedJvmAccessor[];
|
|
87
|
+
}
|
|
88
|
+
interface JvmAccessorSynthesisConfig {
|
|
89
|
+
language: string;
|
|
90
|
+
synthetic: string;
|
|
91
|
+
planOwners(rootNode: Parser.SyntaxNode): readonly PlannedJvmAccessorOwner[];
|
|
92
|
+
}
|
|
93
|
+
export interface JvmAccessorSynthesis {
|
|
94
|
+
synthesize(tree: Parser.Tree, filePath: string, classOwnersById: ReadonlyMap<number, string>): SyntheticAccessorResult;
|
|
95
|
+
captures(rootNode: Parser.SyntaxNode): CaptureMatch[];
|
|
96
|
+
}
|
|
97
|
+
export declare function createJvmAccessorSynthesis(config: JvmAccessorSynthesisConfig): JvmAccessorSynthesis;
|
|
98
|
+
export declare function jvmTypeSimpleName(node: Parser.SyntaxNode): string | undefined;
|
|
99
|
+
export {};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { toZeroBasedLine } from '../../utils/line-base.js';
|
|
2
|
+
export function createExistingMethodIndex(matching) {
|
|
3
|
+
return { matching, aritiesByName: new Map(), arityRangesByName: new Map() };
|
|
4
|
+
}
|
|
5
|
+
function methodKey(index, name) {
|
|
6
|
+
return index.matching === 'case-folded' ? name.toLowerCase() : name;
|
|
7
|
+
}
|
|
8
|
+
export function rememberExistingMethod(index, name, arity) {
|
|
9
|
+
const key = methodKey(index, name);
|
|
10
|
+
let arities = index.aritiesByName.get(key);
|
|
11
|
+
if (!arities) {
|
|
12
|
+
arities = new Set();
|
|
13
|
+
index.aritiesByName.set(key, arities);
|
|
14
|
+
}
|
|
15
|
+
arities.add(arity);
|
|
16
|
+
}
|
|
17
|
+
export function rememberExistingMethodRange(index, name, min, max) {
|
|
18
|
+
if (min === max) {
|
|
19
|
+
rememberExistingMethod(index, name, min);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const key = methodKey(index, name);
|
|
23
|
+
const ranges = index.arityRangesByName.get(key) ?? [];
|
|
24
|
+
ranges.push({ min, max });
|
|
25
|
+
index.arityRangesByName.set(key, ranges);
|
|
26
|
+
}
|
|
27
|
+
export function hasExistingMethod(index, name, arity) {
|
|
28
|
+
const key = methodKey(index, name);
|
|
29
|
+
if (index.aritiesByName.get(key)?.has(arity) === true)
|
|
30
|
+
return true;
|
|
31
|
+
return (index.arityRangesByName.get(key)?.some((range) => range.min <= arity && arity <= range.max) ===
|
|
32
|
+
true);
|
|
33
|
+
}
|
|
34
|
+
export function createJvmAccessorSynthesis(config) {
|
|
35
|
+
return {
|
|
36
|
+
synthesize(tree, filePath, classOwnersById) {
|
|
37
|
+
const result = emptySyntheticAccessorResult();
|
|
38
|
+
for (const owner of config.planOwners(tree.rootNode)) {
|
|
39
|
+
const ownerId = classOwnersById.get(owner.node.id);
|
|
40
|
+
if (!ownerId)
|
|
41
|
+
continue;
|
|
42
|
+
emitPlannedAccessors({
|
|
43
|
+
planned: owner.accessors,
|
|
44
|
+
filePath,
|
|
45
|
+
ownerId,
|
|
46
|
+
idPrefix: ownerIdNamePrefix(ownerId, filePath, owner.name),
|
|
47
|
+
language: config.language,
|
|
48
|
+
synthetic: config.synthetic,
|
|
49
|
+
result,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return result;
|
|
53
|
+
},
|
|
54
|
+
captures(rootNode) {
|
|
55
|
+
return capturesForPlannedAccessors(config.planOwners(rootNode));
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function emptySyntheticAccessorResult() {
|
|
60
|
+
return { symbols: [], nodes: [], relationships: [] };
|
|
61
|
+
}
|
|
62
|
+
function ownerIdNamePrefix(ownerId, filePath, fallback) {
|
|
63
|
+
const needle = `Class:${filePath}:`;
|
|
64
|
+
if (ownerId.startsWith(needle))
|
|
65
|
+
return ownerId.slice(needle.length);
|
|
66
|
+
const enumNeedle = `Enum:${filePath}:`;
|
|
67
|
+
if (ownerId.startsWith(enumNeedle))
|
|
68
|
+
return ownerId.slice(enumNeedle.length);
|
|
69
|
+
const ifaceNeedle = `Interface:${filePath}:`;
|
|
70
|
+
if (ownerId.startsWith(ifaceNeedle))
|
|
71
|
+
return ownerId.slice(ifaceNeedle.length);
|
|
72
|
+
return fallback;
|
|
73
|
+
}
|
|
74
|
+
export function jvmTypeSimpleName(node) {
|
|
75
|
+
const named = node.childForFieldName('name')?.text;
|
|
76
|
+
if (named)
|
|
77
|
+
return named;
|
|
78
|
+
for (const child of node.namedChildren) {
|
|
79
|
+
if (child.type === 'type_identifier' || child.type === 'simple_identifier')
|
|
80
|
+
return child.text;
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
function emitPlannedAccessors(args) {
|
|
85
|
+
const emittedIds = new Set();
|
|
86
|
+
for (const acc of args.planned) {
|
|
87
|
+
const arity = acc.parameterTypes.length;
|
|
88
|
+
const qualifiedName = `${args.idPrefix}.${acc.name}`;
|
|
89
|
+
const nodeId = `Method:${args.filePath}:${qualifiedName}#${arity}`;
|
|
90
|
+
if (emittedIds.has(nodeId))
|
|
91
|
+
continue;
|
|
92
|
+
emittedIds.add(nodeId);
|
|
93
|
+
args.result.nodes.push({
|
|
94
|
+
id: nodeId,
|
|
95
|
+
label: 'Method',
|
|
96
|
+
properties: {
|
|
97
|
+
name: acc.name,
|
|
98
|
+
filePath: args.filePath,
|
|
99
|
+
startLine: toZeroBasedLine(acc.startLine),
|
|
100
|
+
endLine: toZeroBasedLine(acc.endLine),
|
|
101
|
+
language: args.language,
|
|
102
|
+
isExported: false,
|
|
103
|
+
synthetic: args.synthetic,
|
|
104
|
+
visibility: acc.visibility,
|
|
105
|
+
isStatic: acc.isStatic,
|
|
106
|
+
returnType: acc.returnType,
|
|
107
|
+
parameterTypes: acc.parameterTypes,
|
|
108
|
+
parameterCount: arity,
|
|
109
|
+
qualifiedName,
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
args.result.symbols.push({
|
|
113
|
+
filePath: args.filePath,
|
|
114
|
+
name: acc.name,
|
|
115
|
+
nodeId,
|
|
116
|
+
type: 'Method',
|
|
117
|
+
ownerId: args.ownerId,
|
|
118
|
+
qualifiedName,
|
|
119
|
+
parameterCount: arity,
|
|
120
|
+
requiredParameterCount: arity,
|
|
121
|
+
parameterTypes: acc.parameterTypes,
|
|
122
|
+
returnType: acc.returnType,
|
|
123
|
+
visibility: acc.visibility,
|
|
124
|
+
isStatic: acc.isStatic,
|
|
125
|
+
isAbstract: acc.isAbstract,
|
|
126
|
+
isFinal: false,
|
|
127
|
+
});
|
|
128
|
+
args.result.relationships.push({
|
|
129
|
+
id: `HAS_METHOD:${args.ownerId}->${nodeId}`,
|
|
130
|
+
sourceId: args.ownerId,
|
|
131
|
+
targetId: nodeId,
|
|
132
|
+
type: 'HAS_METHOD',
|
|
133
|
+
confidence: 1.0,
|
|
134
|
+
reason: acc.kind === 'getter' ? `${args.synthetic}-getter` : `${args.synthetic}-setter`,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function accessorCapture(name, acc, text) {
|
|
139
|
+
const node = acc.declaratorNode;
|
|
140
|
+
const startLine = node.startPosition.row + 1;
|
|
141
|
+
const startCol = node.startPosition.column;
|
|
142
|
+
const endLine = node.endPosition.row + 1;
|
|
143
|
+
const endCol = acc.kind === 'getter' ? node.endPosition.column : startCol;
|
|
144
|
+
return { name, range: { startLine, startCol, endLine, endCol }, text };
|
|
145
|
+
}
|
|
146
|
+
function capturesForPlannedAccessors(owners) {
|
|
147
|
+
const captures = [];
|
|
148
|
+
for (const owner of owners) {
|
|
149
|
+
const enclosing = owner.name;
|
|
150
|
+
const emitted = new Set();
|
|
151
|
+
for (const acc of owner.accessors) {
|
|
152
|
+
const arity = String(acc.parameterTypes.length);
|
|
153
|
+
const qualifiedName = `${enclosing}.${acc.name}`;
|
|
154
|
+
const identity = `${qualifiedName}#${arity}`;
|
|
155
|
+
if (emitted.has(identity))
|
|
156
|
+
continue;
|
|
157
|
+
emitted.add(identity);
|
|
158
|
+
captures.push({
|
|
159
|
+
'@scope.function': accessorCapture('@scope.function', acc, acc.name),
|
|
160
|
+
});
|
|
161
|
+
captures.push({
|
|
162
|
+
'@declaration.method': accessorCapture('@declaration.method', acc, acc.name),
|
|
163
|
+
'@declaration.name': accessorCapture('@declaration.name', acc, acc.name),
|
|
164
|
+
'@declaration.qualified_name': accessorCapture('@declaration.qualified_name', acc, qualifiedName),
|
|
165
|
+
'@declaration.parameter-count': accessorCapture('@declaration.parameter-count', acc, arity),
|
|
166
|
+
'@declaration.required-parameter-count': accessorCapture('@declaration.required-parameter-count', acc, arity),
|
|
167
|
+
'@declaration.return-type': accessorCapture('@declaration.return-type', acc, acc.returnType),
|
|
168
|
+
'@declaration.is-synthetic': accessorCapture('@declaration.is-synthetic', acc, 'true'),
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return captures;
|
|
173
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language-neutral JVM JavaBeans naming primitives.
|
|
3
|
+
*
|
|
4
|
+
* Language adapters choose whether to invent/preserve an `is` prefix and
|
|
5
|
+
* which single-character capitalization policy their compiler uses.
|
|
6
|
+
*/
|
|
7
|
+
export declare function capitalizeBeanName(s: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Primitive-boolean / Kotlin `is`-prefix fields whose name already starts with
|
|
10
|
+
* `is` plus a non-lowercase character keep that name for the getter and drop
|
|
11
|
+
* the `is` prefix for the setter base (`isEnabled` → `isEnabled()` /
|
|
12
|
+
* `setEnabled(...)`, `is1` → `is1()` / `set1(...)`). Digits and punctuation
|
|
13
|
+
* count as non-lowercase, matching Lombok `!Character.isLowerCase` and kotlinc.
|
|
14
|
+
*/
|
|
15
|
+
export declare function booleanIsPrefixBase(fieldName: string, useIsPrefix: boolean): string | null;
|
|
16
|
+
export declare function jvmGetterName(fieldName: string, useIsPrefix: boolean, capitalize?: (name: string) => string): string;
|
|
17
|
+
export declare function jvmSetterName(fieldName: string, useIsPrefix: boolean, capitalize?: (name: string) => string): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language-neutral JVM JavaBeans naming primitives.
|
|
3
|
+
*
|
|
4
|
+
* Language adapters choose whether to invent/preserve an `is` prefix and
|
|
5
|
+
* which single-character capitalization policy their compiler uses.
|
|
6
|
+
*/
|
|
7
|
+
export function capitalizeBeanName(s) {
|
|
8
|
+
if (s.length === 0)
|
|
9
|
+
return s;
|
|
10
|
+
const first = s.charAt(0);
|
|
11
|
+
const upper = first.toUpperCase();
|
|
12
|
+
// Java Character case conversion is one UTF-16 code unit. JavaScript
|
|
13
|
+
// full-case conversion may expand one unit (`ß` → `SS`), which would invent
|
|
14
|
+
// a method name no JVM compiler emits.
|
|
15
|
+
return (upper.length === 1 ? upper : first) + s.slice(1);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Primitive-boolean / Kotlin `is`-prefix fields whose name already starts with
|
|
19
|
+
* `is` plus a non-lowercase character keep that name for the getter and drop
|
|
20
|
+
* the `is` prefix for the setter base (`isEnabled` → `isEnabled()` /
|
|
21
|
+
* `setEnabled(...)`, `is1` → `is1()` / `set1(...)`). Digits and punctuation
|
|
22
|
+
* count as non-lowercase, matching Lombok `!Character.isLowerCase` and kotlinc.
|
|
23
|
+
*/
|
|
24
|
+
export function booleanIsPrefixBase(fieldName, useIsPrefix) {
|
|
25
|
+
if (!useIsPrefix || !fieldName.startsWith('is') || fieldName.length < 3)
|
|
26
|
+
return null;
|
|
27
|
+
const third = fieldName.charAt(2);
|
|
28
|
+
return third === third.toUpperCase() ? fieldName.slice(2) : null;
|
|
29
|
+
}
|
|
30
|
+
export function jvmGetterName(fieldName, useIsPrefix, capitalize = capitalizeBeanName) {
|
|
31
|
+
if (booleanIsPrefixBase(fieldName, useIsPrefix) !== null)
|
|
32
|
+
return fieldName;
|
|
33
|
+
if (useIsPrefix)
|
|
34
|
+
return `is${capitalize(fieldName)}`;
|
|
35
|
+
return `get${capitalize(fieldName)}`;
|
|
36
|
+
}
|
|
37
|
+
export function jvmSetterName(fieldName, useIsPrefix, capitalize = capitalizeBeanName) {
|
|
38
|
+
const stripped = booleanIsPrefixBase(fieldName, useIsPrefix);
|
|
39
|
+
if (stripped !== null)
|
|
40
|
+
return `set${stripped}`;
|
|
41
|
+
return `set${capitalize(fieldName)}`;
|
|
42
|
+
}
|
|
@@ -39,10 +39,13 @@
|
|
|
39
39
|
import type { ParsedFile, ScopeId } from '../../../../_shared/index.js';
|
|
40
40
|
import { type ClassAnnotationFact } from '../../frameworks/spring/bean-candidates.js';
|
|
41
41
|
import { type JvmPackageFact } from '../jvm/package-facts.js';
|
|
42
|
+
import type { SpringDynamicLookupFact } from '../../frameworks/spring/dynamic-lookups.js';
|
|
43
|
+
import type { SpringMessageProducerFact } from '../../frameworks/spring/message-producers.js';
|
|
42
44
|
import type { KotlinSpringAopFact } from './spring-aop.js';
|
|
43
45
|
import type { KotlinSpringConditionalFact } from './spring-conditionals.js';
|
|
44
46
|
import type { KotlinSpringDiClassFact } from './spring-di.js';
|
|
45
47
|
import type { KotlinSpringNonHttpHandlerFact } from './spring-non-http-handlers.js';
|
|
48
|
+
import type { KotlinSpringConfigConsumerFact } from './spring-config-bindings.js';
|
|
46
49
|
/**
|
|
47
50
|
* Plain JSON-serializable snapshot of the per-file Kotlin capture-time
|
|
48
51
|
* side-channel. Carried opaquely on `ParsedFile.captureSideChannel`. The
|
|
@@ -63,8 +66,14 @@ export interface KotlinCaptureSideChannel {
|
|
|
63
66
|
readonly springConditionalFacts?: readonly KotlinSpringConditionalFact[];
|
|
64
67
|
/** Constructor, property, and method injection syntax captured per class. */
|
|
65
68
|
readonly springDiFacts?: readonly KotlinSpringDiClassFact[];
|
|
69
|
+
/** Programmatic Spring bean lookups captured per callable. */
|
|
70
|
+
readonly springDynamicLookupFacts?: readonly SpringDynamicLookupFact[];
|
|
66
71
|
/** Scheduled, event, messaging, and managed-job handler syntax captured per callable. */
|
|
67
72
|
readonly springNonHttpHandlerFacts?: readonly KotlinSpringNonHttpHandlerFact[];
|
|
73
|
+
/** `@Value` / `@ConfigurationProperties` syntax captured per owner. */
|
|
74
|
+
readonly springConfigConsumerFacts?: readonly KotlinSpringConfigConsumerFact[];
|
|
75
|
+
/** Messaging-template publish syntax captured per callable. */
|
|
76
|
+
readonly springMessageProducerFacts?: readonly SpringMessageProducerFact[];
|
|
68
77
|
}
|
|
69
78
|
export declare function clearKotlinClassAnnotationFacts(): void;
|
|
70
79
|
export declare function setKotlinSpringAopFacts(filePath: string, facts: readonly KotlinSpringAopFact[]): void;
|
|
@@ -75,8 +84,14 @@ export declare function setKotlinSpringConditionalFacts(filePath: string, facts:
|
|
|
75
84
|
export declare function getKotlinSpringConditionalFacts(filePath: string): readonly KotlinSpringConditionalFact[];
|
|
76
85
|
export declare function setKotlinSpringDiFacts(filePath: string, facts: readonly KotlinSpringDiClassFact[]): void;
|
|
77
86
|
export declare function getKotlinSpringDiFacts(filePath: string): readonly KotlinSpringDiClassFact[];
|
|
87
|
+
export declare function setKotlinSpringDynamicLookupFacts(filePath: string, facts: readonly SpringDynamicLookupFact[]): void;
|
|
88
|
+
export declare function getKotlinSpringDynamicLookupFacts(filePath: string): readonly SpringDynamicLookupFact[];
|
|
78
89
|
export declare function setKotlinSpringNonHttpHandlerFacts(filePath: string, facts: readonly KotlinSpringNonHttpHandlerFact[]): void;
|
|
79
90
|
export declare function getKotlinSpringNonHttpHandlerFacts(filePath: string): readonly KotlinSpringNonHttpHandlerFact[];
|
|
91
|
+
export declare function setKotlinSpringConfigConsumerFacts(filePath: string, facts: readonly KotlinSpringConfigConsumerFact[]): void;
|
|
92
|
+
export declare function getKotlinSpringConfigConsumerFacts(filePath: string): readonly KotlinSpringConfigConsumerFact[];
|
|
93
|
+
export declare function setKotlinSpringMessageProducerFacts(filePath: string, facts: readonly SpringMessageProducerFact[]): void;
|
|
94
|
+
export declare function getKotlinSpringMessageProducerFacts(filePath: string): readonly SpringMessageProducerFact[];
|
|
80
95
|
/**
|
|
81
96
|
* `LanguageProvider.collectCaptureSideChannel` implementation for Kotlin.
|
|
82
97
|
* Returns `undefined` when this file recorded no side-channel state at all, so
|