driftdetect-core 0.5.0 → 0.6.1
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/dist/boundaries/types.d.ts +1 -1
- package/dist/boundaries/types.d.ts.map +1 -1
- package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
- package/dist/call-graph/analysis/graph-builder.js +1 -0
- package/dist/call-graph/analysis/graph-builder.js.map +1 -1
- package/dist/call-graph/extractors/go-data-access-extractor.d.ts +80 -0
- package/dist/call-graph/extractors/go-data-access-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/go-data-access-extractor.js +457 -0
- package/dist/call-graph/extractors/go-data-access-extractor.js.map +1 -0
- package/dist/call-graph/extractors/go-extractor.d.ts +103 -0
- package/dist/call-graph/extractors/go-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/go-extractor.js +509 -0
- package/dist/call-graph/extractors/go-extractor.js.map +1 -0
- package/dist/call-graph/extractors/go-hybrid-extractor.d.ts +97 -0
- package/dist/call-graph/extractors/go-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/go-hybrid-extractor.js +496 -0
- package/dist/call-graph/extractors/go-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/regex/go-regex.d.ts +51 -0
- package/dist/call-graph/extractors/regex/go-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/go-regex.js +435 -0
- package/dist/call-graph/extractors/regex/go-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/index.d.ts +1 -0
- package/dist/call-graph/extractors/regex/index.d.ts.map +1 -1
- package/dist/call-graph/extractors/regex/index.js +8 -0
- package/dist/call-graph/extractors/regex/index.js.map +1 -1
- package/dist/call-graph/index.d.ts +3 -0
- package/dist/call-graph/index.d.ts.map +1 -1
- package/dist/call-graph/index.js +5 -0
- package/dist/call-graph/index.js.map +1 -1
- package/dist/call-graph/types.d.ts +1 -1
- package/dist/call-graph/types.d.ts.map +1 -1
- package/dist/constraints/extraction/constraint-synthesizer.d.ts +72 -0
- package/dist/constraints/extraction/constraint-synthesizer.d.ts.map +1 -0
- package/dist/constraints/extraction/constraint-synthesizer.js +336 -0
- package/dist/constraints/extraction/constraint-synthesizer.js.map +1 -0
- package/dist/constraints/extraction/index.d.ts +10 -0
- package/dist/constraints/extraction/index.d.ts.map +1 -0
- package/dist/constraints/extraction/index.js +10 -0
- package/dist/constraints/extraction/index.js.map +1 -0
- package/dist/constraints/extraction/invariant-detector.d.ts +109 -0
- package/dist/constraints/extraction/invariant-detector.d.ts.map +1 -0
- package/dist/constraints/extraction/invariant-detector.js +979 -0
- package/dist/constraints/extraction/invariant-detector.js.map +1 -0
- package/dist/constraints/index.d.ts +15 -0
- package/dist/constraints/index.d.ts.map +1 -0
- package/dist/constraints/index.js +16 -0
- package/dist/constraints/index.js.map +1 -0
- package/dist/constraints/store/constraint-store.d.ts +110 -0
- package/dist/constraints/store/constraint-store.d.ts.map +1 -0
- package/dist/constraints/store/constraint-store.js +584 -0
- package/dist/constraints/store/constraint-store.js.map +1 -0
- package/dist/constraints/types.d.ts +605 -0
- package/dist/constraints/types.d.ts.map +1 -0
- package/dist/constraints/types.js +57 -0
- package/dist/constraints/types.js.map +1 -0
- package/dist/constraints/verification/constraint-verifier.d.ts +100 -0
- package/dist/constraints/verification/constraint-verifier.d.ts.map +1 -0
- package/dist/constraints/verification/constraint-verifier.js +638 -0
- package/dist/constraints/verification/constraint-verifier.js.map +1 -0
- package/dist/constraints/verification/index.d.ts +8 -0
- package/dist/constraints/verification/index.d.ts.map +1 -0
- package/dist/constraints/verification/index.js +8 -0
- package/dist/constraints/verification/index.js.map +1 -0
- package/dist/decisions/analyzer/decision-mining-analyzer.d.ts +121 -0
- package/dist/decisions/analyzer/decision-mining-analyzer.d.ts.map +1 -0
- package/dist/decisions/analyzer/decision-mining-analyzer.js +904 -0
- package/dist/decisions/analyzer/decision-mining-analyzer.js.map +1 -0
- package/dist/decisions/analyzer/index.d.ts +5 -0
- package/dist/decisions/analyzer/index.d.ts.map +1 -0
- package/dist/decisions/analyzer/index.js +5 -0
- package/dist/decisions/analyzer/index.js.map +1 -0
- package/dist/decisions/extractors/base-commit-extractor.d.ts +104 -0
- package/dist/decisions/extractors/base-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/base-commit-extractor.js +305 -0
- package/dist/decisions/extractors/base-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/csharp-commit-extractor.d.ts +18 -0
- package/dist/decisions/extractors/csharp-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/csharp-commit-extractor.js +281 -0
- package/dist/decisions/extractors/csharp-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/index.d.ts +31 -0
- package/dist/decisions/extractors/index.d.ts.map +1 -0
- package/dist/decisions/extractors/index.js +63 -0
- package/dist/decisions/extractors/index.js.map +1 -0
- package/dist/decisions/extractors/java-commit-extractor.d.ts +18 -0
- package/dist/decisions/extractors/java-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/java-commit-extractor.js +248 -0
- package/dist/decisions/extractors/java-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/php-commit-extractor.d.ts +18 -0
- package/dist/decisions/extractors/php-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/php-commit-extractor.js +280 -0
- package/dist/decisions/extractors/php-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/python-commit-extractor.d.ts +18 -0
- package/dist/decisions/extractors/python-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/python-commit-extractor.js +248 -0
- package/dist/decisions/extractors/python-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/typescript-commit-extractor.d.ts +37 -0
- package/dist/decisions/extractors/typescript-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/typescript-commit-extractor.js +229 -0
- package/dist/decisions/extractors/typescript-commit-extractor.js.map +1 -0
- package/dist/decisions/git/commit-parser.d.ts +58 -0
- package/dist/decisions/git/commit-parser.d.ts.map +1 -0
- package/dist/decisions/git/commit-parser.js +344 -0
- package/dist/decisions/git/commit-parser.js.map +1 -0
- package/dist/decisions/git/diff-analyzer.d.ts +30 -0
- package/dist/decisions/git/diff-analyzer.d.ts.map +1 -0
- package/dist/decisions/git/diff-analyzer.js +492 -0
- package/dist/decisions/git/diff-analyzer.js.map +1 -0
- package/dist/decisions/git/git-walker.d.ts +64 -0
- package/dist/decisions/git/git-walker.d.ts.map +1 -0
- package/dist/decisions/git/git-walker.js +441 -0
- package/dist/decisions/git/git-walker.js.map +1 -0
- package/dist/decisions/git/index.d.ts +11 -0
- package/dist/decisions/git/index.d.ts.map +1 -0
- package/dist/decisions/git/index.js +13 -0
- package/dist/decisions/git/index.js.map +1 -0
- package/dist/decisions/git/types.d.ts +223 -0
- package/dist/decisions/git/types.d.ts.map +1 -0
- package/dist/decisions/git/types.js +7 -0
- package/dist/decisions/git/types.js.map +1 -0
- package/dist/decisions/index.d.ts +27 -0
- package/dist/decisions/index.d.ts.map +1 -0
- package/dist/decisions/index.js +45 -0
- package/dist/decisions/index.js.map +1 -0
- package/dist/decisions/types.d.ts +530 -0
- package/dist/decisions/types.d.ts.map +1 -0
- package/dist/decisions/types.js +8 -0
- package/dist/decisions/types.js.map +1 -0
- package/dist/go/go-analyzer.d.ts +203 -0
- package/dist/go/go-analyzer.d.ts.map +1 -0
- package/dist/go/go-analyzer.js +509 -0
- package/dist/go/go-analyzer.js.map +1 -0
- package/dist/go/index.d.ts +7 -0
- package/dist/go/index.d.ts.map +1 -0
- package/dist/go/index.js +8 -0
- package/dist/go/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -1
- package/dist/parsers/tree-sitter/go-loader.d.ts +50 -0
- package/dist/parsers/tree-sitter/go-loader.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/go-loader.js +161 -0
- package/dist/parsers/tree-sitter/go-loader.js.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts +250 -0
- package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-go-parser.js +707 -0
- package/dist/parsers/tree-sitter/tree-sitter-go-parser.js.map +1 -0
- package/dist/parsers/types.d.ts +1 -1
- package/dist/parsers/types.d.ts.map +1 -1
- package/dist/simulation/approach-generator.d.ts +73 -0
- package/dist/simulation/approach-generator.d.ts.map +1 -0
- package/dist/simulation/approach-generator.js +371 -0
- package/dist/simulation/approach-generator.js.map +1 -0
- package/dist/simulation/index.d.ts +14 -0
- package/dist/simulation/index.d.ts.map +1 -0
- package/dist/simulation/index.js +19 -0
- package/dist/simulation/index.js.map +1 -0
- package/dist/simulation/language-strategies/csharp-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/csharp-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/csharp-strategies.js +118 -0
- package/dist/simulation/language-strategies/csharp-strategies.js.map +1 -0
- package/dist/simulation/language-strategies/index.d.ts +41 -0
- package/dist/simulation/language-strategies/index.d.ts.map +1 -0
- package/dist/simulation/language-strategies/index.js +92 -0
- package/dist/simulation/language-strategies/index.js.map +1 -0
- package/dist/simulation/language-strategies/java-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/java-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/java-strategies.js +119 -0
- package/dist/simulation/language-strategies/java-strategies.js.map +1 -0
- package/dist/simulation/language-strategies/php-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/php-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/php-strategies.js +129 -0
- package/dist/simulation/language-strategies/php-strategies.js.map +1 -0
- package/dist/simulation/language-strategies/python-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/python-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/python-strategies.js +208 -0
- package/dist/simulation/language-strategies/python-strategies.js.map +1 -0
- package/dist/simulation/language-strategies/types.d.ts +67 -0
- package/dist/simulation/language-strategies/types.d.ts.map +1 -0
- package/dist/simulation/language-strategies/types.js +23 -0
- package/dist/simulation/language-strategies/types.js.map +1 -0
- package/dist/simulation/language-strategies/typescript-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/typescript-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/typescript-strategies.js +251 -0
- package/dist/simulation/language-strategies/typescript-strategies.js.map +1 -0
- package/dist/simulation/scorers/friction-scorer.d.ts +45 -0
- package/dist/simulation/scorers/friction-scorer.d.ts.map +1 -0
- package/dist/simulation/scorers/friction-scorer.js +336 -0
- package/dist/simulation/scorers/friction-scorer.js.map +1 -0
- package/dist/simulation/scorers/impact-scorer.d.ts +56 -0
- package/dist/simulation/scorers/impact-scorer.d.ts.map +1 -0
- package/dist/simulation/scorers/impact-scorer.js +273 -0
- package/dist/simulation/scorers/impact-scorer.js.map +1 -0
- package/dist/simulation/scorers/index.d.ts +12 -0
- package/dist/simulation/scorers/index.d.ts.map +1 -0
- package/dist/simulation/scorers/index.js +12 -0
- package/dist/simulation/scorers/index.js.map +1 -0
- package/dist/simulation/scorers/pattern-alignment-scorer.d.ts +83 -0
- package/dist/simulation/scorers/pattern-alignment-scorer.d.ts.map +1 -0
- package/dist/simulation/scorers/pattern-alignment-scorer.js +367 -0
- package/dist/simulation/scorers/pattern-alignment-scorer.js.map +1 -0
- package/dist/simulation/scorers/security-scorer.d.ts +63 -0
- package/dist/simulation/scorers/security-scorer.d.ts.map +1 -0
- package/dist/simulation/scorers/security-scorer.js +346 -0
- package/dist/simulation/scorers/security-scorer.js.map +1 -0
- package/dist/simulation/simulation-engine.d.ts +89 -0
- package/dist/simulation/simulation-engine.d.ts.map +1 -0
- package/dist/simulation/simulation-engine.js +480 -0
- package/dist/simulation/simulation-engine.js.map +1 -0
- package/dist/simulation/types.d.ts +200 -0
- package/dist/simulation/types.d.ts.map +1 -0
- package/dist/simulation/types.js +23 -0
- package/dist/simulation/types.js.map +1 -0
- package/dist/speculative/approach-generator.d.ts +2 -0
- package/dist/speculative/approach-generator.d.ts.map +1 -0
- package/dist/speculative/approach-generator.js +2 -0
- package/dist/speculative/approach-generator.js.map +1 -0
- package/dist/speculative/templates/types.d.ts +133 -0
- package/dist/speculative/templates/types.d.ts.map +1 -0
- package/dist/speculative/templates/types.js +208 -0
- package/dist/speculative/templates/types.js.map +1 -0
- package/dist/speculative/types.d.ts +523 -0
- package/dist/speculative/types.d.ts.map +1 -0
- package/dist/speculative/types.js +71 -0
- package/dist/speculative/types.js.map +1 -0
- package/dist/test-topology/extractors/base-test-extractor.d.ts +1 -1
- package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -1
- package/dist/test-topology/extractors/base-test-extractor.js.map +1 -1
- package/dist/test-topology/extractors/go-test-extractor.d.ts +33 -0
- package/dist/test-topology/extractors/go-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/go-test-extractor.js +436 -0
- package/dist/test-topology/extractors/go-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/index.d.ts +1 -0
- package/dist/test-topology/extractors/index.d.ts.map +1 -1
- package/dist/test-topology/extractors/index.js +1 -0
- package/dist/test-topology/extractors/index.js.map +1 -1
- package/dist/test-topology/extractors/regex/go-test-regex.d.ts +62 -0
- package/dist/test-topology/extractors/regex/go-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/go-test-regex.js +528 -0
- package/dist/test-topology/extractors/regex/go-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/index.d.ts +1 -0
- package/dist/test-topology/extractors/regex/index.d.ts.map +1 -1
- package/dist/test-topology/extractors/regex/index.js +4 -0
- package/dist/test-topology/extractors/regex/index.js.map +1 -1
- package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -1
- package/dist/test-topology/hybrid-test-topology-analyzer.js +1 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -1
- package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -1
- package/dist/test-topology/test-topology-analyzer.js +1 -0
- package/dist/test-topology/test-topology-analyzer.js.map +1 -1
- package/dist/test-topology/types.d.ts +2 -2
- package/dist/test-topology/types.d.ts.map +1 -1
- package/dist/unified-provider/matching/database-sql-matcher.d.ts +42 -0
- package/dist/unified-provider/matching/database-sql-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/database-sql-matcher.js +282 -0
- package/dist/unified-provider/matching/database-sql-matcher.js.map +1 -0
- package/dist/unified-provider/matching/gorm-matcher.d.ts +41 -0
- package/dist/unified-provider/matching/gorm-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/gorm-matcher.js +222 -0
- package/dist/unified-provider/matching/gorm-matcher.js.map +1 -0
- package/dist/unified-provider/matching/index.d.ts +3 -0
- package/dist/unified-provider/matching/index.d.ts.map +1 -1
- package/dist/unified-provider/matching/index.js +4 -0
- package/dist/unified-provider/matching/index.js.map +1 -1
- package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -1
- package/dist/unified-provider/matching/matcher-registry.js +7 -0
- package/dist/unified-provider/matching/matcher-registry.js.map +1 -1
- package/dist/unified-provider/matching/sqlx-matcher.d.ts +40 -0
- package/dist/unified-provider/matching/sqlx-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/sqlx-matcher.js +214 -0
- package/dist/unified-provider/matching/sqlx-matcher.js.map +1 -0
- package/dist/unified-provider/normalization/go-normalizer.d.ts +62 -0
- package/dist/unified-provider/normalization/go-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/go-normalizer.js +608 -0
- package/dist/unified-provider/normalization/go-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/index.d.ts +1 -0
- package/dist/unified-provider/normalization/index.d.ts.map +1 -1
- package/dist/unified-provider/normalization/index.js +6 -1
- package/dist/unified-provider/normalization/index.js.map +1 -1
- package/dist/unified-provider/types.d.ts +1 -1
- package/dist/unified-provider/types.d.ts.map +1 -1
- package/dist/wpf/extractors/binding-error-detector.d.ts +75 -0
- package/dist/wpf/extractors/binding-error-detector.d.ts.map +1 -0
- package/dist/wpf/extractors/binding-error-detector.js +290 -0
- package/dist/wpf/extractors/binding-error-detector.js.map +1 -0
- package/dist/wpf/extractors/code-behind-linker.d.ts +70 -0
- package/dist/wpf/extractors/code-behind-linker.d.ts.map +1 -0
- package/dist/wpf/extractors/code-behind-linker.js +172 -0
- package/dist/wpf/extractors/code-behind-linker.js.map +1 -0
- package/dist/wpf/extractors/dependency-property-extractor.d.ts +61 -0
- package/dist/wpf/extractors/dependency-property-extractor.d.ts.map +1 -0
- package/dist/wpf/extractors/dependency-property-extractor.js +201 -0
- package/dist/wpf/extractors/dependency-property-extractor.js.map +1 -0
- package/dist/wpf/extractors/regex/viewmodel-regex.d.ts +82 -0
- package/dist/wpf/extractors/regex/viewmodel-regex.d.ts.map +1 -0
- package/dist/wpf/extractors/regex/viewmodel-regex.js +412 -0
- package/dist/wpf/extractors/regex/viewmodel-regex.js.map +1 -0
- package/dist/wpf/extractors/regex/xaml-regex.d.ts +77 -0
- package/dist/wpf/extractors/regex/xaml-regex.d.ts.map +1 -0
- package/dist/wpf/extractors/regex/xaml-regex.js +353 -0
- package/dist/wpf/extractors/regex/xaml-regex.js.map +1 -0
- package/dist/wpf/extractors/resource-dictionary-parser.d.ts +103 -0
- package/dist/wpf/extractors/resource-dictionary-parser.d.ts.map +1 -0
- package/dist/wpf/extractors/resource-dictionary-parser.js +296 -0
- package/dist/wpf/extractors/resource-dictionary-parser.js.map +1 -0
- package/dist/wpf/extractors/value-converter-extractor.d.ts +128 -0
- package/dist/wpf/extractors/value-converter-extractor.d.ts.map +1 -0
- package/dist/wpf/extractors/value-converter-extractor.js +312 -0
- package/dist/wpf/extractors/value-converter-extractor.js.map +1 -0
- package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts +104 -0
- package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts.map +1 -0
- package/dist/wpf/extractors/viewmodel-hybrid-extractor.js +513 -0
- package/dist/wpf/extractors/viewmodel-hybrid-extractor.js.map +1 -0
- package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts +98 -0
- package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts.map +1 -0
- package/dist/wpf/extractors/xaml-hybrid-extractor.js +444 -0
- package/dist/wpf/extractors/xaml-hybrid-extractor.js.map +1 -0
- package/dist/wpf/index.d.ts +25 -0
- package/dist/wpf/index.d.ts.map +1 -0
- package/dist/wpf/index.js +31 -0
- package/dist/wpf/index.js.map +1 -0
- package/dist/wpf/integration/wpf-callgraph-adapter.d.ts +82 -0
- package/dist/wpf/integration/wpf-callgraph-adapter.d.ts.map +1 -0
- package/dist/wpf/integration/wpf-callgraph-adapter.js +311 -0
- package/dist/wpf/integration/wpf-callgraph-adapter.js.map +1 -0
- package/dist/wpf/integration/wpf-data-flow-tracer.d.ts +129 -0
- package/dist/wpf/integration/wpf-data-flow-tracer.d.ts.map +1 -0
- package/dist/wpf/integration/wpf-data-flow-tracer.js +367 -0
- package/dist/wpf/integration/wpf-data-flow-tracer.js.map +1 -0
- package/dist/wpf/linkers/datacontext-resolver.d.ts +66 -0
- package/dist/wpf/linkers/datacontext-resolver.d.ts.map +1 -0
- package/dist/wpf/linkers/datacontext-resolver.js +240 -0
- package/dist/wpf/linkers/datacontext-resolver.js.map +1 -0
- package/dist/wpf/linkers/viewmodel-linker.d.ts +71 -0
- package/dist/wpf/linkers/viewmodel-linker.d.ts.map +1 -0
- package/dist/wpf/linkers/viewmodel-linker.js +268 -0
- package/dist/wpf/linkers/viewmodel-linker.js.map +1 -0
- package/dist/wpf/types.d.ts +451 -0
- package/dist/wpf/types.d.ts.map +1 -0
- package/dist/wpf/types.js +8 -0
- package/dist/wpf/types.js.map +1 -0
- package/dist/wpf/wpf-analyzer.d.ts +114 -0
- package/dist/wpf/wpf-analyzer.d.ts.map +1 -0
- package/dist/wpf/wpf-analyzer.js +332 -0
- package/dist/wpf/wpf-analyzer.js.map +1 -0
- package/dist/wrappers/integration/adapter.d.ts.map +1 -1
- package/dist/wrappers/integration/adapter.js +1 -0
- package/dist/wrappers/integration/adapter.js.map +1 -1
- package/package.json +29 -18
- package/LICENSE +0 -21
package/dist/index.js
CHANGED
|
@@ -102,4 +102,60 @@ ModuleCouplingAnalyzer, createModuleCouplingAnalyzer, } from './module-coupling/
|
|
|
102
102
|
export {
|
|
103
103
|
// Main analyzer
|
|
104
104
|
ErrorHandlingAnalyzer, createErrorHandlingAnalyzer, } from './error-handling/index.js';
|
|
105
|
+
// ============================================================================
|
|
106
|
+
// Decision Mining (L8 - Architectural decision mining from git history)
|
|
107
|
+
// ============================================================================
|
|
108
|
+
export {
|
|
109
|
+
// Main analyzer
|
|
110
|
+
DecisionMiningAnalyzer, createDecisionMiningAnalyzer,
|
|
111
|
+
// Git integration
|
|
112
|
+
GitWalker, createGitWalker, detectLanguage, classifyFile, CommitParser, createCommitParser, parseCommitMessage, extractMessageSignals, parseDiff, analyzeArchitecturalSignals, analyzeDependencyChanges, analyzeDependencyChangesSync, compareManifests,
|
|
113
|
+
// Extractors
|
|
114
|
+
BaseCommitExtractor, TypeScriptCommitExtractor, createTypeScriptCommitExtractor, PythonCommitExtractor, createPythonCommitExtractor, JavaCommitExtractor, createJavaCommitExtractor, CSharpCommitExtractor, createCSharpCommitExtractor, PhpCommitExtractor, createPhpCommitExtractor, createCommitExtractor, createAllCommitExtractors, getExtractorForFile, } from './decisions/index.js';
|
|
115
|
+
// ============================================================================
|
|
116
|
+
// Speculative Execution Engine (Pre-flight simulation)
|
|
117
|
+
// ============================================================================
|
|
118
|
+
export {
|
|
119
|
+
// Main engine
|
|
120
|
+
SimulationEngine, createSimulationEngine,
|
|
121
|
+
// Approach generator
|
|
122
|
+
ApproachGenerator, createApproachGenerator,
|
|
123
|
+
// Scorers
|
|
124
|
+
FrictionScorer, createFrictionScorer, ImpactScorer, createImpactScorer, PatternAlignmentScorer, createPatternAlignmentScorer, SecurityScorer, createSecurityScorer,
|
|
125
|
+
// Language strategies
|
|
126
|
+
getStrategyProvider, getStrategiesForTask, detectTaskCategory, detectFramework as detectProjectFramework, getSupportedLanguages, getFrameworksForLanguage as getSimulationFrameworksForLanguage, typescriptStrategyProvider, pythonStrategyProvider, javaStrategyProvider, csharpStrategyProvider, phpStrategyProvider,
|
|
127
|
+
// Constants
|
|
128
|
+
DEFAULT_SCORING_WEIGHTS, DEFAULT_SIMULATION_OPTIONS, } from './simulation/index.js';
|
|
129
|
+
// ============================================================================
|
|
130
|
+
// Constraint Protocol (Learned architectural invariants)
|
|
131
|
+
// ============================================================================
|
|
132
|
+
export {
|
|
133
|
+
// Store
|
|
134
|
+
ConstraintStore, createConstraintStore,
|
|
135
|
+
// Extraction
|
|
136
|
+
InvariantDetector, createInvariantDetector, ConstraintSynthesizer, createConstraintSynthesizer,
|
|
137
|
+
// Verification
|
|
138
|
+
ConstraintVerifier, createConstraintVerifier, } from './constraints/index.js';
|
|
139
|
+
// Constraint constants
|
|
140
|
+
export { CONSTRAINT_SCHEMA_VERSION, CONSTRAINT_CATEGORIES, CONSTRAINT_LANGUAGES, CONSTRAINT_STATUSES, CONSTRAINT_TYPES, DEFAULT_MIN_CONFIDENCE, DEFAULT_ENFORCEMENT_LEVEL, } from './constraints/index.js';
|
|
141
|
+
// ============================================================================
|
|
142
|
+
// WPF Framework Support (XAML parsing, ViewModel linking, MVVM analysis)
|
|
143
|
+
// ============================================================================
|
|
144
|
+
export {
|
|
145
|
+
// Main analyzer
|
|
146
|
+
WpfAnalyzer, createWpfAnalyzer,
|
|
147
|
+
// Extractors
|
|
148
|
+
XamlHybridExtractor, createXamlHybridExtractor, ViewModelHybridExtractor, createViewModelHybridExtractor, CodeBehindLinker, createCodeBehindLinker, ResourceDictionaryParser, createResourceDictionaryParser, DependencyPropertyExtractor, createDependencyPropertyExtractor, DEPENDENCY_PROPERTY_PATTERNS, ValueConverterExtractor, createValueConverterExtractor, VALUE_CONVERTER_PATTERNS, BindingErrorDetector, createBindingErrorDetector,
|
|
149
|
+
// Regex extractors (for direct use or testing)
|
|
150
|
+
XamlRegexExtractor, XAML_REGEX_PATTERNS, ViewModelRegexExtractor, VIEWMODEL_REGEX_PATTERNS,
|
|
151
|
+
// Linkers
|
|
152
|
+
DataContextResolver, createDataContextResolver, ViewModelLinker, createViewModelLinker,
|
|
153
|
+
// Integration
|
|
154
|
+
WpfCallGraphAdapter, createWpfCallGraphAdapter, WpfDataFlowTracer, createWpfDataFlowTracer, } from './wpf/index.js';
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// Go Language Support (Go analysis, routes, error handling, data access)
|
|
157
|
+
// ============================================================================
|
|
158
|
+
export {
|
|
159
|
+
// Main analyzer
|
|
160
|
+
GoAnalyzer, createGoAnalyzer, } from './go/index.js';
|
|
105
161
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,iBAAiB;AACjB,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,iCAAiC;AACjC,cAAc,kBAAkB,CAAC;AAEjC,kBAAkB;AAClB,cAAc,oBAAoB,CAAC;AAWnC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,6BAA6B;AAC7B,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf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AO;AACL,YAAY;AACZ,kBAAkB,IAAI,0BAA0B,EAChD,wBAAwB,EACxB,qBAAqB,IAAI,6BAA6B,EACtD,cAAc;AACd,oBAAoB;AACpB,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAe7B,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,kCAAkC,EAClC,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,IAAI,2BAA2B,EACnD,4BAA4B,IAAI,mCAAmC,EACnE,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAqB7B,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,sEAAsE;AACtE,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAG7B,+EAA+E;AAC/E,iEAAiE;AACjE,+EAA+E;AAE/E,OAAO;AACL,gBAAgB;AAChB,oBAAoB,EACpB,0BAA0B;AAC1B,aAAa;AACb,iBAAiB,EACjB,uBAAuB,EACvB,6BAA6B,EAC7B,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AA4BlC,+EAA+E;AAC/E,gEAAgE;AAChE,+EAA+E;AAE/E,OAAO;AACL,gBAAgB;AAChB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC;AAwBpC,+EAA+E;AAC/E,kEAAkE;AAClE,+EAA+E;AAE/E,OAAO;AACL,gBAAgB;AAChB,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA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,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,qBAAqB;AAErB,cAAc;AACd,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AA+FxB,+EAA+E;AAC/E,yEAAyE;AACzE,+EAA+E;AAE/E,OAAO;AACL,gBAAgB;AAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter Go Loader
|
|
3
|
+
*
|
|
4
|
+
* Handles loading tree-sitter and tree-sitter-go with graceful fallback.
|
|
5
|
+
* Provides functions to check availability and access the parser/language.
|
|
6
|
+
*
|
|
7
|
+
* @requirements Go Language Support
|
|
8
|
+
*/
|
|
9
|
+
import type { TreeSitterParser, TreeSitterLanguage } from './types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Check if tree-sitter-go is available.
|
|
12
|
+
*
|
|
13
|
+
* This function attempts to load tree-sitter and tree-sitter-go
|
|
14
|
+
* on first call and caches the result.
|
|
15
|
+
*
|
|
16
|
+
* @returns true if tree-sitter-go is available and working
|
|
17
|
+
*/
|
|
18
|
+
export declare function isGoTreeSitterAvailable(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Get the Go language for tree-sitter.
|
|
21
|
+
*
|
|
22
|
+
* @returns TreeSitter Go language
|
|
23
|
+
* @throws Error if tree-sitter-go is not available
|
|
24
|
+
*/
|
|
25
|
+
export declare function getGoLanguage(): TreeSitterLanguage;
|
|
26
|
+
/**
|
|
27
|
+
* Get the tree-sitter Parser constructor for Go.
|
|
28
|
+
*
|
|
29
|
+
* @returns TreeSitter Parser constructor
|
|
30
|
+
* @throws Error if tree-sitter is not available
|
|
31
|
+
*/
|
|
32
|
+
export declare function getGoTreeSitter(): new () => TreeSitterParser;
|
|
33
|
+
/**
|
|
34
|
+
* Create a new tree-sitter parser instance configured for Go.
|
|
35
|
+
*
|
|
36
|
+
* @returns Configured TreeSitter parser
|
|
37
|
+
* @throws Error if tree-sitter-go is not available
|
|
38
|
+
*/
|
|
39
|
+
export declare function createGoParser(): TreeSitterParser;
|
|
40
|
+
/**
|
|
41
|
+
* Get the loading error message if tree-sitter-go failed to load.
|
|
42
|
+
*
|
|
43
|
+
* @returns Error message or null if no error
|
|
44
|
+
*/
|
|
45
|
+
export declare function getGoLoadingError(): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Reset the loader state (useful for testing).
|
|
48
|
+
*/
|
|
49
|
+
export declare function resetGoLoader(): void;
|
|
50
|
+
//# sourceMappingURL=go-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"go-loader.d.ts","sourceRoot":"","sources":["../../../src/parsers/tree-sitter/go-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAyBvE;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAejD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,kBAAkB,CAUlD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,UAAU,gBAAgB,CAU5D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAgBjD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAIjD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAKpC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter Go Loader
|
|
3
|
+
*
|
|
4
|
+
* Handles loading tree-sitter and tree-sitter-go with graceful fallback.
|
|
5
|
+
* Provides functions to check availability and access the parser/language.
|
|
6
|
+
*
|
|
7
|
+
* @requirements Go Language Support
|
|
8
|
+
*/
|
|
9
|
+
import { createRequire } from 'node:module';
|
|
10
|
+
// Create require function for ESM compatibility
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
// ============================================
|
|
13
|
+
// Module State
|
|
14
|
+
// ============================================
|
|
15
|
+
/** Whether tree-sitter-go is available */
|
|
16
|
+
let goAvailable = null;
|
|
17
|
+
/** Cached tree-sitter module */
|
|
18
|
+
let cachedTreeSitter = null;
|
|
19
|
+
/** Cached Go language */
|
|
20
|
+
let cachedGoLanguage = null;
|
|
21
|
+
/** Loading error message if any */
|
|
22
|
+
let loadingError = null;
|
|
23
|
+
// ============================================
|
|
24
|
+
// Public API
|
|
25
|
+
// ============================================
|
|
26
|
+
/**
|
|
27
|
+
* Check if tree-sitter-go is available.
|
|
28
|
+
*
|
|
29
|
+
* This function attempts to load tree-sitter and tree-sitter-go
|
|
30
|
+
* on first call and caches the result.
|
|
31
|
+
*
|
|
32
|
+
* @returns true if tree-sitter-go is available and working
|
|
33
|
+
*/
|
|
34
|
+
export function isGoTreeSitterAvailable() {
|
|
35
|
+
if (goAvailable !== null) {
|
|
36
|
+
return goAvailable;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
loadGoTreeSitter();
|
|
40
|
+
goAvailable = true;
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
goAvailable = false;
|
|
44
|
+
loadingError = error instanceof Error ? error.message : 'Unknown error loading tree-sitter-go';
|
|
45
|
+
logDebug(`tree-sitter-go not available: ${loadingError}`);
|
|
46
|
+
}
|
|
47
|
+
return goAvailable;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get the Go language for tree-sitter.
|
|
51
|
+
*
|
|
52
|
+
* @returns TreeSitter Go language
|
|
53
|
+
* @throws Error if tree-sitter-go is not available
|
|
54
|
+
*/
|
|
55
|
+
export function getGoLanguage() {
|
|
56
|
+
if (!isGoTreeSitterAvailable()) {
|
|
57
|
+
throw new Error(`tree-sitter-go is not available: ${loadingError ?? 'unknown error'}`);
|
|
58
|
+
}
|
|
59
|
+
if (!cachedGoLanguage) {
|
|
60
|
+
throw new Error('tree-sitter-go language not loaded');
|
|
61
|
+
}
|
|
62
|
+
return cachedGoLanguage;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get the tree-sitter Parser constructor for Go.
|
|
66
|
+
*
|
|
67
|
+
* @returns TreeSitter Parser constructor
|
|
68
|
+
* @throws Error if tree-sitter is not available
|
|
69
|
+
*/
|
|
70
|
+
export function getGoTreeSitter() {
|
|
71
|
+
if (!isGoTreeSitterAvailable()) {
|
|
72
|
+
throw new Error(`tree-sitter-go is not available: ${loadingError ?? 'unknown error'}`);
|
|
73
|
+
}
|
|
74
|
+
if (!cachedTreeSitter) {
|
|
75
|
+
throw new Error('tree-sitter module not loaded');
|
|
76
|
+
}
|
|
77
|
+
return cachedTreeSitter;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Create a new tree-sitter parser instance configured for Go.
|
|
81
|
+
*
|
|
82
|
+
* @returns Configured TreeSitter parser
|
|
83
|
+
* @throws Error if tree-sitter-go is not available
|
|
84
|
+
*/
|
|
85
|
+
export function createGoParser() {
|
|
86
|
+
if (!isGoTreeSitterAvailable()) {
|
|
87
|
+
throw new Error(`tree-sitter-go is not available: ${loadingError ?? 'unknown error'}`);
|
|
88
|
+
}
|
|
89
|
+
if (!cachedTreeSitter) {
|
|
90
|
+
throw new Error('tree-sitter module not loaded');
|
|
91
|
+
}
|
|
92
|
+
const Parser = cachedTreeSitter;
|
|
93
|
+
const language = getGoLanguage();
|
|
94
|
+
const parser = new Parser();
|
|
95
|
+
parser.setLanguage(language);
|
|
96
|
+
return parser;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get the loading error message if tree-sitter-go failed to load.
|
|
100
|
+
*
|
|
101
|
+
* @returns Error message or null if no error
|
|
102
|
+
*/
|
|
103
|
+
export function getGoLoadingError() {
|
|
104
|
+
// Ensure we've attempted to load
|
|
105
|
+
isGoTreeSitterAvailable();
|
|
106
|
+
return loadingError;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Reset the loader state (useful for testing).
|
|
110
|
+
*/
|
|
111
|
+
export function resetGoLoader() {
|
|
112
|
+
goAvailable = null;
|
|
113
|
+
cachedTreeSitter = null;
|
|
114
|
+
cachedGoLanguage = null;
|
|
115
|
+
loadingError = null;
|
|
116
|
+
}
|
|
117
|
+
// ============================================
|
|
118
|
+
// Internal Functions
|
|
119
|
+
// ============================================
|
|
120
|
+
/**
|
|
121
|
+
* Attempt to load tree-sitter and tree-sitter-go.
|
|
122
|
+
*
|
|
123
|
+
* @throws Error if loading fails
|
|
124
|
+
*/
|
|
125
|
+
function loadGoTreeSitter() {
|
|
126
|
+
// Skip if already loaded
|
|
127
|
+
if (cachedTreeSitter && cachedGoLanguage) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
// Dynamic require for optional dependencies
|
|
132
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
133
|
+
cachedTreeSitter = require('tree-sitter');
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
throw new Error(`Failed to load tree-sitter: ${error instanceof Error ? error.message : 'unknown error'}. ` +
|
|
137
|
+
'Install with: pnpm add tree-sitter tree-sitter-go');
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
141
|
+
cachedGoLanguage = require('tree-sitter-go');
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
// Clear tree-sitter cache since we can't use it without Go
|
|
145
|
+
cachedTreeSitter = null;
|
|
146
|
+
throw new Error(`Failed to load tree-sitter-go: ${error instanceof Error ? error.message : 'unknown error'}. ` +
|
|
147
|
+
'Install with: pnpm add tree-sitter-go');
|
|
148
|
+
}
|
|
149
|
+
logDebug('tree-sitter and tree-sitter-go loaded successfully');
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Log debug message if debug mode is enabled.
|
|
153
|
+
*
|
|
154
|
+
* @param message - Message to log
|
|
155
|
+
*/
|
|
156
|
+
function logDebug(message) {
|
|
157
|
+
if (process.env['DRIFT_PARSER_DEBUG'] === 'true') {
|
|
158
|
+
console.debug(`[go-loader] ${message}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=go-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"go-loader.js","sourceRoot":"","sources":["../../../src/parsers/tree-sitter/go-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,gDAAgD;AAChD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,+CAA+C;AAC/C,eAAe;AACf,+CAA+C;AAE/C,0CAA0C;AAC1C,IAAI,WAAW,GAAmB,IAAI,CAAC;AAEvC,gCAAgC;AAChC,IAAI,gBAAgB,GAAwC,IAAI,CAAC;AAEjE,yBAAyB;AACzB,IAAI,gBAAgB,GAA8B,IAAI,CAAC;AAEvD,mCAAmC;AACnC,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC,+CAA+C;AAC/C,aAAa;AACb,+CAA+C;AAE/C;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB;IACrC,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,IAAI,CAAC;QACH,gBAAgB,EAAE,CAAC;QACnB,WAAW,GAAG,IAAI,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,GAAG,KAAK,CAAC;QACpB,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,sCAAsC,CAAC;QAC/F,QAAQ,CAAC,iCAAiC,YAAY,EAAE,CAAC,CAAC;IA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E,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter Go Parser
|
|
3
|
+
*
|
|
4
|
+
* Full Go parser using tree-sitter-go for semantic extraction.
|
|
5
|
+
* Extracts packages, imports, structs, interfaces, functions,
|
|
6
|
+
* methods, and type declarations from Go source files.
|
|
7
|
+
*
|
|
8
|
+
* Supports Go-specific features including receivers, embedded types,
|
|
9
|
+
* multiple return values, and interface embedding.
|
|
10
|
+
*
|
|
11
|
+
* @requirements Go Language Support
|
|
12
|
+
*/
|
|
13
|
+
import type { Position, ParseResult } from '../types.js';
|
|
14
|
+
/** Go package information */
|
|
15
|
+
export interface GoPackageInfo {
|
|
16
|
+
name: string;
|
|
17
|
+
startPosition: Position;
|
|
18
|
+
endPosition: Position;
|
|
19
|
+
}
|
|
20
|
+
/** Go import statement */
|
|
21
|
+
export interface GoImportInfo {
|
|
22
|
+
path: string;
|
|
23
|
+
alias: string | null;
|
|
24
|
+
isBlankImport: boolean;
|
|
25
|
+
isDotImport: boolean;
|
|
26
|
+
startPosition: Position;
|
|
27
|
+
endPosition: Position;
|
|
28
|
+
}
|
|
29
|
+
/** Go parameter */
|
|
30
|
+
export interface GoParameterInfo {
|
|
31
|
+
name: string;
|
|
32
|
+
type: string;
|
|
33
|
+
isVariadic: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** Go return type */
|
|
36
|
+
export interface GoReturnInfo {
|
|
37
|
+
name: string | null;
|
|
38
|
+
type: string;
|
|
39
|
+
}
|
|
40
|
+
/** Go function */
|
|
41
|
+
export interface GoFunctionInfo {
|
|
42
|
+
name: string;
|
|
43
|
+
qualifiedName: string;
|
|
44
|
+
parameters: GoParameterInfo[];
|
|
45
|
+
returns: GoReturnInfo[];
|
|
46
|
+
isExported: boolean;
|
|
47
|
+
isVariadic: boolean;
|
|
48
|
+
startPosition: Position;
|
|
49
|
+
endPosition: Position;
|
|
50
|
+
bodyStartPosition: Position | null;
|
|
51
|
+
bodyEndPosition: Position | null;
|
|
52
|
+
}
|
|
53
|
+
/** Go method (function with receiver) */
|
|
54
|
+
export interface GoMethodInfo extends GoFunctionInfo {
|
|
55
|
+
receiver: GoReceiverInfo;
|
|
56
|
+
}
|
|
57
|
+
/** Go receiver */
|
|
58
|
+
export interface GoReceiverInfo {
|
|
59
|
+
name: string;
|
|
60
|
+
type: string;
|
|
61
|
+
isPointer: boolean;
|
|
62
|
+
}
|
|
63
|
+
/** Go struct field */
|
|
64
|
+
export interface GoFieldInfo {
|
|
65
|
+
name: string;
|
|
66
|
+
type: string;
|
|
67
|
+
tag: string | null;
|
|
68
|
+
isExported: boolean;
|
|
69
|
+
isEmbedded: boolean;
|
|
70
|
+
startPosition: Position;
|
|
71
|
+
endPosition: Position;
|
|
72
|
+
}
|
|
73
|
+
/** Go struct */
|
|
74
|
+
export interface GoStructInfo {
|
|
75
|
+
name: string;
|
|
76
|
+
isExported: boolean;
|
|
77
|
+
fields: GoFieldInfo[];
|
|
78
|
+
embeddedTypes: string[];
|
|
79
|
+
startPosition: Position;
|
|
80
|
+
endPosition: Position;
|
|
81
|
+
}
|
|
82
|
+
/** Go interface method signature */
|
|
83
|
+
export interface GoInterfaceMethodInfo {
|
|
84
|
+
name: string;
|
|
85
|
+
parameters: GoParameterInfo[];
|
|
86
|
+
returns: GoReturnInfo[];
|
|
87
|
+
}
|
|
88
|
+
/** Go interface */
|
|
89
|
+
export interface GoInterfaceInfo {
|
|
90
|
+
name: string;
|
|
91
|
+
isExported: boolean;
|
|
92
|
+
methods: GoInterfaceMethodInfo[];
|
|
93
|
+
embeddedInterfaces: string[];
|
|
94
|
+
startPosition: Position;
|
|
95
|
+
endPosition: Position;
|
|
96
|
+
}
|
|
97
|
+
/** Go type alias */
|
|
98
|
+
export interface GoTypeAliasInfo {
|
|
99
|
+
name: string;
|
|
100
|
+
underlyingType: string;
|
|
101
|
+
isExported: boolean;
|
|
102
|
+
startPosition: Position;
|
|
103
|
+
endPosition: Position;
|
|
104
|
+
}
|
|
105
|
+
/** Go parse result */
|
|
106
|
+
export interface GoParseResult extends ParseResult {
|
|
107
|
+
package: GoPackageInfo | null;
|
|
108
|
+
imports: GoImportInfo[];
|
|
109
|
+
functions: GoFunctionInfo[];
|
|
110
|
+
methods: GoMethodInfo[];
|
|
111
|
+
structs: GoStructInfo[];
|
|
112
|
+
interfaces: GoInterfaceInfo[];
|
|
113
|
+
typeAliases: GoTypeAliasInfo[];
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Go parser using tree-sitter-go.
|
|
117
|
+
*
|
|
118
|
+
* Provides full semantic extraction for Go source files including:
|
|
119
|
+
* - Package declarations
|
|
120
|
+
* - Import statements
|
|
121
|
+
* - Function and method declarations
|
|
122
|
+
* - Struct and interface declarations
|
|
123
|
+
* - Type aliases
|
|
124
|
+
*/
|
|
125
|
+
export declare class TreeSitterGoParser {
|
|
126
|
+
private parser;
|
|
127
|
+
private initError;
|
|
128
|
+
/**
|
|
129
|
+
* Check if the parser is available.
|
|
130
|
+
*/
|
|
131
|
+
isAvailable(): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Get the initialization error if parser is not available.
|
|
134
|
+
*/
|
|
135
|
+
getError(): string | null;
|
|
136
|
+
/**
|
|
137
|
+
* Initialize the parser.
|
|
138
|
+
* Call this before parsing or check isAvailable() first.
|
|
139
|
+
*/
|
|
140
|
+
initialize(): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Parse Go source code and extract semantic information.
|
|
143
|
+
*
|
|
144
|
+
* @param source - Go source code
|
|
145
|
+
* @param filePath - Optional file path for error reporting
|
|
146
|
+
* @returns GoParseResult with full semantic information
|
|
147
|
+
*/
|
|
148
|
+
parse(source: string, _filePath?: string): GoParseResult;
|
|
149
|
+
/**
|
|
150
|
+
* Extract package declaration from the AST.
|
|
151
|
+
*/
|
|
152
|
+
private extractPackage;
|
|
153
|
+
/**
|
|
154
|
+
* Extract import statements from the AST.
|
|
155
|
+
*/
|
|
156
|
+
private extractImports;
|
|
157
|
+
/**
|
|
158
|
+
* Parse a single import spec.
|
|
159
|
+
*/
|
|
160
|
+
private parseImportSpec;
|
|
161
|
+
/**
|
|
162
|
+
* Extract function declarations (non-method functions).
|
|
163
|
+
*/
|
|
164
|
+
private extractFunctions;
|
|
165
|
+
/**
|
|
166
|
+
* Parse a function declaration.
|
|
167
|
+
*/
|
|
168
|
+
private parseFunctionDeclaration;
|
|
169
|
+
/**
|
|
170
|
+
* Extract method declarations (functions with receivers).
|
|
171
|
+
*/
|
|
172
|
+
private extractMethods;
|
|
173
|
+
/**
|
|
174
|
+
* Parse a method declaration.
|
|
175
|
+
*/
|
|
176
|
+
private parseMethodDeclaration;
|
|
177
|
+
/**
|
|
178
|
+
* Parse a receiver declaration.
|
|
179
|
+
*/
|
|
180
|
+
private parseReceiver;
|
|
181
|
+
/**
|
|
182
|
+
* Extract parameters from a parameter list.
|
|
183
|
+
*/
|
|
184
|
+
private extractParameters;
|
|
185
|
+
/**
|
|
186
|
+
* Extract return types from a result node.
|
|
187
|
+
*/
|
|
188
|
+
private extractReturns;
|
|
189
|
+
/**
|
|
190
|
+
* Extract struct declarations.
|
|
191
|
+
*/
|
|
192
|
+
private extractStructs;
|
|
193
|
+
/**
|
|
194
|
+
* Parse a struct type.
|
|
195
|
+
*/
|
|
196
|
+
private parseStruct;
|
|
197
|
+
/**
|
|
198
|
+
* Parse a struct field.
|
|
199
|
+
*/
|
|
200
|
+
private parseField;
|
|
201
|
+
/**
|
|
202
|
+
* Extract interface declarations.
|
|
203
|
+
*/
|
|
204
|
+
private extractInterfaces;
|
|
205
|
+
/**
|
|
206
|
+
* Parse an interface type.
|
|
207
|
+
*/
|
|
208
|
+
private parseInterface;
|
|
209
|
+
/**
|
|
210
|
+
* Parse an interface method signature.
|
|
211
|
+
*/
|
|
212
|
+
private parseInterfaceMethod;
|
|
213
|
+
/**
|
|
214
|
+
* Extract type alias declarations.
|
|
215
|
+
*/
|
|
216
|
+
private extractTypeAliases;
|
|
217
|
+
/**
|
|
218
|
+
* Check if a node is a type node.
|
|
219
|
+
*/
|
|
220
|
+
private isTypeNode;
|
|
221
|
+
/**
|
|
222
|
+
* Convert tree-sitter AST to drift AST format.
|
|
223
|
+
*/
|
|
224
|
+
private convertToAST;
|
|
225
|
+
/**
|
|
226
|
+
* Convert a single tree-sitter node to drift ASTNode.
|
|
227
|
+
*/
|
|
228
|
+
private convertNode;
|
|
229
|
+
/**
|
|
230
|
+
* Map tree-sitter node types to drift node types.
|
|
231
|
+
*/
|
|
232
|
+
private mapNodeType;
|
|
233
|
+
/**
|
|
234
|
+
* Convert tree-sitter position to drift Position.
|
|
235
|
+
*/
|
|
236
|
+
private toPosition;
|
|
237
|
+
/**
|
|
238
|
+
* Find a child node by type.
|
|
239
|
+
*/
|
|
240
|
+
private findChildByType;
|
|
241
|
+
/**
|
|
242
|
+
* Find all nodes of a specific type in the tree.
|
|
243
|
+
*/
|
|
244
|
+
private findNodesOfType;
|
|
245
|
+
/**
|
|
246
|
+
* Create an error result.
|
|
247
|
+
*/
|
|
248
|
+
private createErrorResult;
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=tree-sitter-go-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-sitter-go-parser.d.ts","sourceRoot":"","sources":["../../../src/parsers/tree-sitter/tree-sitter-go-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAgB,WAAW,EAAE,MAAM,aAAa,CAAC;AAYvE,6BAA6B;AAC7B,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,QAAQ,CAAC;IACxB,WAAW,EAAE,QAAQ,CAAC;CACvB;AAED,0BAA0B;AAC1B,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,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