@vibe-validate/extractors 0.16.0 → 0.17.0-rc.5

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 (163) hide show
  1. package/dist/extractor-registry.d.ts +104 -0
  2. package/dist/extractor-registry.d.ts.map +1 -0
  3. package/dist/extractor-registry.js +278 -0
  4. package/dist/extractor-registry.js.map +1 -0
  5. package/dist/extractors/ava/index.d.ts +23 -0
  6. package/dist/extractors/ava/index.d.ts.map +1 -0
  7. package/dist/extractors/ava/index.js +507 -0
  8. package/dist/extractors/ava/index.js.map +1 -0
  9. package/dist/extractors/ava/index.test.d.ts +7 -0
  10. package/dist/extractors/ava/index.test.d.ts.map +1 -0
  11. package/dist/extractors/ava/index.test.js +408 -0
  12. package/dist/extractors/ava/index.test.js.map +1 -0
  13. package/dist/extractors/eslint/index.d.ts +18 -0
  14. package/dist/extractors/eslint/index.d.ts.map +1 -0
  15. package/dist/extractors/eslint/index.js +206 -0
  16. package/dist/extractors/eslint/index.js.map +1 -0
  17. package/dist/extractors/eslint/index.test.d.ts +9 -0
  18. package/dist/extractors/eslint/index.test.d.ts.map +1 -0
  19. package/dist/extractors/eslint/index.test.js +191 -0
  20. package/dist/extractors/eslint/index.test.js.map +1 -0
  21. package/dist/extractors/generic/index.d.ts +30 -0
  22. package/dist/extractors/generic/index.d.ts.map +1 -0
  23. package/dist/extractors/generic/index.js +140 -0
  24. package/dist/extractors/generic/index.js.map +1 -0
  25. package/dist/extractors/generic/index.test.d.ts +7 -0
  26. package/dist/extractors/generic/index.test.d.ts.map +1 -0
  27. package/dist/extractors/generic/index.test.js +61 -0
  28. package/dist/extractors/generic/index.test.js.map +1 -0
  29. package/dist/extractors/jasmine/index.d.ts +17 -0
  30. package/dist/extractors/jasmine/index.d.ts.map +1 -0
  31. package/dist/extractors/jasmine/index.js +242 -0
  32. package/dist/extractors/jasmine/index.js.map +1 -0
  33. package/dist/extractors/jasmine/index.test.d.ts +7 -0
  34. package/dist/extractors/jasmine/index.test.d.ts.map +1 -0
  35. package/dist/extractors/jasmine/index.test.js +318 -0
  36. package/dist/extractors/jasmine/index.test.js.map +1 -0
  37. package/dist/extractors/jest/index.d.ts +17 -0
  38. package/dist/extractors/jest/index.d.ts.map +1 -0
  39. package/dist/extractors/jest/index.js +273 -0
  40. package/dist/extractors/jest/index.js.map +1 -0
  41. package/dist/extractors/jest/index.test.d.ts +9 -0
  42. package/dist/extractors/jest/index.test.d.ts.map +1 -0
  43. package/dist/extractors/jest/index.test.js +338 -0
  44. package/dist/extractors/jest/index.test.js.map +1 -0
  45. package/dist/extractors/junit/index.d.ts +18 -0
  46. package/dist/extractors/junit/index.d.ts.map +1 -0
  47. package/dist/extractors/junit/index.js +259 -0
  48. package/dist/extractors/junit/index.js.map +1 -0
  49. package/dist/extractors/junit/index.test.d.ts +7 -0
  50. package/dist/extractors/junit/index.test.d.ts.map +1 -0
  51. package/dist/extractors/junit/index.test.js +341 -0
  52. package/dist/extractors/junit/index.test.js.map +1 -0
  53. package/dist/extractors/maven-checkstyle/index.d.ts +23 -0
  54. package/dist/extractors/maven-checkstyle/index.d.ts.map +1 -0
  55. package/dist/extractors/maven-checkstyle/index.js +263 -0
  56. package/dist/extractors/maven-checkstyle/index.js.map +1 -0
  57. package/dist/extractors/maven-checkstyle/index.test.d.ts +2 -0
  58. package/dist/extractors/maven-checkstyle/index.test.d.ts.map +1 -0
  59. package/dist/extractors/maven-checkstyle/index.test.js +197 -0
  60. package/dist/extractors/maven-checkstyle/index.test.js.map +1 -0
  61. package/dist/extractors/maven-compiler/index.d.ts +23 -0
  62. package/dist/extractors/maven-compiler/index.d.ts.map +1 -0
  63. package/dist/extractors/maven-compiler/index.js +271 -0
  64. package/dist/extractors/maven-compiler/index.js.map +1 -0
  65. package/dist/extractors/maven-compiler/index.test.d.ts +2 -0
  66. package/dist/extractors/maven-compiler/index.test.d.ts.map +1 -0
  67. package/dist/extractors/maven-compiler/index.test.js +189 -0
  68. package/dist/extractors/maven-compiler/index.test.js.map +1 -0
  69. package/dist/extractors/maven-surefire/index.d.ts +23 -0
  70. package/dist/extractors/maven-surefire/index.d.ts.map +1 -0
  71. package/dist/extractors/maven-surefire/index.js +292 -0
  72. package/dist/extractors/maven-surefire/index.js.map +1 -0
  73. package/dist/extractors/maven-surefire/index.test.d.ts +2 -0
  74. package/dist/extractors/maven-surefire/index.test.d.ts.map +1 -0
  75. package/dist/extractors/maven-surefire/index.test.js +163 -0
  76. package/dist/extractors/maven-surefire/index.test.js.map +1 -0
  77. package/dist/extractors/mocha/index.d.ts +17 -0
  78. package/dist/extractors/mocha/index.d.ts.map +1 -0
  79. package/dist/extractors/mocha/index.js +241 -0
  80. package/dist/extractors/mocha/index.js.map +1 -0
  81. package/dist/extractors/mocha/index.test.d.ts +7 -0
  82. package/dist/extractors/mocha/index.test.d.ts.map +1 -0
  83. package/dist/extractors/mocha/index.test.js +300 -0
  84. package/dist/extractors/mocha/index.test.js.map +1 -0
  85. package/dist/extractors/playwright/index.d.ts +17 -0
  86. package/dist/extractors/playwright/index.d.ts.map +1 -0
  87. package/dist/extractors/playwright/index.js +320 -0
  88. package/dist/extractors/playwright/index.js.map +1 -0
  89. package/dist/extractors/playwright/index.test.d.ts +7 -0
  90. package/dist/extractors/playwright/index.test.d.ts.map +1 -0
  91. package/dist/extractors/playwright/index.test.js +274 -0
  92. package/dist/extractors/playwright/index.test.js.map +1 -0
  93. package/dist/extractors/tap/index.d.ts +23 -0
  94. package/dist/extractors/tap/index.d.ts.map +1 -0
  95. package/dist/extractors/tap/index.js +352 -0
  96. package/dist/extractors/tap/index.js.map +1 -0
  97. package/dist/extractors/tap/index.test.d.ts +7 -0
  98. package/dist/extractors/tap/index.test.d.ts.map +1 -0
  99. package/dist/extractors/tap/index.test.js +100 -0
  100. package/dist/extractors/tap/index.test.js.map +1 -0
  101. package/dist/extractors/typescript/index.d.ts +17 -0
  102. package/dist/extractors/typescript/index.d.ts.map +1 -0
  103. package/dist/extractors/typescript/index.js +150 -0
  104. package/dist/extractors/typescript/index.js.map +1 -0
  105. package/dist/extractors/typescript/index.test.d.ts +9 -0
  106. package/dist/extractors/typescript/index.test.d.ts.map +1 -0
  107. package/dist/extractors/typescript/index.test.js +177 -0
  108. package/dist/extractors/typescript/index.test.js.map +1 -0
  109. package/dist/extractors/vitest/index.d.ts +17 -0
  110. package/dist/extractors/vitest/index.d.ts.map +1 -0
  111. package/dist/extractors/vitest/index.js +564 -0
  112. package/dist/extractors/vitest/index.js.map +1 -0
  113. package/dist/extractors/vitest/index.test.d.ts +9 -0
  114. package/dist/extractors/vitest/index.test.d.ts.map +1 -0
  115. package/dist/extractors/vitest/index.test.js +373 -0
  116. package/dist/extractors/vitest/index.test.js.map +1 -0
  117. package/dist/index.d.ts +27 -11
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +27 -11
  120. package/dist/index.js.map +1 -1
  121. package/dist/maven-checkstyle-extractor.d.ts +20 -0
  122. package/dist/maven-checkstyle-extractor.d.ts.map +1 -0
  123. package/dist/maven-checkstyle-extractor.js +193 -0
  124. package/dist/maven-checkstyle-extractor.js.map +1 -0
  125. package/dist/maven-compiler-extractor.d.ts +20 -0
  126. package/dist/maven-compiler-extractor.d.ts.map +1 -0
  127. package/dist/maven-compiler-extractor.js +218 -0
  128. package/dist/maven-compiler-extractor.js.map +1 -0
  129. package/dist/maven-surefire-extractor.d.ts +20 -0
  130. package/dist/maven-surefire-extractor.d.ts.map +1 -0
  131. package/dist/maven-surefire-extractor.js +228 -0
  132. package/dist/maven-surefire-extractor.js.map +1 -0
  133. package/dist/maven-utils.d.ts +24 -0
  134. package/dist/maven-utils.d.ts.map +1 -0
  135. package/dist/maven-utils.js +36 -0
  136. package/dist/maven-utils.js.map +1 -0
  137. package/dist/plugin-loader.d.ts +82 -0
  138. package/dist/plugin-loader.d.ts.map +1 -0
  139. package/dist/plugin-loader.js +200 -0
  140. package/dist/plugin-loader.js.map +1 -0
  141. package/dist/sandbox.d.ts +161 -0
  142. package/dist/sandbox.d.ts.map +1 -0
  143. package/dist/sandbox.js +254 -0
  144. package/dist/sandbox.js.map +1 -0
  145. package/dist/sandbox.test.d.ts +8 -0
  146. package/dist/sandbox.test.d.ts.map +1 -0
  147. package/dist/sandbox.test.js +395 -0
  148. package/dist/sandbox.test.js.map +1 -0
  149. package/dist/sandboxed-extractor.d.ts +46 -0
  150. package/dist/sandboxed-extractor.d.ts.map +1 -0
  151. package/dist/sandboxed-extractor.js +172 -0
  152. package/dist/sandboxed-extractor.js.map +1 -0
  153. package/dist/sandboxed-extractor.test.d.ts +5 -0
  154. package/dist/sandboxed-extractor.test.d.ts.map +1 -0
  155. package/dist/sandboxed-extractor.test.js +346 -0
  156. package/dist/sandboxed-extractor.test.js.map +1 -0
  157. package/dist/smart-extractor.d.ts +22 -10
  158. package/dist/smart-extractor.d.ts.map +1 -1
  159. package/dist/smart-extractor.js +116 -163
  160. package/dist/smart-extractor.js.map +1 -1
  161. package/dist/types.d.ts +94 -0
  162. package/dist/types.d.ts.map +1 -1
  163. package/package.json +2 -1
@@ -0,0 +1,271 @@
1
+ /**
2
+ * Maven Compiler Error Extractor Plugin
3
+ *
4
+ * Extracts Java compilation errors from Maven compiler plugin output.
5
+ * Supports output from `mvn compile` and `mvn test-compile` commands.
6
+ *
7
+ * @package @vibe-validate/extractors
8
+ */
9
+ import { MAX_ERRORS_IN_ARRAY } from '../../result-schema.js';
10
+ import { extractRelativePath } from '../../maven-utils.js';
11
+ const COMPILER_PATTERNS = {
12
+ // [ERROR] /path/to/File.java:[line,column] error message
13
+ // eslint-disable-next-line sonarjs/slow-regex -- Safe: Maven compiler output is structured, limited line length
14
+ errorLine: /^\[ERROR\]\s+([^:]+):\[(\d+)(?:,(\d+))?\]\s+(.+)$/,
15
+ // Markers for high-confidence detection
16
+ compilationErrorMarker: /^\[ERROR\]\s+COMPILATION ERROR\s*:/,
17
+ compilerPluginMarker: /maven-compiler-plugin/,
18
+ errorCountMarker: /^\[INFO\]\s+(\d+)\s+errors?\s*$/,
19
+ // Common Java compiler error patterns
20
+ compilerErrorPatterns: [
21
+ 'cannot find symbol',
22
+ 'incompatible types',
23
+ 'class, interface, or enum expected',
24
+ 'illegal start of expression',
25
+ 'reached end of file while parsing',
26
+ 'package .* does not exist',
27
+ 'method .* cannot be applied',
28
+ ],
29
+ };
30
+ /**
31
+ * Detects if output is from Maven compiler plugin
32
+ */
33
+ // eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 22 acceptable for detection (sequentially checks 5 distinct Maven compiler output patterns for accurate detection)
34
+ export function detectMavenCompiler(output) {
35
+ const lines = output.split('\n');
36
+ let score = 0;
37
+ const foundPatterns = [];
38
+ // Look for compilation error markers
39
+ let hasErrorLineFormat = false;
40
+ let hasCompilerErrorPattern = false;
41
+ for (const line of lines) {
42
+ // High-value markers (30 points each)
43
+ if (COMPILER_PATTERNS.compilationErrorMarker.test(line)) {
44
+ score += 30;
45
+ foundPatterns.push('[ERROR] COMPILATION ERROR marker');
46
+ }
47
+ if (COMPILER_PATTERNS.compilerPluginMarker.test(line)) {
48
+ score += 30;
49
+ foundPatterns.push('maven-compiler-plugin reference');
50
+ }
51
+ // Medium-value markers (20 points)
52
+ if (COMPILER_PATTERNS.errorCountMarker.test(line)) {
53
+ score += 20;
54
+ foundPatterns.push('error count summary');
55
+ }
56
+ if (!hasErrorLineFormat && COMPILER_PATTERNS.errorLine.test(line)) {
57
+ score += 20;
58
+ foundPatterns.push('file:[line,column] format');
59
+ hasErrorLineFormat = true;
60
+ }
61
+ // Low-value markers (10 points for first match)
62
+ if (!hasCompilerErrorPattern) {
63
+ for (const pattern of COMPILER_PATTERNS.compilerErrorPatterns) {
64
+ if (line.includes(pattern)) {
65
+ score += 10;
66
+ foundPatterns.push('Java compiler error pattern');
67
+ hasCompilerErrorPattern = true;
68
+ break;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ // Determine reason based on score
74
+ let reason;
75
+ if (score >= 70) {
76
+ reason = 'Maven compiler plugin output detected';
77
+ }
78
+ else if (score >= 40) {
79
+ reason = 'Possible Maven compiler output';
80
+ }
81
+ else {
82
+ reason = 'Not Maven compiler output';
83
+ }
84
+ return {
85
+ confidence: Math.min(score, 100),
86
+ patterns: foundPatterns,
87
+ reason,
88
+ };
89
+ }
90
+ /**
91
+ * Extracts compilation errors from Maven compiler output
92
+ */
93
+ // eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 21 acceptable for extraction (parses Maven compiler output with context lines, deduplication, and error formatting)
94
+ export function extractMavenCompiler(output, command) {
95
+ const detection = detectMavenCompiler(output);
96
+ if (detection.confidence < 40) {
97
+ return {
98
+ summary: 'Not Maven compiler output',
99
+ totalErrors: 0,
100
+ errors: [],
101
+ metadata: {
102
+ detection: {
103
+ extractor: 'maven-compiler',
104
+ confidence: detection.confidence,
105
+ patterns: detection.patterns,
106
+ reason: detection.reason,
107
+ },
108
+ confidence: detection.confidence,
109
+ completeness: 100,
110
+ issues: [],
111
+ },
112
+ };
113
+ }
114
+ const compilationErrors = [];
115
+ const lines = output.split('\n');
116
+ // Parse error lines
117
+ for (let i = 0; i < lines.length; i++) {
118
+ const line = lines[i];
119
+ const match = COMPILER_PATTERNS.errorLine.exec(line);
120
+ if (match) {
121
+ const [, filePath, lineStr, colStr, message] = match;
122
+ // Collect additional context (symbol, location) from next lines
123
+ const contextLines = [];
124
+ for (let j = i + 1; j < Math.min(i + 5, lines.length); j++) {
125
+ const nextLine = lines[j]?.trim();
126
+ if (nextLine && !nextLine.startsWith('[') && (nextLine.startsWith('symbol:') || nextLine.startsWith('location:'))) {
127
+ contextLines.push(nextLine);
128
+ }
129
+ else if (nextLine?.startsWith('[')) {
130
+ // Hit next Maven log line
131
+ break;
132
+ }
133
+ }
134
+ const fullMessage = contextLines.length > 0
135
+ ? `${message}\n${contextLines.join('\n')}`
136
+ : message;
137
+ compilationErrors.push({
138
+ file: extractRelativePath(filePath),
139
+ line: Number.parseInt(lineStr, 10),
140
+ column: colStr ? Number.parseInt(colStr, 10) : undefined,
141
+ message: fullMessage.trim(),
142
+ });
143
+ }
144
+ }
145
+ // Remove duplicates (Maven sometimes reports errors twice)
146
+ const uniqueErrors = deduplicateErrors(compilationErrors);
147
+ // Convert to FormattedError format
148
+ const errors = uniqueErrors.slice(0, MAX_ERRORS_IN_ARRAY).map((e) => ({
149
+ file: e.file,
150
+ line: e.line,
151
+ column: e.column,
152
+ message: e.message,
153
+ }));
154
+ // Group by file for summary
155
+ const fileGroups = groupByFile(uniqueErrors);
156
+ const summary = `${uniqueErrors.length} compilation error(s) in ${fileGroups.size} file(s)`;
157
+ // Generate guidance
158
+ const guidance = uniqueErrors.length > 0
159
+ ? `Fix Java compilation errors. Run ${command ?? 'mvn compile'} to see all details.`
160
+ : undefined;
161
+ // Create error summary
162
+ const errorSummary = errors.length > 0
163
+ ? errors.map((e, i) => {
164
+ const location = e.column ? `${e.file}:${e.line}:${e.column}` : `${e.file}:${e.line}`;
165
+ return `[Error ${i + 1}/${errors.length}] ${location}\n${e.message}`;
166
+ }).join('\n\n')
167
+ : undefined;
168
+ return {
169
+ summary,
170
+ totalErrors: uniqueErrors.length,
171
+ errors,
172
+ guidance,
173
+ errorSummary,
174
+ metadata: {
175
+ detection: {
176
+ extractor: 'maven-compiler',
177
+ confidence: detection.confidence,
178
+ patterns: detection.patterns,
179
+ reason: detection.reason,
180
+ },
181
+ confidence: 100,
182
+ completeness: 100,
183
+ issues: [],
184
+ },
185
+ };
186
+ }
187
+ /**
188
+ * Deduplicate compilation errors
189
+ */
190
+ function deduplicateErrors(errors) {
191
+ const seen = new Set();
192
+ const unique = [];
193
+ for (const e of errors) {
194
+ const key = `${e.file}:${e.line}:${e.column}:${e.message.split('\n')[0]}`;
195
+ if (!seen.has(key)) {
196
+ seen.add(key);
197
+ unique.push(e);
198
+ }
199
+ }
200
+ return unique;
201
+ }
202
+ /**
203
+ * Group errors by file
204
+ */
205
+ function groupByFile(errors) {
206
+ const groups = new Map();
207
+ for (const error of errors) {
208
+ const file = error.file || 'unknown';
209
+ if (!groups.has(file)) {
210
+ groups.set(file, []);
211
+ }
212
+ const group = groups.get(file);
213
+ if (group) {
214
+ group.push(error);
215
+ }
216
+ }
217
+ return groups;
218
+ }
219
+ /**
220
+ * Maven Compiler Extractor Plugin
221
+ */
222
+ const mavenCompilerExtractor = {
223
+ metadata: {
224
+ name: 'maven-compiler',
225
+ version: '1.0.0',
226
+ author: 'Jeff Dutton <jeff@duckcreek.com>',
227
+ description: 'Extracts Java compilation errors from Maven compiler plugin output',
228
+ repository: 'https://github.com/jdutton/vibe-validate',
229
+ tags: ['maven', 'java', 'compiler', 'javac'],
230
+ },
231
+ hints: {
232
+ required: ['[ERROR]', '[INFO]'],
233
+ anyOf: ['COMPILATION ERROR', 'maven-compiler-plugin'],
234
+ },
235
+ priority: 70,
236
+ detect: detectMavenCompiler,
237
+ extract: extractMavenCompiler,
238
+ samples: [
239
+ {
240
+ name: 'basic-cannot-find-symbol',
241
+ description: 'Simple cannot find symbol error',
242
+ input: `[INFO] Compiling 45 source files
243
+ [ERROR] COMPILATION ERROR :
244
+ [ERROR] /Users/dev/project/src/main/java/com/example/Foo.java:[42,25] cannot find symbol
245
+ symbol: method extractComponent()
246
+ location: class com.example.RefactoringActions
247
+ [INFO] 1 error`,
248
+ expected: {
249
+ totalErrors: 1,
250
+ errors: [
251
+ {
252
+ file: 'src/main/java/com/example/Foo.java',
253
+ line: 42,
254
+ column: 25,
255
+ message: 'cannot find symbol',
256
+ },
257
+ ],
258
+ },
259
+ },
260
+ {
261
+ name: 'real-world-output',
262
+ description: 'Real Maven compilation failure from test data',
263
+ inputFile: './samples/maven-compile-error.txt',
264
+ expected: {
265
+ totalErrors: 2,
266
+ },
267
+ },
268
+ ],
269
+ };
270
+ export default mavenCompilerExtractor;
271
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/extractors/maven-compiler/index.ts"],"names":[],"mappings":"AAAA;;;;;;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AAO,EAAE,OAAO;QAChB,MAAM,EAAE,kCAAkC;QAC1C,WAAW,EAAE,oEAAoE;QACjF,UAAU,EAAE,0CAA0C;QACtD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC;KAC7C;IAED,KAAK,EAAE;QACL,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;QAC/B,KAAK,EAAE,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;KACtD;IAED,QAAQ,EAAE,EAAE;IAEZ,MAAM,EAAE,mBAAmB;IAC3B,OAAO,EAAE,oBAAoB;IAE7B,OAAO,EAAE;QACP;YACE,IAAI,EAAE,0BAA0B;YAChC,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE;;;;;eAKE;YACT,QAAQ,EAAE;gBACR,WAAW,EAAE,CAAC;gBACd,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,oCAAoC;wBAC1C,IAAI,EAAE,EAAE;wBACR,MAAM,EAAE,EAAE;wBACV,OAAO,EAAE,oBAAoB;qBAC9B;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,+CAA+C;YAC5D,SAAS,EAAE,mCAAmC;YAC9C,QAAQ,EAAE;gBACR,WAAW,EAAE,CAAC;aACf;SACF;KACF;CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/extractors/maven-compiler/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,189 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { readFileSync } from 'node:fs';
3
+ import { join, dirname } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+ import mavenCompilerExtractor from './index.js';
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+ describe('Maven Compiler Extractor', () => {
8
+ describe('detectMavenCompiler', () => {
9
+ it('should detect Maven compiler output with high confidence', () => {
10
+ const output = `[INFO] Compiling 45 source files to target/classes
11
+ [ERROR] COMPILATION ERROR :
12
+ [ERROR] /path/to/File.java:[42,25] cannot find symbol
13
+ [INFO] 2 errors
14
+ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile`;
15
+ const result = mavenCompilerExtractor.detect(output);
16
+ expect(result.confidence).toBe(100);
17
+ expect(result.patterns).toContain('[ERROR] COMPILATION ERROR marker');
18
+ expect(result.patterns).toContain('maven-compiler-plugin reference');
19
+ expect(result.patterns).toContain('file:[line,column] format');
20
+ expect(result.patterns).toContain('error count summary');
21
+ expect(result.patterns).toContain('Java compiler error pattern');
22
+ expect(result.reason).toBe('Maven compiler plugin output detected');
23
+ });
24
+ it('should have low confidence for non-compiler output', () => {
25
+ const output = `Some random build output
26
+ No compilation errors here
27
+ Just normal text`;
28
+ const result = mavenCompilerExtractor.detect(output);
29
+ expect(result.confidence).toBeLessThan(40);
30
+ });
31
+ it('should detect compilation error marker alone (partial match)', () => {
32
+ const output = `[INFO] Building project
33
+ [ERROR] COMPILATION ERROR :
34
+ [ERROR] Some compilation issue occurred`;
35
+ const result = mavenCompilerExtractor.detect(output);
36
+ // COMPILATION ERROR marker is worth 30 points, so this is correct
37
+ expect(result.confidence).toBe(30);
38
+ expect(result.patterns).toContain('[ERROR] COMPILATION ERROR marker');
39
+ });
40
+ });
41
+ describe('extractMavenCompiler', () => {
42
+ it('should extract "cannot find symbol" errors', () => {
43
+ const output = `[INFO] Compiling 45 source files
44
+ [ERROR] COMPILATION ERROR :
45
+ [ERROR] /Users/dev/project/src/main/java/com/example/Foo.java:[42,25] cannot find symbol
46
+ symbol: method extractComponent()
47
+ location: class com.example.RefactoringActions
48
+ [INFO] 1 error`;
49
+ const result = mavenCompilerExtractor.extract(output);
50
+ expect(result.totalErrors).toBe(1);
51
+ expect(result.errors).toHaveLength(1);
52
+ expect(result.errors[0]).toMatchObject({
53
+ file: 'src/main/java/com/example/Foo.java',
54
+ line: 42,
55
+ column: 25,
56
+ message: expect.stringContaining('cannot find symbol'),
57
+ });
58
+ expect(result.errors[0]?.message).toContain('symbol: method extractComponent()');
59
+ expect(result.errors[0]?.message).toContain('location: class com.example.RefactoringActions');
60
+ });
61
+ it('should extract "incompatible types" errors', () => {
62
+ const output = `[ERROR] COMPILATION ERROR :
63
+ [ERROR] /project/src/main/java/com/example/Bar.java:[15,8] incompatible types: java.lang.String cannot be converted to int
64
+ [INFO] 1 error`;
65
+ const result = mavenCompilerExtractor.extract(output);
66
+ expect(result.totalErrors).toBe(1);
67
+ expect(result.errors[0]).toMatchObject({
68
+ file: 'src/main/java/com/example/Bar.java',
69
+ line: 15,
70
+ column: 8,
71
+ message: expect.stringContaining('incompatible types'),
72
+ });
73
+ });
74
+ it('should extract multiple compilation errors', () => {
75
+ const output = `[ERROR] COMPILATION ERROR :
76
+ [ERROR] /path/to/Foo.java:[42,25] cannot find symbol
77
+ [ERROR] /path/to/Bar.java:[15,8] incompatible types: String cannot be converted to int
78
+ [ERROR] /path/to/Baz.java:[8,1] class, interface, or enum expected
79
+ [INFO] 3 errors`;
80
+ const result = mavenCompilerExtractor.extract(output);
81
+ expect(result.totalErrors).toBe(3);
82
+ expect(result.errors).toHaveLength(3);
83
+ expect(result.summary).toContain('3 compilation error(s)');
84
+ });
85
+ it('should deduplicate identical errors', () => {
86
+ const output = `[ERROR] COMPILATION ERROR :
87
+ [ERROR] /path/to/Foo.java:[42,25] cannot find symbol
88
+ [ERROR] /path/to/Foo.java:[42,25] cannot find symbol
89
+ [INFO] 2 errors`;
90
+ const result = mavenCompilerExtractor.extract(output);
91
+ // Should only report once, not twice
92
+ expect(result.totalErrors).toBe(1);
93
+ });
94
+ it('should limit errors to MAX_ERRORS_IN_ARRAY', () => {
95
+ // Create 20 compilation errors
96
+ const errors = Array.from({ length: 20 }, (_, i) => `[ERROR] /path/File${i}.java:[${i + 1},1] error ${i}`).join('\n');
97
+ const output = `[ERROR] COMPILATION ERROR :\n${errors}\n[INFO] 20 errors`;
98
+ const result = mavenCompilerExtractor.extract(output);
99
+ expect(result.totalErrors).toBe(20); // All counted
100
+ expect(result.errors.length).toBeLessThanOrEqual(10); // But array limited
101
+ });
102
+ it('should provide guidance', () => {
103
+ const output = `[ERROR] COMPILATION ERROR :
104
+ [ERROR] /path/Foo.java:[1,1] cannot find symbol
105
+ [INFO] 1 error`;
106
+ const result = mavenCompilerExtractor.extract(output);
107
+ expect(result.guidance).toBeDefined();
108
+ expect(result.guidance).toContain('compilation error');
109
+ });
110
+ it('should return 0 errors for low confidence detection', () => {
111
+ const output = 'Some random text with no compilation errors';
112
+ const result = mavenCompilerExtractor.extract(output);
113
+ expect(result.totalErrors).toBe(0);
114
+ expect(result.errors).toHaveLength(0);
115
+ expect(result.summary).toBe('Not Maven compiler output');
116
+ });
117
+ it('should extract errors from real-world test data', () => {
118
+ // Use co-located sample data
119
+ const testDataPath = join(__dirname, 'samples/maven-compile-error.txt');
120
+ const output = readFileSync(testDataPath, 'utf-8');
121
+ const result = mavenCompilerExtractor.extract(output);
122
+ // Real-world data should have 2 errors
123
+ expect(result.totalErrors).toBe(2);
124
+ expect(result.errors).toHaveLength(2);
125
+ // First error: cannot find symbol
126
+ expect(result.errors[0]).toMatchObject({
127
+ file: expect.stringContaining('Foo.java'),
128
+ line: 42,
129
+ column: 25,
130
+ });
131
+ expect(result.errors[0]?.message).toContain('cannot find symbol');
132
+ expect(result.errors[0]?.message).toContain('extractComponent()');
133
+ // Second error: incompatible types
134
+ expect(result.errors[1]).toMatchObject({
135
+ file: expect.stringContaining('Bar.java'),
136
+ line: 15,
137
+ column: 8,
138
+ });
139
+ expect(result.errors[1]?.message).toContain('incompatible types');
140
+ });
141
+ it('should extract relative paths correctly', () => {
142
+ const output = `[ERROR] COMPILATION ERROR :
143
+ [ERROR] /Users/jeff/workspace/project/src/main/java/com/example/Test.java:[10,5] error message
144
+ [INFO] 1 error`;
145
+ const result = mavenCompilerExtractor.extract(output);
146
+ expect(result.errors[0]?.file).toBe('src/main/java/com/example/Test.java');
147
+ });
148
+ it('should handle errors without column numbers', () => {
149
+ const output = `[ERROR] COMPILATION ERROR :
150
+ [ERROR] /path/to/File.java:[42] some error without column
151
+ [INFO] 1 error`;
152
+ const result = mavenCompilerExtractor.extract(output);
153
+ expect(result.errors[0]).toMatchObject({
154
+ file: expect.any(String),
155
+ line: 42,
156
+ message: 'some error without column',
157
+ });
158
+ expect(result.errors[0]?.column).toBeUndefined();
159
+ });
160
+ it('should group errors by file in summary', () => {
161
+ const output = `[ERROR] COMPILATION ERROR :
162
+ [ERROR] /path/to/Foo.java:[1,1] error 1
163
+ [ERROR] /path/to/Foo.java:[2,1] error 2
164
+ [ERROR] /path/to/Bar.java:[1,1] error 3
165
+ [INFO] 3 errors`;
166
+ const result = mavenCompilerExtractor.extract(output);
167
+ expect(result.summary).toContain('3 compilation error(s)');
168
+ expect(result.summary).toContain('2 file(s)');
169
+ });
170
+ });
171
+ describe('plugin metadata', () => {
172
+ it('should have correct metadata', () => {
173
+ expect(mavenCompilerExtractor.metadata.name).toBe('maven-compiler');
174
+ expect(mavenCompilerExtractor.metadata.version).toBeDefined();
175
+ expect(mavenCompilerExtractor.metadata.description).toContain('Maven');
176
+ });
177
+ it('should have hints for fast filtering', () => {
178
+ expect(mavenCompilerExtractor.hints).toBeDefined();
179
+ expect(mavenCompilerExtractor.hints?.required).toContain('[ERROR]');
180
+ expect(mavenCompilerExtractor.hints?.required).toContain('[INFO]');
181
+ expect(mavenCompilerExtractor.hints?.anyOf).toBeDefined();
182
+ });
183
+ it('should have samples for testing', () => {
184
+ expect(mavenCompilerExtractor.samples).toBeDefined();
185
+ expect(mavenCompilerExtractor.samples.length).toBeGreaterThan(0);
186
+ });
187
+ });
188
+ });
189
+ //# sourceMappingURL=index.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["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ACnE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Maven Surefire/Failsafe Test Extractor Plugin
3
+ *
4
+ * Extracts test failures from Maven Surefire and Failsafe plugin output.
5
+ * Supports JUnit 4, JUnit 5, and AssertJ assertion failures.
6
+ *
7
+ * @package @vibe-validate/extractors
8
+ */
9
+ import type { ExtractorPlugin, DetectionResult, ErrorExtractorResult } from '../../types.js';
10
+ /**
11
+ * Detects if output is from Maven Surefire/Failsafe
12
+ */
13
+ export declare function detectMavenSurefire(output: string): DetectionResult;
14
+ /**
15
+ * Extracts test failures from Maven Surefire/Failsafe output
16
+ */
17
+ export declare function extractMavenSurefire(output: string, command?: string): ErrorExtractorResult;
18
+ /**
19
+ * Maven Surefire/Failsafe Extractor Plugin
20
+ */
21
+ declare const mavenSurefireExtractor: ExtractorPlugin;
22
+ export default mavenSurefireExtractor;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extractors/maven-surefire/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,oBAAoB,EAErB,MAAM,gBAAgB,CAAC;AA4CxB;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CA2CnE;AAED;;GAEG;AAEH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,GACf,oBAAoB,CAsLtB;AAED;;GAEG;AACH,QAAA,MAAM,sBAAsB,EAAE,eA6D7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}