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.
Files changed (644) 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/csharp-data-access-extractor.d.ts +8 -0
  7. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
  8. package/dist/call-graph/extractors/csharp-data-access-extractor.js +8 -0
  9. package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
  10. package/dist/call-graph/extractors/csharp-extractor.d.ts +35 -0
  11. package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -1
  12. package/dist/call-graph/extractors/csharp-extractor.js +362 -4
  13. package/dist/call-graph/extractors/csharp-extractor.js.map +1 -1
  14. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts +37 -0
  15. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts.map +1 -0
  16. package/dist/call-graph/extractors/csharp-hybrid-extractor.js +408 -0
  17. package/dist/call-graph/extractors/csharp-hybrid-extractor.js.map +1 -0
  18. package/dist/call-graph/extractors/go-data-access-extractor.d.ts +80 -0
  19. package/dist/call-graph/extractors/go-data-access-extractor.d.ts.map +1 -0
  20. package/dist/call-graph/extractors/go-data-access-extractor.js +457 -0
  21. package/dist/call-graph/extractors/go-data-access-extractor.js.map +1 -0
  22. package/dist/call-graph/extractors/go-extractor.d.ts +103 -0
  23. package/dist/call-graph/extractors/go-extractor.d.ts.map +1 -0
  24. package/dist/call-graph/extractors/go-extractor.js +509 -0
  25. package/dist/call-graph/extractors/go-extractor.js.map +1 -0
  26. package/dist/call-graph/extractors/go-hybrid-extractor.d.ts +97 -0
  27. package/dist/call-graph/extractors/go-hybrid-extractor.d.ts.map +1 -0
  28. package/dist/call-graph/extractors/go-hybrid-extractor.js +496 -0
  29. package/dist/call-graph/extractors/go-hybrid-extractor.js.map +1 -0
  30. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts +102 -0
  31. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts.map +1 -0
  32. package/dist/call-graph/extractors/hybrid-extractor-base.js +289 -0
  33. package/dist/call-graph/extractors/hybrid-extractor-base.js.map +1 -0
  34. package/dist/call-graph/extractors/index.d.ts +17 -13
  35. package/dist/call-graph/extractors/index.d.ts.map +1 -1
  36. package/dist/call-graph/extractors/index.js +24 -23
  37. package/dist/call-graph/extractors/index.js.map +1 -1
  38. package/dist/call-graph/extractors/java-data-access-extractor.d.ts +8 -0
  39. package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
  40. package/dist/call-graph/extractors/java-data-access-extractor.js +8 -0
  41. package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
  42. package/dist/call-graph/extractors/java-extractor.d.ts +15 -0
  43. package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -1
  44. package/dist/call-graph/extractors/java-extractor.js +120 -4
  45. package/dist/call-graph/extractors/java-extractor.js.map +1 -1
  46. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts +36 -0
  47. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts.map +1 -0
  48. package/dist/call-graph/extractors/java-hybrid-extractor.js +426 -0
  49. package/dist/call-graph/extractors/java-hybrid-extractor.js.map +1 -0
  50. package/dist/call-graph/extractors/php-data-access-extractor.d.ts +8 -0
  51. package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
  52. package/dist/call-graph/extractors/php-data-access-extractor.js +8 -0
  53. package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
  54. package/dist/call-graph/extractors/php-extractor.d.ts +48 -1
  55. package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -1
  56. package/dist/call-graph/extractors/php-extractor.js +460 -6
  57. package/dist/call-graph/extractors/php-extractor.js.map +1 -1
  58. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts +35 -0
  59. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts.map +1 -0
  60. package/dist/call-graph/extractors/php-hybrid-extractor.js +393 -0
  61. package/dist/call-graph/extractors/php-hybrid-extractor.js.map +1 -0
  62. package/dist/call-graph/extractors/python-data-access-extractor.d.ts +8 -0
  63. package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
  64. package/dist/call-graph/extractors/python-data-access-extractor.js +8 -0
  65. package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
  66. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts +85 -0
  67. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts.map +1 -0
  68. package/dist/call-graph/extractors/python-hybrid-extractor.js +462 -0
  69. package/dist/call-graph/extractors/python-hybrid-extractor.js.map +1 -0
  70. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts +154 -0
  71. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts.map +1 -0
  72. package/dist/call-graph/extractors/regex/base-regex-extractor.js +346 -0
  73. package/dist/call-graph/extractors/regex/base-regex-extractor.js.map +1 -0
  74. package/dist/call-graph/extractors/regex/csharp-regex.d.ts +34 -0
  75. package/dist/call-graph/extractors/regex/csharp-regex.d.ts.map +1 -0
  76. package/dist/call-graph/extractors/regex/csharp-regex.js +393 -0
  77. package/dist/call-graph/extractors/regex/csharp-regex.js.map +1 -0
  78. package/dist/call-graph/extractors/regex/go-regex.d.ts +51 -0
  79. package/dist/call-graph/extractors/regex/go-regex.d.ts.map +1 -0
  80. package/dist/call-graph/extractors/regex/go-regex.js +435 -0
  81. package/dist/call-graph/extractors/regex/go-regex.js.map +1 -0
  82. package/dist/call-graph/extractors/regex/index.d.ts +26 -0
  83. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -0
  84. package/dist/call-graph/extractors/regex/index.js +74 -0
  85. package/dist/call-graph/extractors/regex/index.js.map +1 -0
  86. package/dist/call-graph/extractors/regex/java-regex.d.ts +34 -0
  87. package/dist/call-graph/extractors/regex/java-regex.d.ts.map +1 -0
  88. package/dist/call-graph/extractors/regex/java-regex.js +327 -0
  89. package/dist/call-graph/extractors/regex/java-regex.js.map +1 -0
  90. package/dist/call-graph/extractors/regex/php-regex.d.ts +30 -0
  91. package/dist/call-graph/extractors/regex/php-regex.d.ts.map +1 -0
  92. package/dist/call-graph/extractors/regex/php-regex.js +333 -0
  93. package/dist/call-graph/extractors/regex/php-regex.js.map +1 -0
  94. package/dist/call-graph/extractors/regex/python-regex.d.ts +46 -0
  95. package/dist/call-graph/extractors/regex/python-regex.d.ts.map +1 -0
  96. package/dist/call-graph/extractors/regex/python-regex.js +380 -0
  97. package/dist/call-graph/extractors/regex/python-regex.js.map +1 -0
  98. package/dist/call-graph/extractors/regex/typescript-regex.d.ts +27 -0
  99. package/dist/call-graph/extractors/regex/typescript-regex.d.ts.map +1 -0
  100. package/dist/call-graph/extractors/regex/typescript-regex.js +349 -0
  101. package/dist/call-graph/extractors/regex/typescript-regex.js.map +1 -0
  102. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +7 -0
  103. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
  104. package/dist/call-graph/extractors/semantic-data-access-scanner.js +7 -0
  105. package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
  106. package/dist/call-graph/extractors/types.d.ts +111 -0
  107. package/dist/call-graph/extractors/types.d.ts.map +1 -0
  108. package/dist/call-graph/extractors/types.js +68 -0
  109. package/dist/call-graph/extractors/types.js.map +1 -0
  110. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +8 -0
  111. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
  112. package/dist/call-graph/extractors/typescript-data-access-extractor.js +8 -0
  113. package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
  114. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts +116 -0
  115. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts.map +1 -0
  116. package/dist/call-graph/extractors/typescript-hybrid-extractor.js +635 -0
  117. package/dist/call-graph/extractors/typescript-hybrid-extractor.js.map +1 -0
  118. package/dist/call-graph/index.d.ts +3 -0
  119. package/dist/call-graph/index.d.ts.map +1 -1
  120. package/dist/call-graph/index.js +5 -0
  121. package/dist/call-graph/index.js.map +1 -1
  122. package/dist/call-graph/types.d.ts +1 -1
  123. package/dist/call-graph/types.d.ts.map +1 -1
  124. package/dist/constraints/extraction/constraint-synthesizer.d.ts +72 -0
  125. package/dist/constraints/extraction/constraint-synthesizer.d.ts.map +1 -0
  126. package/dist/constraints/extraction/constraint-synthesizer.js +336 -0
  127. package/dist/constraints/extraction/constraint-synthesizer.js.map +1 -0
  128. package/dist/constraints/extraction/index.d.ts +10 -0
  129. package/dist/constraints/extraction/index.d.ts.map +1 -0
  130. package/dist/constraints/extraction/index.js +10 -0
  131. package/dist/constraints/extraction/index.js.map +1 -0
  132. package/dist/constraints/extraction/invariant-detector.d.ts +109 -0
  133. package/dist/constraints/extraction/invariant-detector.d.ts.map +1 -0
  134. package/dist/constraints/extraction/invariant-detector.js +979 -0
  135. package/dist/constraints/extraction/invariant-detector.js.map +1 -0
  136. package/dist/constraints/index.d.ts +15 -0
  137. package/dist/constraints/index.d.ts.map +1 -0
  138. package/dist/constraints/index.js +16 -0
  139. package/dist/constraints/index.js.map +1 -0
  140. package/dist/constraints/store/constraint-store.d.ts +110 -0
  141. package/dist/constraints/store/constraint-store.d.ts.map +1 -0
  142. package/dist/constraints/store/constraint-store.js +584 -0
  143. package/dist/constraints/store/constraint-store.js.map +1 -0
  144. package/dist/constraints/types.d.ts +605 -0
  145. package/dist/constraints/types.d.ts.map +1 -0
  146. package/dist/constraints/types.js +57 -0
  147. package/dist/constraints/types.js.map +1 -0
  148. package/dist/constraints/verification/constraint-verifier.d.ts +100 -0
  149. package/dist/constraints/verification/constraint-verifier.d.ts.map +1 -0
  150. package/dist/constraints/verification/constraint-verifier.js +638 -0
  151. package/dist/constraints/verification/constraint-verifier.js.map +1 -0
  152. package/dist/constraints/verification/index.d.ts +8 -0
  153. package/dist/constraints/verification/index.d.ts.map +1 -0
  154. package/dist/constraints/verification/index.js +8 -0
  155. package/dist/constraints/verification/index.js.map +1 -0
  156. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts +121 -0
  157. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts.map +1 -0
  158. package/dist/decisions/analyzer/decision-mining-analyzer.js +904 -0
  159. package/dist/decisions/analyzer/decision-mining-analyzer.js.map +1 -0
  160. package/dist/decisions/analyzer/index.d.ts +5 -0
  161. package/dist/decisions/analyzer/index.d.ts.map +1 -0
  162. package/dist/decisions/analyzer/index.js +5 -0
  163. package/dist/decisions/analyzer/index.js.map +1 -0
  164. package/dist/decisions/extractors/base-commit-extractor.d.ts +104 -0
  165. package/dist/decisions/extractors/base-commit-extractor.d.ts.map +1 -0
  166. package/dist/decisions/extractors/base-commit-extractor.js +305 -0
  167. package/dist/decisions/extractors/base-commit-extractor.js.map +1 -0
  168. package/dist/decisions/extractors/csharp-commit-extractor.d.ts +18 -0
  169. package/dist/decisions/extractors/csharp-commit-extractor.d.ts.map +1 -0
  170. package/dist/decisions/extractors/csharp-commit-extractor.js +281 -0
  171. package/dist/decisions/extractors/csharp-commit-extractor.js.map +1 -0
  172. package/dist/decisions/extractors/index.d.ts +31 -0
  173. package/dist/decisions/extractors/index.d.ts.map +1 -0
  174. package/dist/decisions/extractors/index.js +63 -0
  175. package/dist/decisions/extractors/index.js.map +1 -0
  176. package/dist/decisions/extractors/java-commit-extractor.d.ts +18 -0
  177. package/dist/decisions/extractors/java-commit-extractor.d.ts.map +1 -0
  178. package/dist/decisions/extractors/java-commit-extractor.js +248 -0
  179. package/dist/decisions/extractors/java-commit-extractor.js.map +1 -0
  180. package/dist/decisions/extractors/php-commit-extractor.d.ts +18 -0
  181. package/dist/decisions/extractors/php-commit-extractor.d.ts.map +1 -0
  182. package/dist/decisions/extractors/php-commit-extractor.js +280 -0
  183. package/dist/decisions/extractors/php-commit-extractor.js.map +1 -0
  184. package/dist/decisions/extractors/python-commit-extractor.d.ts +18 -0
  185. package/dist/decisions/extractors/python-commit-extractor.d.ts.map +1 -0
  186. package/dist/decisions/extractors/python-commit-extractor.js +248 -0
  187. package/dist/decisions/extractors/python-commit-extractor.js.map +1 -0
  188. package/dist/decisions/extractors/typescript-commit-extractor.d.ts +37 -0
  189. package/dist/decisions/extractors/typescript-commit-extractor.d.ts.map +1 -0
  190. package/dist/decisions/extractors/typescript-commit-extractor.js +229 -0
  191. package/dist/decisions/extractors/typescript-commit-extractor.js.map +1 -0
  192. package/dist/decisions/git/commit-parser.d.ts +58 -0
  193. package/dist/decisions/git/commit-parser.d.ts.map +1 -0
  194. package/dist/decisions/git/commit-parser.js +344 -0
  195. package/dist/decisions/git/commit-parser.js.map +1 -0
  196. package/dist/decisions/git/diff-analyzer.d.ts +30 -0
  197. package/dist/decisions/git/diff-analyzer.d.ts.map +1 -0
  198. package/dist/decisions/git/diff-analyzer.js +492 -0
  199. package/dist/decisions/git/diff-analyzer.js.map +1 -0
  200. package/dist/decisions/git/git-walker.d.ts +64 -0
  201. package/dist/decisions/git/git-walker.d.ts.map +1 -0
  202. package/dist/decisions/git/git-walker.js +441 -0
  203. package/dist/decisions/git/git-walker.js.map +1 -0
  204. package/dist/decisions/git/index.d.ts +11 -0
  205. package/dist/decisions/git/index.d.ts.map +1 -0
  206. package/dist/decisions/git/index.js +13 -0
  207. package/dist/decisions/git/index.js.map +1 -0
  208. package/dist/decisions/git/types.d.ts +223 -0
  209. package/dist/decisions/git/types.d.ts.map +1 -0
  210. package/dist/decisions/git/types.js +7 -0
  211. package/dist/decisions/git/types.js.map +1 -0
  212. package/dist/decisions/index.d.ts +27 -0
  213. package/dist/decisions/index.d.ts.map +1 -0
  214. package/dist/decisions/index.js +45 -0
  215. package/dist/decisions/index.js.map +1 -0
  216. package/dist/decisions/types.d.ts +530 -0
  217. package/dist/decisions/types.d.ts.map +1 -0
  218. package/dist/decisions/types.js +8 -0
  219. package/dist/decisions/types.js.map +1 -0
  220. package/dist/error-handling/error-handling-analyzer.d.ts +73 -0
  221. package/dist/error-handling/error-handling-analyzer.d.ts.map +1 -0
  222. package/dist/error-handling/error-handling-analyzer.js +706 -0
  223. package/dist/error-handling/error-handling-analyzer.js.map +1 -0
  224. package/dist/error-handling/index.d.ts +8 -0
  225. package/dist/error-handling/index.d.ts.map +1 -0
  226. package/dist/error-handling/index.js +8 -0
  227. package/dist/error-handling/index.js.map +1 -0
  228. package/dist/error-handling/types.d.ts +307 -0
  229. package/dist/error-handling/types.d.ts.map +1 -0
  230. package/dist/error-handling/types.js +7 -0
  231. package/dist/error-handling/types.js.map +1 -0
  232. package/dist/go/go-analyzer.d.ts +203 -0
  233. package/dist/go/go-analyzer.d.ts.map +1 -0
  234. package/dist/go/go-analyzer.js +509 -0
  235. package/dist/go/go-analyzer.js.map +1 -0
  236. package/dist/go/index.d.ts +7 -0
  237. package/dist/go/index.d.ts.map +1 -0
  238. package/dist/go/index.js +8 -0
  239. package/dist/go/index.js.map +1 -0
  240. package/dist/index.d.ts +25 -0
  241. package/dist/index.d.ts.map +1 -1
  242. package/dist/index.js +85 -0
  243. package/dist/index.js.map +1 -1
  244. package/dist/lake/pattern-shard-store.d.ts +6 -0
  245. package/dist/lake/pattern-shard-store.d.ts.map +1 -1
  246. package/dist/lake/pattern-shard-store.js +6 -0
  247. package/dist/lake/pattern-shard-store.js.map +1 -1
  248. package/dist/module-coupling/coupling-analyzer.d.ts +73 -0
  249. package/dist/module-coupling/coupling-analyzer.d.ts.map +1 -0
  250. package/dist/module-coupling/coupling-analyzer.js +668 -0
  251. package/dist/module-coupling/coupling-analyzer.js.map +1 -0
  252. package/dist/module-coupling/index.d.ts +9 -0
  253. package/dist/module-coupling/index.d.ts.map +1 -0
  254. package/dist/module-coupling/index.js +9 -0
  255. package/dist/module-coupling/index.js.map +1 -0
  256. package/dist/module-coupling/types.d.ts +273 -0
  257. package/dist/module-coupling/types.d.ts.map +1 -0
  258. package/dist/module-coupling/types.js +8 -0
  259. package/dist/module-coupling/types.js.map +1 -0
  260. package/dist/parsers/tree-sitter/go-loader.d.ts +50 -0
  261. package/dist/parsers/tree-sitter/go-loader.d.ts.map +1 -0
  262. package/dist/parsers/tree-sitter/go-loader.js +161 -0
  263. package/dist/parsers/tree-sitter/go-loader.js.map +1 -0
  264. package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts +250 -0
  265. package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts.map +1 -0
  266. package/dist/parsers/tree-sitter/tree-sitter-go-parser.js +707 -0
  267. package/dist/parsers/tree-sitter/tree-sitter-go-parser.js.map +1 -0
  268. package/dist/parsers/types.d.ts +1 -1
  269. package/dist/parsers/types.d.ts.map +1 -1
  270. package/dist/patterns/adapters/index.d.ts +11 -0
  271. package/dist/patterns/adapters/index.d.ts.map +1 -0
  272. package/dist/patterns/adapters/index.js +11 -0
  273. package/dist/patterns/adapters/index.js.map +1 -0
  274. package/dist/patterns/adapters/pattern-store-adapter.d.ts +59 -0
  275. package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -0
  276. package/dist/patterns/adapters/pattern-store-adapter.js +468 -0
  277. package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -0
  278. package/dist/patterns/adapters/service-factory.d.ts +40 -0
  279. package/dist/patterns/adapters/service-factory.d.ts.map +1 -0
  280. package/dist/patterns/adapters/service-factory.js +144 -0
  281. package/dist/patterns/adapters/service-factory.js.map +1 -0
  282. package/dist/patterns/errors.d.ts +32 -0
  283. package/dist/patterns/errors.d.ts.map +1 -0
  284. package/dist/patterns/errors.js +45 -0
  285. package/dist/patterns/errors.js.map +1 -0
  286. package/dist/patterns/impl/cached-repository.d.ts +79 -0
  287. package/dist/patterns/impl/cached-repository.d.ts.map +1 -0
  288. package/dist/patterns/impl/cached-repository.js +296 -0
  289. package/dist/patterns/impl/cached-repository.js.map +1 -0
  290. package/dist/patterns/impl/file-repository.d.ts +75 -0
  291. package/dist/patterns/impl/file-repository.d.ts.map +1 -0
  292. package/dist/patterns/impl/file-repository.js +507 -0
  293. package/dist/patterns/impl/file-repository.js.map +1 -0
  294. package/dist/patterns/impl/index.d.ts +16 -0
  295. package/dist/patterns/impl/index.d.ts.map +1 -0
  296. package/dist/patterns/impl/index.js +21 -0
  297. package/dist/patterns/impl/index.js.map +1 -0
  298. package/dist/patterns/impl/memory-repository.d.ts +56 -0
  299. package/dist/patterns/impl/memory-repository.d.ts.map +1 -0
  300. package/dist/patterns/impl/memory-repository.js +323 -0
  301. package/dist/patterns/impl/memory-repository.js.map +1 -0
  302. package/dist/patterns/impl/pattern-service.d.ts +52 -0
  303. package/dist/patterns/impl/pattern-service.d.ts.map +1 -0
  304. package/dist/patterns/impl/pattern-service.js +382 -0
  305. package/dist/patterns/impl/pattern-service.js.map +1 -0
  306. package/dist/patterns/impl/repository-factory.d.ts +44 -0
  307. package/dist/patterns/impl/repository-factory.d.ts.map +1 -0
  308. package/dist/patterns/impl/repository-factory.js +140 -0
  309. package/dist/patterns/impl/repository-factory.js.map +1 -0
  310. package/dist/patterns/impl/unified-file-repository.d.ts +111 -0
  311. package/dist/patterns/impl/unified-file-repository.d.ts.map +1 -0
  312. package/dist/patterns/impl/unified-file-repository.js +677 -0
  313. package/dist/patterns/impl/unified-file-repository.js.map +1 -0
  314. package/dist/patterns/index.d.ts +23 -0
  315. package/dist/patterns/index.d.ts.map +1 -0
  316. package/dist/patterns/index.js +41 -0
  317. package/dist/patterns/index.js.map +1 -0
  318. package/dist/patterns/repository.d.ts +241 -0
  319. package/dist/patterns/repository.d.ts.map +1 -0
  320. package/dist/patterns/repository.js +23 -0
  321. package/dist/patterns/repository.js.map +1 -0
  322. package/dist/patterns/service.d.ts +245 -0
  323. package/dist/patterns/service.d.ts.map +1 -0
  324. package/dist/patterns/service.js +25 -0
  325. package/dist/patterns/service.js.map +1 -0
  326. package/dist/patterns/types.d.ts +227 -0
  327. package/dist/patterns/types.d.ts.map +1 -0
  328. package/dist/patterns/types.js +117 -0
  329. package/dist/patterns/types.js.map +1 -0
  330. package/dist/simulation/approach-generator.d.ts +73 -0
  331. package/dist/simulation/approach-generator.d.ts.map +1 -0
  332. package/dist/simulation/approach-generator.js +371 -0
  333. package/dist/simulation/approach-generator.js.map +1 -0
  334. package/dist/simulation/index.d.ts +14 -0
  335. package/dist/simulation/index.d.ts.map +1 -0
  336. package/dist/simulation/index.js +19 -0
  337. package/dist/simulation/index.js.map +1 -0
  338. package/dist/simulation/language-strategies/csharp-strategies.d.ts +17 -0
  339. package/dist/simulation/language-strategies/csharp-strategies.d.ts.map +1 -0
  340. package/dist/simulation/language-strategies/csharp-strategies.js +118 -0
  341. package/dist/simulation/language-strategies/csharp-strategies.js.map +1 -0
  342. package/dist/simulation/language-strategies/index.d.ts +41 -0
  343. package/dist/simulation/language-strategies/index.d.ts.map +1 -0
  344. package/dist/simulation/language-strategies/index.js +92 -0
  345. package/dist/simulation/language-strategies/index.js.map +1 -0
  346. package/dist/simulation/language-strategies/java-strategies.d.ts +17 -0
  347. package/dist/simulation/language-strategies/java-strategies.d.ts.map +1 -0
  348. package/dist/simulation/language-strategies/java-strategies.js +119 -0
  349. package/dist/simulation/language-strategies/java-strategies.js.map +1 -0
  350. package/dist/simulation/language-strategies/php-strategies.d.ts +17 -0
  351. package/dist/simulation/language-strategies/php-strategies.d.ts.map +1 -0
  352. package/dist/simulation/language-strategies/php-strategies.js +129 -0
  353. package/dist/simulation/language-strategies/php-strategies.js.map +1 -0
  354. package/dist/simulation/language-strategies/python-strategies.d.ts +17 -0
  355. package/dist/simulation/language-strategies/python-strategies.d.ts.map +1 -0
  356. package/dist/simulation/language-strategies/python-strategies.js +208 -0
  357. package/dist/simulation/language-strategies/python-strategies.js.map +1 -0
  358. package/dist/simulation/language-strategies/types.d.ts +67 -0
  359. package/dist/simulation/language-strategies/types.d.ts.map +1 -0
  360. package/dist/simulation/language-strategies/types.js +23 -0
  361. package/dist/simulation/language-strategies/types.js.map +1 -0
  362. package/dist/simulation/language-strategies/typescript-strategies.d.ts +17 -0
  363. package/dist/simulation/language-strategies/typescript-strategies.d.ts.map +1 -0
  364. package/dist/simulation/language-strategies/typescript-strategies.js +251 -0
  365. package/dist/simulation/language-strategies/typescript-strategies.js.map +1 -0
  366. package/dist/simulation/scorers/friction-scorer.d.ts +45 -0
  367. package/dist/simulation/scorers/friction-scorer.d.ts.map +1 -0
  368. package/dist/simulation/scorers/friction-scorer.js +336 -0
  369. package/dist/simulation/scorers/friction-scorer.js.map +1 -0
  370. package/dist/simulation/scorers/impact-scorer.d.ts +56 -0
  371. package/dist/simulation/scorers/impact-scorer.d.ts.map +1 -0
  372. package/dist/simulation/scorers/impact-scorer.js +273 -0
  373. package/dist/simulation/scorers/impact-scorer.js.map +1 -0
  374. package/dist/simulation/scorers/index.d.ts +12 -0
  375. package/dist/simulation/scorers/index.d.ts.map +1 -0
  376. package/dist/simulation/scorers/index.js +12 -0
  377. package/dist/simulation/scorers/index.js.map +1 -0
  378. package/dist/simulation/scorers/pattern-alignment-scorer.d.ts +83 -0
  379. package/dist/simulation/scorers/pattern-alignment-scorer.d.ts.map +1 -0
  380. package/dist/simulation/scorers/pattern-alignment-scorer.js +367 -0
  381. package/dist/simulation/scorers/pattern-alignment-scorer.js.map +1 -0
  382. package/dist/simulation/scorers/security-scorer.d.ts +63 -0
  383. package/dist/simulation/scorers/security-scorer.d.ts.map +1 -0
  384. package/dist/simulation/scorers/security-scorer.js +346 -0
  385. package/dist/simulation/scorers/security-scorer.js.map +1 -0
  386. package/dist/simulation/simulation-engine.d.ts +89 -0
  387. package/dist/simulation/simulation-engine.d.ts.map +1 -0
  388. package/dist/simulation/simulation-engine.js +480 -0
  389. package/dist/simulation/simulation-engine.js.map +1 -0
  390. package/dist/simulation/types.d.ts +200 -0
  391. package/dist/simulation/types.d.ts.map +1 -0
  392. package/dist/simulation/types.js +23 -0
  393. package/dist/simulation/types.js.map +1 -0
  394. package/dist/speculative/approach-generator.d.ts +2 -0
  395. package/dist/speculative/approach-generator.d.ts.map +1 -0
  396. package/dist/speculative/approach-generator.js +2 -0
  397. package/dist/speculative/approach-generator.js.map +1 -0
  398. package/dist/speculative/templates/types.d.ts +133 -0
  399. package/dist/speculative/templates/types.d.ts.map +1 -0
  400. package/dist/speculative/templates/types.js +208 -0
  401. package/dist/speculative/templates/types.js.map +1 -0
  402. package/dist/speculative/types.d.ts +523 -0
  403. package/dist/speculative/types.d.ts.map +1 -0
  404. package/dist/speculative/types.js +71 -0
  405. package/dist/speculative/types.js.map +1 -0
  406. package/dist/store/pattern-store.d.ts +6 -0
  407. package/dist/store/pattern-store.d.ts.map +1 -1
  408. package/dist/store/pattern-store.js +6 -0
  409. package/dist/store/pattern-store.js.map +1 -1
  410. package/dist/test-topology/extractors/base-test-extractor.d.ts +89 -0
  411. package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -0
  412. package/dist/test-topology/extractors/base-test-extractor.js +187 -0
  413. package/dist/test-topology/extractors/base-test-extractor.js.map +1 -0
  414. package/dist/test-topology/extractors/csharp-test-extractor.d.ts +23 -0
  415. package/dist/test-topology/extractors/csharp-test-extractor.d.ts.map +1 -0
  416. package/dist/test-topology/extractors/csharp-test-extractor.js +367 -0
  417. package/dist/test-topology/extractors/csharp-test-extractor.js.map +1 -0
  418. package/dist/test-topology/extractors/go-test-extractor.d.ts +33 -0
  419. package/dist/test-topology/extractors/go-test-extractor.d.ts.map +1 -0
  420. package/dist/test-topology/extractors/go-test-extractor.js +436 -0
  421. package/dist/test-topology/extractors/go-test-extractor.js.map +1 -0
  422. package/dist/test-topology/extractors/index.d.ts +13 -0
  423. package/dist/test-topology/extractors/index.d.ts.map +1 -0
  424. package/dist/test-topology/extractors/index.js +13 -0
  425. package/dist/test-topology/extractors/index.js.map +1 -0
  426. package/dist/test-topology/extractors/java-test-extractor.d.ts +20 -0
  427. package/dist/test-topology/extractors/java-test-extractor.d.ts.map +1 -0
  428. package/dist/test-topology/extractors/java-test-extractor.js +275 -0
  429. package/dist/test-topology/extractors/java-test-extractor.js.map +1 -0
  430. package/dist/test-topology/extractors/php-test-extractor.d.ts +24 -0
  431. package/dist/test-topology/extractors/php-test-extractor.d.ts.map +1 -0
  432. package/dist/test-topology/extractors/php-test-extractor.js +409 -0
  433. package/dist/test-topology/extractors/php-test-extractor.js.map +1 -0
  434. package/dist/test-topology/extractors/python-test-extractor.d.ts +23 -0
  435. package/dist/test-topology/extractors/python-test-extractor.d.ts.map +1 -0
  436. package/dist/test-topology/extractors/python-test-extractor.js +342 -0
  437. package/dist/test-topology/extractors/python-test-extractor.js.map +1 -0
  438. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts +51 -0
  439. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts.map +1 -0
  440. package/dist/test-topology/extractors/regex/csharp-test-regex.js +383 -0
  441. package/dist/test-topology/extractors/regex/csharp-test-regex.js.map +1 -0
  442. package/dist/test-topology/extractors/regex/go-test-regex.d.ts +62 -0
  443. package/dist/test-topology/extractors/regex/go-test-regex.d.ts.map +1 -0
  444. package/dist/test-topology/extractors/regex/go-test-regex.js +528 -0
  445. package/dist/test-topology/extractors/regex/go-test-regex.js.map +1 -0
  446. package/dist/test-topology/extractors/regex/index.d.ts +19 -0
  447. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -0
  448. package/dist/test-topology/extractors/regex/index.js +47 -0
  449. package/dist/test-topology/extractors/regex/index.js.map +1 -0
  450. package/dist/test-topology/extractors/regex/java-test-regex.d.ts +50 -0
  451. package/dist/test-topology/extractors/regex/java-test-regex.d.ts.map +1 -0
  452. package/dist/test-topology/extractors/regex/java-test-regex.js +370 -0
  453. package/dist/test-topology/extractors/regex/java-test-regex.js.map +1 -0
  454. package/dist/test-topology/extractors/regex/php-test-regex.d.ts +56 -0
  455. package/dist/test-topology/extractors/regex/php-test-regex.d.ts.map +1 -0
  456. package/dist/test-topology/extractors/regex/php-test-regex.js +503 -0
  457. package/dist/test-topology/extractors/regex/php-test-regex.js.map +1 -0
  458. package/dist/test-topology/extractors/regex/python-test-regex.d.ts +57 -0
  459. package/dist/test-topology/extractors/regex/python-test-regex.d.ts.map +1 -0
  460. package/dist/test-topology/extractors/regex/python-test-regex.js +381 -0
  461. package/dist/test-topology/extractors/regex/python-test-regex.js.map +1 -0
  462. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts +60 -0
  463. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts.map +1 -0
  464. package/dist/test-topology/extractors/regex/typescript-test-regex.js +368 -0
  465. package/dist/test-topology/extractors/regex/typescript-test-regex.js.map +1 -0
  466. package/dist/test-topology/extractors/typescript-test-extractor.d.ts +24 -0
  467. package/dist/test-topology/extractors/typescript-test-extractor.d.ts.map +1 -0
  468. package/dist/test-topology/extractors/typescript-test-extractor.js +266 -0
  469. package/dist/test-topology/extractors/typescript-test-extractor.js.map +1 -0
  470. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts +98 -0
  471. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -0
  472. package/dist/test-topology/hybrid-test-topology-analyzer.js +556 -0
  473. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -0
  474. package/dist/test-topology/index.d.ts +16 -0
  475. package/dist/test-topology/index.d.ts.map +1 -0
  476. package/dist/test-topology/index.js +19 -0
  477. package/dist/test-topology/index.js.map +1 -0
  478. package/dist/test-topology/test-topology-analyzer.d.ts +85 -0
  479. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -0
  480. package/dist/test-topology/test-topology-analyzer.js +539 -0
  481. package/dist/test-topology/test-topology-analyzer.js.map +1 -0
  482. package/dist/test-topology/types.d.ts +300 -0
  483. package/dist/test-topology/types.d.ts.map +1 -0
  484. package/dist/test-topology/types.js +7 -0
  485. package/dist/test-topology/types.js.map +1 -0
  486. package/dist/unified-provider/matching/database-sql-matcher.d.ts +42 -0
  487. package/dist/unified-provider/matching/database-sql-matcher.d.ts.map +1 -0
  488. package/dist/unified-provider/matching/database-sql-matcher.js +282 -0
  489. package/dist/unified-provider/matching/database-sql-matcher.js.map +1 -0
  490. package/dist/unified-provider/matching/gorm-matcher.d.ts +41 -0
  491. package/dist/unified-provider/matching/gorm-matcher.d.ts.map +1 -0
  492. package/dist/unified-provider/matching/gorm-matcher.js +222 -0
  493. package/dist/unified-provider/matching/gorm-matcher.js.map +1 -0
  494. package/dist/unified-provider/matching/index.d.ts +3 -0
  495. package/dist/unified-provider/matching/index.d.ts.map +1 -1
  496. package/dist/unified-provider/matching/index.js +4 -0
  497. package/dist/unified-provider/matching/index.js.map +1 -1
  498. package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -1
  499. package/dist/unified-provider/matching/matcher-registry.js +7 -0
  500. package/dist/unified-provider/matching/matcher-registry.js.map +1 -1
  501. package/dist/unified-provider/matching/sqlx-matcher.d.ts +40 -0
  502. package/dist/unified-provider/matching/sqlx-matcher.d.ts.map +1 -0
  503. package/dist/unified-provider/matching/sqlx-matcher.js +214 -0
  504. package/dist/unified-provider/matching/sqlx-matcher.js.map +1 -0
  505. package/dist/unified-provider/normalization/go-normalizer.d.ts +62 -0
  506. package/dist/unified-provider/normalization/go-normalizer.d.ts.map +1 -0
  507. package/dist/unified-provider/normalization/go-normalizer.js +608 -0
  508. package/dist/unified-provider/normalization/go-normalizer.js.map +1 -0
  509. package/dist/unified-provider/normalization/index.d.ts +1 -0
  510. package/dist/unified-provider/normalization/index.d.ts.map +1 -1
  511. package/dist/unified-provider/normalization/index.js +6 -1
  512. package/dist/unified-provider/normalization/index.js.map +1 -1
  513. package/dist/unified-provider/types.d.ts +1 -1
  514. package/dist/unified-provider/types.d.ts.map +1 -1
  515. package/dist/wpf/extractors/binding-error-detector.d.ts +75 -0
  516. package/dist/wpf/extractors/binding-error-detector.d.ts.map +1 -0
  517. package/dist/wpf/extractors/binding-error-detector.js +290 -0
  518. package/dist/wpf/extractors/binding-error-detector.js.map +1 -0
  519. package/dist/wpf/extractors/code-behind-linker.d.ts +70 -0
  520. package/dist/wpf/extractors/code-behind-linker.d.ts.map +1 -0
  521. package/dist/wpf/extractors/code-behind-linker.js +172 -0
  522. package/dist/wpf/extractors/code-behind-linker.js.map +1 -0
  523. package/dist/wpf/extractors/dependency-property-extractor.d.ts +61 -0
  524. package/dist/wpf/extractors/dependency-property-extractor.d.ts.map +1 -0
  525. package/dist/wpf/extractors/dependency-property-extractor.js +201 -0
  526. package/dist/wpf/extractors/dependency-property-extractor.js.map +1 -0
  527. package/dist/wpf/extractors/regex/viewmodel-regex.d.ts +82 -0
  528. package/dist/wpf/extractors/regex/viewmodel-regex.d.ts.map +1 -0
  529. package/dist/wpf/extractors/regex/viewmodel-regex.js +412 -0
  530. package/dist/wpf/extractors/regex/viewmodel-regex.js.map +1 -0
  531. package/dist/wpf/extractors/regex/xaml-regex.d.ts +77 -0
  532. package/dist/wpf/extractors/regex/xaml-regex.d.ts.map +1 -0
  533. package/dist/wpf/extractors/regex/xaml-regex.js +353 -0
  534. package/dist/wpf/extractors/regex/xaml-regex.js.map +1 -0
  535. package/dist/wpf/extractors/resource-dictionary-parser.d.ts +103 -0
  536. package/dist/wpf/extractors/resource-dictionary-parser.d.ts.map +1 -0
  537. package/dist/wpf/extractors/resource-dictionary-parser.js +296 -0
  538. package/dist/wpf/extractors/resource-dictionary-parser.js.map +1 -0
  539. package/dist/wpf/extractors/value-converter-extractor.d.ts +128 -0
  540. package/dist/wpf/extractors/value-converter-extractor.d.ts.map +1 -0
  541. package/dist/wpf/extractors/value-converter-extractor.js +312 -0
  542. package/dist/wpf/extractors/value-converter-extractor.js.map +1 -0
  543. package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts +104 -0
  544. package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts.map +1 -0
  545. package/dist/wpf/extractors/viewmodel-hybrid-extractor.js +513 -0
  546. package/dist/wpf/extractors/viewmodel-hybrid-extractor.js.map +1 -0
  547. package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts +98 -0
  548. package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts.map +1 -0
  549. package/dist/wpf/extractors/xaml-hybrid-extractor.js +444 -0
  550. package/dist/wpf/extractors/xaml-hybrid-extractor.js.map +1 -0
  551. package/dist/wpf/index.d.ts +25 -0
  552. package/dist/wpf/index.d.ts.map +1 -0
  553. package/dist/wpf/index.js +31 -0
  554. package/dist/wpf/index.js.map +1 -0
  555. package/dist/wpf/integration/wpf-callgraph-adapter.d.ts +82 -0
  556. package/dist/wpf/integration/wpf-callgraph-adapter.d.ts.map +1 -0
  557. package/dist/wpf/integration/wpf-callgraph-adapter.js +311 -0
  558. package/dist/wpf/integration/wpf-callgraph-adapter.js.map +1 -0
  559. package/dist/wpf/integration/wpf-data-flow-tracer.d.ts +129 -0
  560. package/dist/wpf/integration/wpf-data-flow-tracer.d.ts.map +1 -0
  561. package/dist/wpf/integration/wpf-data-flow-tracer.js +367 -0
  562. package/dist/wpf/integration/wpf-data-flow-tracer.js.map +1 -0
  563. package/dist/wpf/linkers/datacontext-resolver.d.ts +66 -0
  564. package/dist/wpf/linkers/datacontext-resolver.d.ts.map +1 -0
  565. package/dist/wpf/linkers/datacontext-resolver.js +240 -0
  566. package/dist/wpf/linkers/datacontext-resolver.js.map +1 -0
  567. package/dist/wpf/linkers/viewmodel-linker.d.ts +71 -0
  568. package/dist/wpf/linkers/viewmodel-linker.d.ts.map +1 -0
  569. package/dist/wpf/linkers/viewmodel-linker.js +268 -0
  570. package/dist/wpf/linkers/viewmodel-linker.js.map +1 -0
  571. package/dist/wpf/types.d.ts +451 -0
  572. package/dist/wpf/types.d.ts.map +1 -0
  573. package/dist/wpf/types.js +8 -0
  574. package/dist/wpf/types.js.map +1 -0
  575. package/dist/wpf/wpf-analyzer.d.ts +114 -0
  576. package/dist/wpf/wpf-analyzer.d.ts.map +1 -0
  577. package/dist/wpf/wpf-analyzer.js +332 -0
  578. package/dist/wpf/wpf-analyzer.js.map +1 -0
  579. package/dist/wrappers/clustering/clusterer.d.ts +43 -0
  580. package/dist/wrappers/clustering/clusterer.d.ts.map +1 -0
  581. package/dist/wrappers/clustering/clusterer.js +374 -0
  582. package/dist/wrappers/clustering/clusterer.js.map +1 -0
  583. package/dist/wrappers/clustering/exclusions.d.ts +47 -0
  584. package/dist/wrappers/clustering/exclusions.d.ts.map +1 -0
  585. package/dist/wrappers/clustering/exclusions.js +318 -0
  586. package/dist/wrappers/clustering/exclusions.js.map +1 -0
  587. package/dist/wrappers/clustering/index.d.ts +6 -0
  588. package/dist/wrappers/clustering/index.d.ts.map +1 -0
  589. package/dist/wrappers/clustering/index.js +6 -0
  590. package/dist/wrappers/clustering/index.js.map +1 -0
  591. package/dist/wrappers/detection/detector.d.ts +69 -0
  592. package/dist/wrappers/detection/detector.d.ts.map +1 -0
  593. package/dist/wrappers/detection/detector.js +279 -0
  594. package/dist/wrappers/detection/detector.js.map +1 -0
  595. package/dist/wrappers/detection/index.d.ts +5 -0
  596. package/dist/wrappers/detection/index.d.ts.map +1 -0
  597. package/dist/wrappers/detection/index.js +5 -0
  598. package/dist/wrappers/detection/index.js.map +1 -0
  599. package/dist/wrappers/export/index.d.ts +5 -0
  600. package/dist/wrappers/export/index.d.ts.map +1 -0
  601. package/dist/wrappers/export/index.js +5 -0
  602. package/dist/wrappers/export/index.js.map +1 -0
  603. package/dist/wrappers/export/json.d.ts +127 -0
  604. package/dist/wrappers/export/json.d.ts.map +1 -0
  605. package/dist/wrappers/export/json.js +160 -0
  606. package/dist/wrappers/export/json.js.map +1 -0
  607. package/dist/wrappers/index.d.ts +56 -0
  608. package/dist/wrappers/index.d.ts.map +1 -0
  609. package/dist/wrappers/index.js +159 -0
  610. package/dist/wrappers/index.js.map +1 -0
  611. package/dist/wrappers/integration/adapter.d.ts +52 -0
  612. package/dist/wrappers/integration/adapter.d.ts.map +1 -0
  613. package/dist/wrappers/integration/adapter.js +210 -0
  614. package/dist/wrappers/integration/adapter.js.map +1 -0
  615. package/dist/wrappers/integration/index.d.ts +9 -0
  616. package/dist/wrappers/integration/index.d.ts.map +1 -0
  617. package/dist/wrappers/integration/index.js +12 -0
  618. package/dist/wrappers/integration/index.js.map +1 -0
  619. package/dist/wrappers/integration/pattern-adapter.d.ts +52 -0
  620. package/dist/wrappers/integration/pattern-adapter.d.ts.map +1 -0
  621. package/dist/wrappers/integration/pattern-adapter.js +192 -0
  622. package/dist/wrappers/integration/pattern-adapter.js.map +1 -0
  623. package/dist/wrappers/integration/scanner.d.ts +85 -0
  624. package/dist/wrappers/integration/scanner.d.ts.map +1 -0
  625. package/dist/wrappers/integration/scanner.js +367 -0
  626. package/dist/wrappers/integration/scanner.js.map +1 -0
  627. package/dist/wrappers/primitives/discovery.d.ts +57 -0
  628. package/dist/wrappers/primitives/discovery.d.ts.map +1 -0
  629. package/dist/wrappers/primitives/discovery.js +389 -0
  630. package/dist/wrappers/primitives/discovery.js.map +1 -0
  631. package/dist/wrappers/primitives/index.d.ts +6 -0
  632. package/dist/wrappers/primitives/index.d.ts.map +1 -0
  633. package/dist/wrappers/primitives/index.js +6 -0
  634. package/dist/wrappers/primitives/index.js.map +1 -0
  635. package/dist/wrappers/primitives/registry.d.ts +63 -0
  636. package/dist/wrappers/primitives/registry.d.ts.map +1 -0
  637. package/dist/wrappers/primitives/registry.js +447 -0
  638. package/dist/wrappers/primitives/registry.js.map +1 -0
  639. package/dist/wrappers/types.d.ts +137 -0
  640. package/dist/wrappers/types.d.ts.map +1 -0
  641. package/dist/wrappers/types.js +7 -0
  642. package/dist/wrappers/types.js.map +1 -0
  643. package/package.json +33 -18
  644. package/LICENSE +0 -21
@@ -0,0 +1,668 @@
1
+ /**
2
+ * Module Coupling Analyzer
3
+ *
4
+ * Analyzes module dependencies, calculates coupling metrics,
5
+ * detects cycles, and identifies refactoring opportunities.
6
+ */
7
+ // ============================================================================
8
+ // Analyzer
9
+ // ============================================================================
10
+ export class ModuleCouplingAnalyzer {
11
+ graph = null;
12
+ callGraph = null;
13
+ options;
14
+ constructor(options) {
15
+ this.options = {
16
+ includeExternal: false,
17
+ granularity: 'file',
18
+ maxDepth: 20,
19
+ ...options,
20
+ };
21
+ }
22
+ /**
23
+ * Set the call graph for enhanced analysis
24
+ */
25
+ setCallGraph(callGraph) {
26
+ this.callGraph = callGraph;
27
+ }
28
+ /**
29
+ * Build the module coupling graph from the call graph
30
+ */
31
+ build() {
32
+ if (!this.callGraph) {
33
+ throw new Error('Call graph required. Call setCallGraph() first.');
34
+ }
35
+ const modules = new Map();
36
+ const edges = [];
37
+ const importMap = new Map();
38
+ // Phase 1: Extract modules and imports from call graph
39
+ for (const [_funcId, func] of this.callGraph.functions) {
40
+ const modulePath = func.file;
41
+ // Skip external modules if configured
42
+ if (!this.options.includeExternal && this.isExternalModule(modulePath)) {
43
+ continue;
44
+ }
45
+ // Get or create module node
46
+ if (!modules.has(modulePath)) {
47
+ modules.set(modulePath, this.createModuleNode(modulePath, func.language));
48
+ }
49
+ const moduleNode = modules.get(modulePath);
50
+ // Track exports
51
+ if (func.isExported) {
52
+ moduleNode.exports.push({
53
+ name: func.name,
54
+ kind: this.inferExportKind(func),
55
+ isTypeOnly: false,
56
+ line: func.startLine,
57
+ isReExport: false,
58
+ });
59
+ }
60
+ // Track imports from function calls
61
+ for (const call of func.calls) {
62
+ for (const candidate of call.resolvedCandidates) {
63
+ const targetFunc = this.callGraph.functions.get(candidate);
64
+ if (!targetFunc)
65
+ continue;
66
+ const targetModule = targetFunc.file;
67
+ if (targetModule === modulePath)
68
+ continue; // Skip self-imports
69
+ if (!this.options.includeExternal && this.isExternalModule(targetModule))
70
+ continue;
71
+ // Create or update edge
72
+ if (!importMap.has(modulePath)) {
73
+ importMap.set(modulePath, new Map());
74
+ }
75
+ const moduleImports = importMap.get(modulePath);
76
+ if (!moduleImports.has(targetModule)) {
77
+ moduleImports.set(targetModule, {
78
+ from: modulePath,
79
+ to: targetModule,
80
+ symbols: [],
81
+ isTypeOnly: false,
82
+ weight: 0,
83
+ line: call.line,
84
+ });
85
+ }
86
+ const edge = moduleImports.get(targetModule);
87
+ if (!edge.symbols.includes(targetFunc.name)) {
88
+ edge.symbols.push(targetFunc.name);
89
+ edge.weight++;
90
+ }
91
+ }
92
+ }
93
+ }
94
+ // Phase 2: Build edges array and update module relationships
95
+ for (const [fromModule, targets] of importMap) {
96
+ for (const [toModule, edge] of targets) {
97
+ edges.push(edge);
98
+ // Update module relationships
99
+ const fromNode = modules.get(fromModule);
100
+ const toNode = modules.get(toModule);
101
+ if (fromNode && !fromNode.imports.includes(toModule)) {
102
+ fromNode.imports.push(toModule);
103
+ }
104
+ if (toNode && !toNode.importedBy.includes(fromModule)) {
105
+ toNode.importedBy.push(fromModule);
106
+ }
107
+ }
108
+ }
109
+ // Phase 3: Calculate metrics for each module
110
+ for (const [_path, node] of modules) {
111
+ node.metrics = this.calculateMetrics(node);
112
+ node.role = this.determineRole(node);
113
+ node.isLeaf = node.imports.length === 0;
114
+ node.isEntryPoint = this.callGraph.entryPoints.some(ep => ep.includes(node.path));
115
+ }
116
+ // Phase 4: Find unused exports
117
+ this.findUnusedExports(modules, edges);
118
+ // Phase 5: Detect cycles
119
+ const cycles = this.detectCycles(modules);
120
+ // Phase 6: Calculate aggregate metrics
121
+ const metrics = this.calculateAggregateMetrics(modules, edges, cycles);
122
+ this.graph = {
123
+ modules,
124
+ edges,
125
+ cycles,
126
+ metrics,
127
+ generatedAt: new Date().toISOString(),
128
+ projectRoot: this.options.rootDir,
129
+ };
130
+ return this.graph;
131
+ }
132
+ /**
133
+ * Get the built graph
134
+ */
135
+ getGraph() {
136
+ return this.graph;
137
+ }
138
+ /**
139
+ * Analyze coupling for a specific module
140
+ */
141
+ analyzeModule(modulePath) {
142
+ if (!this.graph)
143
+ return null;
144
+ const module = this.graph.modules.get(modulePath);
145
+ if (!module)
146
+ return null;
147
+ // Get direct dependencies with details
148
+ const directDependencies = module.imports.map(dep => {
149
+ const edge = this.graph.edges.find(e => e.from === modulePath && e.to === dep);
150
+ return {
151
+ path: dep,
152
+ symbols: edge?.symbols ?? [],
153
+ weight: edge?.weight ?? 0,
154
+ };
155
+ });
156
+ // Get direct dependents with details
157
+ const directDependents = module.importedBy.map(dep => {
158
+ const edge = this.graph.edges.find(e => e.from === dep && e.to === modulePath);
159
+ return {
160
+ path: dep,
161
+ symbols: edge?.symbols ?? [],
162
+ weight: edge?.weight ?? 0,
163
+ };
164
+ });
165
+ // Calculate transitive dependencies
166
+ const transitiveDependencies = this.getTransitiveDependencies(modulePath);
167
+ const transitiveDependents = this.getTransitiveDependents(modulePath);
168
+ // Find cycles involving this module
169
+ const cyclesInvolved = this.graph.cycles.filter(c => c.path.includes(modulePath));
170
+ // Calculate health
171
+ const health = this.calculateModuleHealth(module, cyclesInvolved);
172
+ return {
173
+ module,
174
+ directDependencies,
175
+ directDependents,
176
+ transitiveDependencies,
177
+ transitiveDependents,
178
+ cyclesInvolved,
179
+ health,
180
+ };
181
+ }
182
+ /**
183
+ * Analyze refactor impact for a module
184
+ */
185
+ analyzeRefactorImpact(modulePath) {
186
+ if (!this.graph)
187
+ return null;
188
+ const module = this.graph.modules.get(modulePath);
189
+ if (!module)
190
+ return null;
191
+ const transitiveDependents = this.getTransitiveDependents(modulePath);
192
+ const affectedModules = transitiveDependents.map(dep => {
193
+ const depModule = this.graph.modules.get(dep);
194
+ const edge = this.graph.edges.find(e => e.to === modulePath && e.from === dep);
195
+ return {
196
+ path: dep,
197
+ reason: edge
198
+ ? `Imports: ${edge.symbols.slice(0, 3).join(', ')}${edge.symbols.length > 3 ? '...' : ''}`
199
+ : 'Transitive dependency',
200
+ effort: this.estimateRefactorEffort(depModule, edge),
201
+ };
202
+ });
203
+ const totalAffected = affectedModules.length;
204
+ const risk = this.calculateRefactorRisk(totalAffected, module);
205
+ const suggestions = this.generateRefactorSuggestions(module, affectedModules);
206
+ return {
207
+ target: modulePath,
208
+ affectedModules,
209
+ totalAffected,
210
+ risk,
211
+ suggestions,
212
+ };
213
+ }
214
+ /**
215
+ * Get all dependency cycles
216
+ */
217
+ getCycles(options = {}) {
218
+ if (!this.graph)
219
+ return [];
220
+ let cycles = this.graph.cycles;
221
+ if (options.maxCycleLength) {
222
+ cycles = cycles.filter(c => c.length <= options.maxCycleLength);
223
+ }
224
+ if (options.minSeverity) {
225
+ const severityOrder = { critical: 0, warning: 1, info: 2 };
226
+ const minOrder = severityOrder[options.minSeverity];
227
+ cycles = cycles.filter(c => severityOrder[c.severity] <= minOrder);
228
+ }
229
+ return cycles;
230
+ }
231
+ /**
232
+ * Get coupling hotspots
233
+ */
234
+ getHotspots(options = {}) {
235
+ if (!this.graph)
236
+ return [];
237
+ const { limit = 10, minCoupling = 5 } = options;
238
+ const hotspots = [];
239
+ for (const [path, module] of this.graph.modules) {
240
+ const coupling = module.metrics.Ca + module.metrics.Ce;
241
+ if (coupling >= minCoupling) {
242
+ hotspots.push({ path, coupling, metrics: module.metrics });
243
+ }
244
+ }
245
+ return hotspots
246
+ .sort((a, b) => b.coupling - a.coupling)
247
+ .slice(0, limit);
248
+ }
249
+ /**
250
+ * Get unused exports across all modules
251
+ */
252
+ getUnusedExports() {
253
+ if (!this.graph)
254
+ return [];
255
+ const results = [];
256
+ for (const [path, module] of this.graph.modules) {
257
+ if (module.unusedExports.length > 0) {
258
+ const unusedExports = module.unusedExports.map(name => {
259
+ const exp = module.exports.find(e => e.name === name);
260
+ return {
261
+ name,
262
+ kind: exp?.kind ?? 'other',
263
+ line: exp?.line ?? 0,
264
+ };
265
+ });
266
+ results.push({
267
+ module: path,
268
+ unusedExports,
269
+ possibleReasons: this.inferUnusedExportReasons(module, unusedExports),
270
+ });
271
+ }
272
+ }
273
+ return results;
274
+ }
275
+ // ============================================================================
276
+ // Private Helpers
277
+ // ============================================================================
278
+ createModuleNode(path, language) {
279
+ return {
280
+ path,
281
+ language: language,
282
+ importedBy: [],
283
+ imports: [],
284
+ metrics: { Ca: 0, Ce: 0, instability: 0, abstractness: 0, distance: 0 },
285
+ role: 'isolated',
286
+ exports: [],
287
+ unusedExports: [],
288
+ isEntryPoint: false,
289
+ isLeaf: true,
290
+ };
291
+ }
292
+ isExternalModule(path) {
293
+ return path.includes('node_modules') ||
294
+ path.includes('vendor') ||
295
+ path.includes('site-packages') ||
296
+ path.startsWith('@') ||
297
+ !path.includes('/');
298
+ }
299
+ inferExportKind(func) {
300
+ if (func.className)
301
+ return 'class';
302
+ if (func.name.startsWith('use'))
303
+ return 'function'; // React hooks
304
+ return 'function';
305
+ }
306
+ calculateMetrics(node) {
307
+ const Ca = node.importedBy.length;
308
+ const Ce = node.imports.length;
309
+ const instability = Ca + Ce > 0 ? Ce / (Ca + Ce) : 0;
310
+ // Calculate abstractness (ratio of interfaces/abstract types)
311
+ const abstractExports = node.exports.filter(e => e.kind === 'interface' || e.kind === 'type').length;
312
+ const abstractness = node.exports.length > 0
313
+ ? abstractExports / node.exports.length
314
+ : 0;
315
+ const distance = Math.abs(abstractness + instability - 1);
316
+ return {
317
+ Ca,
318
+ Ce,
319
+ instability: Math.round(instability * 100) / 100,
320
+ abstractness: Math.round(abstractness * 100) / 100,
321
+ distance: Math.round(distance * 100) / 100,
322
+ };
323
+ }
324
+ determineRole(node) {
325
+ const { Ca, Ce } = node.metrics;
326
+ if (Ca === 0 && Ce === 0)
327
+ return 'isolated';
328
+ if (Ca > Ce * 2)
329
+ return 'hub'; // Many depend on this
330
+ if (Ce > Ca * 2)
331
+ return 'authority'; // Depends on many
332
+ return 'balanced';
333
+ }
334
+ findUnusedExports(modules, edges) {
335
+ // Build set of all imported symbols per module
336
+ const importedSymbols = new Map();
337
+ for (const edge of edges) {
338
+ if (!importedSymbols.has(edge.to)) {
339
+ importedSymbols.set(edge.to, new Set());
340
+ }
341
+ for (const symbol of edge.symbols) {
342
+ importedSymbols.get(edge.to).add(symbol);
343
+ }
344
+ }
345
+ // Find unused exports
346
+ for (const [path, module] of modules) {
347
+ const imported = importedSymbols.get(path) ?? new Set();
348
+ module.unusedExports = module.exports
349
+ .filter(exp => !imported.has(exp.name))
350
+ .map(exp => exp.name);
351
+ }
352
+ }
353
+ detectCycles(modules) {
354
+ // Tarjan's algorithm for strongly connected components
355
+ const index = new Map();
356
+ const lowlink = new Map();
357
+ const onStack = new Set();
358
+ const stack = [];
359
+ const sccs = [];
360
+ let currentIndex = 0;
361
+ const strongConnect = (v) => {
362
+ index.set(v, currentIndex);
363
+ lowlink.set(v, currentIndex);
364
+ currentIndex++;
365
+ stack.push(v);
366
+ onStack.add(v);
367
+ const node = modules.get(v);
368
+ if (node) {
369
+ for (const w of node.imports) {
370
+ if (!modules.has(w))
371
+ continue; // Skip external
372
+ if (!index.has(w)) {
373
+ strongConnect(w);
374
+ lowlink.set(v, Math.min(lowlink.get(v), lowlink.get(w)));
375
+ }
376
+ else if (onStack.has(w)) {
377
+ lowlink.set(v, Math.min(lowlink.get(v), index.get(w)));
378
+ }
379
+ }
380
+ }
381
+ if (lowlink.get(v) === index.get(v)) {
382
+ const scc = [];
383
+ let w;
384
+ do {
385
+ w = stack.pop();
386
+ onStack.delete(w);
387
+ scc.push(w);
388
+ } while (w !== v);
389
+ if (scc.length > 1) {
390
+ sccs.push(scc);
391
+ }
392
+ }
393
+ };
394
+ for (const v of modules.keys()) {
395
+ if (!index.has(v)) {
396
+ strongConnect(v);
397
+ }
398
+ }
399
+ // Convert SCCs to DependencyCycle objects
400
+ return sccs.map((scc, i) => this.createCycle(scc, i, modules));
401
+ }
402
+ createCycle(path, index, modules) {
403
+ const length = path.length;
404
+ const severity = this.calculateCycleSeverity(path, modules);
405
+ const breakPoints = this.suggestBreakPoints(path, modules);
406
+ // Calculate total weight
407
+ let totalWeight = 0;
408
+ for (let i = 0; i < path.length; i++) {
409
+ const from = path[i];
410
+ const to = path[(i + 1) % path.length];
411
+ const fromNode = modules.get(from);
412
+ if (fromNode?.imports.includes(to)) {
413
+ totalWeight++;
414
+ }
415
+ }
416
+ return {
417
+ id: `cycle-${index}`,
418
+ path,
419
+ length,
420
+ severity,
421
+ breakPoints,
422
+ totalWeight,
423
+ };
424
+ }
425
+ calculateCycleSeverity(path, modules) {
426
+ // Critical: cycles involving entry points or high-coupling modules
427
+ const hasEntryPoint = path.some(p => modules.get(p)?.isEntryPoint);
428
+ const hasHighCoupling = path.some(p => {
429
+ const m = modules.get(p);
430
+ return m && (m.metrics.Ca + m.metrics.Ce) > 10;
431
+ });
432
+ if (hasEntryPoint || path.length > 5)
433
+ return 'critical';
434
+ if (hasHighCoupling || path.length > 3)
435
+ return 'warning';
436
+ return 'info';
437
+ }
438
+ suggestBreakPoints(path, modules) {
439
+ const suggestions = [];
440
+ for (let i = 0; i < path.length; i++) {
441
+ const from = path[i];
442
+ const to = path[(i + 1) % path.length];
443
+ const fromNode = modules.get(from);
444
+ const toNode = modules.get(to);
445
+ if (!fromNode || !toNode)
446
+ continue;
447
+ // Prefer breaking edges from unstable to stable modules
448
+ const effort = this.estimateBreakEffort(fromNode, toNode);
449
+ const rationale = this.generateBreakRationale(fromNode, toNode);
450
+ const approach = this.suggestBreakApproach(fromNode, toNode);
451
+ suggestions.push({
452
+ edge: { from, to },
453
+ rationale,
454
+ effort,
455
+ approach,
456
+ });
457
+ }
458
+ // Sort by effort (low first)
459
+ const effortOrder = { low: 0, medium: 1, high: 2 };
460
+ return suggestions.sort((a, b) => effortOrder[a.effort] - effortOrder[b.effort]);
461
+ }
462
+ estimateBreakEffort(from, to) {
463
+ // Low effort if from is unstable (easy to change)
464
+ if (from.metrics.instability > 0.7)
465
+ return 'low';
466
+ // High effort if to is a hub (many depend on it)
467
+ if (to.role === 'hub')
468
+ return 'high';
469
+ return 'medium';
470
+ }
471
+ generateBreakRationale(from, to) {
472
+ if (from.metrics.instability > to.metrics.instability) {
473
+ return `${from.path} is more unstable (${from.metrics.instability}) than ${to.path} (${to.metrics.instability})`;
474
+ }
475
+ if (to.role === 'hub') {
476
+ return `${to.path} is a hub with ${to.metrics.Ca} dependents`;
477
+ }
478
+ return 'Balanced coupling on both sides';
479
+ }
480
+ suggestBreakApproach(from, to) {
481
+ if (from.metrics.instability > 0.7) {
482
+ return 'Extract shared interface to a new module';
483
+ }
484
+ if (to.role === 'hub') {
485
+ return 'Use dependency injection to invert the dependency';
486
+ }
487
+ return 'Consider extracting common functionality to a shared module';
488
+ }
489
+ calculateAggregateMetrics(modules, edges, cycles) {
490
+ let totalInstability = 0;
491
+ let totalDistance = 0;
492
+ const zoneOfPain = [];
493
+ const zoneOfUselessness = [];
494
+ const hotspots = [];
495
+ const isolatedModules = [];
496
+ for (const [path, module] of modules) {
497
+ totalInstability += module.metrics.instability;
498
+ totalDistance += module.metrics.distance;
499
+ const coupling = module.metrics.Ca + module.metrics.Ce;
500
+ hotspots.push({ path, coupling });
501
+ // Zone of pain: stable (I < 0.3) and concrete (A < 0.3)
502
+ if (module.metrics.instability < 0.3 && module.metrics.abstractness < 0.3) {
503
+ zoneOfPain.push(path);
504
+ }
505
+ // Zone of uselessness: unstable (I > 0.7) and abstract (A > 0.7)
506
+ if (module.metrics.instability > 0.7 && module.metrics.abstractness > 0.7) {
507
+ zoneOfUselessness.push(path);
508
+ }
509
+ if (module.role === 'isolated') {
510
+ isolatedModules.push(path);
511
+ }
512
+ }
513
+ const moduleCount = modules.size;
514
+ return {
515
+ totalModules: moduleCount,
516
+ totalEdges: edges.length,
517
+ avgInstability: moduleCount > 0 ? Math.round((totalInstability / moduleCount) * 100) / 100 : 0,
518
+ avgDistance: moduleCount > 0 ? Math.round((totalDistance / moduleCount) * 100) / 100 : 0,
519
+ cycleCount: cycles.length,
520
+ zoneOfPain,
521
+ zoneOfUselessness,
522
+ hotspots: hotspots.sort((a, b) => b.coupling - a.coupling).slice(0, 10),
523
+ isolatedModules,
524
+ };
525
+ }
526
+ getTransitiveDependencies(modulePath) {
527
+ if (!this.graph)
528
+ return [];
529
+ const visited = new Set();
530
+ const queue = [modulePath];
531
+ while (queue.length > 0) {
532
+ const current = queue.shift();
533
+ if (visited.has(current))
534
+ continue;
535
+ visited.add(current);
536
+ const node = this.graph.modules.get(current);
537
+ if (node) {
538
+ for (const dep of node.imports) {
539
+ if (!visited.has(dep)) {
540
+ queue.push(dep);
541
+ }
542
+ }
543
+ }
544
+ }
545
+ visited.delete(modulePath);
546
+ return Array.from(visited);
547
+ }
548
+ getTransitiveDependents(modulePath) {
549
+ if (!this.graph)
550
+ return [];
551
+ const visited = new Set();
552
+ const queue = [modulePath];
553
+ while (queue.length > 0) {
554
+ const current = queue.shift();
555
+ if (visited.has(current))
556
+ continue;
557
+ visited.add(current);
558
+ const node = this.graph.modules.get(current);
559
+ if (node) {
560
+ for (const dep of node.importedBy) {
561
+ if (!visited.has(dep)) {
562
+ queue.push(dep);
563
+ }
564
+ }
565
+ }
566
+ }
567
+ visited.delete(modulePath);
568
+ return Array.from(visited);
569
+ }
570
+ calculateModuleHealth(module, cycles) {
571
+ let score = 100;
572
+ const issues = [];
573
+ const suggestions = [];
574
+ // Penalize high coupling
575
+ const coupling = module.metrics.Ca + module.metrics.Ce;
576
+ if (coupling > 20) {
577
+ score -= 30;
578
+ issues.push(`Very high coupling (${coupling})`);
579
+ suggestions.push('Consider splitting into smaller modules');
580
+ }
581
+ else if (coupling > 10) {
582
+ score -= 15;
583
+ issues.push(`High coupling (${coupling})`);
584
+ }
585
+ // Penalize cycles
586
+ if (cycles.length > 0) {
587
+ score -= cycles.length * 10;
588
+ issues.push(`Involved in ${cycles.length} cycle(s)`);
589
+ suggestions.push('Break dependency cycles to improve maintainability');
590
+ }
591
+ // Penalize zone of pain
592
+ if (module.metrics.instability < 0.3 && module.metrics.abstractness < 0.3) {
593
+ score -= 20;
594
+ issues.push('In zone of pain (stable but concrete)');
595
+ suggestions.push('Add abstractions or make more flexible');
596
+ }
597
+ // Penalize unused exports
598
+ if (module.unusedExports.length > 3) {
599
+ score -= 10;
600
+ issues.push(`${module.unusedExports.length} unused exports`);
601
+ suggestions.push('Remove or document unused exports');
602
+ }
603
+ return {
604
+ score: Math.max(0, score),
605
+ issues,
606
+ suggestions,
607
+ };
608
+ }
609
+ estimateRefactorEffort(module, edge) {
610
+ if (!module)
611
+ return 'medium';
612
+ const symbolCount = edge?.symbols.length ?? 0;
613
+ if (symbolCount > 5)
614
+ return 'high';
615
+ if (symbolCount > 2)
616
+ return 'medium';
617
+ return 'low';
618
+ }
619
+ calculateRefactorRisk(totalAffected, module) {
620
+ if (totalAffected > 20 || module.role === 'hub')
621
+ return 'critical';
622
+ if (totalAffected > 10)
623
+ return 'high';
624
+ if (totalAffected > 5)
625
+ return 'medium';
626
+ return 'low';
627
+ }
628
+ generateRefactorSuggestions(module, affected) {
629
+ const suggestions = [];
630
+ if (module.role === 'hub') {
631
+ suggestions.push('Consider using dependency injection to reduce direct coupling');
632
+ }
633
+ const highEffortCount = affected.filter(a => a.effort === 'high').length;
634
+ if (highEffortCount > 3) {
635
+ suggestions.push('Create a facade or adapter to minimize breaking changes');
636
+ }
637
+ if (module.exports.length > 10) {
638
+ suggestions.push('Split module into smaller, focused modules');
639
+ }
640
+ if (suggestions.length === 0) {
641
+ suggestions.push('Refactor should be straightforward with proper testing');
642
+ }
643
+ return suggestions;
644
+ }
645
+ inferUnusedExportReasons(module, unusedExports) {
646
+ const reasons = [];
647
+ // Check if it's likely a public API
648
+ if (module.path.includes('index') || module.isEntryPoint) {
649
+ reasons.push('public-api');
650
+ }
651
+ // Check for test-related exports
652
+ if (unusedExports.some(e => e.name.includes('test') || e.name.includes('mock'))) {
653
+ reasons.push('test-only');
654
+ }
655
+ // Default to dead-code if no other reason
656
+ if (reasons.length === 0) {
657
+ reasons.push('dead-code');
658
+ }
659
+ return reasons;
660
+ }
661
+ }
662
+ // ============================================================================
663
+ // Factory
664
+ // ============================================================================
665
+ export function createModuleCouplingAnalyzer(options) {
666
+ return new ModuleCouplingAnalyzer(options);
667
+ }
668
+ //# sourceMappingURL=coupling-analyzer.js.map