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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Friction Scorer
|
|
3
|
+
*
|
|
4
|
+
* Calculates friction metrics for an approach:
|
|
5
|
+
* - Code churn (how much code needs to change)
|
|
6
|
+
* - Pattern deviation (how far from established patterns)
|
|
7
|
+
* - Testing effort (how much testing is needed)
|
|
8
|
+
* - Refactoring required (structural changes needed)
|
|
9
|
+
* - Learning curve (complexity for developers)
|
|
10
|
+
*
|
|
11
|
+
* @module simulation/scorers/friction-scorer
|
|
12
|
+
*/
|
|
13
|
+
import type { CallGraph } from '../../call-graph/types.js';
|
|
14
|
+
import type { IPatternService } from '../../patterns/service.js';
|
|
15
|
+
import type { SimulationApproach, FrictionMetrics } from '../types.js';
|
|
16
|
+
export interface FrictionScorerConfig {
|
|
17
|
+
projectRoot: string;
|
|
18
|
+
callGraph?: CallGraph | undefined;
|
|
19
|
+
patternService?: IPatternService | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Scores the friction of implementing an approach
|
|
23
|
+
*/
|
|
24
|
+
export declare class FrictionScorer {
|
|
25
|
+
constructor(_config: FrictionScorerConfig);
|
|
26
|
+
/**
|
|
27
|
+
* Calculate friction metrics for an approach
|
|
28
|
+
*/
|
|
29
|
+
score(approach: SimulationApproach): Promise<FrictionMetrics>;
|
|
30
|
+
private calculateCodeChurn;
|
|
31
|
+
private getCodeChurnReason;
|
|
32
|
+
private calculatePatternDeviation;
|
|
33
|
+
private getPatternDeviationReason;
|
|
34
|
+
private calculateTestingEffort;
|
|
35
|
+
private getTestingEffortReason;
|
|
36
|
+
private calculateRefactoringRequired;
|
|
37
|
+
private getRefactoringReason;
|
|
38
|
+
private calculateLearningCurve;
|
|
39
|
+
private getLearningCurveReason;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create a friction scorer
|
|
43
|
+
*/
|
|
44
|
+
export declare function createFrictionScorer(config: FrictionScorerConfig): FrictionScorer;
|
|
45
|
+
//# sourceMappingURL=friction-scorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friction-scorer.d.ts","sourceRoot":"","sources":["../../../src/simulation/scorers/friction-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EAEhB,MAAM,aAAa,CAAC;AAMrB,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;CAC9C;AAMD;;GAEG;AACH,qBAAa,cAAc;gBAEb,OAAO,EAAE,oBAAoB;IAIzC;;OAEG;IACG,KAAK,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAuEnE,OAAO,CAAC,kBAAkB;IAoC1B,OAAO,CAAC,kBAAkB;YAkBZ,yBAAyB;IA4BvC,OAAO,CAAC,yBAAyB;IAgBjC,OAAO,CAAC,sBAAsB;IAqC9B,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,4BAA4B;IAiCpC,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,sBAAsB;IAoC9B,OAAO,CAAC,sBAAsB;CAY/B;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAEjF"}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Friction Scorer
|
|
3
|
+
*
|
|
4
|
+
* Calculates friction metrics for an approach:
|
|
5
|
+
* - Code churn (how much code needs to change)
|
|
6
|
+
* - Pattern deviation (how far from established patterns)
|
|
7
|
+
* - Testing effort (how much testing is needed)
|
|
8
|
+
* - Refactoring required (structural changes needed)
|
|
9
|
+
* - Learning curve (complexity for developers)
|
|
10
|
+
*
|
|
11
|
+
* @module simulation/scorers/friction-scorer
|
|
12
|
+
*/
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Friction Scorer
|
|
15
|
+
// ============================================================================
|
|
16
|
+
/**
|
|
17
|
+
* Scores the friction of implementing an approach
|
|
18
|
+
*/
|
|
19
|
+
export class FrictionScorer {
|
|
20
|
+
// Config stored for potential future use
|
|
21
|
+
constructor(_config) {
|
|
22
|
+
// Config available for future extensions
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Calculate friction metrics for an approach
|
|
26
|
+
*/
|
|
27
|
+
async score(approach) {
|
|
28
|
+
const breakdown = [];
|
|
29
|
+
// 1. Code Churn (0-100)
|
|
30
|
+
const codeChurn = this.calculateCodeChurn(approach);
|
|
31
|
+
breakdown.push({
|
|
32
|
+
metric: 'codeChurn',
|
|
33
|
+
value: codeChurn,
|
|
34
|
+
weight: 0.25,
|
|
35
|
+
contribution: codeChurn * 0.25,
|
|
36
|
+
reason: this.getCodeChurnReason(approach),
|
|
37
|
+
});
|
|
38
|
+
// 2. Pattern Deviation (0-100)
|
|
39
|
+
const patternDeviation = await this.calculatePatternDeviation(approach);
|
|
40
|
+
breakdown.push({
|
|
41
|
+
metric: 'patternDeviation',
|
|
42
|
+
value: patternDeviation,
|
|
43
|
+
weight: 0.25,
|
|
44
|
+
contribution: patternDeviation * 0.25,
|
|
45
|
+
reason: this.getPatternDeviationReason(approach, patternDeviation),
|
|
46
|
+
});
|
|
47
|
+
// 3. Testing Effort (0-100)
|
|
48
|
+
const testingEffort = this.calculateTestingEffort(approach);
|
|
49
|
+
breakdown.push({
|
|
50
|
+
metric: 'testingEffort',
|
|
51
|
+
value: testingEffort,
|
|
52
|
+
weight: 0.20,
|
|
53
|
+
contribution: testingEffort * 0.20,
|
|
54
|
+
reason: this.getTestingEffortReason(approach),
|
|
55
|
+
});
|
|
56
|
+
// 4. Refactoring Required (0-100)
|
|
57
|
+
const refactoringRequired = this.calculateRefactoringRequired(approach);
|
|
58
|
+
breakdown.push({
|
|
59
|
+
metric: 'refactoringRequired',
|
|
60
|
+
value: refactoringRequired,
|
|
61
|
+
weight: 0.15,
|
|
62
|
+
contribution: refactoringRequired * 0.15,
|
|
63
|
+
reason: this.getRefactoringReason(approach),
|
|
64
|
+
});
|
|
65
|
+
// 5. Learning Curve (0-100)
|
|
66
|
+
const learningCurve = this.calculateLearningCurve(approach);
|
|
67
|
+
breakdown.push({
|
|
68
|
+
metric: 'learningCurve',
|
|
69
|
+
value: learningCurve,
|
|
70
|
+
weight: 0.15,
|
|
71
|
+
contribution: learningCurve * 0.15,
|
|
72
|
+
reason: this.getLearningCurveReason(approach),
|
|
73
|
+
});
|
|
74
|
+
// Calculate overall friction (weighted average)
|
|
75
|
+
const overall = breakdown.reduce((sum, b) => sum + b.contribution, 0);
|
|
76
|
+
return {
|
|
77
|
+
codeChurn,
|
|
78
|
+
patternDeviation,
|
|
79
|
+
testingEffort,
|
|
80
|
+
refactoringRequired,
|
|
81
|
+
learningCurve,
|
|
82
|
+
overall,
|
|
83
|
+
breakdown,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
// ==========================================================================
|
|
87
|
+
// Code Churn
|
|
88
|
+
// ==========================================================================
|
|
89
|
+
calculateCodeChurn(approach) {
|
|
90
|
+
const linesAdded = approach.estimatedLinesAdded ?? 0;
|
|
91
|
+
const linesModified = approach.estimatedLinesModified ?? 0;
|
|
92
|
+
const filesAffected = approach.targetFiles.length;
|
|
93
|
+
const newFiles = approach.newFiles?.length ?? 0;
|
|
94
|
+
// Score based on total changes
|
|
95
|
+
// Low: < 50 lines, < 3 files
|
|
96
|
+
// Medium: 50-200 lines, 3-10 files
|
|
97
|
+
// High: > 200 lines, > 10 files
|
|
98
|
+
let score = 0;
|
|
99
|
+
// Lines score (0-50)
|
|
100
|
+
const totalLines = linesAdded + linesModified;
|
|
101
|
+
if (totalLines < 50) {
|
|
102
|
+
score += (totalLines / 50) * 25;
|
|
103
|
+
}
|
|
104
|
+
else if (totalLines < 200) {
|
|
105
|
+
score += 25 + ((totalLines - 50) / 150) * 25;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
score += 50 + Math.min(50, (totalLines - 200) / 200 * 50);
|
|
109
|
+
}
|
|
110
|
+
// Files score (0-50)
|
|
111
|
+
const totalFiles = filesAffected + newFiles;
|
|
112
|
+
if (totalFiles < 3) {
|
|
113
|
+
score += (totalFiles / 3) * 25;
|
|
114
|
+
}
|
|
115
|
+
else if (totalFiles < 10) {
|
|
116
|
+
score += 25 + ((totalFiles - 3) / 7) * 25;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
score += 50 + Math.min(50, (totalFiles - 10) / 10 * 50);
|
|
120
|
+
}
|
|
121
|
+
return Math.min(100, Math.round(score));
|
|
122
|
+
}
|
|
123
|
+
getCodeChurnReason(approach) {
|
|
124
|
+
const linesAdded = approach.estimatedLinesAdded ?? 0;
|
|
125
|
+
const linesModified = approach.estimatedLinesModified ?? 0;
|
|
126
|
+
const totalFiles = approach.targetFiles.length + (approach.newFiles?.length ?? 0);
|
|
127
|
+
if (linesAdded + linesModified < 50 && totalFiles < 3) {
|
|
128
|
+
return 'Minimal code changes required';
|
|
129
|
+
}
|
|
130
|
+
else if (linesAdded + linesModified < 200 && totalFiles < 10) {
|
|
131
|
+
return 'Moderate code changes across several files';
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
return 'Significant code changes across many files';
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// ==========================================================================
|
|
138
|
+
// Pattern Deviation
|
|
139
|
+
// ==========================================================================
|
|
140
|
+
async calculatePatternDeviation(approach) {
|
|
141
|
+
// If approach follows patterns, lower deviation
|
|
142
|
+
const followsPatterns = approach.followsPatterns?.length ?? 0;
|
|
143
|
+
if (followsPatterns >= 3) {
|
|
144
|
+
return 10; // Very aligned with patterns
|
|
145
|
+
}
|
|
146
|
+
else if (followsPatterns >= 1) {
|
|
147
|
+
return 30; // Somewhat aligned
|
|
148
|
+
}
|
|
149
|
+
// Check if strategy is common for the language
|
|
150
|
+
const commonStrategies = {
|
|
151
|
+
typescript: ['middleware', 'decorator', 'wrapper', 'guard'],
|
|
152
|
+
javascript: ['middleware', 'wrapper'],
|
|
153
|
+
python: ['decorator', 'middleware', 'mixin'],
|
|
154
|
+
java: ['aspect', 'interceptor', 'filter', 'guard'],
|
|
155
|
+
csharp: ['filter', 'middleware', 'attribute'],
|
|
156
|
+
php: ['middleware', 'policy', 'guard'],
|
|
157
|
+
};
|
|
158
|
+
const langStrategies = commonStrategies[approach.language] ?? [];
|
|
159
|
+
if (langStrategies.includes(approach.strategy)) {
|
|
160
|
+
return 40; // Common strategy but no pattern match
|
|
161
|
+
}
|
|
162
|
+
return 70; // Uncommon approach
|
|
163
|
+
}
|
|
164
|
+
getPatternDeviationReason(approach, score) {
|
|
165
|
+
if (score <= 20) {
|
|
166
|
+
return `Follows ${approach.followsPatterns?.length ?? 0} established patterns`;
|
|
167
|
+
}
|
|
168
|
+
else if (score <= 40) {
|
|
169
|
+
return 'Partially aligned with existing patterns';
|
|
170
|
+
}
|
|
171
|
+
else if (score <= 60) {
|
|
172
|
+
return 'Uses common strategy but no direct pattern match';
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
return 'May introduce new patterns to the codebase';
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
// ==========================================================================
|
|
179
|
+
// Testing Effort
|
|
180
|
+
// ==========================================================================
|
|
181
|
+
calculateTestingEffort(approach) {
|
|
182
|
+
// Base testing effort on strategy complexity
|
|
183
|
+
const strategyTestingEffort = {
|
|
184
|
+
middleware: 40, // Easy to test in isolation
|
|
185
|
+
decorator: 35, // Easy to test
|
|
186
|
+
wrapper: 45, // Moderate
|
|
187
|
+
'per-route': 60, // Need to test each route
|
|
188
|
+
'per-function': 70, // Need to test each function
|
|
189
|
+
centralized: 30, // Single point to test
|
|
190
|
+
distributed: 75, // Many points to test
|
|
191
|
+
aspect: 50, // Moderate
|
|
192
|
+
filter: 40, // Easy to test
|
|
193
|
+
interceptor: 45, // Moderate
|
|
194
|
+
guard: 35, // Easy to test
|
|
195
|
+
policy: 40, // Easy to test
|
|
196
|
+
dependency: 35, // Easy with DI
|
|
197
|
+
mixin: 50, // Moderate
|
|
198
|
+
custom: 65, // Unknown complexity
|
|
199
|
+
};
|
|
200
|
+
let score = strategyTestingEffort[approach.strategy] ?? 50;
|
|
201
|
+
// Adjust based on files affected
|
|
202
|
+
const filesAffected = approach.targetFiles.length;
|
|
203
|
+
if (filesAffected > 10) {
|
|
204
|
+
score += 15;
|
|
205
|
+
}
|
|
206
|
+
else if (filesAffected > 5) {
|
|
207
|
+
score += 10;
|
|
208
|
+
}
|
|
209
|
+
// Adjust based on new files (need new tests)
|
|
210
|
+
const newFiles = approach.newFiles?.length ?? 0;
|
|
211
|
+
score += newFiles * 5;
|
|
212
|
+
return Math.min(100, Math.round(score));
|
|
213
|
+
}
|
|
214
|
+
getTestingEffortReason(approach) {
|
|
215
|
+
const score = this.calculateTestingEffort(approach);
|
|
216
|
+
if (score <= 35) {
|
|
217
|
+
return 'Easy to test in isolation';
|
|
218
|
+
}
|
|
219
|
+
else if (score <= 50) {
|
|
220
|
+
return 'Moderate testing effort required';
|
|
221
|
+
}
|
|
222
|
+
else if (score <= 70) {
|
|
223
|
+
return 'Significant testing effort across multiple components';
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
return 'Extensive testing required due to distributed changes';
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
// ==========================================================================
|
|
230
|
+
// Refactoring Required
|
|
231
|
+
// ==========================================================================
|
|
232
|
+
calculateRefactoringRequired(approach) {
|
|
233
|
+
// Strategies that typically require more refactoring
|
|
234
|
+
const refactoringIntensity = {
|
|
235
|
+
middleware: 20, // Usually additive
|
|
236
|
+
decorator: 15, // Usually additive
|
|
237
|
+
wrapper: 30, // May need to wrap existing code
|
|
238
|
+
'per-route': 50, // Need to modify each route
|
|
239
|
+
'per-function': 60, // Need to modify each function
|
|
240
|
+
centralized: 25, // May need to redirect calls
|
|
241
|
+
distributed: 55, // Changes spread out
|
|
242
|
+
aspect: 20, // Usually non-invasive
|
|
243
|
+
filter: 25, // Usually additive
|
|
244
|
+
interceptor: 25, // Usually additive
|
|
245
|
+
guard: 20, // Usually additive
|
|
246
|
+
policy: 25, // Usually additive
|
|
247
|
+
dependency: 35, // May need DI setup
|
|
248
|
+
mixin: 40, // May need class changes
|
|
249
|
+
custom: 50, // Unknown
|
|
250
|
+
};
|
|
251
|
+
let score = refactoringIntensity[approach.strategy] ?? 40;
|
|
252
|
+
// Adjust based on modified lines
|
|
253
|
+
const linesModified = approach.estimatedLinesModified ?? 0;
|
|
254
|
+
if (linesModified > 100) {
|
|
255
|
+
score += 20;
|
|
256
|
+
}
|
|
257
|
+
else if (linesModified > 50) {
|
|
258
|
+
score += 10;
|
|
259
|
+
}
|
|
260
|
+
return Math.min(100, Math.round(score));
|
|
261
|
+
}
|
|
262
|
+
getRefactoringReason(approach) {
|
|
263
|
+
const score = this.calculateRefactoringRequired(approach);
|
|
264
|
+
if (score <= 25) {
|
|
265
|
+
return 'Mostly additive changes, minimal refactoring';
|
|
266
|
+
}
|
|
267
|
+
else if (score <= 45) {
|
|
268
|
+
return 'Some structural changes required';
|
|
269
|
+
}
|
|
270
|
+
else if (score <= 65) {
|
|
271
|
+
return 'Moderate refactoring of existing code';
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
return 'Significant refactoring required';
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
// ==========================================================================
|
|
278
|
+
// Learning Curve
|
|
279
|
+
// ==========================================================================
|
|
280
|
+
calculateLearningCurve(approach) {
|
|
281
|
+
// Base learning curve on strategy familiarity
|
|
282
|
+
const strategyComplexity = {
|
|
283
|
+
middleware: 25, // Well-known pattern
|
|
284
|
+
decorator: 30, // Common but requires understanding
|
|
285
|
+
wrapper: 25, // Simple concept
|
|
286
|
+
'per-route': 20, // Straightforward
|
|
287
|
+
'per-function': 20, // Straightforward
|
|
288
|
+
centralized: 30, // Need to understand central point
|
|
289
|
+
distributed: 45, // Need to understand all points
|
|
290
|
+
aspect: 55, // AOP concepts
|
|
291
|
+
filter: 25, // Well-known
|
|
292
|
+
interceptor: 35, // Framework-specific
|
|
293
|
+
guard: 30, // Framework-specific
|
|
294
|
+
policy: 35, // Framework-specific
|
|
295
|
+
dependency: 40, // DI concepts
|
|
296
|
+
mixin: 45, // Multiple inheritance concepts
|
|
297
|
+
custom: 50, // Unknown
|
|
298
|
+
};
|
|
299
|
+
let score = strategyComplexity[approach.strategy] ?? 40;
|
|
300
|
+
// Adjust based on framework
|
|
301
|
+
if (approach.framework) {
|
|
302
|
+
// Framework-specific approaches may have steeper learning curve
|
|
303
|
+
// if team is unfamiliar
|
|
304
|
+
score += 10;
|
|
305
|
+
}
|
|
306
|
+
// Adjust based on new files (new concepts to learn)
|
|
307
|
+
const newFiles = approach.newFiles?.length ?? 0;
|
|
308
|
+
score += newFiles * 3;
|
|
309
|
+
return Math.min(100, Math.round(score));
|
|
310
|
+
}
|
|
311
|
+
getLearningCurveReason(approach) {
|
|
312
|
+
const score = this.calculateLearningCurve(approach);
|
|
313
|
+
if (score <= 30) {
|
|
314
|
+
return 'Uses familiar patterns, easy to understand';
|
|
315
|
+
}
|
|
316
|
+
else if (score <= 45) {
|
|
317
|
+
return 'Moderate complexity, some learning required';
|
|
318
|
+
}
|
|
319
|
+
else if (score <= 60) {
|
|
320
|
+
return 'Requires understanding of specific concepts';
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
return 'Steep learning curve, advanced concepts';
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
// ============================================================================
|
|
328
|
+
// Factory Function
|
|
329
|
+
// ============================================================================
|
|
330
|
+
/**
|
|
331
|
+
* Create a friction scorer
|
|
332
|
+
*/
|
|
333
|
+
export function createFrictionScorer(config) {
|
|
334
|
+
return new FrictionScorer(config);
|
|
335
|
+
}
|
|
336
|
+
//# sourceMappingURL=friction-scorer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friction-scorer.js","sourceRoot":"","sources":["../../../src/simulation/scorers/friction-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAoBH,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,yCAAyC;IACzC,YAAY,OAA6B;QACvC,yCAAyC;IAC3C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,QAA4B;QACtC,MAAM,SAAS,GAAwB,EAAE,CAAC;QAE1C,wBAAwB;QACxB,MAAM,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACpD,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,WAAW;YACnB,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,SAAS,GAAG,IAAI;YAC9B,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC;SAC1C,CAAC,CAAC;QAEH,+BAA+B;QAC/B,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;QACxE,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,kBAAkB;YAC1B,KAAK,EAAE,gBAAgB;YACvB,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,gBAAgB,GAAG,IAAI;YACrC,MAAM,EAAE,IAAI,CAAC,yBAAyB,CAAC,QAAQ,EAAE,gBAAgB,CAAC;SACnE,CAAC,C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
+
* - Entry points affected
|
|
8
|
+
* - Sensitive data paths
|
|
9
|
+
* - Risk assessment
|
|
10
|
+
*
|
|
11
|
+
* @module simulation/scorers/impact-scorer
|
|
12
|
+
*/
|
|
13
|
+
import type { CallGraph } from '../../call-graph/types.js';
|
|
14
|
+
import type { SimulationApproach, ImpactMetrics } from '../types.js';
|
|
15
|
+
export interface ImpactScorerConfig {
|
|
16
|
+
projectRoot: string;
|
|
17
|
+
callGraph?: CallGraph | undefined;
|
|
18
|
+
maxDepth?: number | undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Scores the impact of implementing an approach
|
|
22
|
+
*/
|
|
23
|
+
export declare class ImpactScorer {
|
|
24
|
+
private readonly config;
|
|
25
|
+
private impactAnalyzer;
|
|
26
|
+
constructor(config: ImpactScorerConfig);
|
|
27
|
+
/**
|
|
28
|
+
* Calculate impact metrics for an approach
|
|
29
|
+
*/
|
|
30
|
+
score(approach: SimulationApproach): Promise<ImpactMetrics>;
|
|
31
|
+
/**
|
|
32
|
+
* Analyze impact of all target files
|
|
33
|
+
*/
|
|
34
|
+
private analyzeTargetFiles;
|
|
35
|
+
/**
|
|
36
|
+
* Calculate overall risk score (0-100)
|
|
37
|
+
*/
|
|
38
|
+
private calculateRiskScore;
|
|
39
|
+
/**
|
|
40
|
+
* Get risk level from score
|
|
41
|
+
*/
|
|
42
|
+
private getRiskLevel;
|
|
43
|
+
/**
|
|
44
|
+
* Detect potential breaking changes
|
|
45
|
+
*/
|
|
46
|
+
private detectBreakingChanges;
|
|
47
|
+
/**
|
|
48
|
+
* Estimate impact when call graph is not available
|
|
49
|
+
*/
|
|
50
|
+
private estimateImpact;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create an impact scorer
|
|
54
|
+
*/
|
|
55
|
+
export declare function createImpactScorer(config: ImpactScorerConfig): ImpactScorer;
|
|
56
|
+
//# sourceMappingURL=impact-scorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impact-scorer.d.ts","sourceRoot":"","sources":["../../../src/simulation/scorers/impact-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EAEd,MAAM,aAAa,CAAC;AAMrB,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAMD;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,cAAc,CAA+B;gBAEzC,MAAM,EAAE,kBAAkB;IAOtC;;OAEG;IACG,KAAK,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAoCjE;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA2D1B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA4D1B;;OAEG;IACH,OAAO,CAAC,YAAY;IAWpB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAwC7B;;OAEG;IACH,OAAO,CAAC,cAAc;CAiDvB;AAMD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAE3E"}
|