driftdetect-core 0.4.6 → 0.5.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 (325) hide show
  1. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts +8 -0
  2. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
  3. package/dist/call-graph/extractors/csharp-data-access-extractor.js +8 -0
  4. package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
  5. package/dist/call-graph/extractors/csharp-extractor.d.ts +35 -0
  6. package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -1
  7. package/dist/call-graph/extractors/csharp-extractor.js +362 -4
  8. package/dist/call-graph/extractors/csharp-extractor.js.map +1 -1
  9. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts +37 -0
  10. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts.map +1 -0
  11. package/dist/call-graph/extractors/csharp-hybrid-extractor.js +408 -0
  12. package/dist/call-graph/extractors/csharp-hybrid-extractor.js.map +1 -0
  13. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts +102 -0
  14. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts.map +1 -0
  15. package/dist/call-graph/extractors/hybrid-extractor-base.js +289 -0
  16. package/dist/call-graph/extractors/hybrid-extractor-base.js.map +1 -0
  17. package/dist/call-graph/extractors/index.d.ts +17 -13
  18. package/dist/call-graph/extractors/index.d.ts.map +1 -1
  19. package/dist/call-graph/extractors/index.js +24 -23
  20. package/dist/call-graph/extractors/index.js.map +1 -1
  21. package/dist/call-graph/extractors/java-data-access-extractor.d.ts +8 -0
  22. package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
  23. package/dist/call-graph/extractors/java-data-access-extractor.js +8 -0
  24. package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
  25. package/dist/call-graph/extractors/java-extractor.d.ts +15 -0
  26. package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -1
  27. package/dist/call-graph/extractors/java-extractor.js +120 -4
  28. package/dist/call-graph/extractors/java-extractor.js.map +1 -1
  29. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts +36 -0
  30. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts.map +1 -0
  31. package/dist/call-graph/extractors/java-hybrid-extractor.js +426 -0
  32. package/dist/call-graph/extractors/java-hybrid-extractor.js.map +1 -0
  33. package/dist/call-graph/extractors/php-data-access-extractor.d.ts +8 -0
  34. package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
  35. package/dist/call-graph/extractors/php-data-access-extractor.js +8 -0
  36. package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
  37. package/dist/call-graph/extractors/php-extractor.d.ts +48 -1
  38. package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -1
  39. package/dist/call-graph/extractors/php-extractor.js +460 -6
  40. package/dist/call-graph/extractors/php-extractor.js.map +1 -1
  41. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts +35 -0
  42. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts.map +1 -0
  43. package/dist/call-graph/extractors/php-hybrid-extractor.js +393 -0
  44. package/dist/call-graph/extractors/php-hybrid-extractor.js.map +1 -0
  45. package/dist/call-graph/extractors/python-data-access-extractor.d.ts +8 -0
  46. package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
  47. package/dist/call-graph/extractors/python-data-access-extractor.js +8 -0
  48. package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
  49. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts +85 -0
  50. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts.map +1 -0
  51. package/dist/call-graph/extractors/python-hybrid-extractor.js +462 -0
  52. package/dist/call-graph/extractors/python-hybrid-extractor.js.map +1 -0
  53. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts +154 -0
  54. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts.map +1 -0
  55. package/dist/call-graph/extractors/regex/base-regex-extractor.js +346 -0
  56. package/dist/call-graph/extractors/regex/base-regex-extractor.js.map +1 -0
  57. package/dist/call-graph/extractors/regex/csharp-regex.d.ts +34 -0
  58. package/dist/call-graph/extractors/regex/csharp-regex.d.ts.map +1 -0
  59. package/dist/call-graph/extractors/regex/csharp-regex.js +393 -0
  60. package/dist/call-graph/extractors/regex/csharp-regex.js.map +1 -0
  61. package/dist/call-graph/extractors/regex/index.d.ts +25 -0
  62. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -0
  63. package/dist/call-graph/extractors/regex/index.js +66 -0
  64. package/dist/call-graph/extractors/regex/index.js.map +1 -0
  65. package/dist/call-graph/extractors/regex/java-regex.d.ts +34 -0
  66. package/dist/call-graph/extractors/regex/java-regex.d.ts.map +1 -0
  67. package/dist/call-graph/extractors/regex/java-regex.js +327 -0
  68. package/dist/call-graph/extractors/regex/java-regex.js.map +1 -0
  69. package/dist/call-graph/extractors/regex/php-regex.d.ts +30 -0
  70. package/dist/call-graph/extractors/regex/php-regex.d.ts.map +1 -0
  71. package/dist/call-graph/extractors/regex/php-regex.js +333 -0
  72. package/dist/call-graph/extractors/regex/php-regex.js.map +1 -0
  73. package/dist/call-graph/extractors/regex/python-regex.d.ts +46 -0
  74. package/dist/call-graph/extractors/regex/python-regex.d.ts.map +1 -0
  75. package/dist/call-graph/extractors/regex/python-regex.js +380 -0
  76. package/dist/call-graph/extractors/regex/python-regex.js.map +1 -0
  77. package/dist/call-graph/extractors/regex/typescript-regex.d.ts +27 -0
  78. package/dist/call-graph/extractors/regex/typescript-regex.d.ts.map +1 -0
  79. package/dist/call-graph/extractors/regex/typescript-regex.js +349 -0
  80. package/dist/call-graph/extractors/regex/typescript-regex.js.map +1 -0
  81. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +7 -0
  82. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
  83. package/dist/call-graph/extractors/semantic-data-access-scanner.js +7 -0
  84. package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
  85. package/dist/call-graph/extractors/types.d.ts +111 -0
  86. package/dist/call-graph/extractors/types.d.ts.map +1 -0
  87. package/dist/call-graph/extractors/types.js +68 -0
  88. package/dist/call-graph/extractors/types.js.map +1 -0
  89. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +8 -0
  90. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
  91. package/dist/call-graph/extractors/typescript-data-access-extractor.js +8 -0
  92. package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
  93. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts +116 -0
  94. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts.map +1 -0
  95. package/dist/call-graph/extractors/typescript-hybrid-extractor.js +635 -0
  96. package/dist/call-graph/extractors/typescript-hybrid-extractor.js.map +1 -0
  97. package/dist/error-handling/error-handling-analyzer.d.ts +73 -0
  98. package/dist/error-handling/error-handling-analyzer.d.ts.map +1 -0
  99. package/dist/error-handling/error-handling-analyzer.js +706 -0
  100. package/dist/error-handling/error-handling-analyzer.js.map +1 -0
  101. package/dist/error-handling/index.d.ts +8 -0
  102. package/dist/error-handling/index.d.ts.map +1 -0
  103. package/dist/error-handling/index.js +8 -0
  104. package/dist/error-handling/index.js.map +1 -0
  105. package/dist/error-handling/types.d.ts +307 -0
  106. package/dist/error-handling/types.d.ts.map +1 -0
  107. package/dist/error-handling/types.js +7 -0
  108. package/dist/error-handling/types.js.map +1 -0
  109. package/dist/index.d.ts +14 -0
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +29 -0
  112. package/dist/index.js.map +1 -1
  113. package/dist/lake/pattern-shard-store.d.ts +6 -0
  114. package/dist/lake/pattern-shard-store.d.ts.map +1 -1
  115. package/dist/lake/pattern-shard-store.js +6 -0
  116. package/dist/lake/pattern-shard-store.js.map +1 -1
  117. package/dist/module-coupling/coupling-analyzer.d.ts +73 -0
  118. package/dist/module-coupling/coupling-analyzer.d.ts.map +1 -0
  119. package/dist/module-coupling/coupling-analyzer.js +668 -0
  120. package/dist/module-coupling/coupling-analyzer.js.map +1 -0
  121. package/dist/module-coupling/index.d.ts +9 -0
  122. package/dist/module-coupling/index.d.ts.map +1 -0
  123. package/dist/module-coupling/index.js +9 -0
  124. package/dist/module-coupling/index.js.map +1 -0
  125. package/dist/module-coupling/types.d.ts +273 -0
  126. package/dist/module-coupling/types.d.ts.map +1 -0
  127. package/dist/module-coupling/types.js +8 -0
  128. package/dist/module-coupling/types.js.map +1 -0
  129. package/dist/patterns/adapters/index.d.ts +11 -0
  130. package/dist/patterns/adapters/index.d.ts.map +1 -0
  131. package/dist/patterns/adapters/index.js +11 -0
  132. package/dist/patterns/adapters/index.js.map +1 -0
  133. package/dist/patterns/adapters/pattern-store-adapter.d.ts +59 -0
  134. package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -0
  135. package/dist/patterns/adapters/pattern-store-adapter.js +468 -0
  136. package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -0
  137. package/dist/patterns/adapters/service-factory.d.ts +40 -0
  138. package/dist/patterns/adapters/service-factory.d.ts.map +1 -0
  139. package/dist/patterns/adapters/service-factory.js +144 -0
  140. package/dist/patterns/adapters/service-factory.js.map +1 -0
  141. package/dist/patterns/errors.d.ts +32 -0
  142. package/dist/patterns/errors.d.ts.map +1 -0
  143. package/dist/patterns/errors.js +45 -0
  144. package/dist/patterns/errors.js.map +1 -0
  145. package/dist/patterns/impl/cached-repository.d.ts +79 -0
  146. package/dist/patterns/impl/cached-repository.d.ts.map +1 -0
  147. package/dist/patterns/impl/cached-repository.js +296 -0
  148. package/dist/patterns/impl/cached-repository.js.map +1 -0
  149. package/dist/patterns/impl/file-repository.d.ts +75 -0
  150. package/dist/patterns/impl/file-repository.d.ts.map +1 -0
  151. package/dist/patterns/impl/file-repository.js +507 -0
  152. package/dist/patterns/impl/file-repository.js.map +1 -0
  153. package/dist/patterns/impl/index.d.ts +16 -0
  154. package/dist/patterns/impl/index.d.ts.map +1 -0
  155. package/dist/patterns/impl/index.js +21 -0
  156. package/dist/patterns/impl/index.js.map +1 -0
  157. package/dist/patterns/impl/memory-repository.d.ts +56 -0
  158. package/dist/patterns/impl/memory-repository.d.ts.map +1 -0
  159. package/dist/patterns/impl/memory-repository.js +323 -0
  160. package/dist/patterns/impl/memory-repository.js.map +1 -0
  161. package/dist/patterns/impl/pattern-service.d.ts +52 -0
  162. package/dist/patterns/impl/pattern-service.d.ts.map +1 -0
  163. package/dist/patterns/impl/pattern-service.js +382 -0
  164. package/dist/patterns/impl/pattern-service.js.map +1 -0
  165. package/dist/patterns/impl/repository-factory.d.ts +44 -0
  166. package/dist/patterns/impl/repository-factory.d.ts.map +1 -0
  167. package/dist/patterns/impl/repository-factory.js +140 -0
  168. package/dist/patterns/impl/repository-factory.js.map +1 -0
  169. package/dist/patterns/impl/unified-file-repository.d.ts +111 -0
  170. package/dist/patterns/impl/unified-file-repository.d.ts.map +1 -0
  171. package/dist/patterns/impl/unified-file-repository.js +677 -0
  172. package/dist/patterns/impl/unified-file-repository.js.map +1 -0
  173. package/dist/patterns/index.d.ts +23 -0
  174. package/dist/patterns/index.d.ts.map +1 -0
  175. package/dist/patterns/index.js +41 -0
  176. package/dist/patterns/index.js.map +1 -0
  177. package/dist/patterns/repository.d.ts +241 -0
  178. package/dist/patterns/repository.d.ts.map +1 -0
  179. package/dist/patterns/repository.js +23 -0
  180. package/dist/patterns/repository.js.map +1 -0
  181. package/dist/patterns/service.d.ts +245 -0
  182. package/dist/patterns/service.d.ts.map +1 -0
  183. package/dist/patterns/service.js +25 -0
  184. package/dist/patterns/service.js.map +1 -0
  185. package/dist/patterns/types.d.ts +227 -0
  186. package/dist/patterns/types.d.ts.map +1 -0
  187. package/dist/patterns/types.js +117 -0
  188. package/dist/patterns/types.js.map +1 -0
  189. package/dist/store/pattern-store.d.ts +6 -0
  190. package/dist/store/pattern-store.d.ts.map +1 -1
  191. package/dist/store/pattern-store.js +6 -0
  192. package/dist/store/pattern-store.js.map +1 -1
  193. package/dist/test-topology/extractors/base-test-extractor.d.ts +89 -0
  194. package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -0
  195. package/dist/test-topology/extractors/base-test-extractor.js +187 -0
  196. package/dist/test-topology/extractors/base-test-extractor.js.map +1 -0
  197. package/dist/test-topology/extractors/csharp-test-extractor.d.ts +23 -0
  198. package/dist/test-topology/extractors/csharp-test-extractor.d.ts.map +1 -0
  199. package/dist/test-topology/extractors/csharp-test-extractor.js +367 -0
  200. package/dist/test-topology/extractors/csharp-test-extractor.js.map +1 -0
  201. package/dist/test-topology/extractors/index.d.ts +12 -0
  202. package/dist/test-topology/extractors/index.d.ts.map +1 -0
  203. package/dist/test-topology/extractors/index.js +12 -0
  204. package/dist/test-topology/extractors/index.js.map +1 -0
  205. package/dist/test-topology/extractors/java-test-extractor.d.ts +20 -0
  206. package/dist/test-topology/extractors/java-test-extractor.d.ts.map +1 -0
  207. package/dist/test-topology/extractors/java-test-extractor.js +275 -0
  208. package/dist/test-topology/extractors/java-test-extractor.js.map +1 -0
  209. package/dist/test-topology/extractors/php-test-extractor.d.ts +24 -0
  210. package/dist/test-topology/extractors/php-test-extractor.d.ts.map +1 -0
  211. package/dist/test-topology/extractors/php-test-extractor.js +409 -0
  212. package/dist/test-topology/extractors/php-test-extractor.js.map +1 -0
  213. package/dist/test-topology/extractors/python-test-extractor.d.ts +23 -0
  214. package/dist/test-topology/extractors/python-test-extractor.d.ts.map +1 -0
  215. package/dist/test-topology/extractors/python-test-extractor.js +342 -0
  216. package/dist/test-topology/extractors/python-test-extractor.js.map +1 -0
  217. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts +51 -0
  218. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts.map +1 -0
  219. package/dist/test-topology/extractors/regex/csharp-test-regex.js +383 -0
  220. package/dist/test-topology/extractors/regex/csharp-test-regex.js.map +1 -0
  221. package/dist/test-topology/extractors/regex/index.d.ts +18 -0
  222. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -0
  223. package/dist/test-topology/extractors/regex/index.js +43 -0
  224. package/dist/test-topology/extractors/regex/index.js.map +1 -0
  225. package/dist/test-topology/extractors/regex/java-test-regex.d.ts +50 -0
  226. package/dist/test-topology/extractors/regex/java-test-regex.d.ts.map +1 -0
  227. package/dist/test-topology/extractors/regex/java-test-regex.js +370 -0
  228. package/dist/test-topology/extractors/regex/java-test-regex.js.map +1 -0
  229. package/dist/test-topology/extractors/regex/php-test-regex.d.ts +56 -0
  230. package/dist/test-topology/extractors/regex/php-test-regex.d.ts.map +1 -0
  231. package/dist/test-topology/extractors/regex/php-test-regex.js +503 -0
  232. package/dist/test-topology/extractors/regex/php-test-regex.js.map +1 -0
  233. package/dist/test-topology/extractors/regex/python-test-regex.d.ts +57 -0
  234. package/dist/test-topology/extractors/regex/python-test-regex.d.ts.map +1 -0
  235. package/dist/test-topology/extractors/regex/python-test-regex.js +381 -0
  236. package/dist/test-topology/extractors/regex/python-test-regex.js.map +1 -0
  237. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts +60 -0
  238. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts.map +1 -0
  239. package/dist/test-topology/extractors/regex/typescript-test-regex.js +368 -0
  240. package/dist/test-topology/extractors/regex/typescript-test-regex.js.map +1 -0
  241. package/dist/test-topology/extractors/typescript-test-extractor.d.ts +24 -0
  242. package/dist/test-topology/extractors/typescript-test-extractor.d.ts.map +1 -0
  243. package/dist/test-topology/extractors/typescript-test-extractor.js +266 -0
  244. package/dist/test-topology/extractors/typescript-test-extractor.js.map +1 -0
  245. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts +98 -0
  246. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -0
  247. package/dist/test-topology/hybrid-test-topology-analyzer.js +555 -0
  248. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -0
  249. package/dist/test-topology/index.d.ts +16 -0
  250. package/dist/test-topology/index.d.ts.map +1 -0
  251. package/dist/test-topology/index.js +19 -0
  252. package/dist/test-topology/index.js.map +1 -0
  253. package/dist/test-topology/test-topology-analyzer.d.ts +85 -0
  254. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -0
  255. package/dist/test-topology/test-topology-analyzer.js +538 -0
  256. package/dist/test-topology/test-topology-analyzer.js.map +1 -0
  257. package/dist/test-topology/types.d.ts +300 -0
  258. package/dist/test-topology/types.d.ts.map +1 -0
  259. package/dist/test-topology/types.js +7 -0
  260. package/dist/test-topology/types.js.map +1 -0
  261. package/dist/wrappers/clustering/clusterer.d.ts +43 -0
  262. package/dist/wrappers/clustering/clusterer.d.ts.map +1 -0
  263. package/dist/wrappers/clustering/clusterer.js +374 -0
  264. package/dist/wrappers/clustering/clusterer.js.map +1 -0
  265. package/dist/wrappers/clustering/exclusions.d.ts +47 -0
  266. package/dist/wrappers/clustering/exclusions.d.ts.map +1 -0
  267. package/dist/wrappers/clustering/exclusions.js +318 -0
  268. package/dist/wrappers/clustering/exclusions.js.map +1 -0
  269. package/dist/wrappers/clustering/index.d.ts +6 -0
  270. package/dist/wrappers/clustering/index.d.ts.map +1 -0
  271. package/dist/wrappers/clustering/index.js +6 -0
  272. package/dist/wrappers/clustering/index.js.map +1 -0
  273. package/dist/wrappers/detection/detector.d.ts +69 -0
  274. package/dist/wrappers/detection/detector.d.ts.map +1 -0
  275. package/dist/wrappers/detection/detector.js +279 -0
  276. package/dist/wrappers/detection/detector.js.map +1 -0
  277. package/dist/wrappers/detection/index.d.ts +5 -0
  278. package/dist/wrappers/detection/index.d.ts.map +1 -0
  279. package/dist/wrappers/detection/index.js +5 -0
  280. package/dist/wrappers/detection/index.js.map +1 -0
  281. package/dist/wrappers/export/index.d.ts +5 -0
  282. package/dist/wrappers/export/index.d.ts.map +1 -0
  283. package/dist/wrappers/export/index.js +5 -0
  284. package/dist/wrappers/export/index.js.map +1 -0
  285. package/dist/wrappers/export/json.d.ts +127 -0
  286. package/dist/wrappers/export/json.d.ts.map +1 -0
  287. package/dist/wrappers/export/json.js +160 -0
  288. package/dist/wrappers/export/json.js.map +1 -0
  289. package/dist/wrappers/index.d.ts +56 -0
  290. package/dist/wrappers/index.d.ts.map +1 -0
  291. package/dist/wrappers/index.js +159 -0
  292. package/dist/wrappers/index.js.map +1 -0
  293. package/dist/wrappers/integration/adapter.d.ts +52 -0
  294. package/dist/wrappers/integration/adapter.d.ts.map +1 -0
  295. package/dist/wrappers/integration/adapter.js +209 -0
  296. package/dist/wrappers/integration/adapter.js.map +1 -0
  297. package/dist/wrappers/integration/index.d.ts +9 -0
  298. package/dist/wrappers/integration/index.d.ts.map +1 -0
  299. package/dist/wrappers/integration/index.js +12 -0
  300. package/dist/wrappers/integration/index.js.map +1 -0
  301. package/dist/wrappers/integration/pattern-adapter.d.ts +52 -0
  302. package/dist/wrappers/integration/pattern-adapter.d.ts.map +1 -0
  303. package/dist/wrappers/integration/pattern-adapter.js +192 -0
  304. package/dist/wrappers/integration/pattern-adapter.js.map +1 -0
  305. package/dist/wrappers/integration/scanner.d.ts +85 -0
  306. package/dist/wrappers/integration/scanner.d.ts.map +1 -0
  307. package/dist/wrappers/integration/scanner.js +367 -0
  308. package/dist/wrappers/integration/scanner.js.map +1 -0
  309. package/dist/wrappers/primitives/discovery.d.ts +57 -0
  310. package/dist/wrappers/primitives/discovery.d.ts.map +1 -0
  311. package/dist/wrappers/primitives/discovery.js +389 -0
  312. package/dist/wrappers/primitives/discovery.js.map +1 -0
  313. package/dist/wrappers/primitives/index.d.ts +6 -0
  314. package/dist/wrappers/primitives/index.d.ts.map +1 -0
  315. package/dist/wrappers/primitives/index.js +6 -0
  316. package/dist/wrappers/primitives/index.js.map +1 -0
  317. package/dist/wrappers/primitives/registry.d.ts +63 -0
  318. package/dist/wrappers/primitives/registry.d.ts.map +1 -0
  319. package/dist/wrappers/primitives/registry.js +447 -0
  320. package/dist/wrappers/primitives/registry.js.map +1 -0
  321. package/dist/wrappers/types.d.ts +137 -0
  322. package/dist/wrappers/types.d.ts.map +1 -0
  323. package/dist/wrappers/types.js +7 -0
  324. package/dist/wrappers/types.js.map +1 -0
  325. package/package.json +5 -1
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Test Topology Analyzer
3
+ *
4
+ * Main analyzer that orchestrates test extraction across languages,
5
+ * builds test-to-code mappings, and calculates coverage metrics.
6
+ */
7
+ import type Parser from 'tree-sitter';
8
+ import type { TestExtraction, TestCoverage, UncoveredFunction, MockAnalysis, MinimumTestSet, TestTopologySummary, UncoveredOptions } from './types.js';
9
+ import type { CallGraph } from '../call-graph/types.js';
10
+ export interface TestTopologyResult {
11
+ /** All test extractions */
12
+ extractions: TestExtraction[];
13
+ /** Test coverage by source file */
14
+ coverage: Map<string, TestCoverage>;
15
+ /** Mock analysis */
16
+ mockAnalysis: MockAnalysis;
17
+ /** Summary statistics */
18
+ summary: TestTopologySummary;
19
+ }
20
+ export declare class TestTopologyAnalyzer {
21
+ private extractors;
22
+ private callGraph;
23
+ private testExtractions;
24
+ private testToFunctions;
25
+ private functionToTests;
26
+ constructor(parsers: {
27
+ typescript?: Parser;
28
+ python?: Parser;
29
+ java?: Parser;
30
+ csharp?: Parser;
31
+ php?: Parser;
32
+ });
33
+ /**
34
+ * Set the call graph for transitive coverage analysis
35
+ */
36
+ setCallGraph(graph: CallGraph): void;
37
+ /**
38
+ * Extract tests from a single file
39
+ */
40
+ extractFromFile(content: string, filePath: string): TestExtraction | null;
41
+ /**
42
+ * Build test-to-code mappings after extracting all tests
43
+ */
44
+ buildMappings(): void;
45
+ /**
46
+ * Get coverage for a source file
47
+ */
48
+ getCoverage(sourceFile: string): TestCoverage | null;
49
+ /**
50
+ * Get uncovered functions
51
+ */
52
+ getUncoveredFunctions(options?: UncoveredOptions): UncoveredFunction[];
53
+ /**
54
+ * Get minimum test set for changed files
55
+ */
56
+ getMinimumTestSet(changedFiles: string[]): MinimumTestSet;
57
+ /**
58
+ * Analyze mock usage patterns
59
+ */
60
+ analyzeMocks(): MockAnalysis;
61
+ /**
62
+ * Get summary statistics
63
+ */
64
+ getSummary(): TestTopologySummary;
65
+ private getExtractorForFile;
66
+ private resolveFunctionId;
67
+ private findTransitiveCalls;
68
+ private addFunctionToTest;
69
+ private getTestInfo;
70
+ private getReachType;
71
+ private getCallDepth;
72
+ private calculateConfidence;
73
+ private isMockedOnly;
74
+ private calculateRiskScore;
75
+ private inferUncoveredReasons;
76
+ private isTestFile;
77
+ }
78
+ export declare function createTestTopologyAnalyzer(parsers: {
79
+ typescript?: Parser;
80
+ python?: Parser;
81
+ java?: Parser;
82
+ csharp?: Parser;
83
+ php?: Parser;
84
+ }): TestTopologyAnalyzer;
85
+ //# sourceMappingURL=test-topology-analyzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-topology-analyzer.d.ts","sourceRoot":"","sources":["../../src/test-topology/test-topology-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EACV,cAAc,EAEd,YAAY,EAGZ,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAOpB,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,wBAAwB,CAAC;AAMtE,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,mCAAmC;IACnC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACpC,oBAAoB;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,yBAAyB;IACzB,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAeD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,UAAU,CAAe;IACjC,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,eAAe,CAA0C;IACjE,OAAO,CAAC,eAAe,CAAuC;IAC9D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,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,oBAAoB,CAEvB"}
@@ -0,0 +1,538 @@
1
+ /**
2
+ * Test Topology Analyzer
3
+ *
4
+ * Main analyzer that orchestrates test extraction across languages,
5
+ * builds test-to-code mappings, and calculates coverage metrics.
6
+ */
7
+ import { BaseTestExtractor } from './extractors/base-test-extractor.js';
8
+ import { TypeScriptTestExtractor } from './extractors/typescript-test-extractor.js';
9
+ import { PythonTestExtractor } from './extractors/python-test-extractor.js';
10
+ import { JavaTestExtractor } from './extractors/java-test-extractor.js';
11
+ import { CSharpTestExtractor } from './extractors/csharp-test-extractor.js';
12
+ import { PHPTestExtractor } from './extractors/php-test-extractor.js';
13
+ // ============================================================================
14
+ // Analyzer
15
+ // ============================================================================
16
+ export class TestTopologyAnalyzer {
17
+ extractors;
18
+ callGraph = null;
19
+ testExtractions = new Map();
20
+ testToFunctions = new Map();
21
+ functionToTests = new Map();
22
+ constructor(parsers) {
23
+ this.extractors = {
24
+ typescript: parsers.typescript ? new TypeScriptTestExtractor(parsers.typescript) : null,
25
+ javascript: parsers.typescript ? new TypeScriptTestExtractor(parsers.typescript) : null,
26
+ python: parsers.python ? new PythonTestExtractor(parsers.python) : null,
27
+ java: parsers.java ? new JavaTestExtractor(parsers.java) : null,
28
+ csharp: parsers.csharp ? new CSharpTestExtractor(parsers.csharp) : null,
29
+ php: parsers.php ? new PHPTestExtractor(parsers.php) : null,
30
+ };
31
+ }
32
+ /**
33
+ * Set the call graph for transitive coverage analysis
34
+ */
35
+ setCallGraph(graph) {
36
+ this.callGraph = graph;
37
+ }
38
+ /**
39
+ * Extract tests from a single file
40
+ */
41
+ extractFromFile(content, filePath) {
42
+ const extractor = this.getExtractorForFile(filePath);
43
+ if (!extractor)
44
+ return null;
45
+ const extraction = extractor.extract(content, filePath);
46
+ // Update file path in test cases
47
+ for (const test of extraction.testCases) {
48
+ test.file = filePath;
49
+ test.id = `${filePath}:${test.name}:${test.line}`;
50
+ }
51
+ this.testExtractions.set(filePath, extraction);
52
+ return extraction;
53
+ }
54
+ /**
55
+ * Build test-to-code mappings after extracting all tests
56
+ */
57
+ buildMappings() {
58
+ this.testToFunctions.clear();
59
+ this.functionToTests.clear();
60
+ for (const [_file, extraction] of this.testExtractions) {
61
+ for (const test of extraction.testCases) {
62
+ const testId = test.id;
63
+ const functions = new Set();
64
+ // Direct calls
65
+ for (const call of test.directCalls) {
66
+ const funcId = this.resolveFunctionId(call, test.file);
67
+ if (funcId) {
68
+ functions.add(funcId);
69
+ this.addFunctionToTest(funcId, testId);
70
+ }
71
+ }
72
+ // Transitive calls (if call graph available)
73
+ if (this.callGraph) {
74
+ const transitive = this.findTransitiveCalls(functions);
75
+ for (const funcId of transitive) {
76
+ functions.add(funcId);
77
+ this.addFunctionToTest(funcId, testId);
78
+ test.transitiveCalls.push(funcId);
79
+ }
80
+ }
81
+ this.testToFunctions.set(testId, functions);
82
+ }
83
+ }
84
+ }
85
+ /**
86
+ * Get coverage for a source file
87
+ */
88
+ getCoverage(sourceFile) {
89
+ if (!this.callGraph)
90
+ return null;
91
+ const functions = [];
92
+ const tests = [];
93
+ const seenTests = new Set();
94
+ // Find all functions in this file
95
+ for (const [funcId, func] of this.callGraph.functions) {
96
+ if (func.file !== sourceFile)
97
+ continue;
98
+ const coveringTests = this.functionToTests.get(funcId);
99
+ const isCovered = coveringTests !== undefined && coveringTests.size > 0;
100
+ functions.push({
101
+ functionId: funcId,
102
+ name: func.name,
103
+ line: func.startLine,
104
+ isCovered,
105
+ coveringTests: coveringTests ? Array.from(coveringTests) : [],
106
+ isMockedOnly: this.isMockedOnly(funcId, coveringTests),
107
+ });
108
+ // Collect test info
109
+ if (coveringTests) {
110
+ for (const testId of coveringTests) {
111
+ if (seenTests.has(testId))
112
+ continue;
113
+ seenTests.add(testId);
114
+ const testInfo = this.getTestInfo(testId);
115
+ if (testInfo) {
116
+ tests.push({
117
+ testFile: testInfo.file,
118
+ testName: testInfo.name,
119
+ reachType: this.getReachType(testId, funcId),
120
+ depth: this.getCallDepth(testId, funcId),
121
+ confidence: this.calculateConfidence(testId, funcId),
122
+ coveredFunctions: Array.from(this.testToFunctions.get(testId) ?? [])
123
+ .filter(f => this.callGraph?.functions.get(f)?.file === sourceFile),
124
+ });
125
+ }
126
+ }
127
+ }
128
+ }
129
+ const coveredCount = functions.filter(f => f.isCovered).length;
130
+ const coveragePercent = functions.length > 0
131
+ ? Math.round((coveredCount / functions.length) * 100)
132
+ : 0;
133
+ return {
134
+ sourceFile,
135
+ tests,
136
+ functions,
137
+ coveragePercent,
138
+ };
139
+ }
140
+ /**
141
+ * Get uncovered functions
142
+ */
143
+ getUncoveredFunctions(options = {}) {
144
+ const { minRisk = 'low', limit = 50, includeReasons = true } = options;
145
+ const uncovered = [];
146
+ if (!this.callGraph)
147
+ return uncovered;
148
+ const riskThresholds = { low: 0, medium: 30, high: 60 };
149
+ const minRiskScore = riskThresholds[minRisk];
150
+ for (const [funcId, func] of this.callGraph.functions) {
151
+ // Skip test files
152
+ if (this.isTestFile(func.file))
153
+ continue;
154
+ const coveringTests = this.functionToTests.get(funcId);
155
+ if (coveringTests && coveringTests.size > 0)
156
+ continue;
157
+ const riskScore = this.calculateRiskScore(func);
158
+ if (riskScore < minRiskScore)
159
+ continue;
160
+ const possibleReasons = includeReasons
161
+ ? this.inferUncoveredReasons(func)
162
+ : [];
163
+ uncovered.push({
164
+ functionId: funcId,
165
+ name: func.name,
166
+ qualifiedName: func.qualifiedName,
167
+ file: func.file,
168
+ line: func.startLine,
169
+ possibleReasons,
170
+ riskScore,
171
+ isEntryPoint: this.callGraph.entryPoints.includes(funcId),
172
+ accessesSensitiveData: func.dataAccess.length > 0,
173
+ });
174
+ }
175
+ // Sort by risk score descending
176
+ uncovered.sort((a, b) => b.riskScore - a.riskScore);
177
+ return uncovered.slice(0, limit);
178
+ }
179
+ /**
180
+ * Get minimum test set for changed files
181
+ */
182
+ getMinimumTestSet(changedFiles) {
183
+ const selectedTests = new Map();
184
+ const changedFunctions = new Set();
185
+ // Find all functions in changed files
186
+ if (this.callGraph) {
187
+ for (const [funcId, func] of this.callGraph.functions) {
188
+ if (changedFiles.includes(func.file)) {
189
+ changedFunctions.add(funcId);
190
+ }
191
+ }
192
+ }
193
+ // Find tests that cover changed functions
194
+ for (const funcId of changedFunctions) {
195
+ const tests = this.functionToTests.get(funcId);
196
+ if (!tests)
197
+ continue;
198
+ for (const testId of tests) {
199
+ if (selectedTests.has(testId))
200
+ continue;
201
+ const testInfo = this.getTestInfo(testId);
202
+ if (testInfo) {
203
+ selectedTests.set(testId, {
204
+ file: testInfo.file,
205
+ name: testInfo.qualifiedName,
206
+ reason: `Covers function in ${this.callGraph?.functions.get(funcId)?.file ?? 'unknown'}`,
207
+ });
208
+ }
209
+ }
210
+ }
211
+ // Calculate total tests
212
+ let totalTests = 0;
213
+ for (const extraction of this.testExtractions.values()) {
214
+ totalTests += extraction.testCases.length;
215
+ }
216
+ // Estimate time saved (rough: 100ms per skipped test)
217
+ const skippedTests = totalTests - selectedTests.size;
218
+ const timeSavedMs = skippedTests * 100;
219
+ const timeSaved = timeSavedMs > 60000
220
+ ? `${Math.round(timeSavedMs / 60000)}m`
221
+ : `${Math.round(timeSavedMs / 1000)}s`;
222
+ // Calculate coverage of changed code
223
+ let coveredChangedFunctions = 0;
224
+ for (const funcId of changedFunctions) {
225
+ const tests = this.functionToTests.get(funcId);
226
+ if (tests && tests.size > 0) {
227
+ coveredChangedFunctions++;
228
+ }
229
+ }
230
+ const changedCodeCoverage = changedFunctions.size > 0
231
+ ? Math.round((coveredChangedFunctions / changedFunctions.size) * 100)
232
+ : 100;
233
+ return {
234
+ tests: Array.from(selectedTests.values()),
235
+ totalTests,
236
+ selectedTests: selectedTests.size,
237
+ timeSaved,
238
+ changedCodeCoverage,
239
+ };
240
+ }
241
+ /**
242
+ * Analyze mock usage patterns
243
+ */
244
+ analyzeMocks() {
245
+ let totalMocks = 0;
246
+ let externalMocks = 0;
247
+ let internalMocks = 0;
248
+ const mockRatios = [];
249
+ const highMockRatioTests = [];
250
+ const mockedModules = new Map();
251
+ for (const [file, extraction] of this.testExtractions) {
252
+ for (const mock of extraction.mocks) {
253
+ totalMocks++;
254
+ if (mock.isExternal) {
255
+ externalMocks++;
256
+ }
257
+ else {
258
+ internalMocks++;
259
+ }
260
+ // Track mocked modules
261
+ const module = mock.target.split('.')[0] ?? mock.target;
262
+ mockedModules.set(module, (mockedModules.get(module) ?? 0) + 1);
263
+ }
264
+ for (const test of extraction.testCases) {
265
+ mockRatios.push(test.quality.mockRatio);
266
+ if (test.quality.mockRatio > 0.7) {
267
+ highMockRatioTests.push({
268
+ file,
269
+ testName: test.name,
270
+ mockRatio: test.quality.mockRatio,
271
+ });
272
+ }
273
+ }
274
+ }
275
+ const avgMockRatio = mockRatios.length > 0
276
+ ? mockRatios.reduce((a, b) => a + b, 0) / mockRatios.length
277
+ : 0;
278
+ const topMockedModules = Array.from(mockedModules.entries())
279
+ .sort((a, b) => b[1] - a[1])
280
+ .slice(0, 10)
281
+ .map(([module, count]) => ({ module, count }));
282
+ return {
283
+ totalMocks,
284
+ externalMocks,
285
+ internalMocks,
286
+ externalPercent: totalMocks > 0 ? Math.round((externalMocks / totalMocks) * 100) : 0,
287
+ internalPercent: totalMocks > 0 ? Math.round((internalMocks / totalMocks) * 100) : 0,
288
+ avgMockRatio: Math.round(avgMockRatio * 100) / 100,
289
+ highMockRatioTests,
290
+ topMockedModules,
291
+ };
292
+ }
293
+ /**
294
+ * Get summary statistics
295
+ */
296
+ getSummary() {
297
+ const byFramework = {
298
+ jest: 0, vitest: 0, mocha: 0, ava: 0, tape: 0,
299
+ pytest: 0, unittest: 0, nose: 0,
300
+ junit4: 0, junit5: 0, testng: 0,
301
+ xunit: 0, nunit: 0, mstest: 0,
302
+ phpunit: 0, pest: 0, codeception: 0,
303
+ unknown: 0,
304
+ };
305
+ let testFiles = 0;
306
+ let testCases = 0;
307
+ let totalQualityScore = 0;
308
+ let totalMockRatio = 0;
309
+ for (const extraction of this.testExtractions.values()) {
310
+ testFiles++;
311
+ testCases += extraction.testCases.length;
312
+ byFramework[extraction.framework]++;
313
+ for (const test of extraction.testCases) {
314
+ totalQualityScore += test.quality.score;
315
+ totalMockRatio += test.quality.mockRatio;
316
+ }
317
+ }
318
+ // Calculate source file coverage
319
+ let coveredFiles = 0;
320
+ let totalFiles = 0;
321
+ let coveredFunctions = 0;
322
+ let totalFunctions = 0;
323
+ if (this.callGraph) {
324
+ const sourceFiles = new Set();
325
+ const coveredSourceFiles = new Set();
326
+ for (const [funcId, func] of this.callGraph.functions) {
327
+ if (this.isTestFile(func.file))
328
+ continue;
329
+ sourceFiles.add(func.file);
330
+ totalFunctions++;
331
+ const tests = this.functionToTests.get(funcId);
332
+ if (tests && tests.size > 0) {
333
+ coveredSourceFiles.add(func.file);
334
+ coveredFunctions++;
335
+ }
336
+ }
337
+ totalFiles = sourceFiles.size;
338
+ coveredFiles = coveredSourceFiles.size;
339
+ }
340
+ return {
341
+ testFiles,
342
+ testCases,
343
+ coveredFiles,
344
+ totalFiles,
345
+ coveragePercent: totalFiles > 0 ? Math.round((coveredFiles / totalFiles) * 100) : 0,
346
+ coveredFunctions,
347
+ totalFunctions,
348
+ functionCoveragePercent: totalFunctions > 0
349
+ ? Math.round((coveredFunctions / totalFunctions) * 100)
350
+ : 0,
351
+ avgMockRatio: testCases > 0
352
+ ? Math.round((totalMockRatio / testCases) * 100) / 100
353
+ : 0,
354
+ avgQualityScore: testCases > 0
355
+ ? Math.round(totalQualityScore / testCases)
356
+ : 0,
357
+ byFramework,
358
+ };
359
+ }
360
+ // ============================================================================
361
+ // Private Helpers
362
+ // ============================================================================
363
+ getExtractorForFile(filePath) {
364
+ const ext = filePath.split('.').pop()?.toLowerCase();
365
+ switch (ext) {
366
+ case 'ts':
367
+ case 'tsx':
368
+ return this.extractors.typescript;
369
+ case 'js':
370
+ case 'jsx':
371
+ case 'mjs':
372
+ return this.extractors.javascript;
373
+ case 'py':
374
+ return this.extractors.python;
375
+ case 'java':
376
+ return this.extractors.java;
377
+ case 'cs':
378
+ return this.extractors.csharp;
379
+ case 'php':
380
+ return this.extractors.php;
381
+ default:
382
+ return null;
383
+ }
384
+ }
385
+ resolveFunctionId(callName, fromFile) {
386
+ if (!this.callGraph)
387
+ return null;
388
+ // Try exact match first
389
+ for (const [funcId, func] of this.callGraph.functions) {
390
+ if (func.name === callName || func.qualifiedName.endsWith(callName)) {
391
+ return funcId;
392
+ }
393
+ }
394
+ // Try file-relative match
395
+ const dir = fromFile.substring(0, fromFile.lastIndexOf('/'));
396
+ for (const [funcId, func] of this.callGraph.functions) {
397
+ if (func.file.startsWith(dir) && func.name === callName) {
398
+ return funcId;
399
+ }
400
+ }
401
+ return null;
402
+ }
403
+ findTransitiveCalls(directCalls) {
404
+ const transitive = new Set();
405
+ if (!this.callGraph)
406
+ return transitive;
407
+ const visited = new Set();
408
+ const queue = Array.from(directCalls);
409
+ while (queue.length > 0) {
410
+ const funcId = queue.shift();
411
+ if (visited.has(funcId))
412
+ continue;
413
+ visited.add(funcId);
414
+ const func = this.callGraph.functions.get(funcId);
415
+ if (!func)
416
+ continue;
417
+ for (const call of func.calls) {
418
+ for (const candidate of call.resolvedCandidates) {
419
+ if (!directCalls.has(candidate) && !transitive.has(candidate)) {
420
+ transitive.add(candidate);
421
+ queue.push(candidate);
422
+ }
423
+ }
424
+ }
425
+ }
426
+ return transitive;
427
+ }
428
+ addFunctionToTest(funcId, testId) {
429
+ let tests = this.functionToTests.get(funcId);
430
+ if (!tests) {
431
+ tests = new Set();
432
+ this.functionToTests.set(funcId, tests);
433
+ }
434
+ tests.add(testId);
435
+ }
436
+ getTestInfo(testId) {
437
+ for (const extraction of this.testExtractions.values()) {
438
+ for (const test of extraction.testCases) {
439
+ if (test.id === testId)
440
+ return test;
441
+ }
442
+ }
443
+ return null;
444
+ }
445
+ getReachType(testId, funcId) {
446
+ const testFunctions = this.testToFunctions.get(testId);
447
+ if (!testFunctions)
448
+ return 'transitive';
449
+ const testInfo = this.getTestInfo(testId);
450
+ if (testInfo?.directCalls.some(c => this.resolveFunctionId(c, testInfo.file) === funcId)) {
451
+ return 'direct';
452
+ }
453
+ return 'transitive';
454
+ }
455
+ getCallDepth(testId, funcId) {
456
+ // Simplified: return 1 for direct, 2+ for transitive
457
+ return this.getReachType(testId, funcId) === 'direct' ? 1 : 2;
458
+ }
459
+ calculateConfidence(testId, funcId) {
460
+ const reachType = this.getReachType(testId, funcId);
461
+ // Direct calls have higher confidence
462
+ return reachType === 'direct' ? 0.9 : 0.6;
463
+ }
464
+ isMockedOnly(funcId, coveringTests) {
465
+ if (!coveringTests)
466
+ return false;
467
+ // Check if all covering tests mock this function
468
+ for (const testId of coveringTests) {
469
+ const testInfo = this.getTestInfo(testId);
470
+ if (!testInfo)
471
+ continue;
472
+ const extraction = this.testExtractions.get(testInfo.file);
473
+ if (!extraction)
474
+ continue;
475
+ const func = this.callGraph?.functions.get(funcId);
476
+ if (!func)
477
+ continue;
478
+ // Check if any mock targets this function
479
+ const isMocked = extraction.mocks.some(m => m.target.includes(func.name) || m.target.includes(func.qualifiedName));
480
+ if (!isMocked)
481
+ return false;
482
+ }
483
+ return true;
484
+ }
485
+ calculateRiskScore(func) {
486
+ let score = 30; // Base score
487
+ // Entry points are higher risk
488
+ if (this.callGraph?.entryPoints.includes(`${func.file}:${func.name}`)) {
489
+ score += 30;
490
+ }
491
+ // Functions with data access are higher risk
492
+ if (func.dataAccess.length > 0) {
493
+ score += 20;
494
+ }
495
+ // Functions called by many others are higher risk
496
+ if (func.calledBy.length > 5) {
497
+ score += 15;
498
+ }
499
+ // Complex functions (many calls) are higher risk
500
+ if (func.calls.length > 10) {
501
+ score += 10;
502
+ }
503
+ return Math.min(100, score);
504
+ }
505
+ inferUncoveredReasons(func) {
506
+ const reasons = [];
507
+ // Check if it's dead code (no callers)
508
+ if (func.calledBy.length === 0 && !this.callGraph?.entryPoints.includes(`${func.file}:${func.name}`)) {
509
+ reasons.push('dead-code');
510
+ }
511
+ // Check for framework hooks
512
+ const hookPatterns = ['componentDidMount', 'useEffect', 'ngOnInit', 'setUp', 'tearDown'];
513
+ if (hookPatterns.some(p => func.name.includes(p))) {
514
+ reasons.push('framework-hook');
515
+ }
516
+ // Check for generated code patterns
517
+ if (func.name.startsWith('get') || func.name.startsWith('set')) {
518
+ reasons.push('trivial');
519
+ }
520
+ // Check for deprecated
521
+ // Would need to check annotations/comments
522
+ return reasons;
523
+ }
524
+ isTestFile(filePath) {
525
+ const testPatterns = [
526
+ /\.test\./i, /\.spec\./i, /_test\./i, /test_/i,
527
+ /tests?\//i, /specs?\//i, /__tests__\//i,
528
+ ];
529
+ return testPatterns.some(p => p.test(filePath));
530
+ }
531
+ }
532
+ // ============================================================================
533
+ // Factory
534
+ // ============================================================================
535
+ export function createTestTopologyAnalyzer(parsers) {
536
+ return new TestTopologyAnalyzer(parsers);
537
+ }
538
+ //# sourceMappingURL=test-topology-analyzer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-topology-analyzer.js","sourceRoot":"","sources":["../../src/test-topology/test-topology-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AA2BtE,+EAA+E;AAC/E,WAAW;AACX,+EAA+E;AAE/E,MAAM,OAAO,oBAAoB;IACvB,UAAU,CAAe;IACzB,SAAS,GAAqB,IAAI,CAAC;IACnC,eAAe,GAAgC,IAAI,GAAG,EAAE,CAAC;IACzD,eAAe,GAA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