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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { parentPort, threadId, workerData } from 'node:worker_threads';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
2
3
|
import { boundCallableStartPosition, localIdentity, nestedCallableQualifiedName, positionQualifiedCallableName, } from './callable-id.js';
|
|
3
4
|
import Parser from 'tree-sitter';
|
|
4
5
|
import JavaScript from 'tree-sitter-javascript';
|
|
@@ -58,6 +59,13 @@ try {
|
|
|
58
59
|
C = requireVendoredGrammar('tree-sitter-c');
|
|
59
60
|
}
|
|
60
61
|
catch { }
|
|
62
|
+
// @tree-sitter-grammars/tree-sitter-zig is an optionalDependency — may not be installed
|
|
63
|
+
const _require = createRequire(import.meta.url);
|
|
64
|
+
let Zig = null;
|
|
65
|
+
try {
|
|
66
|
+
Zig = _require('@tree-sitter-grammars/tree-sitter-zig');
|
|
67
|
+
}
|
|
68
|
+
catch { }
|
|
61
69
|
import { getLanguageFromFilename } from '../../../_shared/index.js';
|
|
62
70
|
import { buildDefinitionPreScan, FUNCTION_NODE_TYPES, findAncestorBeforeBoundary, findSplitBodyCallableAncestor, SPLIT_SIGNATURE_NODE_TYPES, getDefinitionNodeFromCaptures, findEnclosingClassInfo, findObjectLiteralBindingInfo, isArrayContainedObjectLiteralMember, findReturnShapeOwnerInfo, isReturnShapeProperty, findMemberAssignmentOwnerInfo, isCjsDefaultExportAssignment, getLabelFromCaptures, genericFuncName, inferFunctionLabel, isSuppressedConcreteTypedefDuplicate, isValueDefinitionLabel, isQualifiableScopeLabel, MEMBER_OWNER_NODE_TYPES, qualifyByEnclosingModScope, qualifyRustImplTargetByModScope, CLASS_CONTAINER_TYPES, PARAMETER_LIST_NODE_TYPES, LOCAL_SCOPE_BODY_NODE_TYPES, } from '../utils/ast-helpers.js';
|
|
63
71
|
import { isPositionQualifiedLocalLabel } from '../utils/callable-labels.js';
|
|
@@ -144,6 +152,7 @@ const languageMap = {
|
|
|
144
152
|
[SupportedLanguages.Vue]: TypeScript.typescript,
|
|
145
153
|
...(Dart ? { [SupportedLanguages.Dart]: Dart } : {}),
|
|
146
154
|
...(Swift ? { [SupportedLanguages.Swift]: Swift } : {}),
|
|
155
|
+
...(Zig ? { [SupportedLanguages.Zig]: Zig } : {}),
|
|
147
156
|
};
|
|
148
157
|
/**
|
|
149
158
|
* Check if a language grammar is available in this worker.
|
|
@@ -204,6 +213,25 @@ function findEnclosingClassNode(node) {
|
|
|
204
213
|
}
|
|
205
214
|
return null;
|
|
206
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* `findEnclosingClassNode`, extended with the provider's file-level owner:
|
|
218
|
+
* when no container encloses `node` but the language says the FILE itself is
|
|
219
|
+
* a type (`resolveFileTypeOwner`, e.g. a Zig file-struct), the tree root is
|
|
220
|
+
* the owner node the method/field extractors should read members from. Same
|
|
221
|
+
* root, same name as `findEnclosingClassInfo`'s root branch, so member ids and
|
|
222
|
+
* owner ids agree.
|
|
223
|
+
*/
|
|
224
|
+
function findEnclosingClassNodeOrFileOwner(node, provider, filePath) {
|
|
225
|
+
const container = findEnclosingClassNode(node);
|
|
226
|
+
if (container !== null)
|
|
227
|
+
return container;
|
|
228
|
+
if (provider.resolveFileTypeOwner === undefined)
|
|
229
|
+
return null;
|
|
230
|
+
let root = node;
|
|
231
|
+
while (root.parent)
|
|
232
|
+
root = root.parent;
|
|
233
|
+
return provider.resolveFileTypeOwner(root, filePath) !== null ? root : null;
|
|
234
|
+
}
|
|
207
235
|
/**
|
|
208
236
|
* For C++ out-of-class method definitions (e.g. `void Foo::bar() {}`), extract the
|
|
209
237
|
* class name from the qualified_identifier scope and find the class declaration in the
|
|
@@ -477,7 +505,7 @@ const callableOwnQualifiedName = (fnNode, filePath, provider) => {
|
|
|
477
505
|
}
|
|
478
506
|
const prefix = enclosingCallablePrefix(fnNode, filePath, provider);
|
|
479
507
|
const classInfo = prefix === undefined
|
|
480
|
-
? cachedFindEnclosingClassInfo(fnNode, filePath, provider.resolveEnclosingOwner)
|
|
508
|
+
? cachedFindEnclosingClassInfo(fnNode, filePath, provider.resolveEnclosingOwner, undefined, provider.resolveFileTypeOwner, provider.resolveContainerTypeOwner)
|
|
481
509
|
: null;
|
|
482
510
|
const objectOwner = prefix === undefined && classInfo === null && shouldObjectOwnerQualifyCallable(finalLabel)
|
|
483
511
|
? findObjectLiteralBindingInfo(fnNode, filePath, { includeOwnerName: true })?.ownerName
|
|
@@ -523,7 +551,7 @@ const findEnclosingFunctionId = (node, filePath, provider) => {
|
|
|
523
551
|
finalLabel = override;
|
|
524
552
|
}
|
|
525
553
|
// Qualify with enclosing class to match definition-phase node IDs
|
|
526
|
-
const classInfo = cachedFindEnclosingClassInfo(current, filePath, provider.resolveEnclosingOwner);
|
|
554
|
+
const classInfo = cachedFindEnclosingClassInfo(current, filePath, provider.resolveEnclosingOwner, undefined, provider.resolveFileTypeOwner, provider.resolveContainerTypeOwner);
|
|
527
555
|
const encLang = getLanguageFromFilename(filePath);
|
|
528
556
|
const standaloneMethodInfo = (finalLabel === 'Method' || finalLabel === 'Constructor') &&
|
|
529
557
|
encLang === SupportedLanguages.Go &&
|
|
@@ -573,7 +601,11 @@ const findEnclosingFunctionId = (node, filePath, provider) => {
|
|
|
573
601
|
: standaloneMethodInfo.parameters.length;
|
|
574
602
|
}
|
|
575
603
|
else {
|
|
576
|
-
|
|
604
|
+
// Same owner lookup as the definition-phase Method id builder: a Zig
|
|
605
|
+
// file-struct's top-level fn is owned by the file root, and its
|
|
606
|
+
// id carries the `#<arity>` suffix only if that owner is found.
|
|
607
|
+
const classNode = findEnclosingClassNodeOrFileOwner(current, provider, filePath) ??
|
|
608
|
+
findClassNodeByQualifiedName(current);
|
|
577
609
|
if (classNode && encLang) {
|
|
578
610
|
const methodMap = getMethodInfo(classNode, provider, {
|
|
579
611
|
filePath,
|
|
@@ -613,7 +645,7 @@ const findEnclosingFunctionId = (node, filePath, provider) => {
|
|
|
613
645
|
finalLabel = override;
|
|
614
646
|
}
|
|
615
647
|
// Qualify custom result with enclosing class
|
|
616
|
-
const classInfo = cachedFindEnclosingClassInfo(current.previousSibling ?? current, filePath, provider.resolveEnclosingOwner);
|
|
648
|
+
const classInfo = cachedFindEnclosingClassInfo(current.previousSibling ?? current, filePath, provider.resolveEnclosingOwner, undefined, provider.resolveFileTypeOwner, provider.resolveContainerTypeOwner);
|
|
617
649
|
// Same nesting rule as the generic branch above (#2699). Anchored on
|
|
618
650
|
// `sigNode`-equivalent (`current.previousSibling ?? current`) so Dart,
|
|
619
651
|
// whose body is a SIBLING of the signature, walks from the same node
|
|
@@ -663,11 +695,11 @@ const findEnclosingFunctionId = (node, filePath, provider) => {
|
|
|
663
695
|
return null;
|
|
664
696
|
};
|
|
665
697
|
/** Cached wrapper for findEnclosingClassInfo — avoids repeated parent walks. */
|
|
666
|
-
const cachedFindEnclosingClassInfo = (node, filePath, resolveEnclosingOwner, getQualifiedOwnerName) => {
|
|
698
|
+
const cachedFindEnclosingClassInfo = (node, filePath, resolveEnclosingOwner, getQualifiedOwnerName, resolveFileTypeOwner, resolveContainerTypeOwner) => {
|
|
667
699
|
const cached = classIdCache.get(node);
|
|
668
700
|
if (cached !== undefined)
|
|
669
701
|
return cached;
|
|
670
|
-
const result = findEnclosingClassInfo(node, filePath, resolveEnclosingOwner, getQualifiedOwnerName);
|
|
702
|
+
const result = findEnclosingClassInfo(node, filePath, resolveEnclosingOwner, getQualifiedOwnerName, resolveFileTypeOwner, resolveContainerTypeOwner);
|
|
671
703
|
classIdCache.set(node, result);
|
|
672
704
|
return result;
|
|
673
705
|
};
|
|
@@ -946,6 +978,7 @@ export function extractORMQueries(filePath, content, out) {
|
|
|
946
978
|
// import the function and its types directly from `route-extractors/`.
|
|
947
979
|
import { extractFastAPIRouterBindings } from '../route-extractors/fastapi-router-bindings.js';
|
|
948
980
|
import { parseConstOperands, } from '../route-extractors/python-const-resolver.js';
|
|
981
|
+
import { unfoldableDeclarationsOf } from '../route-extractors/constant-resolver.js';
|
|
949
982
|
/**
|
|
950
983
|
* Report a non-fatal worker issue to the pool over IPC so a caught error is not
|
|
951
984
|
* invisible to the operator (#2264). The pool logs it on the main thread AND
|
|
@@ -1025,6 +1058,10 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
1025
1058
|
continue;
|
|
1026
1059
|
}
|
|
1027
1060
|
const provider = getProvider(language);
|
|
1061
|
+
// Owner map for provider.synthesizeStructureMembers: type-declaration AST
|
|
1062
|
+
// node id → graph node id for classes THIS file's capture loop materialized.
|
|
1063
|
+
// Keyed by in-memory AST identity (never persisted); filled below.
|
|
1064
|
+
const classOwnersByNodeId = new Map();
|
|
1028
1065
|
// #2687: ONE pass over `matches` yields both suppression sets — the
|
|
1029
1066
|
// definition-name claims by rank (callable > Property > value), so the dedup
|
|
1030
1067
|
// below cannot depend on tree-sitter's match order, and the concrete-typedef
|
|
@@ -1210,12 +1247,14 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
1210
1247
|
const httpMethod = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'].includes(method)
|
|
1211
1248
|
? method
|
|
1212
1249
|
: 'GET';
|
|
1250
|
+
const handlerName = provider.decoratorRouteHandlerName?.(decoratorNode);
|
|
1213
1251
|
const base = {
|
|
1214
1252
|
filePath: file.path,
|
|
1215
1253
|
httpMethod,
|
|
1216
1254
|
decoratorName,
|
|
1217
1255
|
lineNumber: decoratorNode.startPosition.row + lineOffset,
|
|
1218
1256
|
...(decoratorReceiver ? { decoratorReceiver } : {}),
|
|
1257
|
+
...(handlerName ? { handlerName } : {}),
|
|
1219
1258
|
};
|
|
1220
1259
|
if (decoratorArgStr) {
|
|
1221
1260
|
// String-literal path (the fast path, unchanged). Empty-string
|
|
@@ -1409,7 +1448,7 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
1409
1448
|
const propGetQualifiedOwnerName = provider.classExtractor?.qualifiedNodeId === true
|
|
1410
1449
|
? (node, simpleName) => provider.classExtractor.extractQualifiedName(node, simpleName)
|
|
1411
1450
|
: undefined;
|
|
1412
|
-
const propEnclosingInfo = cachedFindEnclosingClassInfo(captureMap['call'], file.path, provider.resolveEnclosingOwner, propGetQualifiedOwnerName);
|
|
1451
|
+
const propEnclosingInfo = cachedFindEnclosingClassInfo(captureMap['call'], file.path, provider.resolveEnclosingOwner, propGetQualifiedOwnerName, provider.resolveFileTypeOwner, provider.resolveContainerTypeOwner);
|
|
1413
1452
|
const propEnclosingClassId = propEnclosingInfo?.qualifiedClassId ?? propEnclosingInfo?.classId ?? null;
|
|
1414
1453
|
// Enrich routed properties with FieldExtractor metadata
|
|
1415
1454
|
let routedFieldMap;
|
|
@@ -1568,6 +1607,7 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
1568
1607
|
? provider.classExtractor.extract(definitionNode, {
|
|
1569
1608
|
name: nameNode?.text,
|
|
1570
1609
|
type: defaultNodeLabel,
|
|
1610
|
+
filePath: file.path,
|
|
1571
1611
|
})
|
|
1572
1612
|
: null;
|
|
1573
1613
|
const nodeLabel = extractedClassSymbol?.type ?? defaultNodeLabel;
|
|
@@ -1575,7 +1615,8 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
1575
1615
|
nodeLabel === 'Struct' ||
|
|
1576
1616
|
nodeLabel === 'Interface' ||
|
|
1577
1617
|
nodeLabel === 'Enum' ||
|
|
1578
|
-
nodeLabel === 'Record'
|
|
1618
|
+
nodeLabel === 'Record' ||
|
|
1619
|
+
nodeLabel === 'Union';
|
|
1579
1620
|
if (isClassLikeLabel &&
|
|
1580
1621
|
provider.classExtractor?.shouldSkipClassCapture?.({
|
|
1581
1622
|
captureMap,
|
|
@@ -1755,7 +1796,7 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
1755
1796
|
findAncestorBeforeBoundary(propOwnerNode, LOCAL_SCOPE_BODY_NODE_TYPES, CLASS_CONTAINER_TYPES) !== null &&
|
|
1756
1797
|
findAncestorBeforeBoundary(propOwnerNode, PARAMETER_LIST_NODE_TYPES, LOCAL_SCOPE_BODY_NODE_TYPES) === null;
|
|
1757
1798
|
const enclosingClassInfo = needsOwner && !isFunctionLocalProperty
|
|
1758
|
-
? cachedFindEnclosingClassInfo(nameNode || definitionNode, file.path, provider.resolveEnclosingOwner, getQualifiedOwnerName)
|
|
1799
|
+
? cachedFindEnclosingClassInfo(nameNode || definitionNode, file.path, provider.resolveEnclosingOwner, getQualifiedOwnerName, provider.resolveFileTypeOwner, provider.resolveContainerTypeOwner)
|
|
1759
1800
|
: null;
|
|
1760
1801
|
const enclosingClassId = enclosingClassInfo?.qualifiedClassId ?? enclosingClassInfo?.classId ?? null;
|
|
1761
1802
|
// A Method with no enclosing class container is owned by a NAMED binding
|
|
@@ -1946,7 +1987,8 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
1946
1987
|
// returnType, isAbstract/isFinal/annotations, visibility, and more.
|
|
1947
1988
|
let enrichedByMethodExtractor = false;
|
|
1948
1989
|
if (provider.methodExtractor && definitionNode) {
|
|
1949
|
-
const classNode =
|
|
1990
|
+
const classNode = findEnclosingClassNodeOrFileOwner(definitionNode, provider, file.path) ??
|
|
1991
|
+
findClassNodeByQualifiedName(definitionNode);
|
|
1950
1992
|
if (classNode) {
|
|
1951
1993
|
const methodMap = getMethodInfo(classNode, provider, {
|
|
1952
1994
|
filePath: file.path,
|
|
@@ -2109,7 +2151,7 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
2109
2151
|
if (nodeLabel === 'Property' && definitionNode) {
|
|
2110
2152
|
// FieldExtractor is the single source of truth when available
|
|
2111
2153
|
if (provider.fieldExtractor && typeEnv) {
|
|
2112
|
-
const classNode =
|
|
2154
|
+
const classNode = findEnclosingClassNodeOrFileOwner(definitionNode, provider, file.path);
|
|
2113
2155
|
if (classNode) {
|
|
2114
2156
|
const fieldMap = getFieldInfo(classNode, provider, {
|
|
2115
2157
|
typeEnv,
|
|
@@ -2169,6 +2211,7 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
2169
2211
|
const definitionProperties = runDefinitionPropertiesExtractor(provider.definitionPropertiesExtractor, {
|
|
2170
2212
|
nodeLabel,
|
|
2171
2213
|
nodeName,
|
|
2214
|
+
filePath: file.path,
|
|
2172
2215
|
definitionNode,
|
|
2173
2216
|
parsedImports: parsedFile?.parsedImports ?? [],
|
|
2174
2217
|
isExported,
|
|
@@ -2248,6 +2291,14 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
2248
2291
|
? { annotations: methodProps.annotations }
|
|
2249
2292
|
: {}),
|
|
2250
2293
|
});
|
|
2294
|
+
// Class-like definitions register their AST node id → graph node id for
|
|
2295
|
+
// provider.synthesizeStructureMembers. The definition node is the same
|
|
2296
|
+
// type-declaration AST node that the provider-specific planner receives.
|
|
2297
|
+
if (isClassLikeLabel &&
|
|
2298
|
+
definitionNode &&
|
|
2299
|
+
provider.classExtractor?.isTypeDeclaration(definitionNode)) {
|
|
2300
|
+
classOwnersByNodeId.set(definitionNode.id, nodeId);
|
|
2301
|
+
}
|
|
2251
2302
|
// Object-literal callables remain file definitions as well as members of
|
|
2252
2303
|
// their exported binding. Class members still use HAS_METHOD alone.
|
|
2253
2304
|
const isTopLevelObjectCallable = objectLiteralBindingInfo?.ownerName !== undefined &&
|
|
@@ -2316,7 +2367,13 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
2316
2367
|
// without booting a worker.
|
|
2317
2368
|
if (provider.extractModuleConstants && shouldHarvestModuleConstants(provider, parseContent)) {
|
|
2318
2369
|
const constants = provider.extractModuleConstants(tree);
|
|
2319
|
-
|
|
2370
|
+
const topLevelDeclarations = constants.topLevelDeclarations;
|
|
2371
|
+
if (constants.literals.size > 0 ||
|
|
2372
|
+
constants.exprs.size > 0 ||
|
|
2373
|
+
constants.imports.size > 0 ||
|
|
2374
|
+
(constants.wildcardImports?.length ?? 0) > 0 ||
|
|
2375
|
+
unfoldableDeclarationsOf(constants).size > 0 ||
|
|
2376
|
+
(topLevelDeclarations instanceof Set && topLevelDeclarations.size > 0)) {
|
|
2320
2377
|
(result.moduleConstants ??= []).push({ filePath: file.path, constants });
|
|
2321
2378
|
}
|
|
2322
2379
|
}
|
|
@@ -2337,6 +2394,18 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
|
|
|
2337
2394
|
if (springTypes.length > 0)
|
|
2338
2395
|
(result.springTypes ??= []).push(...springTypes);
|
|
2339
2396
|
}
|
|
2397
|
+
if (provider.synthesizeStructureMembers) {
|
|
2398
|
+
const synthetic = provider.synthesizeStructureMembers(tree, file.path, classOwnersByNodeId);
|
|
2399
|
+
for (const node of synthetic.nodes) {
|
|
2400
|
+
result.nodes.push(node);
|
|
2401
|
+
}
|
|
2402
|
+
for (const sym of synthetic.symbols) {
|
|
2403
|
+
result.symbols.push(sym);
|
|
2404
|
+
}
|
|
2405
|
+
for (const rel of synthetic.relationships) {
|
|
2406
|
+
result.relationships.push(rel);
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2340
2409
|
// Vue: emit CALLS edges for components used in <template>
|
|
2341
2410
|
if (language === SupportedLanguages.Vue) {
|
|
2342
2411
|
const templateComponents = extractTemplateComponents(file.content);
|
|
@@ -2469,8 +2538,10 @@ parentPort.on('message', (msg) => {
|
|
|
2469
2538
|
persistDurableParsedFileShardSync(DURABLE_PARSED_FILE_STORAGE_PATH, msg.chunkHash, threadId, seq, accumulated.parsedFiles);
|
|
2470
2539
|
}
|
|
2471
2540
|
if (PARSED_FILE_STORE_STORAGE_PATH) {
|
|
2472
|
-
persistParsedFileShardSync(PARSED_FILE_STORE_STORAGE_PATH, `w${threadId}-${seq}`, accumulated.parsedFiles);
|
|
2473
|
-
|
|
2541
|
+
const wrote = persistParsedFileShardSync(PARSED_FILE_STORE_STORAGE_PATH, `w${threadId}-${seq}`, accumulated.parsedFiles);
|
|
2542
|
+
if (wrote) {
|
|
2543
|
+
accumulated.parsedFiles = [];
|
|
2544
|
+
}
|
|
2474
2545
|
}
|
|
2475
2546
|
}
|
|
2476
2547
|
postResultCloneSafe(accumulated);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** True only for a persistent npm global or project-local installation. */
|
|
2
|
+
export declare function updateEligibleInstall(entryPath?: string, env?: NodeJS.ProcessEnv): Promise<boolean>;
|
|
3
|
+
/** Synchronous entry-point variant for pre-Commander startup checks. */
|
|
4
|
+
export declare function updateEligibleInstallSync(entryPath?: string, env?: NodeJS.ProcessEnv): boolean;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import fsSync from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
const EPHEMERAL_SEGMENTS = new Set(['_npx', '_cacache']);
|
|
5
|
+
const EPHEMERAL_DLX_OWNERS = new Set(['pnpm', 'yarn']);
|
|
6
|
+
function isInside(parent, child) {
|
|
7
|
+
const relative = path.relative(parent, child);
|
|
8
|
+
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
9
|
+
}
|
|
10
|
+
function hasEphemeralMarker(candidate) {
|
|
11
|
+
const normalized = candidate.replaceAll('\\', '/').toLowerCase();
|
|
12
|
+
const segments = normalized.split('/').filter(Boolean);
|
|
13
|
+
if (segments.some((segment) => EPHEMERAL_SEGMENTS.has(segment)))
|
|
14
|
+
return true;
|
|
15
|
+
// `dlx` is only ephemeral next to a package-manager owner (pnpm dlx / yarn
|
|
16
|
+
// dlx). A project directory that happens to be named `dlx` is a normal install.
|
|
17
|
+
if (segments.includes('dlx') && segments.some((segment) => EPHEMERAL_DLX_OWNERS.has(segment))) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
return normalized.includes('/.bun/install/cache/') || normalized.includes('/bun/install/cache/');
|
|
21
|
+
}
|
|
22
|
+
function findPackageDir(entryPath) {
|
|
23
|
+
let current = path.dirname(path.resolve(entryPath));
|
|
24
|
+
for (;;) {
|
|
25
|
+
if (path.basename(current) === 'gitnexus' &&
|
|
26
|
+
path.basename(path.dirname(current)) === 'node_modules') {
|
|
27
|
+
return current;
|
|
28
|
+
}
|
|
29
|
+
const parent = path.dirname(current);
|
|
30
|
+
if (parent === current)
|
|
31
|
+
return null;
|
|
32
|
+
current = parent;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Pure classification shared by the async and sync variants. Realpath
|
|
37
|
+
* resolution deliberately makes a linked node_modules entry point at its
|
|
38
|
+
* development checkout, which is therefore ineligible.
|
|
39
|
+
*/
|
|
40
|
+
function classifyEligibility(probes) {
|
|
41
|
+
const { realEntry, env, realCache, packageDir, packageDirHasGit, realPrefix } = probes;
|
|
42
|
+
const corroboratingPaths = [
|
|
43
|
+
realEntry,
|
|
44
|
+
env.npm_execpath,
|
|
45
|
+
env.npm_config_cache && path.resolve(env.npm_config_cache),
|
|
46
|
+
].filter((value) => Boolean(value));
|
|
47
|
+
if (corroboratingPaths.some(hasEphemeralMarker))
|
|
48
|
+
return false;
|
|
49
|
+
if (realCache && isInside(realCache, realEntry))
|
|
50
|
+
return false;
|
|
51
|
+
// Published packages do not carry .git. This also rejects unusual installs
|
|
52
|
+
// copied wholesale from a checkout.
|
|
53
|
+
if (!packageDir || packageDirHasGit)
|
|
54
|
+
return false;
|
|
55
|
+
if (realPrefix && isInside(realPrefix, realEntry))
|
|
56
|
+
return true;
|
|
57
|
+
// A package rooted at node_modules/gitnexus is a persistent project-local
|
|
58
|
+
// install after ephemeral/cache layouts have been excluded above.
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
let memoizedEligible;
|
|
62
|
+
/** True only for a persistent npm global or project-local installation. */
|
|
63
|
+
export async function updateEligibleInstall(entryPath, env = process.env) {
|
|
64
|
+
const useMemo = entryPath === undefined && env === process.env;
|
|
65
|
+
if (useMemo && memoizedEligible !== undefined)
|
|
66
|
+
return memoizedEligible;
|
|
67
|
+
const result = await classifyAsync(entryPath ?? process.argv[1] ?? '', env);
|
|
68
|
+
if (useMemo)
|
|
69
|
+
memoizedEligible = result;
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
async function classifyAsync(entryPath, env) {
|
|
73
|
+
if (!entryPath)
|
|
74
|
+
return false;
|
|
75
|
+
try {
|
|
76
|
+
const realEntry = await fs.realpath(entryPath);
|
|
77
|
+
const realCache = env.npm_config_cache
|
|
78
|
+
? await fs
|
|
79
|
+
.realpath(env.npm_config_cache)
|
|
80
|
+
.catch(() => path.resolve(env.npm_config_cache))
|
|
81
|
+
: null;
|
|
82
|
+
const packageDir = findPackageDir(realEntry);
|
|
83
|
+
const packageDirHasGit = packageDir
|
|
84
|
+
? await fs
|
|
85
|
+
.access(path.join(packageDir, '.git'))
|
|
86
|
+
.then(() => true)
|
|
87
|
+
.catch(() => false)
|
|
88
|
+
: false;
|
|
89
|
+
const realPrefix = env.npm_config_prefix
|
|
90
|
+
? await fs.realpath(env.npm_config_prefix).catch(() => path.resolve(env.npm_config_prefix))
|
|
91
|
+
: null;
|
|
92
|
+
return classifyEligibility({
|
|
93
|
+
realEntry,
|
|
94
|
+
env,
|
|
95
|
+
realCache,
|
|
96
|
+
packageDir,
|
|
97
|
+
packageDirHasGit,
|
|
98
|
+
realPrefix,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/** Synchronous entry-point variant for pre-Commander startup checks. */
|
|
106
|
+
export function updateEligibleInstallSync(entryPath, env = process.env) {
|
|
107
|
+
const useMemo = entryPath === undefined && env === process.env;
|
|
108
|
+
if (useMemo && memoizedEligible !== undefined)
|
|
109
|
+
return memoizedEligible;
|
|
110
|
+
const result = classifySync(entryPath ?? process.argv[1] ?? '', env);
|
|
111
|
+
if (useMemo)
|
|
112
|
+
memoizedEligible = result;
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
function classifySync(entryPath, env) {
|
|
116
|
+
if (!entryPath)
|
|
117
|
+
return false;
|
|
118
|
+
try {
|
|
119
|
+
const realEntry = fsSync.realpathSync(entryPath);
|
|
120
|
+
let realCache = null;
|
|
121
|
+
if (env.npm_config_cache) {
|
|
122
|
+
try {
|
|
123
|
+
realCache = fsSync.realpathSync(env.npm_config_cache);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
realCache = path.resolve(env.npm_config_cache);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const packageDir = findPackageDir(realEntry);
|
|
130
|
+
const packageDirHasGit = packageDir ? fsSync.existsSync(path.join(packageDir, '.git')) : false;
|
|
131
|
+
let realPrefix = null;
|
|
132
|
+
if (env.npm_config_prefix) {
|
|
133
|
+
try {
|
|
134
|
+
realPrefix = fsSync.realpathSync(env.npm_config_prefix);
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
realPrefix = path.resolve(env.npm_config_prefix);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return classifyEligibility({
|
|
141
|
+
realEntry,
|
|
142
|
+
env,
|
|
143
|
+
realCache,
|
|
144
|
+
packageDir,
|
|
145
|
+
packageDirHasGit,
|
|
146
|
+
realPrefix,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -53,6 +53,15 @@ export declare const shouldFlushCSVBuffer: (byteCount: number) => boolean;
|
|
|
53
53
|
export declare const sanitizeUTF8: (str: string) => string;
|
|
54
54
|
export declare const escapeCSVField: (value: string | number | undefined | null) => string;
|
|
55
55
|
export declare const escapeCSVNumber: (value: number | undefined | null, defaultValue?: number) => string;
|
|
56
|
+
/**
|
|
57
|
+
* A numeric column that may legitimately have NO value.
|
|
58
|
+
*
|
|
59
|
+
* `escapeCSVNumber` substitutes a sentinel (-1) for absence, which is right
|
|
60
|
+
* where every row has a span and wrong where absence is the fact being
|
|
61
|
+
* recorded. An empty field is loaded as NULL by COPY, so the column can say
|
|
62
|
+
* "there is no line here" instead of pointing at line -1.
|
|
63
|
+
*/
|
|
64
|
+
export declare const escapeCSVNullableNumber: (value: unknown) => string;
|
|
56
65
|
/**
|
|
57
66
|
* Did this text come from a binary payload? Density of non-printables over the
|
|
58
67
|
* first {@link BINARY_SAMPLE_CHARS} characters, above 10%.
|
|
@@ -106,7 +115,7 @@ export declare const isBinaryContent: (content: string) => boolean;
|
|
|
106
115
|
export declare const normalizeFtsText: (text: string) => string;
|
|
107
116
|
/** Canonical relationship CSV header — shared by the emit pass and the
|
|
108
117
|
* `splitRelCsvByLabelPair` differential oracle. */
|
|
109
|
-
export declare const REL_CSV_HEADER = "from,to,type,confidence,reason,step";
|
|
118
|
+
export declare const REL_CSV_HEADER = "from,to,type,confidence,reason,step,staticGated";
|
|
110
119
|
/** Build the escaped CSV row (no trailing newline) for one relationship.
|
|
111
120
|
* Single source of the relationship row bytes — used by the emit pass and by
|
|
112
121
|
* the byte-identity differential test that feeds the legacy split oracle. */
|