driftdetect-core 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/dist/boundaries/types.d.ts +1 -1
  2. package/dist/boundaries/types.d.ts.map +1 -1
  3. package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
  4. package/dist/call-graph/analysis/graph-builder.js +1 -0
  5. package/dist/call-graph/analysis/graph-builder.js.map +1 -1
  6. package/dist/call-graph/extractors/go-data-access-extractor.d.ts +80 -0
  7. package/dist/call-graph/extractors/go-data-access-extractor.d.ts.map +1 -0
  8. package/dist/call-graph/extractors/go-data-access-extractor.js +457 -0
  9. package/dist/call-graph/extractors/go-data-access-extractor.js.map +1 -0
  10. package/dist/call-graph/extractors/go-extractor.d.ts +103 -0
  11. package/dist/call-graph/extractors/go-extractor.d.ts.map +1 -0
  12. package/dist/call-graph/extractors/go-extractor.js +509 -0
  13. package/dist/call-graph/extractors/go-extractor.js.map +1 -0
  14. package/dist/call-graph/extractors/go-hybrid-extractor.d.ts +97 -0
  15. package/dist/call-graph/extractors/go-hybrid-extractor.d.ts.map +1 -0
  16. package/dist/call-graph/extractors/go-hybrid-extractor.js +496 -0
  17. package/dist/call-graph/extractors/go-hybrid-extractor.js.map +1 -0
  18. package/dist/call-graph/extractors/regex/go-regex.d.ts +51 -0
  19. package/dist/call-graph/extractors/regex/go-regex.d.ts.map +1 -0
  20. package/dist/call-graph/extractors/regex/go-regex.js +435 -0
  21. package/dist/call-graph/extractors/regex/go-regex.js.map +1 -0
  22. package/dist/call-graph/extractors/regex/index.d.ts +1 -0
  23. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -1
  24. package/dist/call-graph/extractors/regex/index.js +8 -0
  25. package/dist/call-graph/extractors/regex/index.js.map +1 -1
  26. package/dist/call-graph/index.d.ts +3 -0
  27. package/dist/call-graph/index.d.ts.map +1 -1
  28. package/dist/call-graph/index.js +5 -0
  29. package/dist/call-graph/index.js.map +1 -1
  30. package/dist/call-graph/types.d.ts +1 -1
  31. package/dist/call-graph/types.d.ts.map +1 -1
  32. package/dist/constraints/extraction/constraint-synthesizer.d.ts +72 -0
  33. package/dist/constraints/extraction/constraint-synthesizer.d.ts.map +1 -0
  34. package/dist/constraints/extraction/constraint-synthesizer.js +336 -0
  35. package/dist/constraints/extraction/constraint-synthesizer.js.map +1 -0
  36. package/dist/constraints/extraction/index.d.ts +10 -0
  37. package/dist/constraints/extraction/index.d.ts.map +1 -0
  38. package/dist/constraints/extraction/index.js +10 -0
  39. package/dist/constraints/extraction/index.js.map +1 -0
  40. package/dist/constraints/extraction/invariant-detector.d.ts +109 -0
  41. package/dist/constraints/extraction/invariant-detector.d.ts.map +1 -0
  42. package/dist/constraints/extraction/invariant-detector.js +979 -0
  43. package/dist/constraints/extraction/invariant-detector.js.map +1 -0
  44. package/dist/constraints/index.d.ts +15 -0
  45. package/dist/constraints/index.d.ts.map +1 -0
  46. package/dist/constraints/index.js +16 -0
  47. package/dist/constraints/index.js.map +1 -0
  48. package/dist/constraints/store/constraint-store.d.ts +110 -0
  49. package/dist/constraints/store/constraint-store.d.ts.map +1 -0
  50. package/dist/constraints/store/constraint-store.js +584 -0
  51. package/dist/constraints/store/constraint-store.js.map +1 -0
  52. package/dist/constraints/types.d.ts +605 -0
  53. package/dist/constraints/types.d.ts.map +1 -0
  54. package/dist/constraints/types.js +57 -0
  55. package/dist/constraints/types.js.map +1 -0
  56. package/dist/constraints/verification/constraint-verifier.d.ts +100 -0
  57. package/dist/constraints/verification/constraint-verifier.d.ts.map +1 -0
  58. package/dist/constraints/verification/constraint-verifier.js +638 -0
  59. package/dist/constraints/verification/constraint-verifier.js.map +1 -0
  60. package/dist/constraints/verification/index.d.ts +8 -0
  61. package/dist/constraints/verification/index.d.ts.map +1 -0
  62. package/dist/constraints/verification/index.js +8 -0
  63. package/dist/constraints/verification/index.js.map +1 -0
  64. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts +121 -0
  65. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts.map +1 -0
  66. package/dist/decisions/analyzer/decision-mining-analyzer.js +904 -0
  67. package/dist/decisions/analyzer/decision-mining-analyzer.js.map +1 -0
  68. package/dist/decisions/analyzer/index.d.ts +5 -0
  69. package/dist/decisions/analyzer/index.d.ts.map +1 -0
  70. package/dist/decisions/analyzer/index.js +5 -0
  71. package/dist/decisions/analyzer/index.js.map +1 -0
  72. package/dist/decisions/extractors/base-commit-extractor.d.ts +104 -0
  73. package/dist/decisions/extractors/base-commit-extractor.d.ts.map +1 -0
  74. package/dist/decisions/extractors/base-commit-extractor.js +305 -0
  75. package/dist/decisions/extractors/base-commit-extractor.js.map +1 -0
  76. package/dist/decisions/extractors/csharp-commit-extractor.d.ts +18 -0
  77. package/dist/decisions/extractors/csharp-commit-extractor.d.ts.map +1 -0
  78. package/dist/decisions/extractors/csharp-commit-extractor.js +281 -0
  79. package/dist/decisions/extractors/csharp-commit-extractor.js.map +1 -0
  80. package/dist/decisions/extractors/index.d.ts +31 -0
  81. package/dist/decisions/extractors/index.d.ts.map +1 -0
  82. package/dist/decisions/extractors/index.js +63 -0
  83. package/dist/decisions/extractors/index.js.map +1 -0
  84. package/dist/decisions/extractors/java-commit-extractor.d.ts +18 -0
  85. package/dist/decisions/extractors/java-commit-extractor.d.ts.map +1 -0
  86. package/dist/decisions/extractors/java-commit-extractor.js +248 -0
  87. package/dist/decisions/extractors/java-commit-extractor.js.map +1 -0
  88. package/dist/decisions/extractors/php-commit-extractor.d.ts +18 -0
  89. package/dist/decisions/extractors/php-commit-extractor.d.ts.map +1 -0
  90. package/dist/decisions/extractors/php-commit-extractor.js +280 -0
  91. package/dist/decisions/extractors/php-commit-extractor.js.map +1 -0
  92. package/dist/decisions/extractors/python-commit-extractor.d.ts +18 -0
  93. package/dist/decisions/extractors/python-commit-extractor.d.ts.map +1 -0
  94. package/dist/decisions/extractors/python-commit-extractor.js +248 -0
  95. package/dist/decisions/extractors/python-commit-extractor.js.map +1 -0
  96. package/dist/decisions/extractors/typescript-commit-extractor.d.ts +37 -0
  97. package/dist/decisions/extractors/typescript-commit-extractor.d.ts.map +1 -0
  98. package/dist/decisions/extractors/typescript-commit-extractor.js +229 -0
  99. package/dist/decisions/extractors/typescript-commit-extractor.js.map +1 -0
  100. package/dist/decisions/git/commit-parser.d.ts +58 -0
  101. package/dist/decisions/git/commit-parser.d.ts.map +1 -0
  102. package/dist/decisions/git/commit-parser.js +344 -0
  103. package/dist/decisions/git/commit-parser.js.map +1 -0
  104. package/dist/decisions/git/diff-analyzer.d.ts +30 -0
  105. package/dist/decisions/git/diff-analyzer.d.ts.map +1 -0
  106. package/dist/decisions/git/diff-analyzer.js +492 -0
  107. package/dist/decisions/git/diff-analyzer.js.map +1 -0
  108. package/dist/decisions/git/git-walker.d.ts +64 -0
  109. package/dist/decisions/git/git-walker.d.ts.map +1 -0
  110. package/dist/decisions/git/git-walker.js +441 -0
  111. package/dist/decisions/git/git-walker.js.map +1 -0
  112. package/dist/decisions/git/index.d.ts +11 -0
  113. package/dist/decisions/git/index.d.ts.map +1 -0
  114. package/dist/decisions/git/index.js +13 -0
  115. package/dist/decisions/git/index.js.map +1 -0
  116. package/dist/decisions/git/types.d.ts +223 -0
  117. package/dist/decisions/git/types.d.ts.map +1 -0
  118. package/dist/decisions/git/types.js +7 -0
  119. package/dist/decisions/git/types.js.map +1 -0
  120. package/dist/decisions/index.d.ts +27 -0
  121. package/dist/decisions/index.d.ts.map +1 -0
  122. package/dist/decisions/index.js +45 -0
  123. package/dist/decisions/index.js.map +1 -0
  124. package/dist/decisions/types.d.ts +530 -0
  125. package/dist/decisions/types.d.ts.map +1 -0
  126. package/dist/decisions/types.js +8 -0
  127. package/dist/decisions/types.js.map +1 -0
  128. package/dist/go/go-analyzer.d.ts +203 -0
  129. package/dist/go/go-analyzer.d.ts.map +1 -0
  130. package/dist/go/go-analyzer.js +509 -0
  131. package/dist/go/go-analyzer.js.map +1 -0
  132. package/dist/go/index.d.ts +7 -0
  133. package/dist/go/index.d.ts.map +1 -0
  134. package/dist/go/index.js +8 -0
  135. package/dist/go/index.js.map +1 -0
  136. package/dist/index.d.ts +11 -0
  137. package/dist/index.d.ts.map +1 -1
  138. package/dist/index.js +56 -0
  139. package/dist/index.js.map +1 -1
  140. package/dist/parsers/tree-sitter/go-loader.d.ts +50 -0
  141. package/dist/parsers/tree-sitter/go-loader.d.ts.map +1 -0
  142. package/dist/parsers/tree-sitter/go-loader.js +161 -0
  143. package/dist/parsers/tree-sitter/go-loader.js.map +1 -0
  144. package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts +250 -0
  145. package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts.map +1 -0
  146. package/dist/parsers/tree-sitter/tree-sitter-go-parser.js +707 -0
  147. package/dist/parsers/tree-sitter/tree-sitter-go-parser.js.map +1 -0
  148. package/dist/parsers/types.d.ts +1 -1
  149. package/dist/parsers/types.d.ts.map +1 -1
  150. package/dist/simulation/approach-generator.d.ts +73 -0
  151. package/dist/simulation/approach-generator.d.ts.map +1 -0
  152. package/dist/simulation/approach-generator.js +371 -0
  153. package/dist/simulation/approach-generator.js.map +1 -0
  154. package/dist/simulation/index.d.ts +14 -0
  155. package/dist/simulation/index.d.ts.map +1 -0
  156. package/dist/simulation/index.js +19 -0
  157. package/dist/simulation/index.js.map +1 -0
  158. package/dist/simulation/language-strategies/csharp-strategies.d.ts +17 -0
  159. package/dist/simulation/language-strategies/csharp-strategies.d.ts.map +1 -0
  160. package/dist/simulation/language-strategies/csharp-strategies.js +118 -0
  161. package/dist/simulation/language-strategies/csharp-strategies.js.map +1 -0
  162. package/dist/simulation/language-strategies/index.d.ts +41 -0
  163. package/dist/simulation/language-strategies/index.d.ts.map +1 -0
  164. package/dist/simulation/language-strategies/index.js +92 -0
  165. package/dist/simulation/language-strategies/index.js.map +1 -0
  166. package/dist/simulation/language-strategies/java-strategies.d.ts +17 -0
  167. package/dist/simulation/language-strategies/java-strategies.d.ts.map +1 -0
  168. package/dist/simulation/language-strategies/java-strategies.js +119 -0
  169. package/dist/simulation/language-strategies/java-strategies.js.map +1 -0
  170. package/dist/simulation/language-strategies/php-strategies.d.ts +17 -0
  171. package/dist/simulation/language-strategies/php-strategies.d.ts.map +1 -0
  172. package/dist/simulation/language-strategies/php-strategies.js +129 -0
  173. package/dist/simulation/language-strategies/php-strategies.js.map +1 -0
  174. package/dist/simulation/language-strategies/python-strategies.d.ts +17 -0
  175. package/dist/simulation/language-strategies/python-strategies.d.ts.map +1 -0
  176. package/dist/simulation/language-strategies/python-strategies.js +208 -0
  177. package/dist/simulation/language-strategies/python-strategies.js.map +1 -0
  178. package/dist/simulation/language-strategies/types.d.ts +67 -0
  179. package/dist/simulation/language-strategies/types.d.ts.map +1 -0
  180. package/dist/simulation/language-strategies/types.js +23 -0
  181. package/dist/simulation/language-strategies/types.js.map +1 -0
  182. package/dist/simulation/language-strategies/typescript-strategies.d.ts +17 -0
  183. package/dist/simulation/language-strategies/typescript-strategies.d.ts.map +1 -0
  184. package/dist/simulation/language-strategies/typescript-strategies.js +251 -0
  185. package/dist/simulation/language-strategies/typescript-strategies.js.map +1 -0
  186. package/dist/simulation/scorers/friction-scorer.d.ts +45 -0
  187. package/dist/simulation/scorers/friction-scorer.d.ts.map +1 -0
  188. package/dist/simulation/scorers/friction-scorer.js +336 -0
  189. package/dist/simulation/scorers/friction-scorer.js.map +1 -0
  190. package/dist/simulation/scorers/impact-scorer.d.ts +56 -0
  191. package/dist/simulation/scorers/impact-scorer.d.ts.map +1 -0
  192. package/dist/simulation/scorers/impact-scorer.js +273 -0
  193. package/dist/simulation/scorers/impact-scorer.js.map +1 -0
  194. package/dist/simulation/scorers/index.d.ts +12 -0
  195. package/dist/simulation/scorers/index.d.ts.map +1 -0
  196. package/dist/simulation/scorers/index.js +12 -0
  197. package/dist/simulation/scorers/index.js.map +1 -0
  198. package/dist/simulation/scorers/pattern-alignment-scorer.d.ts +83 -0
  199. package/dist/simulation/scorers/pattern-alignment-scorer.d.ts.map +1 -0
  200. package/dist/simulation/scorers/pattern-alignment-scorer.js +367 -0
  201. package/dist/simulation/scorers/pattern-alignment-scorer.js.map +1 -0
  202. package/dist/simulation/scorers/security-scorer.d.ts +63 -0
  203. package/dist/simulation/scorers/security-scorer.d.ts.map +1 -0
  204. package/dist/simulation/scorers/security-scorer.js +346 -0
  205. package/dist/simulation/scorers/security-scorer.js.map +1 -0
  206. package/dist/simulation/simulation-engine.d.ts +89 -0
  207. package/dist/simulation/simulation-engine.d.ts.map +1 -0
  208. package/dist/simulation/simulation-engine.js +480 -0
  209. package/dist/simulation/simulation-engine.js.map +1 -0
  210. package/dist/simulation/types.d.ts +200 -0
  211. package/dist/simulation/types.d.ts.map +1 -0
  212. package/dist/simulation/types.js +23 -0
  213. package/dist/simulation/types.js.map +1 -0
  214. package/dist/speculative/approach-generator.d.ts +2 -0
  215. package/dist/speculative/approach-generator.d.ts.map +1 -0
  216. package/dist/speculative/approach-generator.js +2 -0
  217. package/dist/speculative/approach-generator.js.map +1 -0
  218. package/dist/speculative/templates/types.d.ts +133 -0
  219. package/dist/speculative/templates/types.d.ts.map +1 -0
  220. package/dist/speculative/templates/types.js +208 -0
  221. package/dist/speculative/templates/types.js.map +1 -0
  222. package/dist/speculative/types.d.ts +523 -0
  223. package/dist/speculative/types.d.ts.map +1 -0
  224. package/dist/speculative/types.js +71 -0
  225. package/dist/speculative/types.js.map +1 -0
  226. package/dist/test-topology/extractors/base-test-extractor.d.ts +1 -1
  227. package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -1
  228. package/dist/test-topology/extractors/base-test-extractor.js.map +1 -1
  229. package/dist/test-topology/extractors/go-test-extractor.d.ts +33 -0
  230. package/dist/test-topology/extractors/go-test-extractor.d.ts.map +1 -0
  231. package/dist/test-topology/extractors/go-test-extractor.js +436 -0
  232. package/dist/test-topology/extractors/go-test-extractor.js.map +1 -0
  233. package/dist/test-topology/extractors/index.d.ts +1 -0
  234. package/dist/test-topology/extractors/index.d.ts.map +1 -1
  235. package/dist/test-topology/extractors/index.js +1 -0
  236. package/dist/test-topology/extractors/index.js.map +1 -1
  237. package/dist/test-topology/extractors/regex/go-test-regex.d.ts +62 -0
  238. package/dist/test-topology/extractors/regex/go-test-regex.d.ts.map +1 -0
  239. package/dist/test-topology/extractors/regex/go-test-regex.js +528 -0
  240. package/dist/test-topology/extractors/regex/go-test-regex.js.map +1 -0
  241. package/dist/test-topology/extractors/regex/index.d.ts +1 -0
  242. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -1
  243. package/dist/test-topology/extractors/regex/index.js +4 -0
  244. package/dist/test-topology/extractors/regex/index.js.map +1 -1
  245. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -1
  246. package/dist/test-topology/hybrid-test-topology-analyzer.js +1 -0
  247. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -1
  248. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -1
  249. package/dist/test-topology/test-topology-analyzer.js +1 -0
  250. package/dist/test-topology/test-topology-analyzer.js.map +1 -1
  251. package/dist/test-topology/types.d.ts +2 -2
  252. package/dist/test-topology/types.d.ts.map +1 -1
  253. package/dist/unified-provider/matching/database-sql-matcher.d.ts +42 -0
  254. package/dist/unified-provider/matching/database-sql-matcher.d.ts.map +1 -0
  255. package/dist/unified-provider/matching/database-sql-matcher.js +282 -0
  256. package/dist/unified-provider/matching/database-sql-matcher.js.map +1 -0
  257. package/dist/unified-provider/matching/gorm-matcher.d.ts +41 -0
  258. package/dist/unified-provider/matching/gorm-matcher.d.ts.map +1 -0
  259. package/dist/unified-provider/matching/gorm-matcher.js +222 -0
  260. package/dist/unified-provider/matching/gorm-matcher.js.map +1 -0
  261. package/dist/unified-provider/matching/index.d.ts +3 -0
  262. package/dist/unified-provider/matching/index.d.ts.map +1 -1
  263. package/dist/unified-provider/matching/index.js +4 -0
  264. package/dist/unified-provider/matching/index.js.map +1 -1
  265. package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -1
  266. package/dist/unified-provider/matching/matcher-registry.js +7 -0
  267. package/dist/unified-provider/matching/matcher-registry.js.map +1 -1
  268. package/dist/unified-provider/matching/sqlx-matcher.d.ts +40 -0
  269. package/dist/unified-provider/matching/sqlx-matcher.d.ts.map +1 -0
  270. package/dist/unified-provider/matching/sqlx-matcher.js +214 -0
  271. package/dist/unified-provider/matching/sqlx-matcher.js.map +1 -0
  272. package/dist/unified-provider/normalization/go-normalizer.d.ts +62 -0
  273. package/dist/unified-provider/normalization/go-normalizer.d.ts.map +1 -0
  274. package/dist/unified-provider/normalization/go-normalizer.js +608 -0
  275. package/dist/unified-provider/normalization/go-normalizer.js.map +1 -0
  276. package/dist/unified-provider/normalization/index.d.ts +1 -0
  277. package/dist/unified-provider/normalization/index.d.ts.map +1 -1
  278. package/dist/unified-provider/normalization/index.js +6 -1
  279. package/dist/unified-provider/normalization/index.js.map +1 -1
  280. package/dist/unified-provider/types.d.ts +1 -1
  281. package/dist/unified-provider/types.d.ts.map +1 -1
  282. package/dist/wpf/extractors/binding-error-detector.d.ts +75 -0
  283. package/dist/wpf/extractors/binding-error-detector.d.ts.map +1 -0
  284. package/dist/wpf/extractors/binding-error-detector.js +290 -0
  285. package/dist/wpf/extractors/binding-error-detector.js.map +1 -0
  286. package/dist/wpf/extractors/code-behind-linker.d.ts +70 -0
  287. package/dist/wpf/extractors/code-behind-linker.d.ts.map +1 -0
  288. package/dist/wpf/extractors/code-behind-linker.js +172 -0
  289. package/dist/wpf/extractors/code-behind-linker.js.map +1 -0
  290. package/dist/wpf/extractors/dependency-property-extractor.d.ts +61 -0
  291. package/dist/wpf/extractors/dependency-property-extractor.d.ts.map +1 -0
  292. package/dist/wpf/extractors/dependency-property-extractor.js +201 -0
  293. package/dist/wpf/extractors/dependency-property-extractor.js.map +1 -0
  294. package/dist/wpf/extractors/regex/viewmodel-regex.d.ts +82 -0
  295. package/dist/wpf/extractors/regex/viewmodel-regex.d.ts.map +1 -0
  296. package/dist/wpf/extractors/regex/viewmodel-regex.js +412 -0
  297. package/dist/wpf/extractors/regex/viewmodel-regex.js.map +1 -0
  298. package/dist/wpf/extractors/regex/xaml-regex.d.ts +77 -0
  299. package/dist/wpf/extractors/regex/xaml-regex.d.ts.map +1 -0
  300. package/dist/wpf/extractors/regex/xaml-regex.js +353 -0
  301. package/dist/wpf/extractors/regex/xaml-regex.js.map +1 -0
  302. package/dist/wpf/extractors/resource-dictionary-parser.d.ts +103 -0
  303. package/dist/wpf/extractors/resource-dictionary-parser.d.ts.map +1 -0
  304. package/dist/wpf/extractors/resource-dictionary-parser.js +296 -0
  305. package/dist/wpf/extractors/resource-dictionary-parser.js.map +1 -0
  306. package/dist/wpf/extractors/value-converter-extractor.d.ts +128 -0
  307. package/dist/wpf/extractors/value-converter-extractor.d.ts.map +1 -0
  308. package/dist/wpf/extractors/value-converter-extractor.js +312 -0
  309. package/dist/wpf/extractors/value-converter-extractor.js.map +1 -0
  310. package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts +104 -0
  311. package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts.map +1 -0
  312. package/dist/wpf/extractors/viewmodel-hybrid-extractor.js +513 -0
  313. package/dist/wpf/extractors/viewmodel-hybrid-extractor.js.map +1 -0
  314. package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts +98 -0
  315. package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts.map +1 -0
  316. package/dist/wpf/extractors/xaml-hybrid-extractor.js +444 -0
  317. package/dist/wpf/extractors/xaml-hybrid-extractor.js.map +1 -0
  318. package/dist/wpf/index.d.ts +25 -0
  319. package/dist/wpf/index.d.ts.map +1 -0
  320. package/dist/wpf/index.js +31 -0
  321. package/dist/wpf/index.js.map +1 -0
  322. package/dist/wpf/integration/wpf-callgraph-adapter.d.ts +82 -0
  323. package/dist/wpf/integration/wpf-callgraph-adapter.d.ts.map +1 -0
  324. package/dist/wpf/integration/wpf-callgraph-adapter.js +311 -0
  325. package/dist/wpf/integration/wpf-callgraph-adapter.js.map +1 -0
  326. package/dist/wpf/integration/wpf-data-flow-tracer.d.ts +129 -0
  327. package/dist/wpf/integration/wpf-data-flow-tracer.d.ts.map +1 -0
  328. package/dist/wpf/integration/wpf-data-flow-tracer.js +367 -0
  329. package/dist/wpf/integration/wpf-data-flow-tracer.js.map +1 -0
  330. package/dist/wpf/linkers/datacontext-resolver.d.ts +66 -0
  331. package/dist/wpf/linkers/datacontext-resolver.d.ts.map +1 -0
  332. package/dist/wpf/linkers/datacontext-resolver.js +240 -0
  333. package/dist/wpf/linkers/datacontext-resolver.js.map +1 -0
  334. package/dist/wpf/linkers/viewmodel-linker.d.ts +71 -0
  335. package/dist/wpf/linkers/viewmodel-linker.d.ts.map +1 -0
  336. package/dist/wpf/linkers/viewmodel-linker.js +268 -0
  337. package/dist/wpf/linkers/viewmodel-linker.js.map +1 -0
  338. package/dist/wpf/types.d.ts +451 -0
  339. package/dist/wpf/types.d.ts.map +1 -0
  340. package/dist/wpf/types.js +8 -0
  341. package/dist/wpf/types.js.map +1 -0
  342. package/dist/wpf/wpf-analyzer.d.ts +114 -0
  343. package/dist/wpf/wpf-analyzer.d.ts.map +1 -0
  344. package/dist/wpf/wpf-analyzer.js +332 -0
  345. package/dist/wpf/wpf-analyzer.js.map +1 -0
  346. package/dist/wrappers/integration/adapter.d.ts.map +1 -1
  347. package/dist/wrappers/integration/adapter.js +1 -0
  348. package/dist/wrappers/integration/adapter.js.map +1 -1
  349. package/package.json +29 -18
  350. package/LICENSE +0 -21
@@ -0,0 +1,296 @@
1
+ /**
2
+ * Resource Dictionary Parser
3
+ *
4
+ * Parses merged resource dictionaries and resolves resource references.
5
+ * Extracts styles, templates, converters, and other resources.
6
+ */
7
+ import * as fs from 'node:fs/promises';
8
+ import * as path from 'node:path';
9
+ // ============================================================================
10
+ // Regex Patterns
11
+ // ============================================================================
12
+ const RESOURCE_PATTERNS = {
13
+ // ResourceDictionary.MergedDictionaries
14
+ mergedDictionary: /<ResourceDictionary\s+Source\s*=\s*["']([^"']+)["']/g,
15
+ // Style with x:Key
16
+ style: /<Style\s+(?:[^>]*?)x:Key\s*=\s*["']([^"']+)["'](?:[^>]*?)(?:TargetType\s*=\s*["']\{?x:Type\s+)?([^}"'\s]+)?/g,
17
+ // DataTemplate with x:Key
18
+ dataTemplate: /<DataTemplate\s+(?:[^>]*?)x:Key\s*=\s*["']([^"']+)["'](?:[^>]*?)(?:DataType\s*=\s*["']\{?x:Type\s+)?([^}"'\s]+)?/g,
19
+ // ControlTemplate with x:Key
20
+ controlTemplate: /<ControlTemplate\s+(?:[^>]*?)x:Key\s*=\s*["']([^"']+)["'](?:[^>]*?)(?:TargetType\s*=\s*["']\{?x:Type\s+)?([^}"'\s]+)?/g,
21
+ // Value converter (local:SomeConverter x:Key="...")
22
+ converter: /<(\w+:)?(\w+Converter)\s+x:Key\s*=\s*["']([^"']+)["']/g,
23
+ // Alternative converter pattern (x:Key first)
24
+ converterAlt: /x:Key\s*=\s*["']([^"']+)["'][^>]*?(?:xmlns:\w+\s*=\s*["'][^"']*["'][^>]*)?\/>/g,
25
+ // Brush resources
26
+ brush: /<(SolidColorBrush|LinearGradientBrush|RadialGradientBrush)\s+(?:[^>]*?)x:Key\s*=\s*["']([^"']+)["']/g,
27
+ // Generic resource with x:Key
28
+ genericResource: /<(\w+(?::\w+)?)\s+(?:[^>]*?)x:Key\s*=\s*["']([^"']+)["']/g,
29
+ // Namespace declarations
30
+ namespace: /xmlns:(\w+)\s*=\s*["']clr-namespace:([^;"']+)(?:;assembly=([^"']+))?["']/g,
31
+ // Converter usage in binding
32
+ converterUsage: /Converter\s*=\s*\{StaticResource\s+([^}]+)\}/g,
33
+ };
34
+ // ============================================================================
35
+ // Resource Dictionary Parser
36
+ // ============================================================================
37
+ export class ResourceDictionaryParser {
38
+ dictionaries = new Map();
39
+ converters = new Map();
40
+ namespaces = new Map(); // prefix -> namespace
41
+ /**
42
+ * Parse a resource dictionary file
43
+ */
44
+ async parse(filePath, content) {
45
+ const resources = new Map();
46
+ const mergedDictionaries = [];
47
+ // Extract namespace declarations
48
+ this.extractNamespaces(content);
49
+ // Extract merged dictionaries
50
+ let match;
51
+ while ((match = RESOURCE_PATTERNS.mergedDictionary.exec(content)) !== null) {
52
+ const source = match[1] ?? '';
53
+ mergedDictionaries.push(source);
54
+ }
55
+ // Extract styles
56
+ RESOURCE_PATTERNS.style.lastIndex = 0;
57
+ while ((match = RESOURCE_PATTERNS.style.exec(content)) !== null) {
58
+ const key = match[1] ?? '';
59
+ const targetType = match[2];
60
+ resources.set(key, {
61
+ key,
62
+ type: 'Style',
63
+ targetType,
64
+ location: { file: filePath, line: this.getLineNumber(content, match.index) },
65
+ });
66
+ }
67
+ // Extract data templates
68
+ RESOURCE_PATTERNS.dataTemplate.lastIndex = 0;
69
+ while ((match = RESOURCE_PATTERNS.dataTemplate.exec(content)) !== null) {
70
+ const key = match[1] ?? '';
71
+ const targetType = match[2];
72
+ resources.set(key, {
73
+ key,
74
+ type: 'DataTemplate',
75
+ targetType,
76
+ location: { file: filePath, line: this.getLineNumber(content, match.index) },
77
+ });
78
+ }
79
+ // Extract control templates
80
+ RESOURCE_PATTERNS.controlTemplate.lastIndex = 0;
81
+ while ((match = RESOURCE_PATTERNS.controlTemplate.exec(content)) !== null) {
82
+ const key = match[1] ?? '';
83
+ const targetType = match[2];
84
+ resources.set(key, {
85
+ key,
86
+ type: 'ControlTemplate',
87
+ targetType,
88
+ location: { file: filePath, line: this.getLineNumber(content, match.index) },
89
+ });
90
+ }
91
+ // Extract converters
92
+ RESOURCE_PATTERNS.converter.lastIndex = 0;
93
+ while ((match = RESOURCE_PATTERNS.converter.exec(content)) !== null) {
94
+ const prefix = match[1]?.replace(':', '') ?? '';
95
+ const converterClass = match[2] ?? '';
96
+ const key = match[3] ?? '';
97
+ const namespace = this.namespaces.get(prefix) ?? '';
98
+ resources.set(key, {
99
+ key,
100
+ type: 'Converter',
101
+ converterType: converterClass,
102
+ location: { file: filePath, line: this.getLineNumber(content, match.index) },
103
+ });
104
+ // Track converter info
105
+ this.converters.set(key, {
106
+ resourceKey: key,
107
+ converterClass,
108
+ fullTypeName: namespace ? `${namespace}.${converterClass}` : converterClass,
109
+ definedIn: filePath,
110
+ usages: [],
111
+ location: { file: filePath, line: this.getLineNumber(content, match.index) },
112
+ });
113
+ }
114
+ // Extract brushes
115
+ RESOURCE_PATTERNS.brush.lastIndex = 0;
116
+ while ((match = RESOURCE_PATTERNS.brush.exec(content)) !== null) {
117
+ const key = match[2] ?? '';
118
+ resources.set(key, {
119
+ key,
120
+ type: 'Brush',
121
+ location: { file: filePath, line: this.getLineNumber(content, match.index) },
122
+ });
123
+ }
124
+ const dictionary = {
125
+ path: filePath,
126
+ mergedDictionaries,
127
+ resources,
128
+ };
129
+ this.dictionaries.set(filePath, dictionary);
130
+ return dictionary;
131
+ }
132
+ /**
133
+ * Parse all resource dictionaries in a directory
134
+ */
135
+ async parseAll(rootDir) {
136
+ const xamlFiles = await this.findResourceDictionaries(rootDir);
137
+ for (const filePath of xamlFiles) {
138
+ const fullPath = path.join(rootDir, filePath);
139
+ try {
140
+ const content = await fs.readFile(fullPath, 'utf-8');
141
+ await this.parse(filePath, content);
142
+ }
143
+ catch {
144
+ // Skip files that can't be read
145
+ }
146
+ }
147
+ return this.dictionaries;
148
+ }
149
+ /**
150
+ * Find resource dictionary files
151
+ */
152
+ async findResourceDictionaries(rootDir) {
153
+ const results = [];
154
+ const walk = async (dir, relativePath = '') => {
155
+ let entries;
156
+ try {
157
+ entries = await fs.readdir(dir, { withFileTypes: true });
158
+ }
159
+ catch {
160
+ return;
161
+ }
162
+ for (const entry of entries) {
163
+ const fullPath = path.join(dir, entry.name);
164
+ const relPath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
165
+ if (entry.isDirectory()) {
166
+ if (!['node_modules', 'bin', 'obj', '.git'].includes(entry.name)) {
167
+ await walk(fullPath, relPath);
168
+ }
169
+ }
170
+ else if (entry.isFile() && entry.name.endsWith('.xaml')) {
171
+ // Check if it's a resource dictionary
172
+ const content = await fs.readFile(fullPath, 'utf-8');
173
+ if (content.includes('<ResourceDictionary') ||
174
+ content.includes('Resources>') ||
175
+ entry.name.includes('Dictionary') ||
176
+ entry.name.includes('Resources') ||
177
+ entry.name.includes('Styles')) {
178
+ results.push(relPath);
179
+ }
180
+ }
181
+ }
182
+ };
183
+ await walk(rootDir);
184
+ return results;
185
+ }
186
+ /**
187
+ * Extract namespace declarations
188
+ */
189
+ extractNamespaces(content) {
190
+ let match;
191
+ RESOURCE_PATTERNS.namespace.lastIndex = 0;
192
+ while ((match = RESOURCE_PATTERNS.namespace.exec(content)) !== null) {
193
+ const prefix = match[1] ?? '';
194
+ const namespace = match[2] ?? '';
195
+ this.namespaces.set(prefix, namespace);
196
+ }
197
+ }
198
+ /**
199
+ * Resolve a resource by key
200
+ */
201
+ resolve(key, startingDictionary) {
202
+ const searchPath = [];
203
+ // Search in specific dictionary first
204
+ if (startingDictionary) {
205
+ const dict = this.dictionaries.get(startingDictionary);
206
+ if (dict) {
207
+ searchPath.push(startingDictionary);
208
+ const resource = dict.resources.get(key);
209
+ if (resource) {
210
+ return { key, resource, searchPath, foundIn: startingDictionary };
211
+ }
212
+ // Search merged dictionaries
213
+ for (const merged of dict.mergedDictionaries) {
214
+ const result = this.resolve(key, merged);
215
+ searchPath.push(...result.searchPath);
216
+ if (result.resource) {
217
+ return { key, resource: result.resource, searchPath, foundIn: result.foundIn };
218
+ }
219
+ }
220
+ }
221
+ }
222
+ // Search all dictionaries
223
+ for (const [dictPath, dict] of this.dictionaries) {
224
+ if (!searchPath.includes(dictPath)) {
225
+ searchPath.push(dictPath);
226
+ const resource = dict.resources.get(key);
227
+ if (resource) {
228
+ return { key, resource, searchPath, foundIn: dictPath };
229
+ }
230
+ }
231
+ }
232
+ return { key, resource: null, searchPath };
233
+ }
234
+ /**
235
+ * Get all converters
236
+ */
237
+ getConverters() {
238
+ return Array.from(this.converters.values());
239
+ }
240
+ /**
241
+ * Track converter usage
242
+ */
243
+ trackConverterUsage(converterKey, xamlFile, property, line) {
244
+ const converter = this.converters.get(converterKey);
245
+ if (converter) {
246
+ converter.usages.push({ xamlFile, property, line });
247
+ }
248
+ }
249
+ /**
250
+ * Find converter usages in XAML content
251
+ */
252
+ findConverterUsages(xamlFile, content) {
253
+ let match;
254
+ RESOURCE_PATTERNS.converterUsage.lastIndex = 0;
255
+ while ((match = RESOURCE_PATTERNS.converterUsage.exec(content)) !== null) {
256
+ const converterKey = match[1]?.trim() ?? '';
257
+ const line = this.getLineNumber(content, match.index);
258
+ this.trackConverterUsage(converterKey, xamlFile, 'Converter', line);
259
+ }
260
+ }
261
+ /**
262
+ * Get all resources of a specific type
263
+ */
264
+ getResourcesByType(type) {
265
+ const results = [];
266
+ for (const dict of this.dictionaries.values()) {
267
+ for (const resource of dict.resources.values()) {
268
+ if (resource.type === type) {
269
+ results.push(resource);
270
+ }
271
+ }
272
+ }
273
+ return results;
274
+ }
275
+ /**
276
+ * Clear all parsed data
277
+ */
278
+ clear() {
279
+ this.dictionaries.clear();
280
+ this.converters.clear();
281
+ this.namespaces.clear();
282
+ }
283
+ /**
284
+ * Get line number from character index
285
+ */
286
+ getLineNumber(content, index) {
287
+ return content.slice(0, index).split('\n').length;
288
+ }
289
+ }
290
+ /**
291
+ * Factory function
292
+ */
293
+ export function createResourceDictionaryParser() {
294
+ return new ResourceDictionaryParser();
295
+ }
296
+ //# sourceMappingURL=resource-dictionary-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-dictionary-parser.js","sourceRoot":"","sources":["../../../src/wpf/extractors/resource-dictionary-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAqDlC,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,MAAM,iBAAiB,GAAG;IACxB,wCAAwC;IACx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KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC;gBAC/C,IAAI,QAAQ,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;oBAC3B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACzB,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACK,aAAa,CAAC,OAAe,EAAE,KAAa;QAClD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;IACpD,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,8BAA8B;IAC5C,OAAO,IAAI,wBAAwB,EAAE,CAAC;AACxC,CAAC"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Value Converter Extractor
3
+ *
4
+ * Extracts IValueConverter and IMultiValueConverter implementations from C# code.
5
+ * Tracks converter usage across XAML files.
6
+ */
7
+ import type { SourceLocation } from '../types.js';
8
+ export interface ValueConverterInfo {
9
+ /** Class name */
10
+ className: string;
11
+ /** Full qualified name */
12
+ qualifiedName: string;
13
+ /** File path */
14
+ filePath: string;
15
+ /** Converter type */
16
+ converterType: 'IValueConverter' | 'IMultiValueConverter';
17
+ /** Resource keys (from XAML) */
18
+ resourceKeys: string[];
19
+ /** Convert method info */
20
+ convertMethod: ConverterMethodInfo | null;
21
+ /** ConvertBack method info */
22
+ convertBackMethod: ConverterMethodInfo | null;
23
+ /** Usages in XAML */
24
+ usages: ConverterUsage[];
25
+ /** Source location */
26
+ location: SourceLocation;
27
+ }
28
+ export interface ConverterMethodInfo {
29
+ /** Has implementation (not just throw) */
30
+ hasImplementation: boolean;
31
+ /** Return type */
32
+ returnType: string;
33
+ /** Parameter types */
34
+ parameterTypes: string[];
35
+ /** Line number */
36
+ line: number;
37
+ }
38
+ export interface ConverterUsage {
39
+ /** XAML file */
40
+ xamlFile: string;
41
+ /** Element type */
42
+ elementType: string;
43
+ /** Binding property */
44
+ property: string;
45
+ /** Resource key used */
46
+ resourceKey: string;
47
+ /** Line number */
48
+ line: number;
49
+ }
50
+ export interface ValueConverterExtractionResult {
51
+ /** Extracted converters */
52
+ converters: ValueConverterInfo[];
53
+ /** Total usages found */
54
+ totalUsages: number;
55
+ /** Extraction confidence */
56
+ confidence: number;
57
+ }
58
+ export declare const VALUE_CONVERTER_PATTERNS: {
59
+ valueConverter: RegExp;
60
+ multiValueConverter: RegExp;
61
+ namespace: RegExp;
62
+ convertMethod: RegExp;
63
+ convertBackMethod: RegExp;
64
+ multiConvertMethod: RegExp;
65
+ multiConvertBackMethod: RegExp;
66
+ throwNotImplemented: RegExp;
67
+ throwNotSupported: RegExp;
68
+ xamlConverterUsage: RegExp;
69
+ xamlConverterResource: RegExp;
70
+ markupExtensionConverter: RegExp;
71
+ };
72
+ export declare class ValueConverterExtractor {
73
+ private converters;
74
+ private resourceKeyToClass;
75
+ /**
76
+ * Extract converters from C# content
77
+ */
78
+ extractFromCSharp(filePath: string, content: string): ValueConverterInfo[];
79
+ /**
80
+ * Extract converter resource definitions from XAML
81
+ */
82
+ extractFromXaml(_filePath: string, content: string): void;
83
+ /**
84
+ * Find converter usages in XAML
85
+ */
86
+ findUsages(xamlFile: string, content: string): ConverterUsage[];
87
+ /**
88
+ * Extract Convert method info
89
+ */
90
+ private extractConvertMethod;
91
+ /**
92
+ * Extract ConvertBack method info
93
+ */
94
+ private extractConvertBackMethod;
95
+ /**
96
+ * Find element context for a match
97
+ */
98
+ private findElementContext;
99
+ /**
100
+ * Get all converters
101
+ */
102
+ getConverters(): ValueConverterInfo[];
103
+ /**
104
+ * Get converter by class name or resource key
105
+ */
106
+ getConverter(nameOrKey: string): ValueConverterInfo | null;
107
+ /**
108
+ * Analyze all converters in a project
109
+ */
110
+ analyzeProject(rootDir: string): Promise<ValueConverterExtractionResult>;
111
+ /**
112
+ * Find files matching pattern
113
+ */
114
+ private findFiles;
115
+ /**
116
+ * Clear all data
117
+ */
118
+ clear(): void;
119
+ /**
120
+ * Get line number from character index
121
+ */
122
+ private getLineNumber;
123
+ }
124
+ /**
125
+ * Factory function
126
+ */
127
+ export declare function createValueConverterExtractor(): ValueConverterExtractor;
128
+ //# sourceMappingURL=value-converter-extractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-converter-extractor.d.ts","sourceRoot":"","sources":["../../../src/wpf/extractors/value-converter-extractor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD,MAAM,WAAW,kBAAkB;IACjC,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,aAAa,EAAE,iBAAiB,GAAG,sBAAsB,CAAC;IAC1D,gCAAgC;IAChC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,0BAA0B;IAC1B,aAAa,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC1C,8BAA8B;IAC9B,iBAAiB,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC9C,qBAAqB;IACrB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,sBAAsB;IACtB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,0CAA0C;IAC1C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,cAAc,EAAE,MA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