driftdetect-core 0.5.0 → 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/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,412 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ViewModel Regex Extractor
|
|
3
|
+
*
|
|
4
|
+
* Regex-based fallback extractor for C# ViewModel classes.
|
|
5
|
+
* Detects INotifyPropertyChanged, commands, and observable properties.
|
|
6
|
+
*/
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Regex Patterns
|
|
9
|
+
// ============================================================================
|
|
10
|
+
export const VIEWMODEL_REGEX_PATTERNS = {
|
|
11
|
+
// INotifyPropertyChanged implementation
|
|
12
|
+
inpcImplementation: /:\s*(?:[\w.]+,\s*)*INotifyPropertyChanged/,
|
|
13
|
+
// ViewModelBase / BindableBase inheritance
|
|
14
|
+
viewModelBase: /class\s+(\w+)\s*:\s*(?:ViewModelBase|BindableBase|ObservableObject|BaseViewModel|NotifyPropertyChanged)/,
|
|
15
|
+
// Property with backing field pattern
|
|
16
|
+
propertyWithBacking: /private\s+(\w+(?:<[^>]+>)?)\s+_(\w+);\s*(?:[\s\S]*?)public\s+\1\s+(\w+)\s*\{/g,
|
|
17
|
+
// Auto-property
|
|
18
|
+
autoProperty: /public\s+(\w+(?:<[^>]+>)?(?:\?)?)\s+(\w+)\s*\{\s*get;\s*(?:private\s+)?set;\s*\}/g,
|
|
19
|
+
// OnPropertyChanged/RaisePropertyChanged calls
|
|
20
|
+
propertyChanged: /(?:OnPropertyChanged|RaisePropertyChanged|NotifyPropertyChanged|NotifyOfPropertyChange)\s*\(\s*(?:nameof\s*\(\s*(\w+)\s*\)|["'](\w+)["'])/g,
|
|
21
|
+
// SetProperty pattern (MVVM Toolkit style)
|
|
22
|
+
setProperty: /SetProperty\s*\(\s*ref\s+_?(\w+)\s*,\s*value\s*(?:,\s*nameof\s*\(\s*(\w+)\s*\))?\)/g,
|
|
23
|
+
// Set pattern (Prism style)
|
|
24
|
+
setMethod: /Set\s*\(\s*ref\s+_?(\w+)\s*,\s*value\s*(?:,\s*\(\)\s*=>\s*(\w+))?\)/g,
|
|
25
|
+
// ICommand property declarations
|
|
26
|
+
commandProperty: /public\s+(?:ICommand|IRelayCommand|IAsyncRelayCommand|RelayCommand|DelegateCommand|AsyncRelayCommand|AsyncCommand)(?:<[^>]+>)?\s+(\w+)\s*\{/g,
|
|
27
|
+
// RelayCommand instantiation
|
|
28
|
+
relayCommandInit: /(\w+)\s*=\s*new\s+(?:Relay|Delegate|Async)?Command(?:<[^>]+>)?\s*\(\s*(\w+)(?:\s*,\s*(\w+))?\s*\)/g,
|
|
29
|
+
// Command with lambda
|
|
30
|
+
commandLambda: /(\w+)\s*=\s*new\s+(?:Relay|Delegate|Async)?Command(?:<[^>]+>)?\s*\(\s*(?:async\s*)?\(\s*\)\s*=>/g,
|
|
31
|
+
// ObservableCollection declarations
|
|
32
|
+
observableCollection: /(?:public|private)\s+ObservableCollection<(\w+)>\s+(\w+)/g,
|
|
33
|
+
// [ObservableProperty] attribute (MVVM Toolkit source generators)
|
|
34
|
+
observablePropertyAttr: /\[ObservableProperty\]\s*(?:\[[\w\(\)]+\]\s*)*private\s+(\w+(?:<[^>]+>)?(?:\?)?)\s+_?(\w+)/g,
|
|
35
|
+
// [RelayCommand] attribute
|
|
36
|
+
relayCommandAttr: /\[RelayCommand(?:\([^\)]*\))?\]\s*(?:private|public)?\s*(?:async\s+)?(?:Task|void)\s+(\w+)\s*\(/g,
|
|
37
|
+
// Class declaration
|
|
38
|
+
classDeclaration: /(?:public|internal|private)?\s*(?:partial\s+)?class\s+(\w+)(?:<[^>]+>)?(?:\s*:\s*([^{]+))?\s*\{/g,
|
|
39
|
+
// Namespace declaration
|
|
40
|
+
namespaceDeclaration: /namespace\s+([\w.]+)/,
|
|
41
|
+
// Property getter/setter
|
|
42
|
+
propertyAccessors: /\{\s*(get\s*(?:\{[^}]*\}|;))?\s*(set\s*(?:\{[^}]*\}|;))?\s*\}/,
|
|
43
|
+
// PropertyChanged event declaration
|
|
44
|
+
propertyChangedEvent: /public\s+event\s+PropertyChangedEventHandler\s+PropertyChanged/,
|
|
45
|
+
// CanExecute method pattern
|
|
46
|
+
canExecuteMethod: /(?:private|public)?\s*bool\s+Can(\w+)\s*\(/g,
|
|
47
|
+
};
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// ViewModel Regex Extractor
|
|
50
|
+
// ============================================================================
|
|
51
|
+
export class ViewModelRegexExtractor {
|
|
52
|
+
/**
|
|
53
|
+
* Extract ViewModel information using regex patterns
|
|
54
|
+
*/
|
|
55
|
+
extract(content, filePath) {
|
|
56
|
+
// Find class declaration
|
|
57
|
+
const classMatch = this.findViewModelClass(content);
|
|
58
|
+
if (!classMatch) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
const { className, baseClass, startLine, endLine } = classMatch;
|
|
62
|
+
// Extract namespace
|
|
63
|
+
const namespaceMatch = content.match(VIEWMODEL_REGEX_PATTERNS.namespaceDeclaration);
|
|
64
|
+
const namespace = namespaceMatch?.[1] ?? '';
|
|
65
|
+
const qualifiedName = namespace ? `${namespace}.${className}` : className;
|
|
66
|
+
// Check for INPC implementation
|
|
67
|
+
const implementsINPC = this.checkINPCImplementation(content, baseClass);
|
|
68
|
+
// Extract properties
|
|
69
|
+
const properties = this.extractProperties(content, filePath);
|
|
70
|
+
// Extract commands
|
|
71
|
+
const commands = this.extractCommands(content, filePath);
|
|
72
|
+
return {
|
|
73
|
+
className,
|
|
74
|
+
qualifiedName,
|
|
75
|
+
filePath,
|
|
76
|
+
properties,
|
|
77
|
+
commands,
|
|
78
|
+
implementsINPC,
|
|
79
|
+
baseClass,
|
|
80
|
+
startLine,
|
|
81
|
+
endLine,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Find ViewModel class in content
|
|
86
|
+
*/
|
|
87
|
+
findViewModelClass(content) {
|
|
88
|
+
VIEWMODEL_REGEX_PATTERNS.classDeclaration.lastIndex = 0;
|
|
89
|
+
let match;
|
|
90
|
+
while ((match = VIEWMODEL_REGEX_PATTERNS.classDeclaration.exec(content)) !== null) {
|
|
91
|
+
const className = match[1] ?? '';
|
|
92
|
+
const inheritance = match[2] ?? '';
|
|
93
|
+
// Check if this looks like a ViewModel
|
|
94
|
+
const isViewModel = className.endsWith('ViewModel') ||
|
|
95
|
+
className.endsWith('VM') ||
|
|
96
|
+
inheritance.includes('ViewModel') ||
|
|
97
|
+
inheritance.includes('BindableBase') ||
|
|
98
|
+
inheritance.includes('ObservableObject') ||
|
|
99
|
+
inheritance.includes('INotifyPropertyChanged');
|
|
100
|
+
if (isViewModel) {
|
|
101
|
+
const startLine = this.getLineNumber(content, match.index);
|
|
102
|
+
const endLine = this.findClassEndLine(content, match.index);
|
|
103
|
+
const baseClass = this.extractBaseClass(inheritance);
|
|
104
|
+
return { className, baseClass, startLine, endLine };
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Extract base class from inheritance string
|
|
111
|
+
*/
|
|
112
|
+
extractBaseClass(inheritance) {
|
|
113
|
+
if (!inheritance)
|
|
114
|
+
return undefined;
|
|
115
|
+
// Split by comma and get first non-interface
|
|
116
|
+
const parts = inheritance.split(',').map(p => p.trim());
|
|
117
|
+
for (const part of parts) {
|
|
118
|
+
// Skip interfaces (start with I and have capital second letter)
|
|
119
|
+
if (!/^I[A-Z]/.test(part)) {
|
|
120
|
+
return part.replace(/<[^>]+>/, '').trim();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Check if class implements INotifyPropertyChanged
|
|
127
|
+
*/
|
|
128
|
+
checkINPCImplementation(content, baseClass) {
|
|
129
|
+
// Direct implementation
|
|
130
|
+
if (VIEWMODEL_REGEX_PATTERNS.inpcImplementation.test(content)) {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
// Through base class
|
|
134
|
+
if (baseClass) {
|
|
135
|
+
const knownINPCBases = [
|
|
136
|
+
'ViewModelBase',
|
|
137
|
+
'BindableBase',
|
|
138
|
+
'ObservableObject',
|
|
139
|
+
'BaseViewModel',
|
|
140
|
+
'NotifyPropertyChanged',
|
|
141
|
+
'ObservableRecipient',
|
|
142
|
+
'Screen', // Caliburn.Micro
|
|
143
|
+
'PropertyChangedBase', // Caliburn.Micro
|
|
144
|
+
];
|
|
145
|
+
if (knownINPCBases.some(b => baseClass.includes(b))) {
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// Has PropertyChanged event
|
|
150
|
+
if (VIEWMODEL_REGEX_PATTERNS.propertyChangedEvent.test(content)) {
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Extract properties from ViewModel
|
|
157
|
+
*/
|
|
158
|
+
extractProperties(content, filePath) {
|
|
159
|
+
const properties = [];
|
|
160
|
+
const seen = new Set();
|
|
161
|
+
// Extract properties with backing fields
|
|
162
|
+
VIEWMODEL_REGEX_PATTERNS.propertyWithBacking.lastIndex = 0;
|
|
163
|
+
let match;
|
|
164
|
+
while ((match = VIEWMODEL_REGEX_PATTERNS.propertyWithBacking.exec(content)) !== null) {
|
|
165
|
+
const type = match[1] ?? '';
|
|
166
|
+
const backingField = `_${match[2]}`;
|
|
167
|
+
const name = match[3] ?? '';
|
|
168
|
+
if (seen.has(name))
|
|
169
|
+
continue;
|
|
170
|
+
seen.add(name);
|
|
171
|
+
const line = this.getLineNumber(content, match.index);
|
|
172
|
+
const raisesPropertyChanged = this.checkPropertyRaisesChanged(content, name);
|
|
173
|
+
properties.push({
|
|
174
|
+
name,
|
|
175
|
+
type,
|
|
176
|
+
hasGetter: true,
|
|
177
|
+
hasSetter: true,
|
|
178
|
+
raisesPropertyChanged,
|
|
179
|
+
backingField,
|
|
180
|
+
location: { file: filePath, line },
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
// Extract auto-properties
|
|
184
|
+
VIEWMODEL_REGEX_PATTERNS.autoProperty.lastIndex = 0;
|
|
185
|
+
while ((match = VIEWMODEL_REGEX_PATTERNS.autoProperty.exec(content)) !== null) {
|
|
186
|
+
const type = match[1] ?? '';
|
|
187
|
+
const name = match[2] ?? '';
|
|
188
|
+
if (seen.has(name))
|
|
189
|
+
continue;
|
|
190
|
+
seen.add(name);
|
|
191
|
+
const line = this.getLineNumber(content, match.index);
|
|
192
|
+
properties.push({
|
|
193
|
+
name,
|
|
194
|
+
type,
|
|
195
|
+
hasGetter: true,
|
|
196
|
+
hasSetter: true,
|
|
197
|
+
raisesPropertyChanged: false, // Auto-properties don't raise by default
|
|
198
|
+
location: { file: filePath, line },
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
// Extract MVVM Toolkit source-generated properties
|
|
202
|
+
VIEWMODEL_REGEX_PATTERNS.observablePropertyAttr.lastIndex = 0;
|
|
203
|
+
while ((match = VIEWMODEL_REGEX_PATTERNS.observablePropertyAttr.exec(content)) !== null) {
|
|
204
|
+
const type = match[1] ?? '';
|
|
205
|
+
const fieldName = match[2] ?? '';
|
|
206
|
+
const name = this.toPascalCase(fieldName);
|
|
207
|
+
if (seen.has(name))
|
|
208
|
+
continue;
|
|
209
|
+
seen.add(name);
|
|
210
|
+
const line = this.getLineNumber(content, match.index);
|
|
211
|
+
properties.push({
|
|
212
|
+
name,
|
|
213
|
+
type,
|
|
214
|
+
hasGetter: true,
|
|
215
|
+
hasSetter: true,
|
|
216
|
+
raisesPropertyChanged: true, // Source generator handles this
|
|
217
|
+
backingField: fieldName.startsWith('_') ? fieldName : `_${fieldName}`,
|
|
218
|
+
isSourceGenerated: true,
|
|
219
|
+
location: { file: filePath, line },
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
return properties;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Check if a property raises PropertyChanged
|
|
226
|
+
*/
|
|
227
|
+
checkPropertyRaisesChanged(content, propertyName) {
|
|
228
|
+
// Check for OnPropertyChanged(nameof(PropertyName))
|
|
229
|
+
const namedPattern = new RegExp(`(?:OnPropertyChanged|RaisePropertyChanged|NotifyPropertyChanged)\\s*\\(\\s*nameof\\s*\\(\\s*${propertyName}\\s*\\)`, 'i');
|
|
230
|
+
if (namedPattern.test(content)) {
|
|
231
|
+
return true;
|
|
232
|
+
}
|
|
233
|
+
// Check for OnPropertyChanged("PropertyName")
|
|
234
|
+
const stringPattern = new RegExp(`(?:OnPropertyChanged|RaisePropertyChanged|NotifyPropertyChanged)\\s*\\(\\s*["']${propertyName}["']`, 'i');
|
|
235
|
+
if (stringPattern.test(content)) {
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
// Check for SetProperty pattern
|
|
239
|
+
const setPropertyPattern = new RegExp(`SetProperty\\s*\\([^)]*nameof\\s*\\(\\s*${propertyName}\\s*\\)`, 'i');
|
|
240
|
+
if (setPropertyPattern.test(content)) {
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Extract commands from ViewModel
|
|
247
|
+
*/
|
|
248
|
+
extractCommands(content, filePath) {
|
|
249
|
+
const commands = [];
|
|
250
|
+
const seen = new Set();
|
|
251
|
+
// Extract ICommand properties
|
|
252
|
+
VIEWMODEL_REGEX_PATTERNS.commandProperty.lastIndex = 0;
|
|
253
|
+
let match;
|
|
254
|
+
while ((match = VIEWMODEL_REGEX_PATTERNS.commandProperty.exec(content)) !== null) {
|
|
255
|
+
const name = match[1] ?? '';
|
|
256
|
+
if (seen.has(name))
|
|
257
|
+
continue;
|
|
258
|
+
seen.add(name);
|
|
259
|
+
const line = this.getLineNumber(content, match.index);
|
|
260
|
+
const commandType = this.inferCommandType(content, name);
|
|
261
|
+
const { executeMethod, canExecuteMethod } = this.findCommandMethods(content, name);
|
|
262
|
+
commands.push({
|
|
263
|
+
name,
|
|
264
|
+
commandType,
|
|
265
|
+
executeMethod,
|
|
266
|
+
canExecuteMethod,
|
|
267
|
+
isAsync: commandType.includes('Async'),
|
|
268
|
+
location: { file: filePath, line },
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
// Extract commands from RelayCommand instantiation
|
|
272
|
+
VIEWMODEL_REGEX_PATTERNS.relayCommandInit.lastIndex = 0;
|
|
273
|
+
while ((match = VIEWMODEL_REGEX_PATTERNS.relayCommandInit.exec(content)) !== null) {
|
|
274
|
+
const name = match[1] ?? '';
|
|
275
|
+
const executeMethod = match[2];
|
|
276
|
+
const canExecuteMethod = match[3];
|
|
277
|
+
if (seen.has(name))
|
|
278
|
+
continue;
|
|
279
|
+
seen.add(name);
|
|
280
|
+
const line = this.getLineNumber(content, match.index);
|
|
281
|
+
commands.push({
|
|
282
|
+
name,
|
|
283
|
+
commandType: 'RelayCommand',
|
|
284
|
+
executeMethod,
|
|
285
|
+
canExecuteMethod,
|
|
286
|
+
location: { file: filePath, line },
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
// Extract MVVM Toolkit [RelayCommand] attributed methods
|
|
290
|
+
VIEWMODEL_REGEX_PATTERNS.relayCommandAttr.lastIndex = 0;
|
|
291
|
+
while ((match = VIEWMODEL_REGEX_PATTERNS.relayCommandAttr.exec(content)) !== null) {
|
|
292
|
+
const methodName = match[1] ?? '';
|
|
293
|
+
const commandName = `${methodName}Command`;
|
|
294
|
+
if (seen.has(commandName))
|
|
295
|
+
continue;
|
|
296
|
+
seen.add(commandName);
|
|
297
|
+
const line = this.getLineNumber(content, match.index);
|
|
298
|
+
const isAsync = match[0].includes('async') || match[0].includes('Task');
|
|
299
|
+
// Look for CanExecute method
|
|
300
|
+
const canExecuteMethod = this.findCanExecuteForMethod(content, methodName);
|
|
301
|
+
commands.push({
|
|
302
|
+
name: commandName,
|
|
303
|
+
commandType: isAsync ? 'AsyncRelayCommand' : 'RelayCommand',
|
|
304
|
+
executeMethod: methodName,
|
|
305
|
+
canExecuteMethod,
|
|
306
|
+
isAsync,
|
|
307
|
+
isSourceGenerated: true,
|
|
308
|
+
location: { file: filePath, line },
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
return commands;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Infer command type from content
|
|
315
|
+
*/
|
|
316
|
+
inferCommandType(content, commandName) {
|
|
317
|
+
// Look for initialization
|
|
318
|
+
const initPattern = new RegExp(`${commandName}\\s*=\\s*new\\s+(\\w+Command)`, 'i');
|
|
319
|
+
const match = content.match(initPattern);
|
|
320
|
+
if (match?.[1]) {
|
|
321
|
+
return match[1];
|
|
322
|
+
}
|
|
323
|
+
// Look for property type
|
|
324
|
+
const typePattern = new RegExp(`(\\w+Command(?:<[^>]+>)?)\\s+${commandName}\\s*\\{`, 'i');
|
|
325
|
+
const typeMatch = content.match(typePattern);
|
|
326
|
+
if (typeMatch?.[1]) {
|
|
327
|
+
return typeMatch[1];
|
|
328
|
+
}
|
|
329
|
+
return 'ICommand';
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Find execute and canExecute methods for a command
|
|
333
|
+
*/
|
|
334
|
+
findCommandMethods(content, commandName) {
|
|
335
|
+
// Common naming conventions
|
|
336
|
+
const baseName = commandName.replace(/Command$/, '');
|
|
337
|
+
// Look for execute method
|
|
338
|
+
const executePatterns = [
|
|
339
|
+
new RegExp(`(?:private|public)?\\s*(?:async\\s+)?(?:Task|void)\\s+(${baseName})\\s*\\(`),
|
|
340
|
+
new RegExp(`(?:private|public)?\\s*(?:async\\s+)?(?:Task|void)\\s+(Execute${baseName})\\s*\\(`),
|
|
341
|
+
new RegExp(`(?:private|public)?\\s*(?:async\\s+)?(?:Task|void)\\s+(On${baseName})\\s*\\(`),
|
|
342
|
+
];
|
|
343
|
+
let executeMethod;
|
|
344
|
+
for (const pattern of executePatterns) {
|
|
345
|
+
const match = content.match(pattern);
|
|
346
|
+
if (match?.[1]) {
|
|
347
|
+
executeMethod = match[1];
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
// Look for canExecute method
|
|
352
|
+
const canExecutePatterns = [
|
|
353
|
+
new RegExp(`(?:private|public)?\\s*bool\\s+(Can${baseName})\\s*\\(`),
|
|
354
|
+
new RegExp(`(?:private|public)?\\s*bool\\s+(${baseName}CanExecute)\\s*\\(`),
|
|
355
|
+
];
|
|
356
|
+
let canExecuteMethod;
|
|
357
|
+
for (const pattern of canExecutePatterns) {
|
|
358
|
+
const match = content.match(pattern);
|
|
359
|
+
if (match?.[1]) {
|
|
360
|
+
canExecuteMethod = match[1];
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return { executeMethod, canExecuteMethod };
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Find CanExecute method for a [RelayCommand] attributed method
|
|
368
|
+
*/
|
|
369
|
+
findCanExecuteForMethod(content, methodName) {
|
|
370
|
+
const pattern = new RegExp(`(?:private|public)?\\s*bool\\s+(Can${methodName})\\s*\\(`);
|
|
371
|
+
const match = content.match(pattern);
|
|
372
|
+
return match?.[1];
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Convert to PascalCase
|
|
376
|
+
*/
|
|
377
|
+
toPascalCase(str) {
|
|
378
|
+
// Remove leading underscore
|
|
379
|
+
const clean = str.startsWith('_') ? str.slice(1) : str;
|
|
380
|
+
// Capitalize first letter
|
|
381
|
+
return clean.charAt(0).toUpperCase() + clean.slice(1);
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Get line number from character index
|
|
385
|
+
*/
|
|
386
|
+
getLineNumber(content, index) {
|
|
387
|
+
const lines = content.slice(0, index).split('\n');
|
|
388
|
+
return lines.length;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Find class end line
|
|
392
|
+
*/
|
|
393
|
+
findClassEndLine(content, startIndex) {
|
|
394
|
+
let depth = 0;
|
|
395
|
+
let inClass = false;
|
|
396
|
+
for (let i = startIndex; i < content.length; i++) {
|
|
397
|
+
const char = content[i];
|
|
398
|
+
if (char === '{') {
|
|
399
|
+
depth++;
|
|
400
|
+
inClass = true;
|
|
401
|
+
}
|
|
402
|
+
else if (char === '}') {
|
|
403
|
+
depth--;
|
|
404
|
+
if (inClass && depth === 0) {
|
|
405
|
+
return this.getLineNumber(content, i);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return this.getLineNumber(content, content.length);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
//# sourceMappingURL=viewmodel-regex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewmodel-regex.js","sourceRoot":"","sources":["../../../../src/wpf/extractors/regex/viewmodel-regex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,wCAAwC;IACxC,kBAAkB,EAAE,2CAA2C;IAE/D,2CAA2C;IAC3C,aAAa,EAAE,yGAAyG;IAExH,sCAAsC;IACtC,mBAAmB,EAAE,+EAA+E;IAEpG,gBAAgB;IAChB,YAAY,EAAE,mFAAmF;IAEjG,+CAA+C;IAC/C,eAAe,EAAE,4IAA4I;IAE7J,2CAA2C;IAC3C,WAAW,EAAE,qFAAqF;IAElG,4BAA4B;IAC5B,SAAS,EAAE,sEAAsE;IAEjF,iCAAiC;IACjC,eAAe,EAAE,8IAA8I;IAE/J,6BAA6B;IAC7B,gBAAgB,EAAE,oGAAoG;IAEtH,sBAAsB;IACtB,aAAa,EAAE,kGAAkG;IAEjH,oCAAoC;IACpC,oBAAoB,EAAE,2DAA2D;IAEjF,kEAAkE;IAClE,sBAAsB,EAAE,6FAA6F;IAErH,2BAA2B;IAC3B,gBAAgB,EAAE,kGAAkG;IAEpH,oBAAoB;IACpB,gBAAg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,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACK,aAAa,CAAC,OAAe,EAAE,KAAa;QAClD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClD,OAAO,KAAK,CAAC,MAAM,CAAC;IACtB,CAAC;IAED;;OAEG;IACK,gBAAgB,CAAC,OAAe,EAAE,UAAkB;QAC1D,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,OAAO,GAAG,KAAK,CAAC;QAEpB,KAAK,IAAI,CAAC,GAAG,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACjD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACxB,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;gBACjB,KAAK,EAAE,CAAC;gBACR,OAAO,GAAG,IAAI,CAAC;YACjB,CAAC;iBAAM,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;gBACxB,KAAK,EAAE,CAAC;gBACR,IAAI,OAAO,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;oBAC3B,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gBACxC,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC;CACF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XAML Regex Extractor
|
|
3
|
+
*
|
|
4
|
+
* Regex-based fallback extractor for XAML files when XML DOM parsing fails.
|
|
5
|
+
* Follows Drift's hybrid extraction pattern: AST first, regex fallback.
|
|
6
|
+
*/
|
|
7
|
+
import type { XamlExtractionResult } from '../../types.js';
|
|
8
|
+
export declare const XAML_REGEX_PATTERNS: {
|
|
9
|
+
xClass: RegExp;
|
|
10
|
+
binding: RegExp;
|
|
11
|
+
bindingFull: RegExp;
|
|
12
|
+
xBind: RegExp;
|
|
13
|
+
command: RegExp;
|
|
14
|
+
commandParameter: RegExp;
|
|
15
|
+
dataContext: RegExp;
|
|
16
|
+
designDataContext: RegExp;
|
|
17
|
+
staticResource: RegExp;
|
|
18
|
+
dynamicResource: RegExp;
|
|
19
|
+
xName: RegExp;
|
|
20
|
+
eventHandler: RegExp;
|
|
21
|
+
converter: RegExp;
|
|
22
|
+
itemsSource: RegExp;
|
|
23
|
+
selectedItem: RegExp;
|
|
24
|
+
style: RegExp;
|
|
25
|
+
dataTemplate: RegExp;
|
|
26
|
+
converterDef: RegExp;
|
|
27
|
+
elementWithBinding: RegExp;
|
|
28
|
+
bindingMode: RegExp;
|
|
29
|
+
updateSourceTrigger: RegExp;
|
|
30
|
+
fallbackValue: RegExp;
|
|
31
|
+
targetNullValue: RegExp;
|
|
32
|
+
relativeSource: RegExp;
|
|
33
|
+
elementName: RegExp;
|
|
34
|
+
};
|
|
35
|
+
export declare class XamlRegexExtractor {
|
|
36
|
+
/**
|
|
37
|
+
* Extract XAML information using regex patterns
|
|
38
|
+
*/
|
|
39
|
+
extract(content: string, filePath: string): XamlExtractionResult;
|
|
40
|
+
/**
|
|
41
|
+
* Extract DataContext type from various sources
|
|
42
|
+
*/
|
|
43
|
+
private extractDataContextType;
|
|
44
|
+
/**
|
|
45
|
+
* Extract all bindings from XAML content
|
|
46
|
+
*/
|
|
47
|
+
private extractBindings;
|
|
48
|
+
/**
|
|
49
|
+
* Parse a binding expression into structured data
|
|
50
|
+
*/
|
|
51
|
+
private parseBindingExpression;
|
|
52
|
+
/**
|
|
53
|
+
* Extract binding source type and value
|
|
54
|
+
*/
|
|
55
|
+
private extractBindingSource;
|
|
56
|
+
/**
|
|
57
|
+
* Parse binding mode string
|
|
58
|
+
*/
|
|
59
|
+
private parseBindingMode;
|
|
60
|
+
/**
|
|
61
|
+
* Parse update source trigger string
|
|
62
|
+
*/
|
|
63
|
+
private parseUpdateTrigger;
|
|
64
|
+
/**
|
|
65
|
+
* Extract commands from XAML content
|
|
66
|
+
*/
|
|
67
|
+
private extractCommands;
|
|
68
|
+
/**
|
|
69
|
+
* Extract resources from XAML content
|
|
70
|
+
*/
|
|
71
|
+
private extractResources;
|
|
72
|
+
/**
|
|
73
|
+
* Get line number from character index
|
|
74
|
+
*/
|
|
75
|
+
private getLineNumber;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=xaml-regex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xaml-regex.d.ts","sourceRoot":"","sources":["../../../../src/wpf/extractors/regex/xaml-regex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,oBAAoB,EAQrB,MAAM,gBAAgB,CAAC;AAMxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;CA2E/B,CAAC;AAMF,qBAAa,kBAAkB;IAC7B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,oBAAoB;IAgDhE;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAqB9B;;OAEG;IACH,OAAO,CAAC,eAAe;IAqDvB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA0D9B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAsB5B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAUxB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAS1B;;OAEG;IACH,OAAO,CAAC,eAAe;IAsCvB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAuDxB;;OAEG;IACH,OAAO,CAAC,aAAa;CAItB"}
|