driftdetect-core 0.4.6 → 0.6.0
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/csharp-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/csharp-data-access-extractor.js +8 -0
- package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/csharp-extractor.d.ts +35 -0
- package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/csharp-extractor.js +362 -4
- package/dist/call-graph/extractors/csharp-extractor.js.map +1 -1
- package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts +37 -0
- package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/csharp-hybrid-extractor.js +408 -0
- package/dist/call-graph/extractors/csharp-hybrid-extractor.js.map +1 -0
- 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/hybrid-extractor-base.d.ts +102 -0
- package/dist/call-graph/extractors/hybrid-extractor-base.d.ts.map +1 -0
- package/dist/call-graph/extractors/hybrid-extractor-base.js +289 -0
- package/dist/call-graph/extractors/hybrid-extractor-base.js.map +1 -0
- package/dist/call-graph/extractors/index.d.ts +17 -13
- package/dist/call-graph/extractors/index.d.ts.map +1 -1
- package/dist/call-graph/extractors/index.js +24 -23
- package/dist/call-graph/extractors/index.js.map +1 -1
- package/dist/call-graph/extractors/java-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/java-data-access-extractor.js +8 -0
- package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/java-extractor.d.ts +15 -0
- package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/java-extractor.js +120 -4
- package/dist/call-graph/extractors/java-extractor.js.map +1 -1
- package/dist/call-graph/extractors/java-hybrid-extractor.d.ts +36 -0
- package/dist/call-graph/extractors/java-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/java-hybrid-extractor.js +426 -0
- package/dist/call-graph/extractors/java-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/php-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/php-data-access-extractor.js +8 -0
- package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/php-extractor.d.ts +48 -1
- package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/php-extractor.js +460 -6
- package/dist/call-graph/extractors/php-extractor.js.map +1 -1
- package/dist/call-graph/extractors/php-hybrid-extractor.d.ts +35 -0
- package/dist/call-graph/extractors/php-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/php-hybrid-extractor.js +393 -0
- package/dist/call-graph/extractors/php-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/python-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/python-data-access-extractor.js +8 -0
- package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/python-hybrid-extractor.d.ts +85 -0
- package/dist/call-graph/extractors/python-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/python-hybrid-extractor.js +462 -0
- package/dist/call-graph/extractors/python-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts +154 -0
- package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/base-regex-extractor.js +346 -0
- package/dist/call-graph/extractors/regex/base-regex-extractor.js.map +1 -0
- package/dist/call-graph/extractors/regex/csharp-regex.d.ts +34 -0
- package/dist/call-graph/extractors/regex/csharp-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/csharp-regex.js +393 -0
- package/dist/call-graph/extractors/regex/csharp-regex.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 +26 -0
- package/dist/call-graph/extractors/regex/index.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/index.js +74 -0
- package/dist/call-graph/extractors/regex/index.js.map +1 -0
- package/dist/call-graph/extractors/regex/java-regex.d.ts +34 -0
- package/dist/call-graph/extractors/regex/java-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/java-regex.js +327 -0
- package/dist/call-graph/extractors/regex/java-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/php-regex.d.ts +30 -0
- package/dist/call-graph/extractors/regex/php-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/php-regex.js +333 -0
- package/dist/call-graph/extractors/regex/php-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/python-regex.d.ts +46 -0
- package/dist/call-graph/extractors/regex/python-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/python-regex.js +380 -0
- package/dist/call-graph/extractors/regex/python-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/typescript-regex.d.ts +27 -0
- package/dist/call-graph/extractors/regex/typescript-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/typescript-regex.js +349 -0
- package/dist/call-graph/extractors/regex/typescript-regex.js.map +1 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +7 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
- package/dist/call-graph/extractors/semantic-data-access-scanner.js +7 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
- package/dist/call-graph/extractors/types.d.ts +111 -0
- package/dist/call-graph/extractors/types.d.ts.map +1 -0
- package/dist/call-graph/extractors/types.js +68 -0
- package/dist/call-graph/extractors/types.js.map +1 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/typescript-data-access-extractor.js +8 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts +116 -0
- package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/typescript-hybrid-extractor.js +635 -0
- package/dist/call-graph/extractors/typescript-hybrid-extractor.js.map +1 -0
- 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/error-handling/error-handling-analyzer.d.ts +73 -0
- package/dist/error-handling/error-handling-analyzer.d.ts.map +1 -0
- package/dist/error-handling/error-handling-analyzer.js +706 -0
- package/dist/error-handling/error-handling-analyzer.js.map +1 -0
- package/dist/error-handling/index.d.ts +8 -0
- package/dist/error-handling/index.d.ts.map +1 -0
- package/dist/error-handling/index.js +8 -0
- package/dist/error-handling/index.js.map +1 -0
- package/dist/error-handling/types.d.ts +307 -0
- package/dist/error-handling/types.d.ts.map +1 -0
- package/dist/error-handling/types.js +7 -0
- package/dist/error-handling/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 +25 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -1
- package/dist/lake/pattern-shard-store.d.ts +6 -0
- package/dist/lake/pattern-shard-store.d.ts.map +1 -1
- package/dist/lake/pattern-shard-store.js +6 -0
- package/dist/lake/pattern-shard-store.js.map +1 -1
- package/dist/module-coupling/coupling-analyzer.d.ts +73 -0
- package/dist/module-coupling/coupling-analyzer.d.ts.map +1 -0
- package/dist/module-coupling/coupling-analyzer.js +668 -0
- package/dist/module-coupling/coupling-analyzer.js.map +1 -0
- package/dist/module-coupling/index.d.ts +9 -0
- package/dist/module-coupling/index.d.ts.map +1 -0
- package/dist/module-coupling/index.js +9 -0
- package/dist/module-coupling/index.js.map +1 -0
- package/dist/module-coupling/types.d.ts +273 -0
- package/dist/module-coupling/types.d.ts.map +1 -0
- package/dist/module-coupling/types.js +8 -0
- package/dist/module-coupling/types.js.map +1 -0
- 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/patterns/adapters/index.d.ts +11 -0
- package/dist/patterns/adapters/index.d.ts.map +1 -0
- package/dist/patterns/adapters/index.js +11 -0
- package/dist/patterns/adapters/index.js.map +1 -0
- package/dist/patterns/adapters/pattern-store-adapter.d.ts +59 -0
- package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -0
- package/dist/patterns/adapters/pattern-store-adapter.js +468 -0
- package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -0
- package/dist/patterns/adapters/service-factory.d.ts +40 -0
- package/dist/patterns/adapters/service-factory.d.ts.map +1 -0
- package/dist/patterns/adapters/service-factory.js +144 -0
- package/dist/patterns/adapters/service-factory.js.map +1 -0
- package/dist/patterns/errors.d.ts +32 -0
- package/dist/patterns/errors.d.ts.map +1 -0
- package/dist/patterns/errors.js +45 -0
- package/dist/patterns/errors.js.map +1 -0
- package/dist/patterns/impl/cached-repository.d.ts +79 -0
- package/dist/patterns/impl/cached-repository.d.ts.map +1 -0
- package/dist/patterns/impl/cached-repository.js +296 -0
- package/dist/patterns/impl/cached-repository.js.map +1 -0
- package/dist/patterns/impl/file-repository.d.ts +75 -0
- package/dist/patterns/impl/file-repository.d.ts.map +1 -0
- package/dist/patterns/impl/file-repository.js +507 -0
- package/dist/patterns/impl/file-repository.js.map +1 -0
- package/dist/patterns/impl/index.d.ts +16 -0
- package/dist/patterns/impl/index.d.ts.map +1 -0
- package/dist/patterns/impl/index.js +21 -0
- package/dist/patterns/impl/index.js.map +1 -0
- package/dist/patterns/impl/memory-repository.d.ts +56 -0
- package/dist/patterns/impl/memory-repository.d.ts.map +1 -0
- package/dist/patterns/impl/memory-repository.js +323 -0
- package/dist/patterns/impl/memory-repository.js.map +1 -0
- package/dist/patterns/impl/pattern-service.d.ts +52 -0
- package/dist/patterns/impl/pattern-service.d.ts.map +1 -0
- package/dist/patterns/impl/pattern-service.js +382 -0
- package/dist/patterns/impl/pattern-service.js.map +1 -0
- package/dist/patterns/impl/repository-factory.d.ts +44 -0
- package/dist/patterns/impl/repository-factory.d.ts.map +1 -0
- package/dist/patterns/impl/repository-factory.js +140 -0
- package/dist/patterns/impl/repository-factory.js.map +1 -0
- package/dist/patterns/impl/unified-file-repository.d.ts +111 -0
- package/dist/patterns/impl/unified-file-repository.d.ts.map +1 -0
- package/dist/patterns/impl/unified-file-repository.js +677 -0
- package/dist/patterns/impl/unified-file-repository.js.map +1 -0
- package/dist/patterns/index.d.ts +23 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +41 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/repository.d.ts +241 -0
- package/dist/patterns/repository.d.ts.map +1 -0
- package/dist/patterns/repository.js +23 -0
- package/dist/patterns/repository.js.map +1 -0
- package/dist/patterns/service.d.ts +245 -0
- package/dist/patterns/service.d.ts.map +1 -0
- package/dist/patterns/service.js +25 -0
- package/dist/patterns/service.js.map +1 -0
- package/dist/patterns/types.d.ts +227 -0
- package/dist/patterns/types.d.ts.map +1 -0
- package/dist/patterns/types.js +117 -0
- package/dist/patterns/types.js.map +1 -0
- 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/store/pattern-store.d.ts +6 -0
- package/dist/store/pattern-store.d.ts.map +1 -1
- package/dist/store/pattern-store.js +6 -0
- package/dist/store/pattern-store.js.map +1 -1
- package/dist/test-topology/extractors/base-test-extractor.d.ts +89 -0
- package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/base-test-extractor.js +187 -0
- package/dist/test-topology/extractors/base-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/csharp-test-extractor.d.ts +23 -0
- package/dist/test-topology/extractors/csharp-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/csharp-test-extractor.js +367 -0
- package/dist/test-topology/extractors/csharp-test-extractor.js.map +1 -0
- 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 +13 -0
- package/dist/test-topology/extractors/index.d.ts.map +1 -0
- package/dist/test-topology/extractors/index.js +13 -0
- package/dist/test-topology/extractors/index.js.map +1 -0
- package/dist/test-topology/extractors/java-test-extractor.d.ts +20 -0
- package/dist/test-topology/extractors/java-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/java-test-extractor.js +275 -0
- package/dist/test-topology/extractors/java-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/php-test-extractor.d.ts +24 -0
- package/dist/test-topology/extractors/php-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/php-test-extractor.js +409 -0
- package/dist/test-topology/extractors/php-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/python-test-extractor.d.ts +23 -0
- package/dist/test-topology/extractors/python-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/python-test-extractor.js +342 -0
- package/dist/test-topology/extractors/python-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts +51 -0
- package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/csharp-test-regex.js +383 -0
- package/dist/test-topology/extractors/regex/csharp-test-regex.js.map +1 -0
- 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 +19 -0
- package/dist/test-topology/extractors/regex/index.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/index.js +47 -0
- package/dist/test-topology/extractors/regex/index.js.map +1 -0
- package/dist/test-topology/extractors/regex/java-test-regex.d.ts +50 -0
- package/dist/test-topology/extractors/regex/java-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/java-test-regex.js +370 -0
- package/dist/test-topology/extractors/regex/java-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/php-test-regex.d.ts +56 -0
- package/dist/test-topology/extractors/regex/php-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/php-test-regex.js +503 -0
- package/dist/test-topology/extractors/regex/php-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/python-test-regex.d.ts +57 -0
- package/dist/test-topology/extractors/regex/python-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/python-test-regex.js +381 -0
- package/dist/test-topology/extractors/regex/python-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts +60 -0
- package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/typescript-test-regex.js +368 -0
- package/dist/test-topology/extractors/regex/typescript-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/typescript-test-extractor.d.ts +24 -0
- package/dist/test-topology/extractors/typescript-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/typescript-test-extractor.js +266 -0
- package/dist/test-topology/extractors/typescript-test-extractor.js.map +1 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.d.ts +98 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.js +556 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -0
- package/dist/test-topology/index.d.ts +16 -0
- package/dist/test-topology/index.d.ts.map +1 -0
- package/dist/test-topology/index.js +19 -0
- package/dist/test-topology/index.js.map +1 -0
- package/dist/test-topology/test-topology-analyzer.d.ts +85 -0
- package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -0
- package/dist/test-topology/test-topology-analyzer.js +539 -0
- package/dist/test-topology/test-topology-analyzer.js.map +1 -0
- package/dist/test-topology/types.d.ts +300 -0
- package/dist/test-topology/types.d.ts.map +1 -0
- package/dist/test-topology/types.js +7 -0
- package/dist/test-topology/types.js.map +1 -0
- 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/clustering/clusterer.d.ts +43 -0
- package/dist/wrappers/clustering/clusterer.d.ts.map +1 -0
- package/dist/wrappers/clustering/clusterer.js +374 -0
- package/dist/wrappers/clustering/clusterer.js.map +1 -0
- package/dist/wrappers/clustering/exclusions.d.ts +47 -0
- package/dist/wrappers/clustering/exclusions.d.ts.map +1 -0
- package/dist/wrappers/clustering/exclusions.js +318 -0
- package/dist/wrappers/clustering/exclusions.js.map +1 -0
- package/dist/wrappers/clustering/index.d.ts +6 -0
- package/dist/wrappers/clustering/index.d.ts.map +1 -0
- package/dist/wrappers/clustering/index.js +6 -0
- package/dist/wrappers/clustering/index.js.map +1 -0
- package/dist/wrappers/detection/detector.d.ts +69 -0
- package/dist/wrappers/detection/detector.d.ts.map +1 -0
- package/dist/wrappers/detection/detector.js +279 -0
- package/dist/wrappers/detection/detector.js.map +1 -0
- package/dist/wrappers/detection/index.d.ts +5 -0
- package/dist/wrappers/detection/index.d.ts.map +1 -0
- package/dist/wrappers/detection/index.js +5 -0
- package/dist/wrappers/detection/index.js.map +1 -0
- package/dist/wrappers/export/index.d.ts +5 -0
- package/dist/wrappers/export/index.d.ts.map +1 -0
- package/dist/wrappers/export/index.js +5 -0
- package/dist/wrappers/export/index.js.map +1 -0
- package/dist/wrappers/export/json.d.ts +127 -0
- package/dist/wrappers/export/json.d.ts.map +1 -0
- package/dist/wrappers/export/json.js +160 -0
- package/dist/wrappers/export/json.js.map +1 -0
- package/dist/wrappers/index.d.ts +56 -0
- package/dist/wrappers/index.d.ts.map +1 -0
- package/dist/wrappers/index.js +159 -0
- package/dist/wrappers/index.js.map +1 -0
- package/dist/wrappers/integration/adapter.d.ts +52 -0
- package/dist/wrappers/integration/adapter.d.ts.map +1 -0
- package/dist/wrappers/integration/adapter.js +210 -0
- package/dist/wrappers/integration/adapter.js.map +1 -0
- package/dist/wrappers/integration/index.d.ts +9 -0
- package/dist/wrappers/integration/index.d.ts.map +1 -0
- package/dist/wrappers/integration/index.js +12 -0
- package/dist/wrappers/integration/index.js.map +1 -0
- package/dist/wrappers/integration/pattern-adapter.d.ts +52 -0
- package/dist/wrappers/integration/pattern-adapter.d.ts.map +1 -0
- package/dist/wrappers/integration/pattern-adapter.js +192 -0
- package/dist/wrappers/integration/pattern-adapter.js.map +1 -0
- package/dist/wrappers/integration/scanner.d.ts +85 -0
- package/dist/wrappers/integration/scanner.d.ts.map +1 -0
- package/dist/wrappers/integration/scanner.js +367 -0
- package/dist/wrappers/integration/scanner.js.map +1 -0
- package/dist/wrappers/primitives/discovery.d.ts +57 -0
- package/dist/wrappers/primitives/discovery.d.ts.map +1 -0
- package/dist/wrappers/primitives/discovery.js +389 -0
- package/dist/wrappers/primitives/discovery.js.map +1 -0
- package/dist/wrappers/primitives/index.d.ts +6 -0
- package/dist/wrappers/primitives/index.d.ts.map +1 -0
- package/dist/wrappers/primitives/index.js +6 -0
- package/dist/wrappers/primitives/index.js.map +1 -0
- package/dist/wrappers/primitives/registry.d.ts +63 -0
- package/dist/wrappers/primitives/registry.d.ts.map +1 -0
- package/dist/wrappers/primitives/registry.js +447 -0
- package/dist/wrappers/primitives/registry.js.map +1 -0
- package/dist/wrappers/types.d.ts +137 -0
- package/dist/wrappers/types.d.ts.map +1 -0
- package/dist/wrappers/types.js +7 -0
- package/dist/wrappers/types.js.map +1 -0
- package/package.json +33 -18
- package/LICENSE +0 -21
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"python-strategies.js","sourceRoot":"","sources":["../../../src/simulation/language-strategies/python-strategies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,MAAM,kBAAkB,GAAuB;IAC7C;QACE,QAAQ,EAAE,YAAY;QACtB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,6CAA6C;QAC1D,oBAAoB,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,CAAC;QACvG,YAAY,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC;QAC9C,IAAI,EAAE,CAAC,kBAAkB,EAAE,WAAW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sB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Strategy Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for language-specific implementation strategies.
|
|
5
|
+
*
|
|
6
|
+
* @module simulation/language-strategies/types
|
|
7
|
+
*/
|
|
8
|
+
import type { TaskCategory, ApproachStrategy } from '../types.js';
|
|
9
|
+
import type { CallGraphLanguage } from '../../call-graph/types.js';
|
|
10
|
+
/** Strategy template for a specific language/framework */
|
|
11
|
+
export interface StrategyTemplate {
|
|
12
|
+
/** Strategy identifier */
|
|
13
|
+
strategy: ApproachStrategy;
|
|
14
|
+
/** Human-readable name */
|
|
15
|
+
name: string;
|
|
16
|
+
/** Description of the approach */
|
|
17
|
+
description: string;
|
|
18
|
+
/** Task categories this strategy applies to */
|
|
19
|
+
applicableCategories: TaskCategory[];
|
|
20
|
+
/** File patterns to look for (e.g., 'middleware', 'controller') */
|
|
21
|
+
filePatterns: string[];
|
|
22
|
+
/** Pros of this approach */
|
|
23
|
+
pros: string[];
|
|
24
|
+
/** Cons of this approach */
|
|
25
|
+
cons: string[];
|
|
26
|
+
/** Estimated base lines of code */
|
|
27
|
+
estimatedLines: number;
|
|
28
|
+
/** Framework-specific notes */
|
|
29
|
+
frameworkNotes?: string;
|
|
30
|
+
/** Example code template */
|
|
31
|
+
template?: string;
|
|
32
|
+
/** New files that would be created */
|
|
33
|
+
newFiles?: string[];
|
|
34
|
+
}
|
|
35
|
+
/** Framework definition */
|
|
36
|
+
export interface FrameworkDefinition {
|
|
37
|
+
/** Framework name */
|
|
38
|
+
name: string;
|
|
39
|
+
/** Language this framework is for */
|
|
40
|
+
language: CallGraphLanguage;
|
|
41
|
+
/** File patterns that indicate this framework */
|
|
42
|
+
detectPatterns: string[];
|
|
43
|
+
/** Import patterns that indicate this framework */
|
|
44
|
+
importPatterns: string[];
|
|
45
|
+
/** Available strategies for this framework */
|
|
46
|
+
strategies: StrategyTemplate[];
|
|
47
|
+
}
|
|
48
|
+
/** Language strategy provider */
|
|
49
|
+
export interface LanguageStrategyProvider {
|
|
50
|
+
/** Language this provider handles */
|
|
51
|
+
language: CallGraphLanguage;
|
|
52
|
+
/** Supported frameworks */
|
|
53
|
+
frameworks: FrameworkDefinition[];
|
|
54
|
+
/** Get strategies for a task category */
|
|
55
|
+
getStrategies(category: TaskCategory, framework?: string): StrategyTemplate[];
|
|
56
|
+
/** Detect framework from file content */
|
|
57
|
+
detectFramework(content: string, filePath: string): string | null;
|
|
58
|
+
}
|
|
59
|
+
/** Category keywords for auto-detection */
|
|
60
|
+
export interface CategoryKeywords {
|
|
61
|
+
category: TaskCategory;
|
|
62
|
+
keywords: string[];
|
|
63
|
+
weight: number;
|
|
64
|
+
}
|
|
65
|
+
/** All category keywords for task detection */
|
|
66
|
+
export declare const CATEGORY_KEYWORDS: CategoryKeywords[];
|
|
67
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/simulation/language-strategies/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC/B,0BAA0B;IAC1B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,oBAAoB,EAAE,YAAY,EAAE,CAAC;IACrC,mEAAmE;IACnE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,4BAA4B;IAC5B,IAAI,EAAE,MA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
*
|
|
6
|
+
* @module simulation/language-strategies/types
|
|
7
|
+
*/
|
|
8
|
+
/** All category keywords for task detection */
|
|
9
|
+
export const CATEGORY_KEYWORDS = [
|
|
10
|
+
{ category: 'rate-limiting', keywords: ['rate limit', 'throttle', 'throttling', 'requests per', 'api limit', 'quota'], weight: 1.0 },
|
|
11
|
+
{ category: 'authentication', keywords: ['auth', 'login', 'logout', 'session', 'jwt', 'token', 'oauth', 'sso', 'sign in', 'sign up', 'password'], weight: 1.0 },
|
|
12
|
+
{ category: 'authorization', keywords: ['permission', 'role', 'access control', 'rbac', 'acl', 'authorize', 'can access', 'allowed', 'forbidden'], weight: 1.0 },
|
|
13
|
+
{ category: 'api-endpoint', keywords: ['endpoint', 'route', 'api', 'rest', 'graphql', 'controller', 'handler'], weight: 0.8 },
|
|
14
|
+
{ category: 'data-access', keywords: ['database', 'query', 'repository', 'dao', 'orm', 'sql', 'crud', 'fetch', 'save', 'delete', 'model'], weight: 0.9 },
|
|
15
|
+
{ category: 'error-handling', keywords: ['error', 'exception', 'catch', 'try', 'throw', 'handle', 'fallback', 'retry', 'recover'], weight: 0.9 },
|
|
16
|
+
{ category: 'caching', keywords: ['cache', 'redis', 'memcache', 'memoize', 'invalidate', 'ttl', 'expire', 'store'], weight: 1.0 },
|
|
17
|
+
{ category: 'logging', keywords: ['log', 'logging', 'trace', 'debug', 'audit', 'monitor', 'observability', 'telemetry'], weight: 0.8 },
|
|
18
|
+
{ category: 'testing', keywords: ['test', 'spec', 'mock', 'stub', 'fixture', 'assert', 'expect', 'coverage', 'unit test'], weight: 0.9 },
|
|
19
|
+
{ category: 'validation', keywords: ['validate', 'validation', 'schema', 'sanitize', 'input', 'form', 'constraint', 'dto'], weight: 0.9 },
|
|
20
|
+
{ category: 'middleware', keywords: ['middleware', 'interceptor', 'filter', 'pipe', 'guard', 'before', 'after', 'hook'], weight: 0.9 },
|
|
21
|
+
{ category: 'refactoring', keywords: ['refactor', 'restructure', 'reorganize', 'clean up', 'simplify', 'extract', 'inline', 'rename'], weight: 0.7 },
|
|
22
|
+
];
|
|
23
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/simulation/language-strategies/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgEH,+CAA+C;AAC/C,MAAM,CAAC,MAAM,iBAAiB,GAAuB;IACnD,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE;IACpI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE;IAC/J,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE;IAChK,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE;IAC7H,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE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U,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE;CACrJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript Language Strategies
|
|
3
|
+
*
|
|
4
|
+
* Strategies for Express, NestJS, Next.js, and Fastify frameworks.
|
|
5
|
+
*
|
|
6
|
+
* @module simulation/language-strategies/typescript-strategies
|
|
7
|
+
*/
|
|
8
|
+
import type { TaskCategory } from '../types.js';
|
|
9
|
+
import type { FrameworkDefinition, LanguageStrategyProvider, StrategyTemplate } from './types.js';
|
|
10
|
+
export declare class TypeScriptStrategyProvider implements LanguageStrategyProvider {
|
|
11
|
+
readonly language: "typescript";
|
|
12
|
+
readonly frameworks: FrameworkDefinition[];
|
|
13
|
+
getStrategies(category: TaskCategory, framework?: string): StrategyTemplate[];
|
|
14
|
+
detectFramework(content: string, _filePath: string): string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const typescriptStrategyProvider: TypeScriptStrategyProvider;
|
|
17
|
+
//# sourceMappingURL=typescript-strategies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-strategies.d.ts","sourceRoot":"","sources":["../../../src/simulation/language-strategies/typescript-strategies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAgOlG,qBAAa,0BAA2B,YAAW,wBAAwB;IACzE,QAAQ,CAAC,QAAQ,EAAG,YAAY,CAAU;IAC1C,QAAQ,CAAC,UAAU,EAAE,mBAAmB,EAAE,CAKxC;IAEF,aAAa,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,gBAAgB,EAAE;IAa7E,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAiBnE;AAED,eAAO,MAAM,0BAA0B,4BAAmC,CAAC"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript Language Strategies
|
|
3
|
+
*
|
|
4
|
+
* Strategies for Express, NestJS, Next.js, and Fastify frameworks.
|
|
5
|
+
*
|
|
6
|
+
* @module simulation/language-strategies/typescript-strategies
|
|
7
|
+
*/
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Express Strategies
|
|
10
|
+
// ============================================================================
|
|
11
|
+
const EXPRESS_STRATEGIES = [
|
|
12
|
+
{
|
|
13
|
+
strategy: 'middleware',
|
|
14
|
+
name: 'Express Middleware',
|
|
15
|
+
description: 'Implement as Express middleware that intercepts requests',
|
|
16
|
+
applicableCategories: ['rate-limiting', 'authentication', 'authorization', 'logging', 'validation', 'error-handling'],
|
|
17
|
+
filePatterns: ['middleware', 'middlewares'],
|
|
18
|
+
pros: ['Centralized logic', 'Easy to enable/disable', 'Reusable across routes', 'Standard Express pattern'],
|
|
19
|
+
cons: ['Applies to all matched routes', 'Order-dependent', 'Can add latency'],
|
|
20
|
+
estimatedLines: 40,
|
|
21
|
+
template: `export const {{name}}Middleware = (req, res, next) => {\n // Implementation\n next();\n};`,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
strategy: 'wrapper',
|
|
25
|
+
name: 'Route Handler Wrapper',
|
|
26
|
+
description: 'Create a wrapper function that adds behavior around route handlers',
|
|
27
|
+
applicableCategories: ['error-handling', 'logging', 'caching', 'rate-limiting'],
|
|
28
|
+
filePatterns: ['utils', 'helpers', 'wrappers'],
|
|
29
|
+
pros: ['Explicit and traceable', 'Works with any handler', 'Easy to test'],
|
|
30
|
+
cons: ['Requires manual wrapping', 'Can lead to deep nesting'],
|
|
31
|
+
estimatedLines: 30,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
strategy: 'per-route',
|
|
35
|
+
name: 'Per-Route Implementation',
|
|
36
|
+
description: 'Implement directly in each route handler',
|
|
37
|
+
applicableCategories: ['api-endpoint', 'validation', 'data-access'],
|
|
38
|
+
filePatterns: ['routes', 'controllers', 'handlers'],
|
|
39
|
+
pros: ['Maximum flexibility', 'No abstraction overhead', 'Easy to understand'],
|
|
40
|
+
cons: ['Code duplication', 'Inconsistent implementations'],
|
|
41
|
+
estimatedLines: 20,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
strategy: 'centralized',
|
|
45
|
+
name: 'Centralized Service',
|
|
46
|
+
description: 'Create a dedicated service module',
|
|
47
|
+
applicableCategories: ['authentication', 'authorization', 'caching', 'data-access', 'logging'],
|
|
48
|
+
filePatterns: ['services', 'providers'],
|
|
49
|
+
pros: ['Single source of truth', 'Easy to modify globally', 'Clear ownership'],
|
|
50
|
+
cons: ['Can become a bottleneck', 'Tight coupling risk'],
|
|
51
|
+
estimatedLines: 80,
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
const EXPRESS_FRAMEWORK = {
|
|
55
|
+
name: 'express',
|
|
56
|
+
language: 'typescript',
|
|
57
|
+
detectPatterns: ['app.use', 'app.get', 'app.post', 'express.Router', 'req, res, next'],
|
|
58
|
+
importPatterns: ['express', 'from \'express\'', 'from "express"'],
|
|
59
|
+
strategies: EXPRESS_STRATEGIES,
|
|
60
|
+
};
|
|
61
|
+
// ============================================================================
|
|
62
|
+
// NestJS Strategies
|
|
63
|
+
// ============================================================================
|
|
64
|
+
const NESTJS_STRATEGIES = [
|
|
65
|
+
{
|
|
66
|
+
strategy: 'guard',
|
|
67
|
+
name: 'NestJS Guard',
|
|
68
|
+
description: 'Implement as a NestJS Guard for route protection',
|
|
69
|
+
applicableCategories: ['authentication', 'authorization', 'rate-limiting'],
|
|
70
|
+
filePatterns: ['guards', 'guard'],
|
|
71
|
+
pros: ['Built-in NestJS pattern', 'Declarative with decorators', 'Reusable'],
|
|
72
|
+
cons: ['NestJS-specific', 'Learning curve'],
|
|
73
|
+
estimatedLines: 35,
|
|
74
|
+
template: `@Injectable()\nexport class {{Name}}Guard implements CanActivate {\n canActivate(context: ExecutionContext): boolean {\n return true;\n }\n}`,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
strategy: 'interceptor',
|
|
78
|
+
name: 'NestJS Interceptor',
|
|
79
|
+
description: 'Implement as a NestJS Interceptor for request/response transformation',
|
|
80
|
+
applicableCategories: ['logging', 'caching', 'error-handling'],
|
|
81
|
+
filePatterns: ['interceptors', 'interceptor'],
|
|
82
|
+
pros: ['Access to both request and response', 'Can transform data', 'Composable'],
|
|
83
|
+
cons: ['More complex than middleware', 'NestJS-specific'],
|
|
84
|
+
estimatedLines: 45,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
strategy: 'decorator',
|
|
88
|
+
name: 'Custom Decorator',
|
|
89
|
+
description: 'Create a custom decorator for declarative behavior',
|
|
90
|
+
applicableCategories: ['rate-limiting', 'caching', 'logging', 'authorization', 'validation'],
|
|
91
|
+
filePatterns: ['decorators', 'decorator'],
|
|
92
|
+
pros: ['Clean syntax', 'Self-documenting', 'Reusable'],
|
|
93
|
+
cons: ['Requires decorator support', 'Can be magical'],
|
|
94
|
+
estimatedLines: 25,
|
|
95
|
+
template: `export const {{Name}} = () => SetMetadata('{{name}}', true);`,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
strategy: 'filter',
|
|
99
|
+
name: 'NestJS Exception Filter',
|
|
100
|
+
description: 'Implement as an exception filter for error handling',
|
|
101
|
+
applicableCategories: ['error-handling'],
|
|
102
|
+
filePatterns: ['filters', 'filter', 'exceptions'],
|
|
103
|
+
pros: ['Centralized error handling', 'Type-safe', 'Customizable responses'],
|
|
104
|
+
cons: ['Only for errors', 'NestJS-specific'],
|
|
105
|
+
estimatedLines: 40,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
strategy: 'middleware',
|
|
109
|
+
name: 'NestJS Middleware',
|
|
110
|
+
description: 'Implement as NestJS middleware',
|
|
111
|
+
applicableCategories: ['logging', 'authentication', 'rate-limiting'],
|
|
112
|
+
filePatterns: ['middleware', 'middlewares'],
|
|
113
|
+
pros: ['Similar to Express', 'Early in request lifecycle'],
|
|
114
|
+
cons: ['Less powerful than guards/interceptors'],
|
|
115
|
+
estimatedLines: 35,
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
const NESTJS_FRAMEWORK = {
|
|
119
|
+
name: 'nestjs',
|
|
120
|
+
language: 'typescript',
|
|
121
|
+
detectPatterns: ['@Controller', '@Injectable', '@Module', '@Get', '@Post', 'NestFactory'],
|
|
122
|
+
importPatterns: ['@nestjs/common', '@nestjs/core'],
|
|
123
|
+
strategies: NESTJS_STRATEGIES,
|
|
124
|
+
};
|
|
125
|
+
// ============================================================================
|
|
126
|
+
// Next.js Strategies
|
|
127
|
+
// ============================================================================
|
|
128
|
+
const NEXTJS_STRATEGIES = [
|
|
129
|
+
{
|
|
130
|
+
strategy: 'middleware',
|
|
131
|
+
name: 'Next.js Middleware',
|
|
132
|
+
description: 'Implement as Next.js edge middleware',
|
|
133
|
+
applicableCategories: ['authentication', 'authorization', 'rate-limiting', 'logging'],
|
|
134
|
+
filePatterns: ['middleware'],
|
|
135
|
+
pros: ['Runs at edge', 'Intercepts all routes', 'Built-in pattern'],
|
|
136
|
+
cons: ['Limited runtime', 'Edge constraints'],
|
|
137
|
+
estimatedLines: 30,
|
|
138
|
+
frameworkNotes: 'Runs in Edge Runtime with limited Node.js APIs',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
strategy: 'wrapper',
|
|
142
|
+
name: 'API Route Wrapper (HOF)',
|
|
143
|
+
description: 'Create a higher-order function to wrap API routes',
|
|
144
|
+
applicableCategories: ['authentication', 'error-handling', 'logging', 'rate-limiting'],
|
|
145
|
+
filePatterns: ['lib', 'utils', 'api'],
|
|
146
|
+
pros: ['Full Node.js runtime', 'Composable', 'Type-safe'],
|
|
147
|
+
cons: ['Manual wrapping required'],
|
|
148
|
+
estimatedLines: 35,
|
|
149
|
+
template: `export const with{{Name}} = (handler) => async (req, res) => {\n // Pre-processing\n return handler(req, res);\n};`,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
strategy: 'per-route',
|
|
153
|
+
name: 'Per-Route Implementation',
|
|
154
|
+
description: 'Implement directly in API route handlers',
|
|
155
|
+
applicableCategories: ['api-endpoint', 'data-access', 'validation'],
|
|
156
|
+
filePatterns: ['api', 'pages/api', 'app/api'],
|
|
157
|
+
pros: ['Simple', 'No abstraction'],
|
|
158
|
+
cons: ['Duplication across routes'],
|
|
159
|
+
estimatedLines: 20,
|
|
160
|
+
},
|
|
161
|
+
];
|
|
162
|
+
const NEXTJS_FRAMEWORK = {
|
|
163
|
+
name: 'nextjs',
|
|
164
|
+
language: 'typescript',
|
|
165
|
+
detectPatterns: ['NextRequest', 'NextResponse', 'getServerSideProps', 'getStaticProps', 'NextApiRequest'],
|
|
166
|
+
importPatterns: ['next', 'next/server', 'from \'next\''],
|
|
167
|
+
strategies: NEXTJS_STRATEGIES,
|
|
168
|
+
};
|
|
169
|
+
// ============================================================================
|
|
170
|
+
// Fastify Strategies
|
|
171
|
+
// ============================================================================
|
|
172
|
+
const FASTIFY_STRATEGIES = [
|
|
173
|
+
{
|
|
174
|
+
strategy: 'decorator',
|
|
175
|
+
name: 'Fastify Decorator',
|
|
176
|
+
description: 'Extend Fastify instance with custom functionality',
|
|
177
|
+
applicableCategories: ['authentication', 'caching', 'data-access'],
|
|
178
|
+
filePatterns: ['plugins', 'decorators'],
|
|
179
|
+
pros: ['Fastify-native', 'Available on all requests', 'Type-safe'],
|
|
180
|
+
cons: ['Fastify-specific pattern'],
|
|
181
|
+
estimatedLines: 30,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
strategy: 'middleware',
|
|
185
|
+
name: 'Fastify Hook',
|
|
186
|
+
description: 'Use Fastify lifecycle hooks (onRequest, preHandler, etc.)',
|
|
187
|
+
applicableCategories: ['authentication', 'authorization', 'logging', 'rate-limiting', 'validation'],
|
|
188
|
+
filePatterns: ['hooks', 'plugins'],
|
|
189
|
+
pros: ['Fine-grained control', 'Multiple hook points', 'Async-friendly'],
|
|
190
|
+
cons: ['Different from Express middleware'],
|
|
191
|
+
estimatedLines: 35,
|
|
192
|
+
template: `fastify.addHook('preHandler', async (request, reply) => {\n // Implementation\n});`,
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
strategy: 'centralized',
|
|
196
|
+
name: 'Fastify Plugin',
|
|
197
|
+
description: 'Create a Fastify plugin for encapsulated functionality',
|
|
198
|
+
applicableCategories: ['authentication', 'caching', 'logging', 'data-access'],
|
|
199
|
+
filePatterns: ['plugins'],
|
|
200
|
+
pros: ['Encapsulated', 'Reusable', 'Scoped'],
|
|
201
|
+
cons: ['Plugin architecture learning curve'],
|
|
202
|
+
estimatedLines: 50,
|
|
203
|
+
},
|
|
204
|
+
];
|
|
205
|
+
const FASTIFY_FRAMEWORK = {
|
|
206
|
+
name: 'fastify',
|
|
207
|
+
language: 'typescript',
|
|
208
|
+
detectPatterns: ['fastify.', 'FastifyInstance', 'FastifyRequest', 'FastifyReply', 'addHook'],
|
|
209
|
+
importPatterns: ['fastify', 'from \'fastify\''],
|
|
210
|
+
strategies: FASTIFY_STRATEGIES,
|
|
211
|
+
};
|
|
212
|
+
// ============================================================================
|
|
213
|
+
// TypeScript Strategy Provider
|
|
214
|
+
// ============================================================================
|
|
215
|
+
export class TypeScriptStrategyProvider {
|
|
216
|
+
language = 'typescript';
|
|
217
|
+
frameworks = [
|
|
218
|
+
NESTJS_FRAMEWORK, // Check NestJS first (more specific)
|
|
219
|
+
NEXTJS_FRAMEWORK,
|
|
220
|
+
FASTIFY_FRAMEWORK,
|
|
221
|
+
EXPRESS_FRAMEWORK, // Express last (most generic)
|
|
222
|
+
];
|
|
223
|
+
getStrategies(category, framework) {
|
|
224
|
+
const fw = framework
|
|
225
|
+
? this.frameworks.find(f => f.name === framework)
|
|
226
|
+
: this.frameworks[0]; // Default to first (NestJS)
|
|
227
|
+
if (!fw)
|
|
228
|
+
return [];
|
|
229
|
+
return fw.strategies.filter(s => s.applicableCategories.includes(category) ||
|
|
230
|
+
s.applicableCategories.includes('generic'));
|
|
231
|
+
}
|
|
232
|
+
detectFramework(content, _filePath) {
|
|
233
|
+
for (const fw of this.frameworks) {
|
|
234
|
+
// Check import patterns first (more reliable)
|
|
235
|
+
for (const pattern of fw.importPatterns) {
|
|
236
|
+
if (content.includes(pattern)) {
|
|
237
|
+
return fw.name;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
// Then check code patterns
|
|
241
|
+
for (const pattern of fw.detectPatterns) {
|
|
242
|
+
if (content.includes(pattern)) {
|
|
243
|
+
return fw.name;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return null;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
export const typescriptStrategyProvider = new TypeScriptStrategyProvider();
|
|
251
|
+
//# sourceMappingURL=typescript-strategies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-strategies.js","sourceRoot":"","sources":["../../../src/simulation/language-strategies/typescript-strategies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,MAAM,kBAAkB,GAAuB;IAC7C;QACE,QAAQ,EAAE,YAAY;QACtB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,0DAA0D;QACvE,oBAAoB,EAAE,CAAC,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,CAAC;QACrH,YAAY,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;QAC3C,IAAI,EAAE,CAAC,mBAAmB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,0BAA0B,CAAC;QAC3G,IAAI,EAAE,CAAC,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CAAC,EAAE,CAAC;oBAC9B,OAAO,EAAE,CAAC,IAAI,CAAC;gBACjB,CAAC;YACH,CAAC;YACD,2BAA2B;YAC3B,KAAK,MAAM,OAAO,IAAI,EAAE,CAAC,cAAc,EAAE,CAAC;gBACxC,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC9B,OAAO,EAAE,CAAC,IAAI,CAAC;gBACjB,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,0BAA0B,EAAE,CAAC"}
|
|
@@ -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"}
|