driftdetect-core 0.4.5 → 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 (578) hide show
  1. package/LICENSE +21 -0
  2. package/dist/boundaries/boundary-scanner.d.ts.map +1 -1
  3. package/dist/boundaries/boundary-scanner.js +184 -18
  4. package/dist/boundaries/boundary-scanner.js.map +1 -1
  5. package/dist/boundaries/types.d.ts +34 -2
  6. package/dist/boundaries/types.d.ts.map +1 -1
  7. package/dist/call-graph/analysis/graph-builder.d.ts +3 -0
  8. package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
  9. package/dist/call-graph/analysis/graph-builder.js +81 -18
  10. package/dist/call-graph/analysis/graph-builder.js.map +1 -1
  11. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts +8 -0
  12. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
  13. package/dist/call-graph/extractors/csharp-data-access-extractor.js +18 -5
  14. package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
  15. package/dist/call-graph/extractors/csharp-extractor.d.ts +35 -0
  16. package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -1
  17. package/dist/call-graph/extractors/csharp-extractor.js +362 -4
  18. package/dist/call-graph/extractors/csharp-extractor.js.map +1 -1
  19. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts +37 -0
  20. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts.map +1 -0
  21. package/dist/call-graph/extractors/csharp-hybrid-extractor.js +408 -0
  22. package/dist/call-graph/extractors/csharp-hybrid-extractor.js.map +1 -0
  23. package/dist/call-graph/extractors/data-access-extractor.d.ts +16 -2
  24. package/dist/call-graph/extractors/data-access-extractor.d.ts.map +1 -1
  25. package/dist/call-graph/extractors/data-access-extractor.js +114 -5
  26. package/dist/call-graph/extractors/data-access-extractor.js.map +1 -1
  27. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts +102 -0
  28. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts.map +1 -0
  29. package/dist/call-graph/extractors/hybrid-extractor-base.js +289 -0
  30. package/dist/call-graph/extractors/hybrid-extractor-base.js.map +1 -0
  31. package/dist/call-graph/extractors/index.d.ts +17 -13
  32. package/dist/call-graph/extractors/index.d.ts.map +1 -1
  33. package/dist/call-graph/extractors/index.js +24 -23
  34. package/dist/call-graph/extractors/index.js.map +1 -1
  35. package/dist/call-graph/extractors/java-data-access-extractor.d.ts +8 -0
  36. package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
  37. package/dist/call-graph/extractors/java-data-access-extractor.js +20 -6
  38. package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
  39. package/dist/call-graph/extractors/java-extractor.d.ts +15 -0
  40. package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -1
  41. package/dist/call-graph/extractors/java-extractor.js +120 -4
  42. package/dist/call-graph/extractors/java-extractor.js.map +1 -1
  43. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts +36 -0
  44. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts.map +1 -0
  45. package/dist/call-graph/extractors/java-hybrid-extractor.js +426 -0
  46. package/dist/call-graph/extractors/java-hybrid-extractor.js.map +1 -0
  47. package/dist/call-graph/extractors/php-data-access-extractor.d.ts +8 -0
  48. package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
  49. package/dist/call-graph/extractors/php-data-access-extractor.js +20 -6
  50. package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
  51. package/dist/call-graph/extractors/php-extractor.d.ts +48 -1
  52. package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -1
  53. package/dist/call-graph/extractors/php-extractor.js +460 -6
  54. package/dist/call-graph/extractors/php-extractor.js.map +1 -1
  55. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts +35 -0
  56. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts.map +1 -0
  57. package/dist/call-graph/extractors/php-hybrid-extractor.js +393 -0
  58. package/dist/call-graph/extractors/php-hybrid-extractor.js.map +1 -0
  59. package/dist/call-graph/extractors/python-data-access-extractor.d.ts +8 -0
  60. package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
  61. package/dist/call-graph/extractors/python-data-access-extractor.js +20 -6
  62. package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
  63. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts +85 -0
  64. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts.map +1 -0
  65. package/dist/call-graph/extractors/python-hybrid-extractor.js +462 -0
  66. package/dist/call-graph/extractors/python-hybrid-extractor.js.map +1 -0
  67. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts +154 -0
  68. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts.map +1 -0
  69. package/dist/call-graph/extractors/regex/base-regex-extractor.js +346 -0
  70. package/dist/call-graph/extractors/regex/base-regex-extractor.js.map +1 -0
  71. package/dist/call-graph/extractors/regex/csharp-regex.d.ts +34 -0
  72. package/dist/call-graph/extractors/regex/csharp-regex.d.ts.map +1 -0
  73. package/dist/call-graph/extractors/regex/csharp-regex.js +393 -0
  74. package/dist/call-graph/extractors/regex/csharp-regex.js.map +1 -0
  75. package/dist/call-graph/extractors/regex/index.d.ts +25 -0
  76. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -0
  77. package/dist/call-graph/extractors/regex/index.js +66 -0
  78. package/dist/call-graph/extractors/regex/index.js.map +1 -0
  79. package/dist/call-graph/extractors/regex/java-regex.d.ts +34 -0
  80. package/dist/call-graph/extractors/regex/java-regex.d.ts.map +1 -0
  81. package/dist/call-graph/extractors/regex/java-regex.js +327 -0
  82. package/dist/call-graph/extractors/regex/java-regex.js.map +1 -0
  83. package/dist/call-graph/extractors/regex/php-regex.d.ts +30 -0
  84. package/dist/call-graph/extractors/regex/php-regex.d.ts.map +1 -0
  85. package/dist/call-graph/extractors/regex/php-regex.js +333 -0
  86. package/dist/call-graph/extractors/regex/php-regex.js.map +1 -0
  87. package/dist/call-graph/extractors/regex/python-regex.d.ts +46 -0
  88. package/dist/call-graph/extractors/regex/python-regex.d.ts.map +1 -0
  89. package/dist/call-graph/extractors/regex/python-regex.js +380 -0
  90. package/dist/call-graph/extractors/regex/python-regex.js.map +1 -0
  91. package/dist/call-graph/extractors/regex/typescript-regex.d.ts +27 -0
  92. package/dist/call-graph/extractors/regex/typescript-regex.d.ts.map +1 -0
  93. package/dist/call-graph/extractors/regex/typescript-regex.js +349 -0
  94. package/dist/call-graph/extractors/regex/typescript-regex.js.map +1 -0
  95. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +11 -0
  96. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
  97. package/dist/call-graph/extractors/semantic-data-access-scanner.js +53 -2
  98. package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
  99. package/dist/call-graph/extractors/types.d.ts +111 -0
  100. package/dist/call-graph/extractors/types.d.ts.map +1 -0
  101. package/dist/call-graph/extractors/types.js +68 -0
  102. package/dist/call-graph/extractors/types.js.map +1 -0
  103. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +8 -0
  104. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
  105. package/dist/call-graph/extractors/typescript-data-access-extractor.js +31 -10
  106. package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
  107. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts +116 -0
  108. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts.map +1 -0
  109. package/dist/call-graph/extractors/typescript-hybrid-extractor.js +635 -0
  110. package/dist/call-graph/extractors/typescript-hybrid-extractor.js.map +1 -0
  111. package/dist/call-graph/index.d.ts +2 -4
  112. package/dist/call-graph/index.d.ts.map +1 -1
  113. package/dist/call-graph/index.js +5 -6
  114. package/dist/call-graph/index.js.map +1 -1
  115. package/dist/error-handling/error-handling-analyzer.d.ts +73 -0
  116. package/dist/error-handling/error-handling-analyzer.d.ts.map +1 -0
  117. package/dist/error-handling/error-handling-analyzer.js +706 -0
  118. package/dist/error-handling/error-handling-analyzer.js.map +1 -0
  119. package/dist/error-handling/index.d.ts +8 -0
  120. package/dist/error-handling/index.d.ts.map +1 -0
  121. package/dist/error-handling/index.js +8 -0
  122. package/dist/error-handling/index.js.map +1 -0
  123. package/dist/error-handling/types.d.ts +307 -0
  124. package/dist/error-handling/types.d.ts.map +1 -0
  125. package/dist/error-handling/types.js +7 -0
  126. package/dist/error-handling/types.js.map +1 -0
  127. package/dist/index.d.ts +18 -2
  128. package/dist/index.d.ts.map +1 -1
  129. package/dist/index.js +44 -5
  130. package/dist/index.js.map +1 -1
  131. package/dist/lake/pattern-shard-store.d.ts +6 -0
  132. package/dist/lake/pattern-shard-store.d.ts.map +1 -1
  133. package/dist/lake/pattern-shard-store.js +6 -0
  134. package/dist/lake/pattern-shard-store.js.map +1 -1
  135. package/dist/language-intelligence/base-normalizer.d.ts +68 -0
  136. package/dist/language-intelligence/base-normalizer.d.ts.map +1 -0
  137. package/dist/language-intelligence/base-normalizer.js +210 -0
  138. package/dist/language-intelligence/base-normalizer.js.map +1 -0
  139. package/dist/language-intelligence/framework-registry.d.ts +89 -0
  140. package/dist/language-intelligence/framework-registry.d.ts.map +1 -0
  141. package/dist/language-intelligence/framework-registry.js +165 -0
  142. package/dist/language-intelligence/framework-registry.js.map +1 -0
  143. package/dist/language-intelligence/frameworks/aspnet.d.ts +11 -0
  144. package/dist/language-intelligence/frameworks/aspnet.d.ts.map +1 -0
  145. package/dist/language-intelligence/frameworks/aspnet.js +325 -0
  146. package/dist/language-intelligence/frameworks/aspnet.js.map +1 -0
  147. package/dist/language-intelligence/frameworks/fastapi.d.ts +11 -0
  148. package/dist/language-intelligence/frameworks/fastapi.d.ts.map +1 -0
  149. package/dist/language-intelligence/frameworks/fastapi.js +188 -0
  150. package/dist/language-intelligence/frameworks/fastapi.js.map +1 -0
  151. package/dist/language-intelligence/frameworks/index.d.ts +32 -0
  152. package/dist/language-intelligence/frameworks/index.d.ts.map +1 -0
  153. package/dist/language-intelligence/frameworks/index.js +51 -0
  154. package/dist/language-intelligence/frameworks/index.js.map +1 -0
  155. package/dist/language-intelligence/frameworks/laravel.d.ts +12 -0
  156. package/dist/language-intelligence/frameworks/laravel.d.ts.map +1 -0
  157. package/dist/language-intelligence/frameworks/laravel.js +194 -0
  158. package/dist/language-intelligence/frameworks/laravel.js.map +1 -0
  159. package/dist/language-intelligence/frameworks/nestjs.d.ts +11 -0
  160. package/dist/language-intelligence/frameworks/nestjs.d.ts.map +1 -0
  161. package/dist/language-intelligence/frameworks/nestjs.js +307 -0
  162. package/dist/language-intelligence/frameworks/nestjs.js.map +1 -0
  163. package/dist/language-intelligence/frameworks/spring.d.ts +11 -0
  164. package/dist/language-intelligence/frameworks/spring.d.ts.map +1 -0
  165. package/dist/language-intelligence/frameworks/spring.js +369 -0
  166. package/dist/language-intelligence/frameworks/spring.js.map +1 -0
  167. package/dist/language-intelligence/index.d.ts +33 -0
  168. package/dist/language-intelligence/index.d.ts.map +1 -0
  169. package/dist/language-intelligence/index.js +37 -0
  170. package/dist/language-intelligence/index.js.map +1 -0
  171. package/dist/language-intelligence/language-intelligence.d.ts +99 -0
  172. package/dist/language-intelligence/language-intelligence.d.ts.map +1 -0
  173. package/dist/language-intelligence/language-intelligence.js +239 -0
  174. package/dist/language-intelligence/language-intelligence.js.map +1 -0
  175. package/dist/language-intelligence/normalizers/csharp-normalizer.d.ts +39 -0
  176. package/dist/language-intelligence/normalizers/csharp-normalizer.d.ts.map +1 -0
  177. package/dist/language-intelligence/normalizers/csharp-normalizer.js +86 -0
  178. package/dist/language-intelligence/normalizers/csharp-normalizer.js.map +1 -0
  179. package/dist/language-intelligence/normalizers/index.d.ts +25 -0
  180. package/dist/language-intelligence/normalizers/index.d.ts.map +1 -0
  181. package/dist/language-intelligence/normalizers/index.js +60 -0
  182. package/dist/language-intelligence/normalizers/index.js.map +1 -0
  183. package/dist/language-intelligence/normalizers/java-normalizer.d.ts +39 -0
  184. package/dist/language-intelligence/normalizers/java-normalizer.d.ts.map +1 -0
  185. package/dist/language-intelligence/normalizers/java-normalizer.js +96 -0
  186. package/dist/language-intelligence/normalizers/java-normalizer.js.map +1 -0
  187. package/dist/language-intelligence/normalizers/php-normalizer.d.ts +39 -0
  188. package/dist/language-intelligence/normalizers/php-normalizer.d.ts.map +1 -0
  189. package/dist/language-intelligence/normalizers/php-normalizer.js +86 -0
  190. package/dist/language-intelligence/normalizers/php-normalizer.js.map +1 -0
  191. package/dist/language-intelligence/normalizers/python-normalizer.d.ts +39 -0
  192. package/dist/language-intelligence/normalizers/python-normalizer.d.ts.map +1 -0
  193. package/dist/language-intelligence/normalizers/python-normalizer.js +95 -0
  194. package/dist/language-intelligence/normalizers/python-normalizer.js.map +1 -0
  195. package/dist/language-intelligence/normalizers/typescript-normalizer.d.ts +39 -0
  196. package/dist/language-intelligence/normalizers/typescript-normalizer.d.ts.map +1 -0
  197. package/dist/language-intelligence/normalizers/typescript-normalizer.js +84 -0
  198. package/dist/language-intelligence/normalizers/typescript-normalizer.js.map +1 -0
  199. package/dist/language-intelligence/types.d.ts +270 -0
  200. package/dist/language-intelligence/types.d.ts.map +1 -0
  201. package/dist/language-intelligence/types.js +9 -0
  202. package/dist/language-intelligence/types.js.map +1 -0
  203. package/dist/module-coupling/coupling-analyzer.d.ts +73 -0
  204. package/dist/module-coupling/coupling-analyzer.d.ts.map +1 -0
  205. package/dist/module-coupling/coupling-analyzer.js +668 -0
  206. package/dist/module-coupling/coupling-analyzer.js.map +1 -0
  207. package/dist/module-coupling/index.d.ts +9 -0
  208. package/dist/module-coupling/index.d.ts.map +1 -0
  209. package/dist/module-coupling/index.js +9 -0
  210. package/dist/module-coupling/index.js.map +1 -0
  211. package/dist/module-coupling/types.d.ts +273 -0
  212. package/dist/module-coupling/types.d.ts.map +1 -0
  213. package/dist/module-coupling/types.js +8 -0
  214. package/dist/module-coupling/types.js.map +1 -0
  215. package/dist/patterns/adapters/index.d.ts +11 -0
  216. package/dist/patterns/adapters/index.d.ts.map +1 -0
  217. package/dist/patterns/adapters/index.js +11 -0
  218. package/dist/patterns/adapters/index.js.map +1 -0
  219. package/dist/patterns/adapters/pattern-store-adapter.d.ts +59 -0
  220. package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -0
  221. package/dist/patterns/adapters/pattern-store-adapter.js +468 -0
  222. package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -0
  223. package/dist/patterns/adapters/service-factory.d.ts +40 -0
  224. package/dist/patterns/adapters/service-factory.d.ts.map +1 -0
  225. package/dist/patterns/adapters/service-factory.js +144 -0
  226. package/dist/patterns/adapters/service-factory.js.map +1 -0
  227. package/dist/patterns/errors.d.ts +32 -0
  228. package/dist/patterns/errors.d.ts.map +1 -0
  229. package/dist/patterns/errors.js +45 -0
  230. package/dist/patterns/errors.js.map +1 -0
  231. package/dist/patterns/impl/cached-repository.d.ts +79 -0
  232. package/dist/patterns/impl/cached-repository.d.ts.map +1 -0
  233. package/dist/patterns/impl/cached-repository.js +296 -0
  234. package/dist/patterns/impl/cached-repository.js.map +1 -0
  235. package/dist/patterns/impl/file-repository.d.ts +75 -0
  236. package/dist/patterns/impl/file-repository.d.ts.map +1 -0
  237. package/dist/patterns/impl/file-repository.js +507 -0
  238. package/dist/patterns/impl/file-repository.js.map +1 -0
  239. package/dist/patterns/impl/index.d.ts +16 -0
  240. package/dist/patterns/impl/index.d.ts.map +1 -0
  241. package/dist/patterns/impl/index.js +21 -0
  242. package/dist/patterns/impl/index.js.map +1 -0
  243. package/dist/patterns/impl/memory-repository.d.ts +56 -0
  244. package/dist/patterns/impl/memory-repository.d.ts.map +1 -0
  245. package/dist/patterns/impl/memory-repository.js +323 -0
  246. package/dist/patterns/impl/memory-repository.js.map +1 -0
  247. package/dist/patterns/impl/pattern-service.d.ts +52 -0
  248. package/dist/patterns/impl/pattern-service.d.ts.map +1 -0
  249. package/dist/patterns/impl/pattern-service.js +382 -0
  250. package/dist/patterns/impl/pattern-service.js.map +1 -0
  251. package/dist/patterns/impl/repository-factory.d.ts +44 -0
  252. package/dist/patterns/impl/repository-factory.d.ts.map +1 -0
  253. package/dist/patterns/impl/repository-factory.js +140 -0
  254. package/dist/patterns/impl/repository-factory.js.map +1 -0
  255. package/dist/patterns/impl/unified-file-repository.d.ts +111 -0
  256. package/dist/patterns/impl/unified-file-repository.d.ts.map +1 -0
  257. package/dist/patterns/impl/unified-file-repository.js +677 -0
  258. package/dist/patterns/impl/unified-file-repository.js.map +1 -0
  259. package/dist/patterns/index.d.ts +23 -0
  260. package/dist/patterns/index.d.ts.map +1 -0
  261. package/dist/patterns/index.js +41 -0
  262. package/dist/patterns/index.js.map +1 -0
  263. package/dist/patterns/repository.d.ts +241 -0
  264. package/dist/patterns/repository.d.ts.map +1 -0
  265. package/dist/patterns/repository.js +23 -0
  266. package/dist/patterns/repository.js.map +1 -0
  267. package/dist/patterns/service.d.ts +245 -0
  268. package/dist/patterns/service.d.ts.map +1 -0
  269. package/dist/patterns/service.js +25 -0
  270. package/dist/patterns/service.js.map +1 -0
  271. package/dist/patterns/types.d.ts +227 -0
  272. package/dist/patterns/types.d.ts.map +1 -0
  273. package/dist/patterns/types.js +117 -0
  274. package/dist/patterns/types.js.map +1 -0
  275. package/dist/scanner/file-processor-worker.d.ts +66 -0
  276. package/dist/scanner/file-processor-worker.d.ts.map +1 -0
  277. package/dist/scanner/file-processor-worker.js +189 -0
  278. package/dist/scanner/file-processor-worker.js.map +1 -0
  279. package/dist/scanner/index.d.ts +2 -0
  280. package/dist/scanner/index.d.ts.map +1 -1
  281. package/dist/scanner/index.js +2 -0
  282. package/dist/scanner/index.js.map +1 -1
  283. package/dist/scanner/threaded-worker-pool.d.ts +182 -0
  284. package/dist/scanner/threaded-worker-pool.d.ts.map +1 -0
  285. package/dist/scanner/threaded-worker-pool.js +243 -0
  286. package/dist/scanner/threaded-worker-pool.js.map +1 -0
  287. package/dist/store/pattern-store.d.ts +6 -0
  288. package/dist/store/pattern-store.d.ts.map +1 -1
  289. package/dist/store/pattern-store.js +6 -0
  290. package/dist/store/pattern-store.js.map +1 -1
  291. package/dist/store/types.d.ts +6 -3
  292. package/dist/store/types.d.ts.map +1 -1
  293. package/dist/store/types.js.map +1 -1
  294. package/dist/test-topology/extractors/base-test-extractor.d.ts +89 -0
  295. package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -0
  296. package/dist/test-topology/extractors/base-test-extractor.js +187 -0
  297. package/dist/test-topology/extractors/base-test-extractor.js.map +1 -0
  298. package/dist/test-topology/extractors/csharp-test-extractor.d.ts +23 -0
  299. package/dist/test-topology/extractors/csharp-test-extractor.d.ts.map +1 -0
  300. package/dist/test-topology/extractors/csharp-test-extractor.js +367 -0
  301. package/dist/test-topology/extractors/csharp-test-extractor.js.map +1 -0
  302. package/dist/test-topology/extractors/index.d.ts +12 -0
  303. package/dist/test-topology/extractors/index.d.ts.map +1 -0
  304. package/dist/test-topology/extractors/index.js +12 -0
  305. package/dist/test-topology/extractors/index.js.map +1 -0
  306. package/dist/test-topology/extractors/java-test-extractor.d.ts +20 -0
  307. package/dist/test-topology/extractors/java-test-extractor.d.ts.map +1 -0
  308. package/dist/test-topology/extractors/java-test-extractor.js +275 -0
  309. package/dist/test-topology/extractors/java-test-extractor.js.map +1 -0
  310. package/dist/test-topology/extractors/php-test-extractor.d.ts +24 -0
  311. package/dist/test-topology/extractors/php-test-extractor.d.ts.map +1 -0
  312. package/dist/test-topology/extractors/php-test-extractor.js +409 -0
  313. package/dist/test-topology/extractors/php-test-extractor.js.map +1 -0
  314. package/dist/test-topology/extractors/python-test-extractor.d.ts +23 -0
  315. package/dist/test-topology/extractors/python-test-extractor.d.ts.map +1 -0
  316. package/dist/test-topology/extractors/python-test-extractor.js +342 -0
  317. package/dist/test-topology/extractors/python-test-extractor.js.map +1 -0
  318. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts +51 -0
  319. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts.map +1 -0
  320. package/dist/test-topology/extractors/regex/csharp-test-regex.js +383 -0
  321. package/dist/test-topology/extractors/regex/csharp-test-regex.js.map +1 -0
  322. package/dist/test-topology/extractors/regex/index.d.ts +18 -0
  323. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -0
  324. package/dist/test-topology/extractors/regex/index.js +43 -0
  325. package/dist/test-topology/extractors/regex/index.js.map +1 -0
  326. package/dist/test-topology/extractors/regex/java-test-regex.d.ts +50 -0
  327. package/dist/test-topology/extractors/regex/java-test-regex.d.ts.map +1 -0
  328. package/dist/test-topology/extractors/regex/java-test-regex.js +370 -0
  329. package/dist/test-topology/extractors/regex/java-test-regex.js.map +1 -0
  330. package/dist/test-topology/extractors/regex/php-test-regex.d.ts +56 -0
  331. package/dist/test-topology/extractors/regex/php-test-regex.d.ts.map +1 -0
  332. package/dist/test-topology/extractors/regex/php-test-regex.js +503 -0
  333. package/dist/test-topology/extractors/regex/php-test-regex.js.map +1 -0
  334. package/dist/test-topology/extractors/regex/python-test-regex.d.ts +57 -0
  335. package/dist/test-topology/extractors/regex/python-test-regex.d.ts.map +1 -0
  336. package/dist/test-topology/extractors/regex/python-test-regex.js +381 -0
  337. package/dist/test-topology/extractors/regex/python-test-regex.js.map +1 -0
  338. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts +60 -0
  339. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts.map +1 -0
  340. package/dist/test-topology/extractors/regex/typescript-test-regex.js +368 -0
  341. package/dist/test-topology/extractors/regex/typescript-test-regex.js.map +1 -0
  342. package/dist/test-topology/extractors/typescript-test-extractor.d.ts +24 -0
  343. package/dist/test-topology/extractors/typescript-test-extractor.d.ts.map +1 -0
  344. package/dist/test-topology/extractors/typescript-test-extractor.js +266 -0
  345. package/dist/test-topology/extractors/typescript-test-extractor.js.map +1 -0
  346. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts +98 -0
  347. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -0
  348. package/dist/test-topology/hybrid-test-topology-analyzer.js +555 -0
  349. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -0
  350. package/dist/test-topology/index.d.ts +16 -0
  351. package/dist/test-topology/index.d.ts.map +1 -0
  352. package/dist/test-topology/index.js +19 -0
  353. package/dist/test-topology/index.js.map +1 -0
  354. package/dist/test-topology/test-topology-analyzer.d.ts +85 -0
  355. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -0
  356. package/dist/test-topology/test-topology-analyzer.js +538 -0
  357. package/dist/test-topology/test-topology-analyzer.js.map +1 -0
  358. package/dist/test-topology/types.d.ts +300 -0
  359. package/dist/test-topology/types.d.ts.map +1 -0
  360. package/dist/test-topology/types.js +7 -0
  361. package/dist/test-topology/types.js.map +1 -0
  362. package/dist/unified-provider/compat/index.d.ts +11 -0
  363. package/dist/unified-provider/compat/index.d.ts.map +1 -0
  364. package/dist/unified-provider/compat/index.js +13 -0
  365. package/dist/unified-provider/compat/index.js.map +1 -0
  366. package/dist/unified-provider/compat/legacy-extractors.d.ts +63 -0
  367. package/dist/unified-provider/compat/legacy-extractors.d.ts.map +1 -0
  368. package/dist/unified-provider/compat/legacy-extractors.js +80 -0
  369. package/dist/unified-provider/compat/legacy-extractors.js.map +1 -0
  370. package/dist/unified-provider/compat/legacy-scanner.d.ts +28 -0
  371. package/dist/unified-provider/compat/legacy-scanner.d.ts.map +1 -0
  372. package/dist/unified-provider/compat/legacy-scanner.js +31 -0
  373. package/dist/unified-provider/compat/legacy-scanner.js.map +1 -0
  374. package/dist/unified-provider/index.d.ts +28 -0
  375. package/dist/unified-provider/index.d.ts.map +1 -0
  376. package/dist/unified-provider/index.js +47 -0
  377. package/dist/unified-provider/index.js.map +1 -0
  378. package/dist/unified-provider/integration/index.d.ts +9 -0
  379. package/dist/unified-provider/integration/index.d.ts.map +1 -0
  380. package/dist/unified-provider/integration/index.js +11 -0
  381. package/dist/unified-provider/integration/index.js.map +1 -0
  382. package/dist/unified-provider/integration/unified-data-access-adapter.d.ts +75 -0
  383. package/dist/unified-provider/integration/unified-data-access-adapter.d.ts.map +1 -0
  384. package/dist/unified-provider/integration/unified-data-access-adapter.js +210 -0
  385. package/dist/unified-provider/integration/unified-data-access-adapter.js.map +1 -0
  386. package/dist/unified-provider/integration/unified-scanner.d.ts +90 -0
  387. package/dist/unified-provider/integration/unified-scanner.d.ts.map +1 -0
  388. package/dist/unified-provider/integration/unified-scanner.js +369 -0
  389. package/dist/unified-provider/integration/unified-scanner.js.map +1 -0
  390. package/dist/unified-provider/matching/base-matcher.d.ts +80 -0
  391. package/dist/unified-provider/matching/base-matcher.d.ts.map +1 -0
  392. package/dist/unified-provider/matching/base-matcher.js +196 -0
  393. package/dist/unified-provider/matching/base-matcher.js.map +1 -0
  394. package/dist/unified-provider/matching/django-matcher.d.ts +32 -0
  395. package/dist/unified-provider/matching/django-matcher.d.ts.map +1 -0
  396. package/dist/unified-provider/matching/django-matcher.js +107 -0
  397. package/dist/unified-provider/matching/django-matcher.js.map +1 -0
  398. package/dist/unified-provider/matching/drizzle-matcher.d.ts +25 -0
  399. package/dist/unified-provider/matching/drizzle-matcher.d.ts.map +1 -0
  400. package/dist/unified-provider/matching/drizzle-matcher.js +123 -0
  401. package/dist/unified-provider/matching/drizzle-matcher.js.map +1 -0
  402. package/dist/unified-provider/matching/efcore-matcher.d.ts +27 -0
  403. package/dist/unified-provider/matching/efcore-matcher.d.ts.map +1 -0
  404. package/dist/unified-provider/matching/efcore-matcher.js +88 -0
  405. package/dist/unified-provider/matching/efcore-matcher.js.map +1 -0
  406. package/dist/unified-provider/matching/eloquent-matcher.d.ts +32 -0
  407. package/dist/unified-provider/matching/eloquent-matcher.d.ts.map +1 -0
  408. package/dist/unified-provider/matching/eloquent-matcher.js +162 -0
  409. package/dist/unified-provider/matching/eloquent-matcher.js.map +1 -0
  410. package/dist/unified-provider/matching/index.d.ts +19 -0
  411. package/dist/unified-provider/matching/index.d.ts.map +1 -0
  412. package/dist/unified-provider/matching/index.js +24 -0
  413. package/dist/unified-provider/matching/index.js.map +1 -0
  414. package/dist/unified-provider/matching/knex-matcher.d.ts +26 -0
  415. package/dist/unified-provider/matching/knex-matcher.d.ts.map +1 -0
  416. package/dist/unified-provider/matching/knex-matcher.js +109 -0
  417. package/dist/unified-provider/matching/knex-matcher.js.map +1 -0
  418. package/dist/unified-provider/matching/matcher-registry.d.ts +55 -0
  419. package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -0
  420. package/dist/unified-provider/matching/matcher-registry.js +130 -0
  421. package/dist/unified-provider/matching/matcher-registry.js.map +1 -0
  422. package/dist/unified-provider/matching/mongoose-matcher.d.ts +30 -0
  423. package/dist/unified-provider/matching/mongoose-matcher.d.ts.map +1 -0
  424. package/dist/unified-provider/matching/mongoose-matcher.js +132 -0
  425. package/dist/unified-provider/matching/mongoose-matcher.js.map +1 -0
  426. package/dist/unified-provider/matching/prisma-matcher.d.ts +31 -0
  427. package/dist/unified-provider/matching/prisma-matcher.d.ts.map +1 -0
  428. package/dist/unified-provider/matching/prisma-matcher.js +123 -0
  429. package/dist/unified-provider/matching/prisma-matcher.js.map +1 -0
  430. package/dist/unified-provider/matching/raw-sql-matcher.d.ts +31 -0
  431. package/dist/unified-provider/matching/raw-sql-matcher.d.ts.map +1 -0
  432. package/dist/unified-provider/matching/raw-sql-matcher.js +173 -0
  433. package/dist/unified-provider/matching/raw-sql-matcher.js.map +1 -0
  434. package/dist/unified-provider/matching/sequelize-matcher.d.ts +28 -0
  435. package/dist/unified-provider/matching/sequelize-matcher.d.ts.map +1 -0
  436. package/dist/unified-provider/matching/sequelize-matcher.js +132 -0
  437. package/dist/unified-provider/matching/sequelize-matcher.js.map +1 -0
  438. package/dist/unified-provider/matching/spring-data-matcher.d.ts +32 -0
  439. package/dist/unified-provider/matching/spring-data-matcher.d.ts.map +1 -0
  440. package/dist/unified-provider/matching/spring-data-matcher.js +112 -0
  441. package/dist/unified-provider/matching/spring-data-matcher.js.map +1 -0
  442. package/dist/unified-provider/matching/sqlalchemy-matcher.d.ts +32 -0
  443. package/dist/unified-provider/matching/sqlalchemy-matcher.d.ts.map +1 -0
  444. package/dist/unified-provider/matching/sqlalchemy-matcher.js +201 -0
  445. package/dist/unified-provider/matching/sqlalchemy-matcher.js.map +1 -0
  446. package/dist/unified-provider/matching/supabase-matcher.d.ts +27 -0
  447. package/dist/unified-provider/matching/supabase-matcher.d.ts.map +1 -0
  448. package/dist/unified-provider/matching/supabase-matcher.js +122 -0
  449. package/dist/unified-provider/matching/supabase-matcher.js.map +1 -0
  450. package/dist/unified-provider/matching/typeorm-matcher.d.ts +32 -0
  451. package/dist/unified-provider/matching/typeorm-matcher.d.ts.map +1 -0
  452. package/dist/unified-provider/matching/typeorm-matcher.js +169 -0
  453. package/dist/unified-provider/matching/typeorm-matcher.js.map +1 -0
  454. package/dist/unified-provider/migration/deprecated-extractors.d.ts +104 -0
  455. package/dist/unified-provider/migration/deprecated-extractors.d.ts.map +1 -0
  456. package/dist/unified-provider/migration/deprecated-extractors.js +129 -0
  457. package/dist/unified-provider/migration/deprecated-extractors.js.map +1 -0
  458. package/dist/unified-provider/migration/deprecated-scanner.d.ts +40 -0
  459. package/dist/unified-provider/migration/deprecated-scanner.d.ts.map +1 -0
  460. package/dist/unified-provider/migration/deprecated-scanner.js +49 -0
  461. package/dist/unified-provider/migration/deprecated-scanner.js.map +1 -0
  462. package/dist/unified-provider/migration/index.d.ts +41 -0
  463. package/dist/unified-provider/migration/index.d.ts.map +1 -0
  464. package/dist/unified-provider/migration/index.js +43 -0
  465. package/dist/unified-provider/migration/index.js.map +1 -0
  466. package/dist/unified-provider/normalization/base-normalizer.d.ts +188 -0
  467. package/dist/unified-provider/normalization/base-normalizer.d.ts.map +1 -0
  468. package/dist/unified-provider/normalization/base-normalizer.js +339 -0
  469. package/dist/unified-provider/normalization/base-normalizer.js.map +1 -0
  470. package/dist/unified-provider/normalization/csharp-normalizer.d.ts +58 -0
  471. package/dist/unified-provider/normalization/csharp-normalizer.d.ts.map +1 -0
  472. package/dist/unified-provider/normalization/csharp-normalizer.js +467 -0
  473. package/dist/unified-provider/normalization/csharp-normalizer.js.map +1 -0
  474. package/dist/unified-provider/normalization/index.d.ts +23 -0
  475. package/dist/unified-provider/normalization/index.d.ts.map +1 -0
  476. package/dist/unified-provider/normalization/index.js +62 -0
  477. package/dist/unified-provider/normalization/index.js.map +1 -0
  478. package/dist/unified-provider/normalization/java-normalizer.d.ts +54 -0
  479. package/dist/unified-provider/normalization/java-normalizer.d.ts.map +1 -0
  480. package/dist/unified-provider/normalization/java-normalizer.js +453 -0
  481. package/dist/unified-provider/normalization/java-normalizer.js.map +1 -0
  482. package/dist/unified-provider/normalization/php-normalizer.d.ts +54 -0
  483. package/dist/unified-provider/normalization/php-normalizer.d.ts.map +1 -0
  484. package/dist/unified-provider/normalization/php-normalizer.js +489 -0
  485. package/dist/unified-provider/normalization/php-normalizer.js.map +1 -0
  486. package/dist/unified-provider/normalization/python-normalizer.d.ts +61 -0
  487. package/dist/unified-provider/normalization/python-normalizer.d.ts.map +1 -0
  488. package/dist/unified-provider/normalization/python-normalizer.js +548 -0
  489. package/dist/unified-provider/normalization/python-normalizer.js.map +1 -0
  490. package/dist/unified-provider/normalization/typescript-normalizer.d.ts +60 -0
  491. package/dist/unified-provider/normalization/typescript-normalizer.d.ts.map +1 -0
  492. package/dist/unified-provider/normalization/typescript-normalizer.js +608 -0
  493. package/dist/unified-provider/normalization/typescript-normalizer.js.map +1 -0
  494. package/dist/unified-provider/parsing/index.d.ts +5 -0
  495. package/dist/unified-provider/parsing/index.d.ts.map +1 -0
  496. package/dist/unified-provider/parsing/index.js +5 -0
  497. package/dist/unified-provider/parsing/index.js.map +1 -0
  498. package/dist/unified-provider/parsing/parser-registry.d.ts +70 -0
  499. package/dist/unified-provider/parsing/parser-registry.d.ts.map +1 -0
  500. package/dist/unified-provider/parsing/parser-registry.js +260 -0
  501. package/dist/unified-provider/parsing/parser-registry.js.map +1 -0
  502. package/dist/unified-provider/provider/index.d.ts +5 -0
  503. package/dist/unified-provider/provider/index.d.ts.map +1 -0
  504. package/dist/unified-provider/provider/index.js +5 -0
  505. package/dist/unified-provider/provider/index.js.map +1 -0
  506. package/dist/unified-provider/provider/unified-language-provider.d.ts +56 -0
  507. package/dist/unified-provider/provider/unified-language-provider.d.ts.map +1 -0
  508. package/dist/unified-provider/provider/unified-language-provider.js +212 -0
  509. package/dist/unified-provider/provider/unified-language-provider.js.map +1 -0
  510. package/dist/unified-provider/types.d.ts +389 -0
  511. package/dist/unified-provider/types.d.ts.map +1 -0
  512. package/dist/unified-provider/types.js +9 -0
  513. package/dist/unified-provider/types.js.map +1 -0
  514. package/dist/wrappers/clustering/clusterer.d.ts +43 -0
  515. package/dist/wrappers/clustering/clusterer.d.ts.map +1 -0
  516. package/dist/wrappers/clustering/clusterer.js +374 -0
  517. package/dist/wrappers/clustering/clusterer.js.map +1 -0
  518. package/dist/wrappers/clustering/exclusions.d.ts +47 -0
  519. package/dist/wrappers/clustering/exclusions.d.ts.map +1 -0
  520. package/dist/wrappers/clustering/exclusions.js +318 -0
  521. package/dist/wrappers/clustering/exclusions.js.map +1 -0
  522. package/dist/wrappers/clustering/index.d.ts +6 -0
  523. package/dist/wrappers/clustering/index.d.ts.map +1 -0
  524. package/dist/wrappers/clustering/index.js +6 -0
  525. package/dist/wrappers/clustering/index.js.map +1 -0
  526. package/dist/wrappers/detection/detector.d.ts +69 -0
  527. package/dist/wrappers/detection/detector.d.ts.map +1 -0
  528. package/dist/wrappers/detection/detector.js +279 -0
  529. package/dist/wrappers/detection/detector.js.map +1 -0
  530. package/dist/wrappers/detection/index.d.ts +5 -0
  531. package/dist/wrappers/detection/index.d.ts.map +1 -0
  532. package/dist/wrappers/detection/index.js +5 -0
  533. package/dist/wrappers/detection/index.js.map +1 -0
  534. package/dist/wrappers/export/index.d.ts +5 -0
  535. package/dist/wrappers/export/index.d.ts.map +1 -0
  536. package/dist/wrappers/export/index.js +5 -0
  537. package/dist/wrappers/export/index.js.map +1 -0
  538. package/dist/wrappers/export/json.d.ts +127 -0
  539. package/dist/wrappers/export/json.d.ts.map +1 -0
  540. package/dist/wrappers/export/json.js +160 -0
  541. package/dist/wrappers/export/json.js.map +1 -0
  542. package/dist/wrappers/index.d.ts +56 -0
  543. package/dist/wrappers/index.d.ts.map +1 -0
  544. package/dist/wrappers/index.js +159 -0
  545. package/dist/wrappers/index.js.map +1 -0
  546. package/dist/wrappers/integration/adapter.d.ts +52 -0
  547. package/dist/wrappers/integration/adapter.d.ts.map +1 -0
  548. package/dist/wrappers/integration/adapter.js +209 -0
  549. package/dist/wrappers/integration/adapter.js.map +1 -0
  550. package/dist/wrappers/integration/index.d.ts +9 -0
  551. package/dist/wrappers/integration/index.d.ts.map +1 -0
  552. package/dist/wrappers/integration/index.js +12 -0
  553. package/dist/wrappers/integration/index.js.map +1 -0
  554. package/dist/wrappers/integration/pattern-adapter.d.ts +52 -0
  555. package/dist/wrappers/integration/pattern-adapter.d.ts.map +1 -0
  556. package/dist/wrappers/integration/pattern-adapter.js +192 -0
  557. package/dist/wrappers/integration/pattern-adapter.js.map +1 -0
  558. package/dist/wrappers/integration/scanner.d.ts +85 -0
  559. package/dist/wrappers/integration/scanner.d.ts.map +1 -0
  560. package/dist/wrappers/integration/scanner.js +367 -0
  561. package/dist/wrappers/integration/scanner.js.map +1 -0
  562. package/dist/wrappers/primitives/discovery.d.ts +57 -0
  563. package/dist/wrappers/primitives/discovery.d.ts.map +1 -0
  564. package/dist/wrappers/primitives/discovery.js +389 -0
  565. package/dist/wrappers/primitives/discovery.js.map +1 -0
  566. package/dist/wrappers/primitives/index.d.ts +6 -0
  567. package/dist/wrappers/primitives/index.d.ts.map +1 -0
  568. package/dist/wrappers/primitives/index.js +6 -0
  569. package/dist/wrappers/primitives/index.js.map +1 -0
  570. package/dist/wrappers/primitives/registry.d.ts +63 -0
  571. package/dist/wrappers/primitives/registry.d.ts.map +1 -0
  572. package/dist/wrappers/primitives/registry.js +447 -0
  573. package/dist/wrappers/primitives/registry.js.map +1 -0
  574. package/dist/wrappers/types.d.ts +137 -0
  575. package/dist/wrappers/types.d.ts.map +1 -0
  576. package/dist/wrappers/types.js +7 -0
  577. package/dist/wrappers/types.js.map +1 -0
  578. package/package.json +23 -18
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Framework Wrapper Detection
3
+ *
4
+ * Automatically detect custom abstractions built on top of framework primitives.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { analyzeWrappers } from '@drift/core/wrappers';
9
+ *
10
+ * const result = await analyzeWrappers({
11
+ * projectPath: '/path/to/project',
12
+ * language: 'typescript',
13
+ * });
14
+ *
15
+ * console.log(`Found ${result.clusters.length} wrapper patterns`);
16
+ * ```
17
+ */
18
+ export type { PrimitiveSourceType, PrimitiveSource, DetectedPrimitive, SupportedLanguage, WrapperFunction, WrapperCategory, WrapperCluster, FactoryType, FactoryFunction, DecoratorWrapper, AsyncType, ErrorHandlingPattern, AsyncWrapper, WrapperAnalysisResult, FrameworkInfo, WrapperSummary, PrimitiveRegistry, FrameworkDetectionResult, } from './types.js';
19
+ export { REACT_PRIMITIVES, REACT_ECOSYSTEM_PRIMITIVES, VUE_PRIMITIVES, SVELTE_PRIMITIVES, ANGULAR_PRIMITIVES, EXPRESS_PRIMITIVES, JS_TESTING_PRIMITIVES, FASTAPI_PRIMITIVES, DJANGO_PRIMITIVES, FLASK_PRIMITIVES, SQLALCHEMY_PRIMITIVES, CELERY_PRIMITIVES, PYDANTIC_PRIMITIVES, PYTHON_TESTING_PRIMITIVES, SPRING_PRIMITIVES, JAVA_TESTING_PRIMITIVES, ASPNET_PRIMITIVES, EFCORE_PRIMITIVES, CSHARP_TESTING_PRIMITIVES, LARAVEL_PRIMITIVES, SYMFONY_PRIMITIVES, PHP_TESTING_PRIMITIVES, TYPESCRIPT_PRIMITIVES, PYTHON_PRIMITIVES, JAVA_PRIMITIVES, CSHARP_PRIMITIVES, PHP_PRIMITIVES, ALL_PRIMITIVES, getPrimitiveNames, getFrameworkNames, findPrimitiveFramework, looksLikePrimitive, getPrimitiveCount, getPrimitivesByCategory, } from './primitives/registry.js';
20
+ export { discoverPrimitives, detectFrameworks, filterByConfidence, groupByFramework, groupByCategory, type ImportInfo, type DecoratorUsage, type FunctionUsage, type DiscoveryContext, } from './primitives/discovery.js';
21
+ export { detectWrappers, getWrappersByDepth, getWrappersForPrimitive, getWrapperCallChain, calculateWrapperStats, type FunctionInfo, type ParameterInfo, type CallInfo, type DetectionContext, type DetectionOptions, } from './detection/detector.js';
22
+ export { clusterWrappers, inferCategory, calculateConfidence, detectNamingPatterns, getClustersByCategory, getMostCommonPrimitives, findRelatedClusters, type ClusteringOptions, } from './clustering/clusterer.js';
23
+ export { applyExclusions, applyClusterExclusions, getLanguageExclusions, createExclusionRule, excludeByName, excludeByFile, EXCLUSION_RULES, type ExclusionRule, type ExclusionResult, } from './clustering/exclusions.js';
24
+ export { exportToJson, buildExportResult, parseJsonExport, validateExport, type WrapperExportOptions, type WrapperExportResult, type ProjectMetadata, type FrameworkExport, type PrimitiveExport, type WrapperExport, type WrapperFlags, type ClusterExport, type ClusterMetrics, type SummaryExport, } from './export/index.js';
25
+ export { mapLanguage, convertFunction, convertImport, buildDiscoveryContext, buildDetectionContext, filterExtractions, calculateExtractionStats, type AdapterOptions, type ExtractionStats, WrapperScanner, createWrapperScanner, type WrapperScannerConfig, type WrapperScanResult, clusterToPattern, wrapperToLocation, clustersToPatterns, generatePatternId, extractPatternMetadata, isWrapperPattern, extractWrapperInfo, type WrapperToPatternOptions, } from './integration/index.js';
26
+ import type { WrapperAnalysisResult } from './types.js';
27
+ import { type DiscoveryContext } from './primitives/discovery.js';
28
+ import { type DetectionContext } from './detection/detector.js';
29
+ import { type ExclusionRule } from './clustering/exclusions.js';
30
+ export interface AnalysisOptions {
31
+ /** Minimum confidence for clusters (0-1) */
32
+ minConfidence?: number | undefined;
33
+ /** Minimum cluster size */
34
+ minClusterSize?: number | undefined;
35
+ /** Maximum wrapper depth to traverse */
36
+ maxDepth?: number | undefined;
37
+ /** Include test files in analysis */
38
+ includeTestFiles?: boolean | undefined;
39
+ /** Apply exclusion rules to filter false positives */
40
+ applyExclusions?: boolean | undefined;
41
+ /** Custom exclusion rules (in addition to built-in rules) */
42
+ customExclusions?: ExclusionRule[] | undefined;
43
+ }
44
+ /**
45
+ * Perform complete wrapper analysis on a codebase
46
+ */
47
+ export declare function analyzeWrappers(discoveryContext: DiscoveryContext, detectionContext: Omit<DetectionContext, 'primitives'>, options?: AnalysisOptions): WrapperAnalysisResult;
48
+ /**
49
+ * Quick analysis - just get clusters without full details
50
+ */
51
+ export declare function quickAnalyze(discoveryContext: DiscoveryContext, detectionContext: Omit<DetectionContext, 'primitives'>): {
52
+ clusterCount: number;
53
+ wrapperCount: number;
54
+ topPatterns: string[];
55
+ };
56
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wrappers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EAEV,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EAGjB,eAAe,EACf,eAAe,EACf,cAAc,EAGd,WAAW,EACX,eAAe,EACf,gBAAgB,EAGhB,SAAS,EACT,oBAAoB,EACpB,YAAY,EAGZ,qBAAqB,EACrB,aAAa,EACb,cAAc,EAGd,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAEL,gBAAgB,EAChB,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,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ClC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,GACrD;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,CAWvE"}
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Framework Wrapper Detection
3
+ *
4
+ * Automatically detect custom abstractions built on top of framework primitives.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { analyzeWrappers } from '@drift/core/wrappers';
9
+ *
10
+ * const result = await analyzeWrappers({
11
+ * projectPath: '/path/to/project',
12
+ * language: 'typescript',
13
+ * });
14
+ *
15
+ * console.log(`Found ${result.clusters.length} wrapper patterns`);
16
+ * ```
17
+ */
18
+ // Primitive registry
19
+ export {
20
+ // Individual registries
21
+ REACT_PRIMITIVES, REACT_ECOSYSTEM_PRIMITIVES, VUE_PRIMITIVES, SVELTE_PRIMITIVES, ANGULAR_PRIMITIVES, EXPRESS_PRIMITIVES, JS_TESTING_PRIMITIVES, FASTAPI_PRIMITIVES, DJANGO_PRIMITIVES, FLASK_PRIMITIVES, SQLALCHEMY_PRIMITIVES, CELERY_PRIMITIVES, PYDANTIC_PRIMITIVES, PYTHON_TESTING_PRIMITIVES, SPRING_PRIMITIVES, JAVA_TESTING_PRIMITIVES, ASPNET_PRIMITIVES, EFCORE_PRIMITIVES, CSHARP_TESTING_PRIMITIVES, LARAVEL_PRIMITIVES, SYMFONY_PRIMITIVES, PHP_TESTING_PRIMITIVES,
22
+ // Combined registries
23
+ TYPESCRIPT_PRIMITIVES, PYTHON_PRIMITIVES, JAVA_PRIMITIVES, CSHARP_PRIMITIVES, PHP_PRIMITIVES, ALL_PRIMITIVES,
24
+ // Utility functions
25
+ getPrimitiveNames, getFrameworkNames, findPrimitiveFramework, looksLikePrimitive, getPrimitiveCount, getPrimitivesByCategory, } from './primitives/registry.js';
26
+ // Primitive discovery
27
+ export { discoverPrimitives, detectFrameworks, filterByConfidence, groupByFramework, groupByCategory, } from './primitives/discovery.js';
28
+ // Wrapper detection
29
+ export { detectWrappers, getWrappersByDepth, getWrappersForPrimitive, getWrapperCallChain, calculateWrapperStats, } from './detection/detector.js';
30
+ // Clustering
31
+ export { clusterWrappers, inferCategory, calculateConfidence, detectNamingPatterns, getClustersByCategory, getMostCommonPrimitives, findRelatedClusters, } from './clustering/clusterer.js';
32
+ // Exclusions
33
+ export { applyExclusions, applyClusterExclusions, getLanguageExclusions, createExclusionRule, excludeByName, excludeByFile, EXCLUSION_RULES, } from './clustering/exclusions.js';
34
+ // Export formats
35
+ export { exportToJson, buildExportResult, parseJsonExport, validateExport, } from './export/index.js';
36
+ // Integration with call graph
37
+ export {
38
+ // Adapter utilities
39
+ mapLanguage, convertFunction, convertImport, buildDiscoveryContext, buildDetectionContext, filterExtractions, calculateExtractionStats,
40
+ // Scanner
41
+ WrapperScanner, createWrapperScanner,
42
+ // Pattern adapter
43
+ clusterToPattern, wrapperToLocation, clustersToPatterns, generatePatternId, extractPatternMetadata, isWrapperPattern, extractWrapperInfo, } from './integration/index.js';
44
+ import { discoverPrimitives, detectFrameworks } from './primitives/discovery.js';
45
+ import { detectWrappers, calculateWrapperStats } from './detection/detector.js';
46
+ import { clusterWrappers, getMostCommonPrimitives } from './clustering/clusterer.js';
47
+ import { applyExclusions, applyClusterExclusions, getLanguageExclusions } from './clustering/exclusions.js';
48
+ /**
49
+ * Perform complete wrapper analysis on a codebase
50
+ */
51
+ export function analyzeWrappers(discoveryContext, detectionContext, options = {}) {
52
+ const { minConfidence = 0.3, minClusterSize = 2, maxDepth, includeTestFiles, applyExclusions: shouldApplyExclusions = true, customExclusions = [], } = options;
53
+ // 1. Discover primitives
54
+ const primitives = discoverPrimitives(discoveryContext);
55
+ // 2. Detect frameworks
56
+ const frameworkResults = detectFrameworks(discoveryContext);
57
+ const frameworks = frameworkResults.map((fw) => ({
58
+ name: fw.framework,
59
+ version: fw.version,
60
+ primitiveCount: primitives.filter((p) => p.framework === fw.framework).length,
61
+ language: discoveryContext.language,
62
+ }));
63
+ // 3. Detect wrappers
64
+ const fullDetectionContext = {
65
+ ...detectionContext,
66
+ primitives,
67
+ };
68
+ let wrappers = detectWrappers(fullDetectionContext, {
69
+ maxDepth,
70
+ includeTestFiles,
71
+ });
72
+ // 4. Apply exclusion rules to filter false positives
73
+ if (shouldApplyExclusions) {
74
+ const languageRules = getLanguageExclusions(discoveryContext.language);
75
+ const allRules = [...languageRules, ...customExclusions];
76
+ const exclusionResult = applyExclusions(wrappers, allRules);
77
+ wrappers = exclusionResult.included;
78
+ }
79
+ // 5. Cluster wrappers
80
+ let clusters = clusterWrappers(wrappers, primitives, {
81
+ minConfidence,
82
+ minClusterSize,
83
+ });
84
+ // 6. Apply cluster-level exclusions
85
+ if (shouldApplyExclusions) {
86
+ clusters = applyClusterExclusions(clusters, minClusterSize, minConfidence);
87
+ }
88
+ // 7. Calculate summary
89
+ const stats = calculateWrapperStats(wrappers);
90
+ const mostCommon = getMostCommonPrimitives(clusters, 1);
91
+ const wrappersByLanguage = {
92
+ typescript: 0,
93
+ python: 0,
94
+ java: 0,
95
+ csharp: 0,
96
+ php: 0,
97
+ };
98
+ wrappersByLanguage[discoveryContext.language] = wrappers.length;
99
+ const wrappersByCategory = {
100
+ 'state-management': 0,
101
+ 'data-fetching': 0,
102
+ 'side-effects': 0,
103
+ 'authentication': 0,
104
+ 'authorization': 0,
105
+ 'validation': 0,
106
+ 'dependency-injection': 0,
107
+ 'middleware': 0,
108
+ 'testing': 0,
109
+ 'logging': 0,
110
+ 'caching': 0,
111
+ 'error-handling': 0,
112
+ 'async-utilities': 0,
113
+ 'form-handling': 0,
114
+ 'routing': 0,
115
+ 'factory': 0,
116
+ 'decorator': 0,
117
+ 'utility': 0,
118
+ 'other': 0,
119
+ };
120
+ for (const cluster of clusters) {
121
+ wrappersByCategory[cluster.category] += cluster.wrappers.length;
122
+ }
123
+ const mostUsedWrapper = wrappers.reduce((max, w) => (w.calledBy.length > (max?.calledBy.length ?? 0) ? w : max), wrappers[0]);
124
+ const summary = {
125
+ totalWrappers: stats.totalWrappers,
126
+ totalClusters: clusters.length,
127
+ avgDepth: stats.avgDepth,
128
+ maxDepth: stats.maxDepth,
129
+ mostWrappedPrimitive: mostCommon[0]?.primitive ?? 'N/A',
130
+ mostUsedWrapper: mostUsedWrapper?.name ?? 'N/A',
131
+ wrappersByLanguage,
132
+ wrappersByCategory,
133
+ };
134
+ return {
135
+ frameworks,
136
+ primitives,
137
+ wrappers,
138
+ clusters,
139
+ factories: [], // TODO: Implement factory detection
140
+ decoratorWrappers: [], // TODO: Implement decorator wrapper detection
141
+ asyncWrappers: [], // TODO: Implement async wrapper detection
142
+ summary,
143
+ };
144
+ }
145
+ /**
146
+ * Quick analysis - just get clusters without full details
147
+ */
148
+ export function quickAnalyze(discoveryContext, detectionContext) {
149
+ const result = analyzeWrappers(discoveryContext, detectionContext, {
150
+ minConfidence: 0.7,
151
+ minClusterSize: 2,
152
+ });
153
+ return {
154
+ clusterCount: result.clusters.length,
155
+ wrapperCount: result.wrappers.length,
156
+ topPatterns: result.clusters.slice(0, 5).map((c) => c.name),
157
+ };
158
+ }
159
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wrappers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAmCH,qBAAqB;AACrB,OAAO;AACL,wBAAwB;AACxB,gBAAgB,EAChB,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB;AAEtB,sB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,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,EAAE;QACjE,aAAa,EAAE,GAAG;QAClB,cAAc,EAAE,CAAC;KAClB,CAAC,CAAC;IAEH,OAAO;QACL,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;QACpC,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;QACpC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KAC5D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Call Graph to Wrapper Detection Adapter
3
+ *
4
+ * Bridges the call graph infrastructure with wrapper detection.
5
+ * Converts FileExtractionResult to DiscoveryContext and DetectionContext.
6
+ */
7
+ import type { FileExtractionResult, FunctionExtraction, CallExtraction, ImportExtraction, CallGraphLanguage } from '../../call-graph/types.js';
8
+ import type { SupportedLanguage, DetectedPrimitive } from '../types.js';
9
+ import type { FunctionInfo, DetectionContext } from '../detection/detector.js';
10
+ import type { ImportInfo, DiscoveryContext } from '../primitives/discovery.js';
11
+ /**
12
+ * Map call graph language to wrapper supported language
13
+ */
14
+ export declare function mapLanguage(lang: CallGraphLanguage): SupportedLanguage | null;
15
+ /**
16
+ * Convert FunctionExtraction to FunctionInfo for wrapper detection
17
+ */
18
+ export declare function convertFunction(func: FunctionExtraction, file: string, language: SupportedLanguage, calls: CallExtraction[]): FunctionInfo;
19
+ /**
20
+ * Convert ImportExtraction to ImportInfo for primitive discovery
21
+ */
22
+ export declare function convertImport(imp: ImportExtraction): ImportInfo;
23
+ /**
24
+ * Build DiscoveryContext from FileExtractionResult(s)
25
+ */
26
+ export declare function buildDiscoveryContext(extractions: FileExtractionResult[], language: SupportedLanguage): DiscoveryContext;
27
+ /**
28
+ * Build DetectionContext from FileExtractionResult(s)
29
+ */
30
+ export declare function buildDetectionContext(extractions: FileExtractionResult[], primitives: DetectedPrimitive[], language: SupportedLanguage): DetectionContext;
31
+ export interface AdapterOptions {
32
+ /** Include test files in analysis */
33
+ includeTestFiles?: boolean | undefined;
34
+ /** Filter to specific file patterns */
35
+ filePatterns?: string[] | undefined;
36
+ }
37
+ /**
38
+ * Filter extractions based on options
39
+ */
40
+ export declare function filterExtractions(extractions: FileExtractionResult[], options?: AdapterOptions): FileExtractionResult[];
41
+ export interface ExtractionStats {
42
+ totalFiles: number;
43
+ totalFunctions: number;
44
+ totalCalls: number;
45
+ totalImports: number;
46
+ byLanguage: Record<string, number>;
47
+ }
48
+ /**
49
+ * Calculate statistics from extractions
50
+ */
51
+ export declare function calculateExtractionStats(extractions: FileExtractionResult[]): ExtractionStats;
52
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/wrappers/integration/adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EACV,YAAY,EAGZ,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EACV,UAAU,EAGV,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAMpC;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,iBAAiB,GAAG,iBAAiB,GAAG,IAAI,CAU7E;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,kBAAkB,EACxB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,cAAc,EAAE,GACtB,YAAY,CAmBd;AA+BD;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,gBAAgB,GAAG,UAAU,CAW/D;AAMD;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,oBAAoB,EAAE,EACnC,QAAQ,EAAE,iBAAiB,GAC1B,gBAAgB,CAwClB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,oBAAoB,EAAE,EACnC,UAAU,EAAE,iBAAiB,EAAE,EAC/B,QAAQ,EAAE,iBAAiB,GAC1B,gBAAgB,CAmBlB;AAMD,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,oBAAoB,EAAE,EACnC,OAAO,GAAE,cAAmB,GAC3B,oBAAoB,EAAE,CAgBxB;AA8BD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,oBAAoB,EAAE,GAClC,eAAe,CAsBjB"}
@@ -0,0 +1,209 @@
1
+ /**
2
+ * Call Graph to Wrapper Detection Adapter
3
+ *
4
+ * Bridges the call graph infrastructure with wrapper detection.
5
+ * Converts FileExtractionResult to DiscoveryContext and DetectionContext.
6
+ */
7
+ import { minimatch } from 'minimatch';
8
+ // =============================================================================
9
+ // Language Mapping
10
+ // =============================================================================
11
+ /**
12
+ * Map call graph language to wrapper supported language
13
+ */
14
+ export function mapLanguage(lang) {
15
+ const mapping = {
16
+ typescript: 'typescript',
17
+ javascript: 'typescript', // Treat JS as TS for wrapper detection
18
+ python: 'python',
19
+ java: 'java',
20
+ csharp: 'csharp',
21
+ php: 'php',
22
+ };
23
+ return mapping[lang];
24
+ }
25
+ // =============================================================================
26
+ // Function Conversion
27
+ // =============================================================================
28
+ /**
29
+ * Convert FunctionExtraction to FunctionInfo for wrapper detection
30
+ */
31
+ export function convertFunction(func, file, language, calls) {
32
+ // Filter calls that belong to this function (by line range)
33
+ const functionCalls = calls.filter((c) => c.line >= func.startLine && c.line <= func.endLine);
34
+ return {
35
+ name: func.name,
36
+ qualifiedName: func.qualifiedName,
37
+ file,
38
+ startLine: func.startLine,
39
+ endLine: func.endLine,
40
+ language,
41
+ isAsync: func.isAsync,
42
+ returnType: func.returnType,
43
+ parameters: func.parameters.map((p) => convertParameter(p)),
44
+ decorators: func.decorators,
45
+ calls: functionCalls.map(convertCall),
46
+ };
47
+ }
48
+ /**
49
+ * Convert parameter info
50
+ */
51
+ function convertParameter(param) {
52
+ return {
53
+ name: param.name,
54
+ type: param.type,
55
+ defaultValue: param.hasDefault ? 'default' : undefined,
56
+ };
57
+ }
58
+ /**
59
+ * Convert call extraction to call info
60
+ */
61
+ function convertCall(call) {
62
+ return {
63
+ calleeName: call.calleeName,
64
+ calleeQualifiedName: call.receiver
65
+ ? `${call.receiver}.${call.calleeName}`
66
+ : call.calleeName,
67
+ line: call.line,
68
+ isCallback: false, // Could be enhanced with more analysis
69
+ };
70
+ }
71
+ // =============================================================================
72
+ // Import Conversion
73
+ // =============================================================================
74
+ /**
75
+ * Convert ImportExtraction to ImportInfo for primitive discovery
76
+ */
77
+ export function convertImport(imp) {
78
+ return {
79
+ source: imp.source,
80
+ names: imp.names.map((n) => ({
81
+ imported: n.imported,
82
+ local: n.local,
83
+ isDefault: n.isDefault,
84
+ })),
85
+ line: imp.line,
86
+ isTypeOnly: imp.isTypeOnly,
87
+ };
88
+ }
89
+ // =============================================================================
90
+ // Context Builders
91
+ // =============================================================================
92
+ /**
93
+ * Build DiscoveryContext from FileExtractionResult(s)
94
+ */
95
+ export function buildDiscoveryContext(extractions, language) {
96
+ const imports = [];
97
+ const decorators = [];
98
+ const functionUsages = [];
99
+ for (const extraction of extractions) {
100
+ // Collect imports
101
+ for (const imp of extraction.imports) {
102
+ imports.push(convertImport(imp));
103
+ }
104
+ // Collect decorators from functions
105
+ for (const func of extraction.functions) {
106
+ for (const decorator of func.decorators) {
107
+ decorators.push({
108
+ name: decorator,
109
+ file: extraction.file,
110
+ line: func.startLine,
111
+ });
112
+ }
113
+ }
114
+ // Collect function usages (calls)
115
+ for (const call of extraction.calls) {
116
+ functionUsages.push({
117
+ name: call.calleeName,
118
+ file: extraction.file,
119
+ line: call.line,
120
+ isMethodCall: call.isMethodCall,
121
+ receiver: call.receiver,
122
+ });
123
+ }
124
+ }
125
+ return {
126
+ imports,
127
+ decorators,
128
+ functionUsages,
129
+ language,
130
+ };
131
+ }
132
+ /**
133
+ * Build DetectionContext from FileExtractionResult(s)
134
+ */
135
+ export function buildDetectionContext(extractions, primitives, language) {
136
+ const functions = [];
137
+ for (const extraction of extractions) {
138
+ const mappedLang = mapLanguage(extraction.language);
139
+ if (!mappedLang)
140
+ continue;
141
+ for (const func of extraction.functions) {
142
+ functions.push(convertFunction(func, extraction.file, mappedLang, extraction.calls));
143
+ }
144
+ }
145
+ return {
146
+ functions,
147
+ primitives,
148
+ language,
149
+ };
150
+ }
151
+ /**
152
+ * Filter extractions based on options
153
+ */
154
+ export function filterExtractions(extractions, options = {}) {
155
+ let filtered = extractions;
156
+ // Filter test files if requested
157
+ if (!options.includeTestFiles) {
158
+ filtered = filtered.filter((e) => !isTestFile(e.file));
159
+ }
160
+ // Filter by file patterns if specified
161
+ if (options.filePatterns && options.filePatterns.length > 0) {
162
+ filtered = filtered.filter((e) => options.filePatterns.some((pattern) => matchesPattern(e.file, pattern)));
163
+ }
164
+ return filtered;
165
+ }
166
+ /**
167
+ * Check if file is a test file
168
+ */
169
+ function isTestFile(filePath) {
170
+ const testPatterns = [
171
+ /\.test\.[jt]sx?$/,
172
+ /\.spec\.[jt]sx?$/,
173
+ /_test\.(py|go|java|cs|php)$/,
174
+ /Test\.(java|cs)$/,
175
+ /Tests?\//,
176
+ /__tests__\//,
177
+ /test_.*\.py$/,
178
+ ];
179
+ return testPatterns.some((pattern) => pattern.test(filePath));
180
+ }
181
+ /**
182
+ * Simple glob-like pattern matching using minimatch
183
+ */
184
+ function matchesPattern(filePath, pattern) {
185
+ return minimatch(filePath, pattern);
186
+ }
187
+ /**
188
+ * Calculate statistics from extractions
189
+ */
190
+ export function calculateExtractionStats(extractions) {
191
+ const byLanguage = {};
192
+ let totalFunctions = 0;
193
+ let totalCalls = 0;
194
+ let totalImports = 0;
195
+ for (const extraction of extractions) {
196
+ totalFunctions += extraction.functions.length;
197
+ totalCalls += extraction.calls.length;
198
+ totalImports += extraction.imports.length;
199
+ byLanguage[extraction.language] = (byLanguage[extraction.language] || 0) + 1;
200
+ }
201
+ return {
202
+ totalFiles: extractions.length,
203
+ totalFunctions,
204
+ totalCalls,
205
+ totalImports,
206
+ byLanguage,
207
+ };
208
+ }
209
+ //# sourceMappingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../src/wrappers/integration/adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA6BtC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAuB;IACjD,MAAM,OAAO,GAAwD;QACnE,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,YAAY,EAAE,uCAAuC;QACjE,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;QAChB,GAAG,EAAE,KAAK;KACX,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC;AAED,gFAAgF;AAChF,sBAAsB;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AAC,KAAK,CAAC,MAAM,CAAC;QACtC,YAAY,IAAI,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC;QAE1C,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO;QACL,UAAU,EAAE,WAAW,CAAC,MAAM;QAC9B,cAAc;QACd,UAAU;QACV,YAAY;QACZ,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Wrapper Detection Integration
3
+ *
4
+ * Bridges wrapper detection with the call graph infrastructure.
5
+ */
6
+ export { mapLanguage, convertFunction, convertImport, buildDiscoveryContext, buildDetectionContext, filterExtractions, calculateExtractionStats, type AdapterOptions, type ExtractionStats, } from './adapter.js';
7
+ export { WrapperScanner, createWrapperScanner, type WrapperScannerConfig, type WrapperScanResult, } from './scanner.js';
8
+ export { clusterToPattern, wrapperToLocation, clustersToPatterns, generatePatternId, extractPatternMetadata, isWrapperPattern, extractWrapperInfo, type WrapperToPatternOptions, } from './pattern-adapter.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wrappers/integration/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Wrapper Detection Integration
3
+ *
4
+ * Bridges wrapper detection with the call graph infrastructure.
5
+ */
6
+ // Adapter - type conversions between call graph and wrapper detection
7
+ export { mapLanguage, convertFunction, convertImport, buildDiscoveryContext, buildDetectionContext, filterExtractions, calculateExtractionStats, } from './adapter.js';
8
+ // Scanner - high-level scanning API
9
+ export { WrapperScanner, createWrapperScanner, } from './scanner.js';
10
+ // Pattern adapter - convert wrapper clusters to Drift patterns
11
+ export { clusterToPattern, wrapperToLocation, clustersToPatterns, generatePatternId, extractPatternMetadata, isWrapperPattern, extractWrapperInfo, } from './pattern-adapter.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/wrappers/integration/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sEAAsE;AACtE,OAAO,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,GAGzB,MAAM,cAAc,CAAC;AAEtB,oCAAoC;AACpC,OAAO,EACL,cAAc,EACd,oBAAoB,GAGrB,MAAM,cAAc,CAAC;AAEtB,+DAA+D;AAC/D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,GAEnB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Pattern System Integration
3
+ *
4
+ * Converts wrapper clusters to Drift patterns for integration with
5
+ * the existing pattern detection and management system.
6
+ */
7
+ import type { WrapperCluster, WrapperFunction } from '../types.js';
8
+ import type { Pattern, PatternLocation, Severity } from '../../patterns/types.js';
9
+ export interface WrapperToPatternOptions {
10
+ /** Minimum confidence to convert (default: 0.5) */
11
+ minConfidence?: number | undefined;
12
+ /** Default severity for wrapper patterns (default: 'info') */
13
+ defaultSeverity?: Severity | undefined;
14
+ /** Prefix for pattern IDs (default: 'wrapper-') */
15
+ idPrefix?: string | undefined;
16
+ /** Include wrapper details in pattern description */
17
+ includeDetails?: boolean | undefined;
18
+ }
19
+ /**
20
+ * Convert a wrapper cluster to a Drift pattern
21
+ */
22
+ export declare function clusterToPattern(cluster: WrapperCluster, options?: WrapperToPatternOptions): Pattern;
23
+ /**
24
+ * Convert a wrapper function to a pattern location
25
+ */
26
+ export declare function wrapperToLocation(wrapper: WrapperFunction): PatternLocation;
27
+ /**
28
+ * Convert multiple clusters to patterns
29
+ */
30
+ export declare function clustersToPatterns(clusters: WrapperCluster[], options?: WrapperToPatternOptions): Pattern[];
31
+ /**
32
+ * Generate a unique pattern ID for a wrapper cluster
33
+ */
34
+ export declare function generatePatternId(cluster: WrapperCluster): string;
35
+ /**
36
+ * Extract pattern metadata from a wrapper cluster
37
+ */
38
+ export declare function extractPatternMetadata(cluster: WrapperCluster): Record<string, unknown>;
39
+ /**
40
+ * Check if a pattern was created from a wrapper cluster
41
+ */
42
+ export declare function isWrapperPattern(pattern: Pattern): boolean;
43
+ /**
44
+ * Extract wrapper info from a pattern (if it's a wrapper pattern)
45
+ */
46
+ export declare function extractWrapperInfo(pattern: Pattern): {
47
+ primitiveSignature: string[];
48
+ wrapperCategory: string;
49
+ avgDepth: number;
50
+ maxDepth: number;
51
+ } | null;
52
+ //# sourceMappingURL=pattern-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern-adapter.d.ts","sourceRoot":"","sources":["../../../src/wrappers/integration/pattern-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAmB,MAAM,aAAa,CAAC;AACpF,OAAO,KAAK,EACV,OAAO,EAEP,eAAe,EAEf,QAAQ,EACT,MAAM,yBAAyB,CAAC;AA6DjC,MAAM,WAA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