driftdetect-core 0.7.1 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (466) hide show
  1. package/dist/boundaries/types.d.ts +1 -1
  2. package/dist/boundaries/types.d.ts.map +1 -1
  3. package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
  4. package/dist/call-graph/analysis/graph-builder.js +2 -0
  5. package/dist/call-graph/analysis/graph-builder.js.map +1 -1
  6. package/dist/call-graph/extractors/cpp-data-access-extractor.d.ts +37 -0
  7. package/dist/call-graph/extractors/cpp-data-access-extractor.d.ts.map +1 -0
  8. package/dist/call-graph/extractors/cpp-data-access-extractor.js +467 -0
  9. package/dist/call-graph/extractors/cpp-data-access-extractor.js.map +1 -0
  10. package/dist/call-graph/extractors/cpp-hybrid-extractor.d.ts +89 -0
  11. package/dist/call-graph/extractors/cpp-hybrid-extractor.d.ts.map +1 -0
  12. package/dist/call-graph/extractors/cpp-hybrid-extractor.js +541 -0
  13. package/dist/call-graph/extractors/cpp-hybrid-extractor.js.map +1 -0
  14. package/dist/call-graph/extractors/index.d.ts +8 -1
  15. package/dist/call-graph/extractors/index.d.ts.map +1 -1
  16. package/dist/call-graph/extractors/index.js +9 -1
  17. package/dist/call-graph/extractors/index.js.map +1 -1
  18. package/dist/call-graph/extractors/regex/cpp-regex.d.ts +46 -0
  19. package/dist/call-graph/extractors/regex/cpp-regex.d.ts.map +1 -0
  20. package/dist/call-graph/extractors/regex/cpp-regex.js +325 -0
  21. package/dist/call-graph/extractors/regex/cpp-regex.js.map +1 -0
  22. package/dist/call-graph/extractors/regex/index.d.ts +2 -0
  23. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -1
  24. package/dist/call-graph/extractors/regex/index.js +16 -0
  25. package/dist/call-graph/extractors/regex/index.js.map +1 -1
  26. package/dist/call-graph/extractors/regex/rust-regex.d.ts +45 -0
  27. package/dist/call-graph/extractors/regex/rust-regex.d.ts.map +1 -0
  28. package/dist/call-graph/extractors/regex/rust-regex.js +517 -0
  29. package/dist/call-graph/extractors/regex/rust-regex.js.map +1 -0
  30. package/dist/call-graph/extractors/rust-data-access-extractor.d.ts +35 -0
  31. package/dist/call-graph/extractors/rust-data-access-extractor.d.ts.map +1 -0
  32. package/dist/call-graph/extractors/rust-data-access-extractor.js +349 -0
  33. package/dist/call-graph/extractors/rust-data-access-extractor.js.map +1 -0
  34. package/dist/call-graph/extractors/rust-extractor.d.ts +125 -0
  35. package/dist/call-graph/extractors/rust-extractor.d.ts.map +1 -0
  36. package/dist/call-graph/extractors/rust-extractor.js +604 -0
  37. package/dist/call-graph/extractors/rust-extractor.js.map +1 -0
  38. package/dist/call-graph/extractors/rust-hybrid-extractor.d.ts +119 -0
  39. package/dist/call-graph/extractors/rust-hybrid-extractor.d.ts.map +1 -0
  40. package/dist/call-graph/extractors/rust-hybrid-extractor.js +548 -0
  41. package/dist/call-graph/extractors/rust-hybrid-extractor.js.map +1 -0
  42. package/dist/call-graph/index.d.ts +2 -0
  43. package/dist/call-graph/index.d.ts.map +1 -1
  44. package/dist/call-graph/index.js +4 -0
  45. package/dist/call-graph/index.js.map +1 -1
  46. package/dist/call-graph/streaming-builder.d.ts +60 -0
  47. package/dist/call-graph/streaming-builder.d.ts.map +1 -0
  48. package/dist/call-graph/streaming-builder.js +204 -0
  49. package/dist/call-graph/streaming-builder.js.map +1 -0
  50. package/dist/call-graph/types.d.ts +1 -1
  51. package/dist/call-graph/types.d.ts.map +1 -1
  52. package/dist/call-graph/unified-provider.d.ts +72 -0
  53. package/dist/call-graph/unified-provider.d.ts.map +1 -0
  54. package/dist/call-graph/unified-provider.js +502 -0
  55. package/dist/call-graph/unified-provider.js.map +1 -0
  56. package/dist/constants/extractors/regex/rust-regex.d.ts +43 -0
  57. package/dist/constants/extractors/regex/rust-regex.d.ts.map +1 -0
  58. package/dist/constants/extractors/regex/rust-regex.js +370 -0
  59. package/dist/constants/extractors/regex/rust-regex.js.map +1 -0
  60. package/dist/constants/types.d.ts +1 -1
  61. package/dist/constants/types.d.ts.map +1 -1
  62. package/dist/constants/types.js.map +1 -1
  63. package/dist/constraints/store/constraint-store.d.ts.map +1 -1
  64. package/dist/constraints/store/constraint-store.js +2 -0
  65. package/dist/constraints/store/constraint-store.js.map +1 -1
  66. package/dist/constraints/types.d.ts +1 -1
  67. package/dist/constraints/types.d.ts.map +1 -1
  68. package/dist/constraints/types.js +2 -0
  69. package/dist/constraints/types.js.map +1 -1
  70. package/dist/context/context-generator.d.ts +38 -0
  71. package/dist/context/context-generator.d.ts.map +1 -0
  72. package/dist/context/context-generator.js +392 -0
  73. package/dist/context/context-generator.js.map +1 -0
  74. package/dist/context/index.d.ts +13 -0
  75. package/dist/context/index.d.ts.map +1 -0
  76. package/dist/context/index.js +14 -0
  77. package/dist/context/index.js.map +1 -0
  78. package/dist/context/package-detector.d.ts +53 -0
  79. package/dist/context/package-detector.d.ts.map +1 -0
  80. package/dist/context/package-detector.js +672 -0
  81. package/dist/context/package-detector.js.map +1 -0
  82. package/dist/context/types.d.ts +258 -0
  83. package/dist/context/types.d.ts.map +1 -0
  84. package/dist/context/types.js +10 -0
  85. package/dist/context/types.js.map +1 -0
  86. package/dist/cpp/cpp-analyzer.d.ts +179 -0
  87. package/dist/cpp/cpp-analyzer.d.ts.map +1 -0
  88. package/dist/cpp/cpp-analyzer.js +532 -0
  89. package/dist/cpp/cpp-analyzer.js.map +1 -0
  90. package/dist/cpp/index.d.ts +9 -0
  91. package/dist/cpp/index.d.ts.map +1 -0
  92. package/dist/cpp/index.js +9 -0
  93. package/dist/cpp/index.js.map +1 -0
  94. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts.map +1 -1
  95. package/dist/decisions/analyzer/decision-mining-analyzer.js +4 -0
  96. package/dist/decisions/analyzer/decision-mining-analyzer.js.map +1 -1
  97. package/dist/decisions/types.d.ts +1 -1
  98. package/dist/decisions/types.d.ts.map +1 -1
  99. package/dist/environment/extractors/cpp-env-extractor.d.ts +58 -0
  100. package/dist/environment/extractors/cpp-env-extractor.d.ts.map +1 -0
  101. package/dist/environment/extractors/cpp-env-extractor.js +298 -0
  102. package/dist/environment/extractors/cpp-env-extractor.js.map +1 -0
  103. package/dist/environment/extractors/index.d.ts +2 -0
  104. package/dist/environment/extractors/index.d.ts.map +1 -1
  105. package/dist/environment/extractors/index.js +2 -0
  106. package/dist/environment/extractors/index.js.map +1 -1
  107. package/dist/environment/extractors/rust-env-extractor.d.ts +58 -0
  108. package/dist/environment/extractors/rust-env-extractor.d.ts.map +1 -0
  109. package/dist/environment/extractors/rust-env-extractor.js +297 -0
  110. package/dist/environment/extractors/rust-env-extractor.js.map +1 -0
  111. package/dist/environment/index.d.ts +1 -1
  112. package/dist/environment/index.d.ts.map +1 -1
  113. package/dist/environment/index.js +1 -1
  114. package/dist/environment/index.js.map +1 -1
  115. package/dist/environment/types.d.ts +2 -2
  116. package/dist/environment/types.d.ts.map +1 -1
  117. package/dist/environment/types.js.map +1 -1
  118. package/dist/index.d.ts +15 -3
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +62 -2
  121. package/dist/index.js.map +1 -1
  122. package/dist/licensing/feature-guard.d.ts +103 -0
  123. package/dist/licensing/feature-guard.d.ts.map +1 -0
  124. package/dist/licensing/feature-guard.js +195 -0
  125. package/dist/licensing/feature-guard.js.map +1 -0
  126. package/dist/licensing/index.d.ts +46 -0
  127. package/dist/licensing/index.d.ts.map +1 -0
  128. package/dist/licensing/index.js +47 -0
  129. package/dist/licensing/index.js.map +1 -0
  130. package/dist/licensing/license-manager.d.ts +88 -0
  131. package/dist/licensing/license-manager.d.ts.map +1 -0
  132. package/dist/licensing/license-manager.js +251 -0
  133. package/dist/licensing/license-manager.js.map +1 -0
  134. package/dist/licensing/license-validator.d.ts +60 -0
  135. package/dist/licensing/license-validator.d.ts.map +1 -0
  136. package/dist/licensing/license-validator.js +300 -0
  137. package/dist/licensing/license-validator.js.map +1 -0
  138. package/dist/licensing/types.d.ts +76 -0
  139. package/dist/licensing/types.d.ts.map +1 -0
  140. package/dist/licensing/types.js +51 -0
  141. package/dist/licensing/types.js.map +1 -0
  142. package/dist/parsers/tree-sitter/cpp-loader.d.ts +51 -0
  143. package/dist/parsers/tree-sitter/cpp-loader.d.ts.map +1 -0
  144. package/dist/parsers/tree-sitter/cpp-loader.js +162 -0
  145. package/dist/parsers/tree-sitter/cpp-loader.js.map +1 -0
  146. package/dist/parsers/tree-sitter/index.d.ts +6 -0
  147. package/dist/parsers/tree-sitter/index.d.ts.map +1 -1
  148. package/dist/parsers/tree-sitter/index.js +16 -0
  149. package/dist/parsers/tree-sitter/index.js.map +1 -1
  150. package/dist/parsers/tree-sitter/rust-loader.d.ts +50 -0
  151. package/dist/parsers/tree-sitter/rust-loader.d.ts.map +1 -0
  152. package/dist/parsers/tree-sitter/rust-loader.js +161 -0
  153. package/dist/parsers/tree-sitter/rust-loader.js.map +1 -0
  154. package/dist/parsers/tree-sitter/tree-sitter-cpp-parser.d.ts +198 -0
  155. package/dist/parsers/tree-sitter/tree-sitter-cpp-parser.d.ts.map +1 -0
  156. package/dist/parsers/tree-sitter/tree-sitter-cpp-parser.js +671 -0
  157. package/dist/parsers/tree-sitter/tree-sitter-cpp-parser.js.map +1 -0
  158. package/dist/parsers/tree-sitter/tree-sitter-rust-parser.d.ts +180 -0
  159. package/dist/parsers/tree-sitter/tree-sitter-rust-parser.d.ts.map +1 -0
  160. package/dist/parsers/tree-sitter/tree-sitter-rust-parser.js +478 -0
  161. package/dist/parsers/tree-sitter/tree-sitter-rust-parser.js.map +1 -0
  162. package/dist/parsers/types.d.ts +1 -1
  163. package/dist/parsers/types.d.ts.map +1 -1
  164. package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -1
  165. package/dist/patterns/adapters/pattern-store-adapter.js +35 -10
  166. package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -1
  167. package/dist/quality-gates/gates/base-gate.d.ts +71 -0
  168. package/dist/quality-gates/gates/base-gate.d.ts.map +1 -0
  169. package/dist/quality-gates/gates/base-gate.js +178 -0
  170. package/dist/quality-gates/gates/base-gate.js.map +1 -0
  171. package/dist/quality-gates/gates/constraint-verification/constraint-verification-gate.d.ts +62 -0
  172. package/dist/quality-gates/gates/constraint-verification/constraint-verification-gate.d.ts.map +1 -0
  173. package/dist/quality-gates/gates/constraint-verification/constraint-verification-gate.js +255 -0
  174. package/dist/quality-gates/gates/constraint-verification/constraint-verification-gate.js.map +1 -0
  175. package/dist/quality-gates/gates/constraint-verification/index.d.ts +7 -0
  176. package/dist/quality-gates/gates/constraint-verification/index.d.ts.map +1 -0
  177. package/dist/quality-gates/gates/constraint-verification/index.js +7 -0
  178. package/dist/quality-gates/gates/constraint-verification/index.js.map +1 -0
  179. package/dist/quality-gates/gates/custom-rules/custom-rules-gate.d.ts +73 -0
  180. package/dist/quality-gates/gates/custom-rules/custom-rules-gate.d.ts.map +1 -0
  181. package/dist/quality-gates/gates/custom-rules/custom-rules-gate.js +351 -0
  182. package/dist/quality-gates/gates/custom-rules/custom-rules-gate.js.map +1 -0
  183. package/dist/quality-gates/gates/custom-rules/index.d.ts +7 -0
  184. package/dist/quality-gates/gates/custom-rules/index.d.ts.map +1 -0
  185. package/dist/quality-gates/gates/custom-rules/index.js +7 -0
  186. package/dist/quality-gates/gates/custom-rules/index.js.map +1 -0
  187. package/dist/quality-gates/gates/impact-simulation/impact-simulation-gate.d.ts +61 -0
  188. package/dist/quality-gates/gates/impact-simulation/impact-simulation-gate.d.ts.map +1 -0
  189. package/dist/quality-gates/gates/impact-simulation/impact-simulation-gate.js +318 -0
  190. package/dist/quality-gates/gates/impact-simulation/impact-simulation-gate.js.map +1 -0
  191. package/dist/quality-gates/gates/impact-simulation/index.d.ts +7 -0
  192. package/dist/quality-gates/gates/impact-simulation/index.d.ts.map +1 -0
  193. package/dist/quality-gates/gates/impact-simulation/index.js +7 -0
  194. package/dist/quality-gates/gates/impact-simulation/index.js.map +1 -0
  195. package/dist/quality-gates/gates/index.d.ts +13 -0
  196. package/dist/quality-gates/gates/index.d.ts.map +1 -0
  197. package/dist/quality-gates/gates/index.js +13 -0
  198. package/dist/quality-gates/gates/index.js.map +1 -0
  199. package/dist/quality-gates/gates/pattern-compliance/index.d.ts +7 -0
  200. package/dist/quality-gates/gates/pattern-compliance/index.d.ts.map +1 -0
  201. package/dist/quality-gates/gates/pattern-compliance/index.js +7 -0
  202. package/dist/quality-gates/gates/pattern-compliance/index.js.map +1 -0
  203. package/dist/quality-gates/gates/pattern-compliance/pattern-compliance-gate.d.ts +61 -0
  204. package/dist/quality-gates/gates/pattern-compliance/pattern-compliance-gate.d.ts.map +1 -0
  205. package/dist/quality-gates/gates/pattern-compliance/pattern-compliance-gate.js +261 -0
  206. package/dist/quality-gates/gates/pattern-compliance/pattern-compliance-gate.js.map +1 -0
  207. package/dist/quality-gates/gates/regression-detection/index.d.ts +7 -0
  208. package/dist/quality-gates/gates/regression-detection/index.d.ts.map +1 -0
  209. package/dist/quality-gates/gates/regression-detection/index.js +7 -0
  210. package/dist/quality-gates/gates/regression-detection/index.js.map +1 -0
  211. package/dist/quality-gates/gates/regression-detection/regression-detection-gate.d.ts +69 -0
  212. package/dist/quality-gates/gates/regression-detection/regression-detection-gate.d.ts.map +1 -0
  213. package/dist/quality-gates/gates/regression-detection/regression-detection-gate.js +330 -0
  214. package/dist/quality-gates/gates/regression-detection/regression-detection-gate.js.map +1 -0
  215. package/dist/quality-gates/gates/security-boundary/index.d.ts +7 -0
  216. package/dist/quality-gates/gates/security-boundary/index.d.ts.map +1 -0
  217. package/dist/quality-gates/gates/security-boundary/index.js +7 -0
  218. package/dist/quality-gates/gates/security-boundary/index.js.map +1 -0
  219. package/dist/quality-gates/gates/security-boundary/security-boundary-gate.d.ts +65 -0
  220. package/dist/quality-gates/gates/security-boundary/security-boundary-gate.d.ts.map +1 -0
  221. package/dist/quality-gates/gates/security-boundary/security-boundary-gate.js +307 -0
  222. package/dist/quality-gates/gates/security-boundary/security-boundary-gate.js.map +1 -0
  223. package/dist/quality-gates/index.d.ts +35 -0
  224. package/dist/quality-gates/index.d.ts.map +1 -0
  225. package/dist/quality-gates/index.js +43 -0
  226. package/dist/quality-gates/index.js.map +1 -0
  227. package/dist/quality-gates/orchestrator/gate-orchestrator.d.ts +79 -0
  228. package/dist/quality-gates/orchestrator/gate-orchestrator.d.ts.map +1 -0
  229. package/dist/quality-gates/orchestrator/gate-orchestrator.js +314 -0
  230. package/dist/quality-gates/orchestrator/gate-orchestrator.js.map +1 -0
  231. package/dist/quality-gates/orchestrator/gate-registry.d.ts +53 -0
  232. package/dist/quality-gates/orchestrator/gate-registry.d.ts.map +1 -0
  233. package/dist/quality-gates/orchestrator/gate-registry.js +141 -0
  234. package/dist/quality-gates/orchestrator/gate-registry.js.map +1 -0
  235. package/dist/quality-gates/orchestrator/index.d.ts +10 -0
  236. package/dist/quality-gates/orchestrator/index.d.ts.map +1 -0
  237. package/dist/quality-gates/orchestrator/index.js +10 -0
  238. package/dist/quality-gates/orchestrator/index.js.map +1 -0
  239. package/dist/quality-gates/orchestrator/parallel-executor.d.ts +35 -0
  240. package/dist/quality-gates/orchestrator/parallel-executor.d.ts.map +1 -0
  241. package/dist/quality-gates/orchestrator/parallel-executor.js +70 -0
  242. package/dist/quality-gates/orchestrator/parallel-executor.js.map +1 -0
  243. package/dist/quality-gates/orchestrator/result-aggregator.d.ts +27 -0
  244. package/dist/quality-gates/orchestrator/result-aggregator.d.ts.map +1 -0
  245. package/dist/quality-gates/orchestrator/result-aggregator.js +70 -0
  246. package/dist/quality-gates/orchestrator/result-aggregator.js.map +1 -0
  247. package/dist/quality-gates/policy/default-policies.d.ts +14 -0
  248. package/dist/quality-gates/policy/default-policies.d.ts.map +1 -0
  249. package/dist/quality-gates/policy/default-policies.js +266 -0
  250. package/dist/quality-gates/policy/default-policies.js.map +1 -0
  251. package/dist/quality-gates/policy/index.d.ts +9 -0
  252. package/dist/quality-gates/policy/index.d.ts.map +1 -0
  253. package/dist/quality-gates/policy/index.js +9 -0
  254. package/dist/quality-gates/policy/index.js.map +1 -0
  255. package/dist/quality-gates/policy/policy-evaluator.d.ts +43 -0
  256. package/dist/quality-gates/policy/policy-evaluator.d.ts.map +1 -0
  257. package/dist/quality-gates/policy/policy-evaluator.js +136 -0
  258. package/dist/quality-gates/policy/policy-evaluator.js.map +1 -0
  259. package/dist/quality-gates/policy/policy-loader.d.ts +72 -0
  260. package/dist/quality-gates/policy/policy-loader.d.ts.map +1 -0
  261. package/dist/quality-gates/policy/policy-loader.js +228 -0
  262. package/dist/quality-gates/policy/policy-loader.js.map +1 -0
  263. package/dist/quality-gates/reporters/github-reporter.d.ts +19 -0
  264. package/dist/quality-gates/reporters/github-reporter.d.ts.map +1 -0
  265. package/dist/quality-gates/reporters/github-reporter.js +49 -0
  266. package/dist/quality-gates/reporters/github-reporter.js.map +1 -0
  267. package/dist/quality-gates/reporters/gitlab-reporter.d.ts +20 -0
  268. package/dist/quality-gates/reporters/gitlab-reporter.d.ts.map +1 -0
  269. package/dist/quality-gates/reporters/gitlab-reporter.js +42 -0
  270. package/dist/quality-gates/reporters/gitlab-reporter.js.map +1 -0
  271. package/dist/quality-gates/reporters/index.d.ts +12 -0
  272. package/dist/quality-gates/reporters/index.d.ts.map +1 -0
  273. package/dist/quality-gates/reporters/index.js +12 -0
  274. package/dist/quality-gates/reporters/index.js.map +1 -0
  275. package/dist/quality-gates/reporters/json-reporter.d.ts +18 -0
  276. package/dist/quality-gates/reporters/json-reporter.d.ts.map +1 -0
  277. package/dist/quality-gates/reporters/json-reporter.js +51 -0
  278. package/dist/quality-gates/reporters/json-reporter.js.map +1 -0
  279. package/dist/quality-gates/reporters/reporter-interface.d.ts +35 -0
  280. package/dist/quality-gates/reporters/reporter-interface.d.ts.map +1 -0
  281. package/dist/quality-gates/reporters/reporter-interface.js +22 -0
  282. package/dist/quality-gates/reporters/reporter-interface.js.map +1 -0
  283. package/dist/quality-gates/reporters/sarif-reporter.d.ts +22 -0
  284. package/dist/quality-gates/reporters/sarif-reporter.d.ts.map +1 -0
  285. package/dist/quality-gates/reporters/sarif-reporter.js +85 -0
  286. package/dist/quality-gates/reporters/sarif-reporter.js.map +1 -0
  287. package/dist/quality-gates/reporters/text-reporter.d.ts +18 -0
  288. package/dist/quality-gates/reporters/text-reporter.d.ts.map +1 -0
  289. package/dist/quality-gates/reporters/text-reporter.js +92 -0
  290. package/dist/quality-gates/reporters/text-reporter.js.map +1 -0
  291. package/dist/quality-gates/store/gate-run-store.d.ts +37 -0
  292. package/dist/quality-gates/store/gate-run-store.d.ts.map +1 -0
  293. package/dist/quality-gates/store/gate-run-store.js +104 -0
  294. package/dist/quality-gates/store/gate-run-store.js.map +1 -0
  295. package/dist/quality-gates/store/index.d.ts +8 -0
  296. package/dist/quality-gates/store/index.d.ts.map +1 -0
  297. package/dist/quality-gates/store/index.js +8 -0
  298. package/dist/quality-gates/store/index.js.map +1 -0
  299. package/dist/quality-gates/store/snapshot-store.d.ts +41 -0
  300. package/dist/quality-gates/store/snapshot-store.d.ts.map +1 -0
  301. package/dist/quality-gates/store/snapshot-store.js +117 -0
  302. package/dist/quality-gates/store/snapshot-store.js.map +1 -0
  303. package/dist/quality-gates/types.d.ts +992 -0
  304. package/dist/quality-gates/types.d.ts.map +1 -0
  305. package/dist/quality-gates/types.js +14 -0
  306. package/dist/quality-gates/types.js.map +1 -0
  307. package/dist/rust/index.d.ts +7 -0
  308. package/dist/rust/index.d.ts.map +1 -0
  309. package/dist/rust/index.js +8 -0
  310. package/dist/rust/index.js.map +1 -0
  311. package/dist/rust/rust-analyzer.d.ts +185 -0
  312. package/dist/rust/rust-analyzer.d.ts.map +1 -0
  313. package/dist/rust/rust-analyzer.js +538 -0
  314. package/dist/rust/rust-analyzer.js.map +1 -0
  315. package/dist/scanner/file-walker.d.ts.map +1 -1
  316. package/dist/scanner/file-walker.js +11 -0
  317. package/dist/scanner/file-walker.js.map +1 -1
  318. package/dist/simulation/simulation-engine.d.ts +6 -0
  319. package/dist/simulation/simulation-engine.d.ts.map +1 -1
  320. package/dist/simulation/simulation-engine.js +6 -0
  321. package/dist/simulation/simulation-engine.js.map +1 -1
  322. package/dist/speculative/types.d.ts +1 -1
  323. package/dist/speculative/types.d.ts.map +1 -1
  324. package/dist/speculative/types.js +2 -0
  325. package/dist/speculative/types.js.map +1 -1
  326. package/dist/store/project-config.d.ts +19 -0
  327. package/dist/store/project-config.d.ts.map +1 -1
  328. package/dist/store/project-config.js.map +1 -1
  329. package/dist/telemetry/index.d.ts +10 -0
  330. package/dist/telemetry/index.d.ts.map +1 -0
  331. package/dist/telemetry/index.js +11 -0
  332. package/dist/telemetry/index.js.map +1 -0
  333. package/dist/telemetry/telemetry-client.d.ts +127 -0
  334. package/dist/telemetry/telemetry-client.d.ts.map +1 -0
  335. package/dist/telemetry/telemetry-client.js +373 -0
  336. package/dist/telemetry/telemetry-client.js.map +1 -0
  337. package/dist/telemetry/types.d.ts +160 -0
  338. package/dist/telemetry/types.d.ts.map +1 -0
  339. package/dist/telemetry/types.js +27 -0
  340. package/dist/telemetry/types.js.map +1 -0
  341. package/dist/test-topology/extractors/cpp-test-extractor.d.ts +38 -0
  342. package/dist/test-topology/extractors/cpp-test-extractor.d.ts.map +1 -0
  343. package/dist/test-topology/extractors/cpp-test-extractor.js +507 -0
  344. package/dist/test-topology/extractors/cpp-test-extractor.js.map +1 -0
  345. package/dist/test-topology/extractors/index.d.ts +2 -0
  346. package/dist/test-topology/extractors/index.d.ts.map +1 -1
  347. package/dist/test-topology/extractors/index.js +2 -0
  348. package/dist/test-topology/extractors/index.js.map +1 -1
  349. package/dist/test-topology/extractors/regex/index.d.ts +1 -0
  350. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -1
  351. package/dist/test-topology/extractors/regex/index.js +4 -0
  352. package/dist/test-topology/extractors/regex/index.js.map +1 -1
  353. package/dist/test-topology/extractors/regex/rust-test-regex.d.ts +66 -0
  354. package/dist/test-topology/extractors/regex/rust-test-regex.d.ts.map +1 -0
  355. package/dist/test-topology/extractors/regex/rust-test-regex.js +565 -0
  356. package/dist/test-topology/extractors/regex/rust-test-regex.js.map +1 -0
  357. package/dist/test-topology/extractors/rust-test-extractor.d.ts +49 -0
  358. package/dist/test-topology/extractors/rust-test-extractor.d.ts.map +1 -0
  359. package/dist/test-topology/extractors/rust-test-extractor.js +422 -0
  360. package/dist/test-topology/extractors/rust-test-extractor.js.map +1 -0
  361. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -1
  362. package/dist/test-topology/hybrid-test-topology-analyzer.js +2 -0
  363. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -1
  364. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -1
  365. package/dist/test-topology/test-topology-analyzer.js +2 -0
  366. package/dist/test-topology/test-topology-analyzer.js.map +1 -1
  367. package/dist/test-topology/types.d.ts +2 -2
  368. package/dist/test-topology/types.d.ts.map +1 -1
  369. package/dist/unified-provider/integration/unified-scanner.d.ts.map +1 -1
  370. package/dist/unified-provider/integration/unified-scanner.js +3 -0
  371. package/dist/unified-provider/integration/unified-scanner.js.map +1 -1
  372. package/dist/unified-provider/matching/diesel-matcher.d.ts +33 -0
  373. package/dist/unified-provider/matching/diesel-matcher.d.ts.map +1 -0
  374. package/dist/unified-provider/matching/diesel-matcher.js +210 -0
  375. package/dist/unified-provider/matching/diesel-matcher.js.map +1 -0
  376. package/dist/unified-provider/matching/index.d.ts +3 -1
  377. package/dist/unified-provider/matching/index.d.ts.map +1 -1
  378. package/dist/unified-provider/matching/index.js +4 -1
  379. package/dist/unified-provider/matching/index.js.map +1 -1
  380. package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -1
  381. package/dist/unified-provider/matching/matcher-registry.js +7 -2
  382. package/dist/unified-provider/matching/matcher-registry.js.map +1 -1
  383. package/dist/unified-provider/matching/seaorm-matcher.d.ts +35 -0
  384. package/dist/unified-provider/matching/seaorm-matcher.d.ts.map +1 -0
  385. package/dist/unified-provider/matching/seaorm-matcher.js +200 -0
  386. package/dist/unified-provider/matching/seaorm-matcher.js.map +1 -0
  387. package/dist/unified-provider/matching/sqlx-matcher.d.ts +19 -24
  388. package/dist/unified-provider/matching/sqlx-matcher.d.ts.map +1 -1
  389. package/dist/unified-provider/matching/sqlx-matcher.js +171 -149
  390. package/dist/unified-provider/matching/sqlx-matcher.js.map +1 -1
  391. package/dist/unified-provider/normalization/cpp-normalizer.d.ts +62 -0
  392. package/dist/unified-provider/normalization/cpp-normalizer.d.ts.map +1 -0
  393. package/dist/unified-provider/normalization/cpp-normalizer.js +581 -0
  394. package/dist/unified-provider/normalization/cpp-normalizer.js.map +1 -0
  395. package/dist/unified-provider/normalization/index.d.ts +2 -0
  396. package/dist/unified-provider/normalization/index.d.ts.map +1 -1
  397. package/dist/unified-provider/normalization/index.js +11 -1
  398. package/dist/unified-provider/normalization/index.js.map +1 -1
  399. package/dist/unified-provider/normalization/rust-normalizer.d.ts +71 -0
  400. package/dist/unified-provider/normalization/rust-normalizer.d.ts.map +1 -0
  401. package/dist/unified-provider/normalization/rust-normalizer.js +670 -0
  402. package/dist/unified-provider/normalization/rust-normalizer.js.map +1 -0
  403. package/dist/unified-provider/parsing/parser-registry.d.ts.map +1 -1
  404. package/dist/unified-provider/parsing/parser-registry.js +62 -1
  405. package/dist/unified-provider/parsing/parser-registry.js.map +1 -1
  406. package/dist/unified-provider/provider/unified-language-provider.js +1 -1
  407. package/dist/unified-provider/provider/unified-language-provider.js.map +1 -1
  408. package/dist/unified-provider/types.d.ts +1 -1
  409. package/dist/unified-provider/types.d.ts.map +1 -1
  410. package/dist/wrappers/index.d.ts.map +1 -1
  411. package/dist/wrappers/index.js +2 -0
  412. package/dist/wrappers/index.js.map +1 -1
  413. package/dist/wrappers/integration/adapter.d.ts.map +1 -1
  414. package/dist/wrappers/integration/adapter.js +2 -0
  415. package/dist/wrappers/integration/adapter.js.map +1 -1
  416. package/dist/wrappers/integration/scanner.d.ts.map +1 -1
  417. package/dist/wrappers/integration/scanner.js +2 -0
  418. package/dist/wrappers/integration/scanner.js.map +1 -1
  419. package/dist/wrappers/primitives/registry.d.ts +18 -0
  420. package/dist/wrappers/primitives/registry.d.ts.map +1 -1
  421. package/dist/wrappers/primitives/registry.js +190 -0
  422. package/dist/wrappers/primitives/registry.js.map +1 -1
  423. package/dist/wrappers/types.d.ts +1 -1
  424. package/dist/wrappers/types.d.ts.map +1 -1
  425. package/package.json +5 -2
  426. package/LICENSE +0 -21
  427. package/dist/lake/lake.bak/index-store.d.ts +0 -82
  428. package/dist/lake/lake.bak/index-store.d.ts.map +0 -1
  429. package/dist/lake/lake.bak/index-store.js +0 -357
  430. package/dist/lake/lake.bak/index-store.js.map +0 -1
  431. package/dist/lake/lake.bak/index.d.ts +0 -81
  432. package/dist/lake/lake.bak/index.d.ts.map +0 -1
  433. package/dist/lake/lake.bak/index.js +0 -114
  434. package/dist/lake/lake.bak/index.js.map +0 -1
  435. package/dist/lake/lake.bak/manifest-store.d.ts +0 -51
  436. package/dist/lake/lake.bak/manifest-store.d.ts.map +0 -1
  437. package/dist/lake/lake.bak/manifest-store.js +0 -347
  438. package/dist/lake/lake.bak/manifest-store.js.map +0 -1
  439. package/dist/lake/lake.bak/query-engine.d.ts +0 -112
  440. package/dist/lake/lake.bak/query-engine.d.ts.map +0 -1
  441. package/dist/lake/lake.bak/query-engine.js +0 -370
  442. package/dist/lake/lake.bak/query-engine.js.map +0 -1
  443. package/dist/lake/lake.bak/types.d.ts +0 -428
  444. package/dist/lake/lake.bak/types.d.ts.map +0 -1
  445. package/dist/lake/lake.bak/types.js +0 -46
  446. package/dist/lake/lake.bak/types.js.map +0 -1
  447. package/dist/lake/lake.bak/view-materializer.d.ts +0 -70
  448. package/dist/lake/lake.bak/view-materializer.d.ts.map +0 -1
  449. package/dist/lake/lake.bak/view-materializer.js +0 -314
  450. package/dist/lake/lake.bak/view-materializer.js.map +0 -1
  451. package/dist/lake/lake.bak/view-store.d.ts +0 -57
  452. package/dist/lake/lake.bak/view-store.d.ts.map +0 -1
  453. package/dist/lake/lake.bak/view-store.js +0 -348
  454. package/dist/lake/lake.bak/view-store.js.map +0 -1
  455. package/dist/unified-provider/migration/deprecated-extractors.d.ts +0 -104
  456. package/dist/unified-provider/migration/deprecated-extractors.d.ts.map +0 -1
  457. package/dist/unified-provider/migration/deprecated-extractors.js +0 -129
  458. package/dist/unified-provider/migration/deprecated-extractors.js.map +0 -1
  459. package/dist/unified-provider/migration/deprecated-scanner.d.ts +0 -40
  460. package/dist/unified-provider/migration/deprecated-scanner.d.ts.map +0 -1
  461. package/dist/unified-provider/migration/deprecated-scanner.js +0 -49
  462. package/dist/unified-provider/migration/deprecated-scanner.js.map +0 -1
  463. package/dist/unified-provider/migration/index.d.ts +0 -41
  464. package/dist/unified-provider/migration/index.d.ts.map +0 -1
  465. package/dist/unified-provider/migration/index.js +0 -43
  466. package/dist/unified-provider/migration/index.js.map +0 -1
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Rust Hybrid Extractor
3
+ *
4
+ * Combines tree-sitter (primary) with regex fallback for enterprise-grade
5
+ * Rust code extraction. Provides confidence tracking and graceful degradation.
6
+ *
7
+ * @requirements Rust Language Support
8
+ */
9
+ import { HybridExtractorBase } from './hybrid-extractor-base.js';
10
+ import { RustRegexExtractor } from './regex/rust-regex.js';
11
+ import type { CallGraphLanguage, FileExtractionResult } from '../types.js';
12
+ import type { HybridExtractorConfig } from './types.js';
13
+ /**
14
+ * Rust hybrid extractor combining tree-sitter and regex
15
+ */
16
+ export declare class RustHybridExtractor extends HybridExtractorBase {
17
+ readonly language: CallGraphLanguage;
18
+ readonly extensions: string[];
19
+ protected regexExtractor: RustRegexExtractor;
20
+ private parser;
21
+ constructor(config?: HybridExtractorConfig);
22
+ /**
23
+ * Check if tree-sitter is available for Rust
24
+ */
25
+ protected isTreeSitterAvailable(): boolean;
26
+ /**
27
+ * Extract using tree-sitter
28
+ */
29
+ protected extractWithTreeSitter(source: string, filePath: string): FileExtractionResult | null;
30
+ /**
31
+ * Extract module name from file path
32
+ */
33
+ private extractModuleName;
34
+ /**
35
+ * Visit a tree-sitter node and extract information
36
+ */
37
+ private visitNode;
38
+ /**
39
+ * Extract a function item
40
+ */
41
+ private extractFunctionItem;
42
+ /**
43
+ * Extract an impl block
44
+ */
45
+ private extractImplItem;
46
+ /**
47
+ * Extract a trait definition
48
+ */
49
+ private extractTraitItem;
50
+ /**
51
+ * Extract a struct definition
52
+ */
53
+ private extractStructItem;
54
+ /**
55
+ * Extract an enum definition
56
+ */
57
+ private extractEnumItem;
58
+ /**
59
+ * Extract use declaration
60
+ */
61
+ private extractUseDeclaration;
62
+ /**
63
+ * Extract imports from use tree
64
+ */
65
+ private extractUseTree;
66
+ /**
67
+ * Extract call expression
68
+ */
69
+ private extractCallExpression;
70
+ /**
71
+ * Extract method call expression
72
+ */
73
+ private extractMethodCallExpression;
74
+ /**
75
+ * Extract macro invocation
76
+ */
77
+ private extractMacroInvocation;
78
+ /**
79
+ * Extract calls from a function body
80
+ */
81
+ private extractCallsFromBody;
82
+ /**
83
+ * Extract parameters from parameter list
84
+ */
85
+ private extractParameters;
86
+ /**
87
+ * Check if parameters include self
88
+ */
89
+ private hasSelfParameter;
90
+ /**
91
+ * Extract return type
92
+ */
93
+ private extractReturnType;
94
+ /**
95
+ * Extract type name from type node
96
+ */
97
+ private extractTypeName;
98
+ /**
99
+ * Check for visibility modifier
100
+ */
101
+ private hasVisibilityModifier;
102
+ /**
103
+ * Check for other modifiers
104
+ */
105
+ private hasModifier;
106
+ /**
107
+ * Extract attributes (decorators)
108
+ */
109
+ private extractAttributes;
110
+ /**
111
+ * Count arguments in argument list
112
+ */
113
+ private countArguments;
114
+ }
115
+ /**
116
+ * Create a Rust hybrid extractor instance
117
+ */
118
+ export declare function createRustHybridExtractor(config?: HybridExtractorConfig): RustHybridExtractor;
119
+ //# sourceMappingURL=rust-hybrid-extractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rust-hybrid-extractor.d.ts","sourceRoot":"","sources":["../../../src/call-graph/extractors/rust-hybrid-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAiB,MAAM,aAAa,CAAC;AAG1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,mBAAmB;IAC1D,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAU;IAC9C,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAW;IACxC,SAAS,CAAC,cAAc,qBAA4B;IAEpD,OAAO,CAAC,MAAM,CAAiC;gBAEnC,MAAM,CAAC,EAAE,qBAAqB;IAI1C;;OAEG;IACH,SAAS,CAAC,qBAAqB,IAAI,OAAO;IAI1C;;OAEG;IACH,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI;IAgC9F;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;OAEG;IACH,OAAO,CAAC,SAAS;IAmDjB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAiD3B;;OAEG;IACH,OAAO,CAAC,eAAe;IA4BvB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA4CxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAqBzB;;OAEG;IACH,OAAO,CAAC,eAAe;IAqBvB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAqB7B;;OAEG;IACH,OAAO,CAAC,cAAc;IAgEtB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA+C7B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAuBnC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAiB9B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAoB5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoBzB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAWxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAKzB;;OAEG;IACH,OAAO,CAAC,eAAe;IAYvB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAS7B;;OAEG;IACH,OAAO,CAAC,WAAW;IASnB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAgBzB;;OAEG;IACH,OAAO,CAAC,cAAc;CASvB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,mBAAmB,CAE7F"}
@@ -0,0 +1,548 @@
1
+ /**
2
+ * Rust Hybrid Extractor
3
+ *
4
+ * Combines tree-sitter (primary) with regex fallback for enterprise-grade
5
+ * Rust code extraction. Provides confidence tracking and graceful degradation.
6
+ *
7
+ * @requirements Rust Language Support
8
+ */
9
+ import { HybridExtractorBase } from './hybrid-extractor-base.js';
10
+ import { RustRegexExtractor } from './regex/rust-regex.js';
11
+ import { isRustTreeSitterAvailable, createRustParser } from '../../parsers/tree-sitter/rust-loader.js';
12
+ /**
13
+ * Rust hybrid extractor combining tree-sitter and regex
14
+ */
15
+ export class RustHybridExtractor extends HybridExtractorBase {
16
+ language = 'rust';
17
+ extensions = ['.rs'];
18
+ regexExtractor = new RustRegexExtractor();
19
+ parser = null;
20
+ constructor(config) {
21
+ super(config);
22
+ }
23
+ /**
24
+ * Check if tree-sitter is available for Rust
25
+ */
26
+ isTreeSitterAvailable() {
27
+ return isRustTreeSitterAvailable();
28
+ }
29
+ /**
30
+ * Extract using tree-sitter
31
+ */
32
+ extractWithTreeSitter(source, filePath) {
33
+ if (!isRustTreeSitterAvailable()) {
34
+ return null;
35
+ }
36
+ const result = {
37
+ file: filePath,
38
+ language: this.language,
39
+ functions: [],
40
+ calls: [],
41
+ imports: [],
42
+ exports: [],
43
+ classes: [],
44
+ errors: [],
45
+ };
46
+ try {
47
+ if (!this.parser) {
48
+ this.parser = createRustParser();
49
+ }
50
+ const tree = this.parser.parse(source);
51
+ const moduleName = this.extractModuleName(filePath);
52
+ this.visitNode(tree.rootNode, result, source, null, moduleName);
53
+ }
54
+ catch (error) {
55
+ result.errors.push(error instanceof Error ? error.message : 'Unknown parse error');
56
+ }
57
+ return result;
58
+ }
59
+ /**
60
+ * Extract module name from file path
61
+ */
62
+ extractModuleName(filePath) {
63
+ const parts = filePath.split('/');
64
+ const fileName = parts[parts.length - 1] ?? 'main';
65
+ return fileName.replace('.rs', '');
66
+ }
67
+ /**
68
+ * Visit a tree-sitter node and extract information
69
+ */
70
+ visitNode(node, result, source, currentImpl, currentModule) {
71
+ switch (node.type) {
72
+ case 'function_item':
73
+ this.extractFunctionItem(node, result, source, currentImpl, currentModule);
74
+ break;
75
+ case 'impl_item':
76
+ this.extractImplItem(node, result, source, currentModule);
77
+ return;
78
+ case 'trait_item':
79
+ this.extractTraitItem(node, result, currentModule);
80
+ return;
81
+ case 'struct_item':
82
+ this.extractStructItem(node, result, currentModule);
83
+ break;
84
+ case 'enum_item':
85
+ this.extractEnumItem(node, result, currentModule);
86
+ break;
87
+ case 'use_declaration':
88
+ this.extractUseDeclaration(node, result);
89
+ break;
90
+ case 'call_expression':
91
+ this.extractCallExpression(node, result);
92
+ break;
93
+ case 'method_call_expression':
94
+ this.extractMethodCallExpression(node, result);
95
+ break;
96
+ case 'macro_invocation':
97
+ this.extractMacroInvocation(node, result);
98
+ break;
99
+ default:
100
+ for (const child of node.children) {
101
+ this.visitNode(child, result, source, currentImpl, currentModule);
102
+ }
103
+ }
104
+ }
105
+ /**
106
+ * Extract a function item
107
+ */
108
+ extractFunctionItem(node, result, _source, currentImpl, currentModule) {
109
+ const nameNode = node.childForFieldName('name');
110
+ if (!nameNode)
111
+ return;
112
+ const name = nameNode.text;
113
+ const isPublic = this.hasVisibilityModifier(node, 'pub');
114
+ const isAsync = this.hasModifier(node, 'async');
115
+ const parametersNode = node.childForFieldName('parameters');
116
+ const returnTypeNode = node.childForFieldName('return_type');
117
+ const bodyNode = node.childForFieldName('body');
118
+ const parameters = parametersNode ? this.extractParameters(parametersNode) : [];
119
+ const returnType = returnTypeNode ? this.extractReturnType(returnTypeNode) : undefined;
120
+ const qualifiedName = currentImpl
121
+ ? `${currentModule}::${currentImpl}::${name}`
122
+ : `${currentModule}::${name}`;
123
+ result.functions.push({
124
+ name,
125
+ qualifiedName,
126
+ startLine: node.startPosition.row + 1,
127
+ endLine: node.endPosition.row + 1,
128
+ startColumn: node.startPosition.column,
129
+ endColumn: node.endPosition.column,
130
+ parameters,
131
+ returnType,
132
+ isMethod: currentImpl !== null,
133
+ isStatic: currentImpl !== null && !this.hasSelfParameter(parametersNode),
134
+ isExported: isPublic,
135
+ isConstructor: name === 'new' || name === 'default',
136
+ isAsync,
137
+ className: currentImpl ?? undefined,
138
+ decorators: this.extractAttributes(node),
139
+ bodyStartLine: bodyNode ? bodyNode.startPosition.row + 1 : node.startPosition.row + 1,
140
+ bodyEndLine: bodyNode ? bodyNode.endPosition.row + 1 : node.endPosition.row + 1,
141
+ });
142
+ if (bodyNode) {
143
+ this.extractCallsFromBody(bodyNode, result);
144
+ }
145
+ }
146
+ /**
147
+ * Extract an impl block
148
+ */
149
+ extractImplItem(node, result, source, currentModule) {
150
+ const typeNode = node.childForFieldName('type');
151
+ const traitNode = node.childForFieldName('trait');
152
+ if (!typeNode)
153
+ return;
154
+ let implName = this.extractTypeName(typeNode);
155
+ if (traitNode) {
156
+ const traitName = this.extractTypeName(traitNode);
157
+ implName = `${traitName} for ${implName}`;
158
+ }
159
+ const bodyNode = node.childForFieldName('body');
160
+ if (bodyNode) {
161
+ for (const child of bodyNode.children) {
162
+ if (child.type === 'function_item') {
163
+ this.extractFunctionItem(child, result, source, implName, currentModule);
164
+ }
165
+ }
166
+ }
167
+ }
168
+ /**
169
+ * Extract a trait definition
170
+ */
171
+ extractTraitItem(node, result, _currentModule) {
172
+ const nameNode = node.childForFieldName('name');
173
+ if (!nameNode)
174
+ return;
175
+ const name = nameNode.text;
176
+ const isPublic = this.hasVisibilityModifier(node, 'pub');
177
+ const methods = [];
178
+ const baseClasses = [];
179
+ const boundsNode = node.childForFieldName('bounds');
180
+ if (boundsNode) {
181
+ for (const child of boundsNode.children) {
182
+ if (child.type === 'type_identifier' || child.type === 'scoped_type_identifier') {
183
+ baseClasses.push(child.text);
184
+ }
185
+ }
186
+ }
187
+ const bodyNode = node.childForFieldName('body');
188
+ if (bodyNode) {
189
+ for (const child of bodyNode.children) {
190
+ if (child.type === 'function_signature_item' || child.type === 'function_item') {
191
+ const methodNameNode = child.childForFieldName('name');
192
+ if (methodNameNode) {
193
+ methods.push(methodNameNode.text);
194
+ }
195
+ }
196
+ }
197
+ }
198
+ result.classes.push({
199
+ name,
200
+ startLine: node.startPosition.row + 1,
201
+ endLine: node.endPosition.row + 1,
202
+ baseClasses,
203
+ methods,
204
+ isExported: isPublic,
205
+ });
206
+ }
207
+ /**
208
+ * Extract a struct definition
209
+ */
210
+ extractStructItem(node, result, _currentModule) {
211
+ const nameNode = node.childForFieldName('name');
212
+ if (!nameNode)
213
+ return;
214
+ const name = nameNode.text;
215
+ const isPublic = this.hasVisibilityModifier(node, 'pub');
216
+ result.classes.push({
217
+ name,
218
+ startLine: node.startPosition.row + 1,
219
+ endLine: node.endPosition.row + 1,
220
+ baseClasses: [],
221
+ methods: [],
222
+ isExported: isPublic,
223
+ });
224
+ }
225
+ /**
226
+ * Extract an enum definition
227
+ */
228
+ extractEnumItem(node, result, _currentModule) {
229
+ const nameNode = node.childForFieldName('name');
230
+ if (!nameNode)
231
+ return;
232
+ const name = nameNode.text;
233
+ const isPublic = this.hasVisibilityModifier(node, 'pub');
234
+ result.classes.push({
235
+ name,
236
+ startLine: node.startPosition.row + 1,
237
+ endLine: node.endPosition.row + 1,
238
+ baseClasses: [],
239
+ methods: [],
240
+ isExported: isPublic,
241
+ });
242
+ }
243
+ /**
244
+ * Extract use declaration
245
+ */
246
+ extractUseDeclaration(node, result) {
247
+ const argumentNode = node.childForFieldName('argument');
248
+ if (!argumentNode)
249
+ return;
250
+ const imports = this.extractUseTree(argumentNode);
251
+ for (const imp of imports) {
252
+ result.imports.push({
253
+ source: imp.source,
254
+ names: [{
255
+ imported: imp.name,
256
+ local: imp.alias ?? imp.name,
257
+ isDefault: false,
258
+ isNamespace: imp.isGlob,
259
+ }],
260
+ line: node.startPosition.row + 1,
261
+ isTypeOnly: false,
262
+ });
263
+ }
264
+ }
265
+ /**
266
+ * Extract imports from use tree
267
+ */
268
+ extractUseTree(node) {
269
+ const imports = [];
270
+ if (node.type === 'scoped_identifier' || node.type === 'identifier') {
271
+ const path = node.text;
272
+ const parts = path.split('::');
273
+ const name = parts[parts.length - 1] ?? path;
274
+ imports.push({ source: path, name, isGlob: false });
275
+ }
276
+ else if (node.type === 'use_wildcard') {
277
+ const pathNode = node.childForFieldName('path');
278
+ imports.push({ source: pathNode?.text ?? '', name: '*', isGlob: true });
279
+ }
280
+ else if (node.type === 'use_as_clause') {
281
+ const pathNode = node.childForFieldName('path');
282
+ const aliasNode = node.childForFieldName('alias');
283
+ const path = pathNode?.text ?? '';
284
+ const parts = path.split('::');
285
+ const name = parts[parts.length - 1] ?? path;
286
+ const aliasText = aliasNode?.text;
287
+ imports.push({ source: path, name, ...(aliasText ? { alias: aliasText } : {}), isGlob: false });
288
+ }
289
+ else if (node.type === 'scoped_use_list') {
290
+ const pathNode = node.childForFieldName('path');
291
+ const listNode = node.childForFieldName('list');
292
+ const basePath = pathNode?.text ?? '';
293
+ if (listNode) {
294
+ for (const child of listNode.children) {
295
+ if (child.type === 'identifier') {
296
+ imports.push({
297
+ source: basePath ? `${basePath}::${child.text}` : child.text,
298
+ name: child.text,
299
+ isGlob: false,
300
+ });
301
+ }
302
+ else if (child.type === 'self') {
303
+ imports.push({
304
+ source: basePath,
305
+ name: basePath.split('::').pop() ?? basePath,
306
+ isGlob: false,
307
+ });
308
+ }
309
+ else if (child.type !== '{' && child.type !== '}' && child.type !== ',') {
310
+ const subImports = this.extractUseTree(child);
311
+ for (const sub of subImports) {
312
+ imports.push({
313
+ ...sub,
314
+ source: basePath ? `${basePath}::${sub.source}` : sub.source,
315
+ });
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ return imports;
322
+ }
323
+ /**
324
+ * Extract call expression
325
+ */
326
+ extractCallExpression(node, result) {
327
+ const funcNode = node.childForFieldName('function');
328
+ const argsNode = node.childForFieldName('arguments');
329
+ if (!funcNode)
330
+ return;
331
+ let calleeName;
332
+ let receiver;
333
+ let isMethodCall = false;
334
+ if (funcNode.type === 'scoped_identifier') {
335
+ calleeName = funcNode.text;
336
+ const parts = calleeName.split('::');
337
+ if (parts.length > 1) {
338
+ receiver = parts.slice(0, -1).join('::');
339
+ calleeName = parts[parts.length - 1] ?? calleeName;
340
+ }
341
+ }
342
+ else if (funcNode.type === 'field_expression') {
343
+ const fieldNode = funcNode.childForFieldName('field');
344
+ const valueNode = funcNode.childForFieldName('value');
345
+ if (fieldNode && valueNode) {
346
+ receiver = valueNode.text;
347
+ calleeName = fieldNode.text;
348
+ isMethodCall = true;
349
+ }
350
+ else {
351
+ calleeName = funcNode.text;
352
+ }
353
+ }
354
+ else if (funcNode.type === 'identifier') {
355
+ calleeName = funcNode.text;
356
+ }
357
+ else {
358
+ calleeName = funcNode.text;
359
+ }
360
+ const argumentCount = argsNode ? this.countArguments(argsNode) : 0;
361
+ result.calls.push({
362
+ calleeName,
363
+ receiver,
364
+ fullExpression: node.text,
365
+ line: node.startPosition.row + 1,
366
+ column: node.startPosition.column,
367
+ argumentCount,
368
+ isMethodCall,
369
+ isConstructorCall: calleeName === 'new' || calleeName === 'default',
370
+ });
371
+ }
372
+ /**
373
+ * Extract method call expression
374
+ */
375
+ extractMethodCallExpression(node, result) {
376
+ const nameNode = node.childForFieldName('name');
377
+ const receiverNode = node.childForFieldName('value');
378
+ const argsNode = node.childForFieldName('arguments');
379
+ if (!nameNode)
380
+ return;
381
+ const calleeName = nameNode.text;
382
+ const receiver = receiverNode?.text;
383
+ const argumentCount = argsNode ? this.countArguments(argsNode) : 0;
384
+ result.calls.push({
385
+ calleeName,
386
+ receiver,
387
+ fullExpression: node.text,
388
+ line: node.startPosition.row + 1,
389
+ column: node.startPosition.column,
390
+ argumentCount,
391
+ isMethodCall: true,
392
+ isConstructorCall: calleeName === 'new' || calleeName === 'default',
393
+ });
394
+ }
395
+ /**
396
+ * Extract macro invocation
397
+ */
398
+ extractMacroInvocation(node, result) {
399
+ const macroNode = node.childForFieldName('macro');
400
+ if (!macroNode)
401
+ return;
402
+ const calleeName = macroNode.text + '!';
403
+ result.calls.push({
404
+ calleeName,
405
+ fullExpression: node.text,
406
+ line: node.startPosition.row + 1,
407
+ column: node.startPosition.column,
408
+ argumentCount: 0,
409
+ isMethodCall: false,
410
+ isConstructorCall: false,
411
+ });
412
+ }
413
+ /**
414
+ * Extract calls from a function body
415
+ */
416
+ extractCallsFromBody(node, result) {
417
+ const visit = (n) => {
418
+ if (n.type === 'call_expression') {
419
+ this.extractCallExpression(n, result);
420
+ }
421
+ else if (n.type === 'method_call_expression') {
422
+ this.extractMethodCallExpression(n, result);
423
+ }
424
+ else if (n.type === 'macro_invocation') {
425
+ this.extractMacroInvocation(n, result);
426
+ }
427
+ for (const child of n.children) {
428
+ visit(child);
429
+ }
430
+ };
431
+ for (const child of node.children) {
432
+ visit(child);
433
+ }
434
+ }
435
+ /**
436
+ * Extract parameters from parameter list
437
+ */
438
+ extractParameters(node) {
439
+ const params = [];
440
+ for (const child of node.children) {
441
+ if (child.type === 'parameter') {
442
+ const patternNode = child.childForFieldName('pattern');
443
+ const typeNode = child.childForFieldName('type');
444
+ const name = patternNode?.text ?? '_';
445
+ const type = typeNode?.text;
446
+ params.push({ name, type, hasDefault: false, isRest: false });
447
+ }
448
+ else if (child.type === 'self_parameter') {
449
+ params.push({ name: 'self', type: child.text, hasDefault: false, isRest: false });
450
+ }
451
+ }
452
+ return params;
453
+ }
454
+ /**
455
+ * Check if parameters include self
456
+ */
457
+ hasSelfParameter(parametersNode) {
458
+ if (!parametersNode)
459
+ return false;
460
+ for (const child of parametersNode.children) {
461
+ if (child.type === 'self_parameter') {
462
+ return true;
463
+ }
464
+ }
465
+ return false;
466
+ }
467
+ /**
468
+ * Extract return type
469
+ */
470
+ extractReturnType(node) {
471
+ const typeNode = node.namedChildren[0];
472
+ return typeNode?.text ?? node.text.replace(/^->\s*/, '');
473
+ }
474
+ /**
475
+ * Extract type name from type node
476
+ */
477
+ extractTypeName(node) {
478
+ if (node.type === 'type_identifier') {
479
+ return node.text;
480
+ }
481
+ else if (node.type === 'scoped_type_identifier') {
482
+ return node.text;
483
+ }
484
+ else if (node.type === 'generic_type') {
485
+ const typeNode = node.childForFieldName('type');
486
+ return typeNode?.text ?? node.text;
487
+ }
488
+ return node.text;
489
+ }
490
+ /**
491
+ * Check for visibility modifier
492
+ */
493
+ hasVisibilityModifier(node, modifier) {
494
+ for (const child of node.children) {
495
+ if (child.type === 'visibility_modifier') {
496
+ return child.text.startsWith(modifier);
497
+ }
498
+ }
499
+ return false;
500
+ }
501
+ /**
502
+ * Check for other modifiers
503
+ */
504
+ hasModifier(node, modifier) {
505
+ for (const child of node.children) {
506
+ if (child.type === modifier || child.text === modifier) {
507
+ return true;
508
+ }
509
+ }
510
+ return false;
511
+ }
512
+ /**
513
+ * Extract attributes (decorators)
514
+ */
515
+ extractAttributes(node) {
516
+ const attributes = [];
517
+ let sibling = node.previousSibling;
518
+ while (sibling) {
519
+ if (sibling.type === 'attribute_item') {
520
+ attributes.push(sibling.text);
521
+ }
522
+ else if (sibling.type !== 'line_comment' && sibling.type !== 'block_comment') {
523
+ break;
524
+ }
525
+ sibling = sibling.previousSibling;
526
+ }
527
+ return attributes.reverse();
528
+ }
529
+ /**
530
+ * Count arguments in argument list
531
+ */
532
+ countArguments(argsNode) {
533
+ let count = 0;
534
+ for (const child of argsNode.children) {
535
+ if (child.type !== '(' && child.type !== ')' && child.type !== ',') {
536
+ count++;
537
+ }
538
+ }
539
+ return count;
540
+ }
541
+ }
542
+ /**
543
+ * Create a Rust hybrid extractor instance
544
+ */
545
+ export function createRustHybridExtractor(config) {
546
+ return new RustHybridExtractor(config);
547
+ }
548
+ //# sourceMappingURL=rust-hybrid-extractor.js.map