@mycodemap/mycodemap 0.1.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 (329) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +21 -0
  3. package/README.md +559 -0
  4. package/dist/ai/claude.d.ts +38 -0
  5. package/dist/ai/claude.d.ts.map +1 -0
  6. package/dist/ai/claude.js +169 -0
  7. package/dist/ai/claude.js.map +1 -0
  8. package/dist/ai/codex.d.ts +38 -0
  9. package/dist/ai/codex.d.ts.map +1 -0
  10. package/dist/ai/codex.js +169 -0
  11. package/dist/ai/codex.js.map +1 -0
  12. package/dist/ai/factory.d.ts +48 -0
  13. package/dist/ai/factory.d.ts.map +1 -0
  14. package/dist/ai/factory.js +95 -0
  15. package/dist/ai/factory.js.map +1 -0
  16. package/dist/ai/index.d.ts +12 -0
  17. package/dist/ai/index.d.ts.map +1 -0
  18. package/dist/ai/index.js +29 -0
  19. package/dist/ai/index.js.map +1 -0
  20. package/dist/ai/provider.d.ts +70 -0
  21. package/dist/ai/provider.d.ts.map +1 -0
  22. package/dist/ai/provider.js +31 -0
  23. package/dist/ai/provider.js.map +1 -0
  24. package/dist/ai/subagent-caller.d.ts +90 -0
  25. package/dist/ai/subagent-caller.d.ts.map +1 -0
  26. package/dist/ai/subagent-caller.js +280 -0
  27. package/dist/ai/subagent-caller.js.map +1 -0
  28. package/dist/ai/types.d.ts +70 -0
  29. package/dist/ai/types.d.ts.map +1 -0
  30. package/dist/ai/types.js +5 -0
  31. package/dist/ai/types.js.map +1 -0
  32. package/dist/cache/file-hash-cache.d.ts +76 -0
  33. package/dist/cache/file-hash-cache.d.ts.map +1 -0
  34. package/dist/cache/file-hash-cache.js +159 -0
  35. package/dist/cache/file-hash-cache.js.map +1 -0
  36. package/dist/cache/index.d.ts +151 -0
  37. package/dist/cache/index.d.ts.map +1 -0
  38. package/dist/cache/index.js +303 -0
  39. package/dist/cache/index.js.map +1 -0
  40. package/dist/cache/lru-cache.d.ts +93 -0
  41. package/dist/cache/lru-cache.d.ts.map +1 -0
  42. package/dist/cache/lru-cache.js +194 -0
  43. package/dist/cache/lru-cache.js.map +1 -0
  44. package/dist/cache/parse-cache.d.ts +68 -0
  45. package/dist/cache/parse-cache.d.ts.map +1 -0
  46. package/dist/cache/parse-cache.js +173 -0
  47. package/dist/cache/parse-cache.js.map +1 -0
  48. package/dist/cli/commands/analyze.d.ts +96 -0
  49. package/dist/cli/commands/analyze.d.ts.map +1 -0
  50. package/dist/cli/commands/analyze.js +567 -0
  51. package/dist/cli/commands/analyze.js.map +1 -0
  52. package/dist/cli/commands/ci.d.ts +25 -0
  53. package/dist/cli/commands/ci.d.ts.map +1 -0
  54. package/dist/cli/commands/ci.js +481 -0
  55. package/dist/cli/commands/ci.js.map +1 -0
  56. package/dist/cli/commands/complexity.d.ts +70 -0
  57. package/dist/cli/commands/complexity.d.ts.map +1 -0
  58. package/dist/cli/commands/complexity.js +479 -0
  59. package/dist/cli/commands/complexity.js.map +1 -0
  60. package/dist/cli/commands/cycles.d.ts +10 -0
  61. package/dist/cli/commands/cycles.d.ts.map +1 -0
  62. package/dist/cli/commands/cycles.js +202 -0
  63. package/dist/cli/commands/cycles.js.map +1 -0
  64. package/dist/cli/commands/deps.d.ts +61 -0
  65. package/dist/cli/commands/deps.d.ts.map +1 -0
  66. package/dist/cli/commands/deps.js +340 -0
  67. package/dist/cli/commands/deps.js.map +1 -0
  68. package/dist/cli/commands/generate.d.ts +8 -0
  69. package/dist/cli/commands/generate.d.ts.map +1 -0
  70. package/dist/cli/commands/generate.js +61 -0
  71. package/dist/cli/commands/generate.js.map +1 -0
  72. package/dist/cli/commands/impact.d.ts +55 -0
  73. package/dist/cli/commands/impact.d.ts.map +1 -0
  74. package/dist/cli/commands/impact.js +455 -0
  75. package/dist/cli/commands/impact.js.map +1 -0
  76. package/dist/cli/commands/init.d.ts +4 -0
  77. package/dist/cli/commands/init.d.ts.map +1 -0
  78. package/dist/cli/commands/init.js +50 -0
  79. package/dist/cli/commands/init.js.map +1 -0
  80. package/dist/cli/commands/query.d.ts +22 -0
  81. package/dist/cli/commands/query.d.ts.map +1 -0
  82. package/dist/cli/commands/query.js +718 -0
  83. package/dist/cli/commands/query.js.map +1 -0
  84. package/dist/cli/commands/watch-foreground.d.ts +9 -0
  85. package/dist/cli/commands/watch-foreground.d.ts.map +1 -0
  86. package/dist/cli/commands/watch-foreground.js +67 -0
  87. package/dist/cli/commands/watch-foreground.js.map +1 -0
  88. package/dist/cli/commands/watch.d.ts +12 -0
  89. package/dist/cli/commands/watch.d.ts.map +1 -0
  90. package/dist/cli/commands/watch.js +114 -0
  91. package/dist/cli/commands/watch.js.map +1 -0
  92. package/dist/cli/commands/workflow.d.ts +25 -0
  93. package/dist/cli/commands/workflow.d.ts.map +1 -0
  94. package/dist/cli/commands/workflow.js +488 -0
  95. package/dist/cli/commands/workflow.js.map +1 -0
  96. package/dist/cli/index.d.ts +3 -0
  97. package/dist/cli/index.d.ts.map +1 -0
  98. package/dist/cli/index.js +115 -0
  99. package/dist/cli/index.js.map +1 -0
  100. package/dist/cli/paths.d.ts +90 -0
  101. package/dist/cli/paths.d.ts.map +1 -0
  102. package/dist/cli/paths.js +136 -0
  103. package/dist/cli/paths.js.map +1 -0
  104. package/dist/cli/runtime-logger.d.ts +13 -0
  105. package/dist/cli/runtime-logger.d.ts.map +1 -0
  106. package/dist/cli/runtime-logger.js +213 -0
  107. package/dist/cli/runtime-logger.js.map +1 -0
  108. package/dist/core/analyzer.d.ts +3 -0
  109. package/dist/core/analyzer.d.ts.map +1 -0
  110. package/dist/core/analyzer.js +359 -0
  111. package/dist/core/analyzer.js.map +1 -0
  112. package/dist/core/ast-complexity-analyzer.d.ts +40 -0
  113. package/dist/core/ast-complexity-analyzer.d.ts.map +1 -0
  114. package/dist/core/ast-complexity-analyzer.js +279 -0
  115. package/dist/core/ast-complexity-analyzer.js.map +1 -0
  116. package/dist/core/global-index.d.ts +69 -0
  117. package/dist/core/global-index.d.ts.map +1 -0
  118. package/dist/core/global-index.js +388 -0
  119. package/dist/core/global-index.js.map +1 -0
  120. package/dist/generator/ai-overview.d.ts +51 -0
  121. package/dist/generator/ai-overview.d.ts.map +1 -0
  122. package/dist/generator/ai-overview.js +160 -0
  123. package/dist/generator/ai-overview.js.map +1 -0
  124. package/dist/generator/context.d.ts +5 -0
  125. package/dist/generator/context.d.ts.map +1 -0
  126. package/dist/generator/context.js +514 -0
  127. package/dist/generator/context.js.map +1 -0
  128. package/dist/generator/file-describer.d.ts +93 -0
  129. package/dist/generator/file-describer.d.ts.map +1 -0
  130. package/dist/generator/file-describer.js +375 -0
  131. package/dist/generator/file-describer.js.map +1 -0
  132. package/dist/generator/index.d.ts +8 -0
  133. package/dist/generator/index.d.ts.map +1 -0
  134. package/dist/generator/index.js +259 -0
  135. package/dist/generator/index.js.map +1 -0
  136. package/dist/index.d.ts +5 -0
  137. package/dist/index.d.ts.map +1 -0
  138. package/dist/index.js +6 -0
  139. package/dist/index.js.map +1 -0
  140. package/dist/orchestrator/adapters/ast-grep-adapter.d.ts +75 -0
  141. package/dist/orchestrator/adapters/ast-grep-adapter.d.ts.map +1 -0
  142. package/dist/orchestrator/adapters/ast-grep-adapter.js +242 -0
  143. package/dist/orchestrator/adapters/ast-grep-adapter.js.map +1 -0
  144. package/dist/orchestrator/adapters/base-adapter.d.ts +24 -0
  145. package/dist/orchestrator/adapters/base-adapter.d.ts.map +1 -0
  146. package/dist/orchestrator/adapters/base-adapter.js +2 -0
  147. package/dist/orchestrator/adapters/base-adapter.js.map +1 -0
  148. package/dist/orchestrator/adapters/codemap-adapter.d.ts +56 -0
  149. package/dist/orchestrator/adapters/codemap-adapter.d.ts.map +1 -0
  150. package/dist/orchestrator/adapters/codemap-adapter.js +163 -0
  151. package/dist/orchestrator/adapters/codemap-adapter.js.map +1 -0
  152. package/dist/orchestrator/adapters/index.d.ts +10 -0
  153. package/dist/orchestrator/adapters/index.d.ts.map +1 -0
  154. package/dist/orchestrator/adapters/index.js +3 -0
  155. package/dist/orchestrator/adapters/index.js.map +1 -0
  156. package/dist/orchestrator/ai-feed-generator.d.ts +210 -0
  157. package/dist/orchestrator/ai-feed-generator.d.ts.map +1 -0
  158. package/dist/orchestrator/ai-feed-generator.js +377 -0
  159. package/dist/orchestrator/ai-feed-generator.js.map +1 -0
  160. package/dist/orchestrator/commit-validator.d.ts +30 -0
  161. package/dist/orchestrator/commit-validator.d.ts.map +1 -0
  162. package/dist/orchestrator/commit-validator.js +87 -0
  163. package/dist/orchestrator/commit-validator.js.map +1 -0
  164. package/dist/orchestrator/confidence.d.ts +25 -0
  165. package/dist/orchestrator/confidence.d.ts.map +1 -0
  166. package/dist/orchestrator/confidence.js +138 -0
  167. package/dist/orchestrator/confidence.js.map +1 -0
  168. package/dist/orchestrator/file-header-scanner.d.ts +48 -0
  169. package/dist/orchestrator/file-header-scanner.d.ts.map +1 -0
  170. package/dist/orchestrator/file-header-scanner.js +158 -0
  171. package/dist/orchestrator/file-header-scanner.js.map +1 -0
  172. package/dist/orchestrator/git-analyzer.d.ts +192 -0
  173. package/dist/orchestrator/git-analyzer.d.ts.map +1 -0
  174. package/dist/orchestrator/git-analyzer.js +539 -0
  175. package/dist/orchestrator/git-analyzer.js.map +1 -0
  176. package/dist/orchestrator/index.d.ts +20 -0
  177. package/dist/orchestrator/index.d.ts.map +1 -0
  178. package/dist/orchestrator/index.js +16 -0
  179. package/dist/orchestrator/index.js.map +1 -0
  180. package/dist/orchestrator/intent-router.d.ts +41 -0
  181. package/dist/orchestrator/intent-router.d.ts.map +1 -0
  182. package/dist/orchestrator/intent-router.js +98 -0
  183. package/dist/orchestrator/intent-router.js.map +1 -0
  184. package/dist/orchestrator/result-fusion.d.ts +114 -0
  185. package/dist/orchestrator/result-fusion.d.ts.map +1 -0
  186. package/dist/orchestrator/result-fusion.js +332 -0
  187. package/dist/orchestrator/result-fusion.js.map +1 -0
  188. package/dist/orchestrator/test-linker.d.ts +166 -0
  189. package/dist/orchestrator/test-linker.d.ts.map +1 -0
  190. package/dist/orchestrator/test-linker.js +570 -0
  191. package/dist/orchestrator/test-linker.js.map +1 -0
  192. package/dist/orchestrator/tool-orchestrator.d.ts +108 -0
  193. package/dist/orchestrator/tool-orchestrator.d.ts.map +1 -0
  194. package/dist/orchestrator/tool-orchestrator.js +247 -0
  195. package/dist/orchestrator/tool-orchestrator.js.map +1 -0
  196. package/dist/orchestrator/types.d.ts +162 -0
  197. package/dist/orchestrator/types.d.ts.map +1 -0
  198. package/dist/orchestrator/types.js +39 -0
  199. package/dist/orchestrator/types.js.map +1 -0
  200. package/dist/orchestrator/workflow/ci-executor.d.ts +157 -0
  201. package/dist/orchestrator/workflow/ci-executor.d.ts.map +1 -0
  202. package/dist/orchestrator/workflow/ci-executor.js +423 -0
  203. package/dist/orchestrator/workflow/ci-executor.js.map +1 -0
  204. package/dist/orchestrator/workflow/config.d.ts +97 -0
  205. package/dist/orchestrator/workflow/config.d.ts.map +1 -0
  206. package/dist/orchestrator/workflow/config.js +115 -0
  207. package/dist/orchestrator/workflow/config.js.map +1 -0
  208. package/dist/orchestrator/workflow/git-analyzer.d.ts +173 -0
  209. package/dist/orchestrator/workflow/git-analyzer.d.ts.map +1 -0
  210. package/dist/orchestrator/workflow/git-analyzer.js +473 -0
  211. package/dist/orchestrator/workflow/git-analyzer.js.map +1 -0
  212. package/dist/orchestrator/workflow/index.d.ts +21 -0
  213. package/dist/orchestrator/workflow/index.d.ts.map +1 -0
  214. package/dist/orchestrator/workflow/index.js +21 -0
  215. package/dist/orchestrator/workflow/index.js.map +1 -0
  216. package/dist/orchestrator/workflow/phase-checkpoint.d.ts +38 -0
  217. package/dist/orchestrator/workflow/phase-checkpoint.d.ts.map +1 -0
  218. package/dist/orchestrator/workflow/phase-checkpoint.js +75 -0
  219. package/dist/orchestrator/workflow/phase-checkpoint.js.map +1 -0
  220. package/dist/orchestrator/workflow/phase-inheritance.d.ts +128 -0
  221. package/dist/orchestrator/workflow/phase-inheritance.d.ts.map +1 -0
  222. package/dist/orchestrator/workflow/phase-inheritance.js +266 -0
  223. package/dist/orchestrator/workflow/phase-inheritance.js.map +1 -0
  224. package/dist/orchestrator/workflow/result-fusion.d.ts +117 -0
  225. package/dist/orchestrator/workflow/result-fusion.d.ts.map +1 -0
  226. package/dist/orchestrator/workflow/result-fusion.js +246 -0
  227. package/dist/orchestrator/workflow/result-fusion.js.map +1 -0
  228. package/dist/orchestrator/workflow/templates.d.ts +116 -0
  229. package/dist/orchestrator/workflow/templates.d.ts.map +1 -0
  230. package/dist/orchestrator/workflow/templates.js +546 -0
  231. package/dist/orchestrator/workflow/templates.js.map +1 -0
  232. package/dist/orchestrator/workflow/test-linker.d.ts +152 -0
  233. package/dist/orchestrator/workflow/test-linker.d.ts.map +1 -0
  234. package/dist/orchestrator/workflow/test-linker.js +342 -0
  235. package/dist/orchestrator/workflow/test-linker.js.map +1 -0
  236. package/dist/orchestrator/workflow/types.d.ts +202 -0
  237. package/dist/orchestrator/workflow/types.d.ts.map +1 -0
  238. package/dist/orchestrator/workflow/types.js +4 -0
  239. package/dist/orchestrator/workflow/types.js.map +1 -0
  240. package/dist/orchestrator/workflow/visualizer.d.ts +56 -0
  241. package/dist/orchestrator/workflow/visualizer.d.ts.map +1 -0
  242. package/dist/orchestrator/workflow/visualizer.js +300 -0
  243. package/dist/orchestrator/workflow/visualizer.js.map +1 -0
  244. package/dist/orchestrator/workflow/workflow-context.d.ts +50 -0
  245. package/dist/orchestrator/workflow/workflow-context.d.ts.map +1 -0
  246. package/dist/orchestrator/workflow/workflow-context.js +105 -0
  247. package/dist/orchestrator/workflow/workflow-context.js.map +1 -0
  248. package/dist/orchestrator/workflow/workflow-orchestrator.d.ts +126 -0
  249. package/dist/orchestrator/workflow/workflow-orchestrator.d.ts.map +1 -0
  250. package/dist/orchestrator/workflow/workflow-orchestrator.js +489 -0
  251. package/dist/orchestrator/workflow/workflow-orchestrator.js.map +1 -0
  252. package/dist/orchestrator/workflow/workflow-persistence.d.ts +38 -0
  253. package/dist/orchestrator/workflow/workflow-persistence.d.ts.map +1 -0
  254. package/dist/orchestrator/workflow/workflow-persistence.js +166 -0
  255. package/dist/orchestrator/workflow/workflow-persistence.js.map +1 -0
  256. package/dist/parser/implementations/fast-parser.d.ts +65 -0
  257. package/dist/parser/implementations/fast-parser.d.ts.map +1 -0
  258. package/dist/parser/implementations/fast-parser.js +299 -0
  259. package/dist/parser/implementations/fast-parser.js.map +1 -0
  260. package/dist/parser/implementations/smart-parser.d.ts +220 -0
  261. package/dist/parser/implementations/smart-parser.d.ts.map +1 -0
  262. package/dist/parser/implementations/smart-parser.js +1536 -0
  263. package/dist/parser/implementations/smart-parser.js.map +1 -0
  264. package/dist/parser/implementations/tree-sitter-parser.d.ts +57 -0
  265. package/dist/parser/implementations/tree-sitter-parser.d.ts.map +1 -0
  266. package/dist/parser/implementations/tree-sitter-parser.js +375 -0
  267. package/dist/parser/implementations/tree-sitter-parser.js.map +1 -0
  268. package/dist/parser/index.d.ts +19 -0
  269. package/dist/parser/index.d.ts.map +1 -0
  270. package/dist/parser/index.js +449 -0
  271. package/dist/parser/index.js.map +1 -0
  272. package/dist/parser/interfaces/IParser.d.ts +218 -0
  273. package/dist/parser/interfaces/IParser.d.ts.map +1 -0
  274. package/dist/parser/interfaces/IParser.js +22 -0
  275. package/dist/parser/interfaces/IParser.js.map +1 -0
  276. package/dist/plugins/built-in/call-graph.d.ts +38 -0
  277. package/dist/plugins/built-in/call-graph.d.ts.map +1 -0
  278. package/dist/plugins/built-in/call-graph.js +135 -0
  279. package/dist/plugins/built-in/call-graph.js.map +1 -0
  280. package/dist/plugins/built-in/complexity-analyzer.d.ts +45 -0
  281. package/dist/plugins/built-in/complexity-analyzer.d.ts.map +1 -0
  282. package/dist/plugins/built-in/complexity-analyzer.js +155 -0
  283. package/dist/plugins/built-in/complexity-analyzer.js.map +1 -0
  284. package/dist/plugins/index.d.ts +34 -0
  285. package/dist/plugins/index.d.ts.map +1 -0
  286. package/dist/plugins/index.js +103 -0
  287. package/dist/plugins/index.js.map +1 -0
  288. package/dist/plugins/plugin-loader.d.ts +22 -0
  289. package/dist/plugins/plugin-loader.d.ts.map +1 -0
  290. package/dist/plugins/plugin-loader.js +200 -0
  291. package/dist/plugins/plugin-loader.js.map +1 -0
  292. package/dist/plugins/plugin-registry.d.ts +20 -0
  293. package/dist/plugins/plugin-registry.d.ts.map +1 -0
  294. package/dist/plugins/plugin-registry.js +143 -0
  295. package/dist/plugins/plugin-registry.js.map +1 -0
  296. package/dist/plugins/types.d.ts +72 -0
  297. package/dist/plugins/types.d.ts.map +1 -0
  298. package/dist/plugins/types.js +5 -0
  299. package/dist/plugins/types.js.map +1 -0
  300. package/dist/types/index.d.ts +373 -0
  301. package/dist/types/index.d.ts.map +1 -0
  302. package/dist/types/index.js +7 -0
  303. package/dist/types/index.js.map +1 -0
  304. package/dist/watcher/daemon.d.ts +64 -0
  305. package/dist/watcher/daemon.d.ts.map +1 -0
  306. package/dist/watcher/daemon.js +189 -0
  307. package/dist/watcher/daemon.js.map +1 -0
  308. package/dist/watcher/file-watcher.d.ts +70 -0
  309. package/dist/watcher/file-watcher.d.ts.map +1 -0
  310. package/dist/watcher/file-watcher.js +127 -0
  311. package/dist/watcher/file-watcher.js.map +1 -0
  312. package/dist/watcher/index.d.ts +5 -0
  313. package/dist/watcher/index.d.ts.map +1 -0
  314. package/dist/watcher/index.js +6 -0
  315. package/dist/watcher/index.js.map +1 -0
  316. package/dist/watcher/watch-worker.d.ts +2 -0
  317. package/dist/watcher/watch-worker.d.ts.map +1 -0
  318. package/dist/watcher/watch-worker.js +57 -0
  319. package/dist/watcher/watch-worker.js.map +1 -0
  320. package/dist/worker/index.d.ts +76 -0
  321. package/dist/worker/index.d.ts.map +1 -0
  322. package/dist/worker/index.js +155 -0
  323. package/dist/worker/index.js.map +1 -0
  324. package/dist/worker/parse-worker.d.ts +2 -0
  325. package/dist/worker/parse-worker.d.ts.map +1 -0
  326. package/dist/worker/parse-worker.js +202 -0
  327. package/dist/worker/parse-worker.js.map +1 -0
  328. package/mycodemap.config.schema.json +42 -0
  329. package/package.json +69 -0
@@ -0,0 +1,570 @@
1
+ /**
2
+ * [META] TestLinker - 测试文件关联器
3
+ * [WHY] 基于 Jest/Vitest 配置自动关联测试文件
4
+ */
5
+ import { readFile, access } from 'node:fs/promises';
6
+ import { dirname, join } from 'node:path';
7
+ import pkg from 'glob';
8
+ const { Glob } = pkg;
9
+ /**
10
+ * TestLinker 类
11
+ */
12
+ export class TestLinker {
13
+ rootDir;
14
+ framework;
15
+ testPatterns = [];
16
+ config = null;
17
+ constructor(options = {}) {
18
+ this.rootDir = options.rootDir || process.cwd();
19
+ this.framework = options.framework || 'auto';
20
+ }
21
+ /**
22
+ * 初始化测试链接器
23
+ * 检测测试框架并加载配置
24
+ */
25
+ async initialize() {
26
+ if (this.framework !== 'auto') {
27
+ this.testPatterns = this.getDefaultPatterns(this.framework);
28
+ return;
29
+ }
30
+ // 自动检测测试框架
31
+ const hasVitest = await this.hasConfig('vitest.config.ts') || await this.hasConfig('vitest.config.js');
32
+ const hasJest = await this.hasConfig('jest.config.js') || await this.hasConfig('jest.config.ts');
33
+ if (hasVitest) {
34
+ this.framework = 'vitest';
35
+ this.testPatterns = this.getDefaultPatterns('vitest');
36
+ }
37
+ else if (hasJest) {
38
+ this.framework = 'jest';
39
+ this.testPatterns = this.getDefaultPatterns('jest');
40
+ }
41
+ else {
42
+ // 默认使用 Vitest 模式
43
+ this.framework = 'vitest';
44
+ this.testPatterns = this.getDefaultPatterns('vitest');
45
+ }
46
+ }
47
+ /**
48
+ * 检查配置文件是否存在
49
+ */
50
+ async hasConfig(filename) {
51
+ try {
52
+ await access(join(this.rootDir, filename));
53
+ return true;
54
+ }
55
+ catch {
56
+ return false;
57
+ }
58
+ }
59
+ /**
60
+ * 获取默认测试模式
61
+ */
62
+ getDefaultPatterns(framework) {
63
+ if (framework === 'jest') {
64
+ return [
65
+ '**/*.test.ts',
66
+ '**/*.test.js',
67
+ '**/*.spec.ts',
68
+ '**/*.spec.js',
69
+ '**/__tests__/**/*.ts',
70
+ '**/__tests__/**/*.js',
71
+ ];
72
+ }
73
+ return [
74
+ '**/*.test.ts',
75
+ '**/*.test.js',
76
+ '**/*.spec.ts',
77
+ '**/*.spec.js',
78
+ ];
79
+ }
80
+ /**
81
+ * 加载测试配置
82
+ * 读取 jest.config.js / vitest.config.ts
83
+ * @param projectRoot 项目根目录
84
+ * @returns 测试配置对象
85
+ */
86
+ async loadConfig(projectRoot) {
87
+ // 尝试读取 vitest.config.ts
88
+ const vitestPath = join(projectRoot, 'vitest.config.ts');
89
+ if (await this.pathExists(vitestPath)) {
90
+ this.config = await this.parseVitestConfig(vitestPath);
91
+ return this.config;
92
+ }
93
+ // 尝试读取 vitest.config.js
94
+ const vitestJsPath = join(projectRoot, 'vitest.config.js');
95
+ if (await this.pathExists(vitestJsPath)) {
96
+ this.config = await this.parseVitestConfig(vitestJsPath);
97
+ return this.config;
98
+ }
99
+ // 尝试读取 jest.config.js
100
+ const jestPath = join(projectRoot, 'jest.config.js');
101
+ if (await this.pathExists(jestPath)) {
102
+ this.config = await this.parseJestConfig(jestPath);
103
+ return this.config;
104
+ }
105
+ // 尝试读取 jest.config.ts
106
+ const jestTsPath = join(projectRoot, 'jest.config.ts');
107
+ if (await this.pathExists(jestTsPath)) {
108
+ this.config = await this.parseJestConfig(jestTsPath);
109
+ return this.config;
110
+ }
111
+ // 使用默认模式
112
+ const defaultConfig = {
113
+ framework: 'vitest',
114
+ patterns: {
115
+ testFile: ['**/*.test.ts', '**/*.spec.ts', '**/*.test.js', '**/*.spec.js'],
116
+ testDir: ['__tests__', 'test', 'tests']
117
+ },
118
+ sourceToTestMap: new Map()
119
+ };
120
+ this.config = defaultConfig;
121
+ return this.config;
122
+ }
123
+ /**
124
+ * 检查文件是否存在
125
+ */
126
+ async pathExists(filePath) {
127
+ try {
128
+ await access(filePath);
129
+ return true;
130
+ }
131
+ catch {
132
+ return false;
133
+ }
134
+ }
135
+ /**
136
+ * 解析 Vitest 配置
137
+ */
138
+ async parseVitestConfig(configPath) {
139
+ // 读取配置文件内容,提取 testMatch 或 testPattern
140
+ const content = await readFile(configPath, 'utf-8');
141
+ // 简单的模式提取
142
+ const testMatchMatch = content.match(/testMatch\s*:\s*\[([^\]]+)\]/);
143
+ const testPatternMatch = content.match(/testPattern\s*:\s*\[([^\]]+)\]/);
144
+ const testFilePatterns = [];
145
+ if (testMatchMatch) {
146
+ // 提取字符串字面量
147
+ const matches = testMatchMatch[1].match(/['"]([^'"]+)['"]/g);
148
+ if (matches) {
149
+ matches.forEach(m => {
150
+ const pattern = m.replace(/['"]/g, '');
151
+ testFilePatterns.push(pattern);
152
+ });
153
+ }
154
+ }
155
+ if (testPatternMatch) {
156
+ const matches = testPatternMatch[1].match(/['"]([^'"]+)['"]/g);
157
+ if (matches) {
158
+ matches.forEach(m => {
159
+ const pattern = m.replace(/['"]/g, '');
160
+ if (!testFilePatterns.includes(pattern)) {
161
+ testFilePatterns.push(pattern);
162
+ }
163
+ });
164
+ }
165
+ }
166
+ // 如果没有从配置中提取到模式,使用默认值
167
+ if (testFilePatterns.length === 0) {
168
+ testFilePatterns.push('**/*.test.ts', '**/*.spec.ts');
169
+ }
170
+ return {
171
+ framework: 'vitest',
172
+ patterns: {
173
+ testFile: testFilePatterns,
174
+ testDir: ['__tests__', 'test', 'tests']
175
+ },
176
+ sourceToTestMap: new Map()
177
+ };
178
+ }
179
+ /**
180
+ * 解析 Jest 配置
181
+ */
182
+ async parseJestConfig(configPath) {
183
+ const content = await readFile(configPath, 'utf-8');
184
+ // 提取 testMatch 或 testRegex
185
+ const testMatchMatch = content.match(/testMatch\s*:\s*\[([^\]]+)\]/);
186
+ const testRegexMatch = content.match(/testRegex\s*:\s*\[([^\]]+)\]/);
187
+ const testFilePatterns = [];
188
+ if (testMatchMatch) {
189
+ const matches = testMatchMatch[1].match(/['"]([^'"]+)['"]/g);
190
+ if (matches) {
191
+ matches.forEach(m => {
192
+ const pattern = m.replace(/['"]/g, '');
193
+ testFilePatterns.push(pattern);
194
+ });
195
+ }
196
+ }
197
+ if (testRegexMatch) {
198
+ const matches = testRegexMatch[1].match(/['"]([^'"]+)['"]/g);
199
+ if (matches) {
200
+ matches.forEach(m => {
201
+ const pattern = m.replace(/['"]/g, '');
202
+ if (!testFilePatterns.includes(pattern)) {
203
+ testFilePatterns.push(pattern);
204
+ }
205
+ });
206
+ }
207
+ }
208
+ if (testFilePatterns.length === 0) {
209
+ testFilePatterns.push('**/*.test.ts', '**/*.spec.ts', '**/__tests__/**/*.ts');
210
+ }
211
+ return {
212
+ framework: 'jest',
213
+ patterns: {
214
+ testFile: testFilePatterns,
215
+ testDir: ['__tests__', 'test', 'tests']
216
+ },
217
+ sourceToTestMap: new Map()
218
+ };
219
+ }
220
+ /**
221
+ * 确保配置已加载
222
+ */
223
+ assertConfig() {
224
+ if (!this.config) {
225
+ throw new Error('TestLinker 配置未初始化,请先调用 loadConfig');
226
+ }
227
+ }
228
+ /**
229
+ * 构建源文件 → 测试文件 映射
230
+ * 基于测试框架的匹配规则
231
+ * @param projectRoot 项目根目录
232
+ * @param codemap 代码映射数据
233
+ */
234
+ async buildMapping(projectRoot, codemap) {
235
+ // 确保配置已加载
236
+ if (!this.config) {
237
+ await this.loadConfig(projectRoot);
238
+ }
239
+ this.assertConfig();
240
+ const testFiles = await this.findTestFiles(projectRoot);
241
+ // assertConfig 确保 this.config 不为 null
242
+ const config = this.config;
243
+ for (const testFile of testFiles) {
244
+ // 从测试文件名推断源文件
245
+ // 例如: lru-cache.test.ts → lru-cache.ts
246
+ const sourceFile = this.inferSourceFile(testFile);
247
+ if (sourceFile) {
248
+ const existing = config.sourceToTestMap.get(sourceFile) || [];
249
+ if (!existing.includes(testFile)) {
250
+ existing.push(testFile);
251
+ config.sourceToTestMap.set(sourceFile, existing);
252
+ }
253
+ }
254
+ // 扫描测试文件内容,找出 import 的源文件
255
+ const imports = await this.scanTestImports(testFile);
256
+ for (const imported of imports) {
257
+ const existing = config.sourceToTestMap.get(imported) || [];
258
+ if (!existing.includes(testFile)) {
259
+ existing.push(testFile);
260
+ config.sourceToTestMap.set(imported, existing);
261
+ }
262
+ }
263
+ }
264
+ }
265
+ /**
266
+ * 查找所有测试文件
267
+ */
268
+ async findTestFiles(projectRoot) {
269
+ if (!this.config) {
270
+ return [];
271
+ }
272
+ const patterns = this.config.patterns.testFile;
273
+ const allFiles = [];
274
+ for (const pattern of patterns) {
275
+ const glob = new Glob(pattern, {
276
+ cwd: projectRoot,
277
+ absolute: true,
278
+ });
279
+ const matches = await new Promise((resolve, reject) => {
280
+ const files = [];
281
+ glob.on('match', (match) => {
282
+ files.push(match);
283
+ });
284
+ glob.on('end', () => {
285
+ resolve(files);
286
+ });
287
+ glob.on('error', reject);
288
+ });
289
+ allFiles.push(...matches);
290
+ }
291
+ // 去重
292
+ return [...new Set(allFiles)];
293
+ }
294
+ /**
295
+ * 从测试文件名推断源文件
296
+ * lru-cache.test.ts → lru-cache.ts
297
+ * src/cache/__tests__/lru-cache.test.ts → src/cache/lru-cache.ts
298
+ */
299
+ inferSourceFile(testFile) {
300
+ const normalized = testFile.replace(/\\/g, '/');
301
+ const baseMatch = normalized.match(/^(.+?)\.(test|spec)\.(ts|js|mjs|tsx|jsx)$/);
302
+ if (!baseMatch)
303
+ return null;
304
+ const base = baseMatch[1];
305
+ // 处理任意层级的 __tests__ 目录
306
+ if (base.includes('/__tests__/')) {
307
+ return base.replace(/\/__tests__\//, '/') + '.ts';
308
+ }
309
+ // 处理 test 目录
310
+ if (base.includes('/test/')) {
311
+ return base.replace(/\/test\//, '/src/') + '.ts';
312
+ }
313
+ // 处理 tests 目录
314
+ if (base.includes('/tests/')) {
315
+ return base.replace(/\/tests\//, '/src/') + '.ts';
316
+ }
317
+ return base + '.ts';
318
+ }
319
+ /**
320
+ * 扫描测试文件的 import 语句
321
+ * 提取被导入的源文件路径
322
+ * @param testFile 测试文件路径
323
+ * @returns 源文件路径列表
324
+ */
325
+ async scanTestImports(testFile) {
326
+ try {
327
+ const content = await readFile(testFile, 'utf-8');
328
+ const importedFiles = [];
329
+ // 匹配 ESM import 语句
330
+ // import xxx from 'xxx' 或 import 'xxx'
331
+ const importRegex = /import\s+(?:[\w*{}\s,]+\s+from\s+)?['"]([^'"]+)['"]/g;
332
+ let match;
333
+ while ((match = importRegex.exec(content)) !== null) {
334
+ const importPath = match[1];
335
+ // 过滤掉 node_modules 导入
336
+ if (!importPath.startsWith('.') && !importPath.startsWith('/')) {
337
+ continue;
338
+ }
339
+ // 转换为绝对路径
340
+ const resolvedPath = importPath.startsWith('/')
341
+ ? importPath
342
+ : join(dirname(testFile), importPath);
343
+ importedFiles.push(resolvedPath);
344
+ }
345
+ // 匹配 require() 语句
346
+ const requireRegex = /require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
347
+ while ((match = requireRegex.exec(content)) !== null) {
348
+ const importPath = match[1];
349
+ if (!importPath.startsWith('.') && !importPath.startsWith('/')) {
350
+ continue;
351
+ }
352
+ const resolvedPath = importPath.startsWith('/')
353
+ ? importPath
354
+ : join(dirname(testFile), importPath);
355
+ if (!importedFiles.includes(resolvedPath)) {
356
+ importedFiles.push(resolvedPath);
357
+ }
358
+ }
359
+ // 匹配动态 import 语句
360
+ const dynamicImportRegex = /await\s+import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
361
+ while ((match = dynamicImportRegex.exec(content)) !== null) {
362
+ const importPath = match[1];
363
+ if (!importPath.startsWith('.') && !importPath.startsWith('/')) {
364
+ continue;
365
+ }
366
+ const resolvedPath = importPath.startsWith('/')
367
+ ? importPath
368
+ : join(dirname(testFile), importPath);
369
+ if (!importedFiles.includes(resolvedPath)) {
370
+ importedFiles.push(resolvedPath);
371
+ }
372
+ }
373
+ return importedFiles;
374
+ }
375
+ catch {
376
+ return [];
377
+ }
378
+ }
379
+ /**
380
+ * 查找目录级别测试文件
381
+ * 支持 src/cache/__tests__/*.test.ts 格式
382
+ * 支持 src/cache/test/*.test.ts 格式
383
+ * @param sourceFile 源文件路径
384
+ * @returns 测试文件路径列表
385
+ */
386
+ async findDirLevelTests(sourceFile) {
387
+ this.assertConfig();
388
+ const sourceDir = dirname(sourceFile);
389
+ const sourceBasename = this.getBasename(sourceFile);
390
+ const testFiles = [];
391
+ // 策略1: __tests__ 目录
392
+ const testsDir1 = join(sourceDir, '__tests__');
393
+ const patterns1 = [
394
+ join(testsDir1, `${sourceBasename}.test.ts`),
395
+ join(testsDir1, `${sourceBasename}.test.js`),
396
+ join(testsDir1, `${sourceBasename}.spec.ts`),
397
+ join(testsDir1, `${sourceBasename}.spec.js`),
398
+ ];
399
+ for (const pattern of patterns1) {
400
+ if (await this.pathExists(pattern)) {
401
+ testFiles.push(pattern);
402
+ }
403
+ }
404
+ // 策略2: test 目录
405
+ const testsDir2 = join(sourceDir, 'test');
406
+ const patterns2 = [
407
+ join(testsDir2, `${sourceBasename}.test.ts`),
408
+ join(testsDir2, `${sourceBasename}.test.js`),
409
+ join(testsDir2, `${sourceBasename}.spec.ts`),
410
+ join(testsDir2, `${sourceBasename}.spec.js`),
411
+ ];
412
+ for (const pattern of patterns2) {
413
+ if (await this.pathExists(pattern)) {
414
+ if (!testFiles.includes(pattern)) {
415
+ testFiles.push(pattern);
416
+ }
417
+ }
418
+ }
419
+ // 策略3: tests 目录
420
+ const testsDir3 = join(sourceDir, 'tests');
421
+ const patterns3 = [
422
+ join(testsDir3, `${sourceBasename}.test.ts`),
423
+ join(testsDir3, `${sourceBasename}.test.js`),
424
+ join(testsDir3, `${sourceBasename}.spec.ts`),
425
+ join(testsDir3, `${sourceBasename}.spec.js`),
426
+ ];
427
+ for (const pattern of patterns3) {
428
+ if (await this.pathExists(pattern)) {
429
+ if (!testFiles.includes(pattern)) {
430
+ testFiles.push(pattern);
431
+ }
432
+ }
433
+ }
434
+ return testFiles;
435
+ }
436
+ /**
437
+ * 查找相关测试文件
438
+ * @param sourceFiles 源文件路径列表
439
+ * @returns 相关测试文件路径列表
440
+ */
441
+ async findRelatedTests(sourceFiles) {
442
+ this.assertConfig();
443
+ const relatedTests = new Set();
444
+ for (const sourceFile of sourceFiles) {
445
+ // 直接映射
446
+ const direct = this.config.sourceToTestMap.get(sourceFile) || [];
447
+ direct.forEach(t => relatedTests.add(t));
448
+ // 目录级别匹配
449
+ const dirTests = await this.findDirLevelTests(sourceFile);
450
+ dirTests.forEach(t => relatedTests.add(t));
451
+ }
452
+ return Array.from(relatedTests);
453
+ }
454
+ /**
455
+ * 解析源文件对应的测试文件
456
+ * @param sourceFile 源文件路径
457
+ * @returns 测试文件路径,如果不存在则返回 null
458
+ */
459
+ async resolveTestFile(sourceFile) {
460
+ await this.initialize();
461
+ const sourceDir = dirname(sourceFile);
462
+ const sourceBasename = this.getBasename(sourceFile);
463
+ // 尝试多种测试文件命名模式
464
+ const testPatterns = [
465
+ // 同目录同名测试文件
466
+ join(sourceDir, `${sourceBasename}.test.ts`),
467
+ join(sourceDir, `${sourceBasename}.test.js`),
468
+ join(sourceDir, `${sourceBasename}.spec.ts`),
469
+ join(sourceDir, `${sourceBasename}.spec.js`),
470
+ // __tests__ 目录
471
+ join(sourceDir, '__tests__', `${sourceBasename}.test.ts`),
472
+ join(sourceDir, '__tests__', `${sourceBasename}.test.js`),
473
+ // 同名文件在 test 目录
474
+ join(sourceDir.replace('/src/', '/test/'), `${sourceBasename}.test.ts`),
475
+ join(sourceDir.replace('/src/', '/tests/'), `${sourceBasename}.test.ts`),
476
+ ];
477
+ for (const pattern of testPatterns) {
478
+ try {
479
+ await access(pattern);
480
+ return pattern;
481
+ }
482
+ catch {
483
+ continue;
484
+ }
485
+ }
486
+ // 使用 glob 搜索
487
+ const globMatches = await this.globSearch(sourceFile);
488
+ if (globMatches.length > 0) {
489
+ return globMatches[0];
490
+ }
491
+ return null;
492
+ }
493
+ /**
494
+ * 获取文件名(不含扩展名)
495
+ */
496
+ getBasename(filePath) {
497
+ const base = filePath.split(/[/\\]/).pop() || '';
498
+ return base.replace(/\.(ts|js|mjs|jsx|tsx)$/, '');
499
+ }
500
+ /**
501
+ * 使用 glob 搜索测试文件
502
+ */
503
+ async globSearch(sourceFile) {
504
+ const sourceDir = dirname(sourceFile);
505
+ const sourceBasename = this.getBasename(sourceFile);
506
+ const glob = new Glob(`**/${sourceBasename}.{test,spec}.{ts,js}`, {
507
+ cwd: this.rootDir,
508
+ absolute: true,
509
+ });
510
+ const matches = await new Promise((resolve, reject) => {
511
+ glob.on('match', (match) => {
512
+ // 收集匹配结果
513
+ });
514
+ glob.on('end', (matches) => {
515
+ resolve(matches.slice(0, 3));
516
+ });
517
+ glob.on('error', reject);
518
+ });
519
+ return matches;
520
+ }
521
+ /**
522
+ * 批量解析多个源文件的测试文件
523
+ */
524
+ async resolveTestFiles(sourceFiles) {
525
+ const mappings = [];
526
+ for (const sourceFile of sourceFiles) {
527
+ const testFile = await this.resolveTestFile(sourceFile);
528
+ mappings.push({
529
+ sourceFile,
530
+ testFile,
531
+ framework: this.framework,
532
+ });
533
+ }
534
+ return mappings;
535
+ }
536
+ /**
537
+ * 获取所有测试文件
538
+ */
539
+ async getAllTestFiles() {
540
+ const glob = new Glob(this.testPatterns[0], {
541
+ cwd: this.rootDir,
542
+ absolute: true,
543
+ });
544
+ return new Promise((resolve, reject) => {
545
+ const matches = [];
546
+ glob.on('match', (match) => {
547
+ matches.push(match);
548
+ });
549
+ glob.on('end', () => {
550
+ resolve(matches);
551
+ });
552
+ glob.on('error', reject);
553
+ });
554
+ }
555
+ }
556
+ /**
557
+ * 解析测试文件的便捷函数
558
+ */
559
+ export async function resolveTestFile(sourceFile) {
560
+ const linker = new TestLinker();
561
+ return linker.resolveTestFile(sourceFile);
562
+ }
563
+ /**
564
+ * 批量解析测试文件的便捷函数
565
+ */
566
+ export async function resolveTestFiles(sourceFiles) {
567
+ const linker = new TestLinker();
568
+ return linker.resolveTestFiles(sourceFiles);
569
+ }
570
+ //# sourceMappingURL=test-linker.js.map
@@ -0,0 +1 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