@vibe-validate/extractors 0.17.4 → 0.17.5-rc.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 (134) hide show
  1. package/dist/extractor-registry.d.ts.map +1 -1
  2. package/dist/extractor-registry.js +8 -8
  3. package/dist/extractor-registry.js.map +1 -1
  4. package/dist/extractors/ava/index.d.ts.map +1 -1
  5. package/dist/extractors/ava/index.js +15 -14
  6. package/dist/extractors/ava/index.js.map +1 -1
  7. package/dist/extractors/ava/index.test.js +30 -20
  8. package/dist/extractors/ava/index.test.js.map +1 -1
  9. package/dist/extractors/eslint/index.d.ts.map +1 -1
  10. package/dist/extractors/eslint/index.js +1 -1
  11. package/dist/extractors/eslint/index.js.map +1 -1
  12. package/dist/extractors/eslint/index.test.js.map +1 -1
  13. package/dist/extractors/generic/index.test.js.map +1 -1
  14. package/dist/extractors/jasmine/index.test.js.map +1 -1
  15. package/dist/extractors/jest/index.d.ts.map +1 -1
  16. package/dist/extractors/jest/index.js.map +1 -1
  17. package/dist/extractors/jest/index.test.js.map +1 -1
  18. package/dist/extractors/junit/index.d.ts.map +1 -1
  19. package/dist/extractors/junit/index.js +5 -5
  20. package/dist/extractors/junit/index.js.map +1 -1
  21. package/dist/extractors/junit/index.test.js.map +1 -1
  22. package/dist/extractors/maven-checkstyle/index.d.ts.map +1 -1
  23. package/dist/extractors/maven-checkstyle/index.js +1 -1
  24. package/dist/extractors/maven-checkstyle/index.js.map +1 -1
  25. package/dist/extractors/maven-checkstyle/index.test.js +2 -2
  26. package/dist/extractors/maven-checkstyle/index.test.js.map +1 -1
  27. package/dist/extractors/maven-compiler/index.d.ts.map +1 -1
  28. package/dist/extractors/maven-compiler/index.js +1 -1
  29. package/dist/extractors/maven-compiler/index.js.map +1 -1
  30. package/dist/extractors/maven-compiler/index.test.js +1 -1
  31. package/dist/extractors/maven-compiler/index.test.js.map +1 -1
  32. package/dist/extractors/maven-surefire/index.d.ts.map +1 -1
  33. package/dist/extractors/maven-surefire/index.js.map +1 -1
  34. package/dist/extractors/maven-surefire/index.test.js.map +1 -1
  35. package/dist/extractors/mocha/index.test.js.map +1 -1
  36. package/dist/extractors/playwright/index.test.js.map +1 -1
  37. package/dist/extractors/tap/index.test.js +2 -2
  38. package/dist/extractors/tap/index.test.js.map +1 -1
  39. package/dist/extractors/typescript/index.d.ts.map +1 -1
  40. package/dist/extractors/typescript/index.js +16 -19
  41. package/dist/extractors/typescript/index.js.map +1 -1
  42. package/dist/extractors/typescript/index.test.js.map +1 -1
  43. package/dist/extractors/vitest/index.d.ts.map +1 -1
  44. package/dist/extractors/vitest/index.js +16 -7
  45. package/dist/extractors/vitest/index.js.map +1 -1
  46. package/dist/extractors/vitest/index.test.js +38 -0
  47. package/dist/extractors/vitest/index.test.js.map +1 -1
  48. package/dist/plugin-loader.d.ts.map +1 -1
  49. package/dist/plugin-loader.js +1 -1
  50. package/dist/plugin-loader.js.map +1 -1
  51. package/dist/result-schema-export.d.ts.map +1 -1
  52. package/dist/result-schema-export.js.map +1 -1
  53. package/dist/result-schema.d.ts.map +1 -1
  54. package/dist/result-schema.js +1 -1
  55. package/dist/result-schema.js.map +1 -1
  56. package/dist/sandboxed-extractor.d.ts +1 -1
  57. package/dist/sandboxed-extractor.d.ts.map +1 -1
  58. package/dist/sandboxed-extractor.js.map +1 -1
  59. package/dist/scripts/generate-result-schema.js +1 -1
  60. package/dist/scripts/generate-result-schema.js.map +1 -1
  61. package/dist/smart-extractor.d.ts.map +1 -1
  62. package/dist/smart-extractor.js.map +1 -1
  63. package/dist/utils/guidance-generator.d.ts.map +1 -1
  64. package/dist/utils/guidance-generator.js +4 -7
  65. package/dist/utils/guidance-generator.js.map +1 -1
  66. package/dist/utils/test-framework-utils.d.ts.map +1 -1
  67. package/dist/utils/test-framework-utils.js.map +1 -1
  68. package/dist/utils.js +1 -1
  69. package/dist/utils.js.map +1 -1
  70. package/package.json +8 -8
  71. package/dist/ava-extractor.d.ts +0 -24
  72. package/dist/ava-extractor.d.ts.map +0 -1
  73. package/dist/ava-extractor.js +0 -343
  74. package/dist/ava-extractor.js.map +0 -1
  75. package/dist/eslint-extractor.d.ts +0 -25
  76. package/dist/eslint-extractor.d.ts.map +0 -1
  77. package/dist/eslint-extractor.js +0 -145
  78. package/dist/eslint-extractor.js.map +0 -1
  79. package/dist/generic-extractor.d.ts +0 -35
  80. package/dist/generic-extractor.d.ts.map +0 -1
  81. package/dist/generic-extractor.js +0 -128
  82. package/dist/generic-extractor.js.map +0 -1
  83. package/dist/jasmine-extractor.d.ts +0 -23
  84. package/dist/jasmine-extractor.d.ts.map +0 -1
  85. package/dist/jasmine-extractor.js +0 -151
  86. package/dist/jasmine-extractor.js.map +0 -1
  87. package/dist/jest-extractor.d.ts +0 -29
  88. package/dist/jest-extractor.d.ts.map +0 -1
  89. package/dist/jest-extractor.js +0 -174
  90. package/dist/jest-extractor.js.map +0 -1
  91. package/dist/junit-extractor.d.ts +0 -24
  92. package/dist/junit-extractor.d.ts.map +0 -1
  93. package/dist/junit-extractor.js +0 -193
  94. package/dist/junit-extractor.js.map +0 -1
  95. package/dist/maven-checkstyle-extractor.d.ts +0 -20
  96. package/dist/maven-checkstyle-extractor.d.ts.map +0 -1
  97. package/dist/maven-checkstyle-extractor.js +0 -208
  98. package/dist/maven-checkstyle-extractor.js.map +0 -1
  99. package/dist/maven-compiler-extractor.d.ts +0 -20
  100. package/dist/maven-compiler-extractor.d.ts.map +0 -1
  101. package/dist/maven-compiler-extractor.js +0 -218
  102. package/dist/maven-compiler-extractor.js.map +0 -1
  103. package/dist/maven-surefire-extractor.d.ts +0 -20
  104. package/dist/maven-surefire-extractor.d.ts.map +0 -1
  105. package/dist/maven-surefire-extractor.js +0 -228
  106. package/dist/maven-surefire-extractor.js.map +0 -1
  107. package/dist/mocha-extractor.d.ts +0 -23
  108. package/dist/mocha-extractor.d.ts.map +0 -1
  109. package/dist/mocha-extractor.js +0 -160
  110. package/dist/mocha-extractor.js.map +0 -1
  111. package/dist/playwright-extractor.d.ts +0 -38
  112. package/dist/playwright-extractor.d.ts.map +0 -1
  113. package/dist/playwright-extractor.js +0 -239
  114. package/dist/playwright-extractor.js.map +0 -1
  115. package/dist/sandbox.test.d.ts +0 -8
  116. package/dist/sandbox.test.d.ts.map +0 -1
  117. package/dist/sandbox.test.js +0 -395
  118. package/dist/sandbox.test.js.map +0 -1
  119. package/dist/sandboxed-extractor.test.d.ts +0 -5
  120. package/dist/sandboxed-extractor.test.d.ts.map +0 -1
  121. package/dist/sandboxed-extractor.test.js +0 -346
  122. package/dist/sandboxed-extractor.test.js.map +0 -1
  123. package/dist/tap-extractor.d.ts +0 -24
  124. package/dist/tap-extractor.d.ts.map +0 -1
  125. package/dist/tap-extractor.js +0 -217
  126. package/dist/tap-extractor.js.map +0 -1
  127. package/dist/typescript-extractor.d.ts +0 -25
  128. package/dist/typescript-extractor.d.ts.map +0 -1
  129. package/dist/typescript-extractor.js +0 -96
  130. package/dist/typescript-extractor.js.map +0 -1
  131. package/dist/vitest-extractor.d.ts +0 -38
  132. package/dist/vitest-extractor.d.ts.map +0 -1
  133. package/dist/vitest-extractor.js +0 -540
  134. package/dist/vitest-extractor.js.map +0 -1
@@ -1,218 +0,0 @@
1
- /**
2
- * Maven Compiler error extractor
3
- *
4
- * Extracts Java compilation errors from Maven compiler plugin output.
5
- * Supports output from `mvn compile` and `mvn test` when compilation fails.
6
- */
7
- import { MAX_ERRORS_IN_ARRAY } from './result-schema.js';
8
- import { extractRelativePath } from './maven-utils.js';
9
- const COMPILER_PATTERNS = {
10
- // [ERROR] /path/to/File.java:[line,column] error message
11
- // eslint-disable-next-line sonarjs/slow-regex -- Safe: Maven compiler output is structured, limited line length
12
- errorLine: /^\[ERROR\]\s+([^:]+):\[(\d+)(?:,(\d+))?\]\s+(.+)$/,
13
- // Markers for high-confidence detection
14
- compilationErrorMarker: /^\[ERROR\]\s+COMPILATION ERROR\s*:/,
15
- compilerPluginMarker: /maven-compiler-plugin/,
16
- errorCountMarker: /^\[INFO\]\s+(\d+)\s+errors?\s*$/,
17
- // Common Java compiler error patterns
18
- compilerErrorPatterns: [
19
- 'cannot find symbol',
20
- 'incompatible types',
21
- 'class, interface, or enum expected',
22
- 'illegal start of expression',
23
- 'reached end of file while parsing',
24
- 'package .* does not exist',
25
- 'method .* cannot be applied',
26
- ],
27
- };
28
- /**
29
- * Detects if output is from Maven compiler plugin
30
- */
31
- // eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 22 acceptable for detection (sequentially checks 5 distinct Maven compiler output patterns for accurate detection)
32
- export function detectMavenCompiler(output) {
33
- const lines = output.split('\n');
34
- let score = 0;
35
- const foundPatterns = [];
36
- // Look for compilation error markers
37
- let hasErrorLineFormat = false;
38
- let hasCompilerErrorPattern = false;
39
- for (const line of lines) {
40
- // High-value markers (30 points each)
41
- if (COMPILER_PATTERNS.compilationErrorMarker.test(line)) {
42
- score += 30;
43
- foundPatterns.push('[ERROR] COMPILATION ERROR marker');
44
- }
45
- if (COMPILER_PATTERNS.compilerPluginMarker.test(line)) {
46
- score += 30;
47
- foundPatterns.push('maven-compiler-plugin reference');
48
- }
49
- // Medium-value markers (20 points)
50
- if (COMPILER_PATTERNS.errorCountMarker.test(line)) {
51
- score += 20;
52
- foundPatterns.push('error count summary');
53
- }
54
- if (!hasErrorLineFormat && COMPILER_PATTERNS.errorLine.test(line)) {
55
- score += 20;
56
- foundPatterns.push('file:[line,column] format');
57
- hasErrorLineFormat = true;
58
- }
59
- // Low-value markers (10 points for first match)
60
- if (!hasCompilerErrorPattern) {
61
- for (const pattern of COMPILER_PATTERNS.compilerErrorPatterns) {
62
- if (line.includes(pattern)) {
63
- score += 10;
64
- foundPatterns.push('Java compiler error pattern');
65
- hasCompilerErrorPattern = true;
66
- break;
67
- }
68
- }
69
- }
70
- }
71
- // Determine reason based on score
72
- let reason;
73
- if (score >= 70) {
74
- reason = 'Maven compiler plugin output detected';
75
- }
76
- else if (score >= 40) {
77
- reason = 'Possible Maven compiler output';
78
- }
79
- else {
80
- reason = 'Not Maven compiler output';
81
- }
82
- return {
83
- confidence: Math.min(score, 100),
84
- patterns: foundPatterns,
85
- reason,
86
- };
87
- }
88
- /**
89
- * Extracts compilation errors from Maven compiler output
90
- */
91
- // eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 21 acceptable for extraction (parses Maven compiler output with context lines, deduplication, and error formatting)
92
- export function extractMavenCompiler(output, command) {
93
- const detection = detectMavenCompiler(output);
94
- if (detection.confidence < 40) {
95
- return {
96
- summary: 'Not Maven compiler output',
97
- totalErrors: 0,
98
- errors: [],
99
- metadata: {
100
- detection: {
101
- extractor: 'maven-compiler',
102
- confidence: detection.confidence,
103
- patterns: detection.patterns,
104
- reason: detection.reason,
105
- },
106
- confidence: detection.confidence,
107
- completeness: 100,
108
- issues: [],
109
- },
110
- };
111
- }
112
- const compilationErrors = [];
113
- const lines = output.split('\n');
114
- // Parse error lines
115
- for (let i = 0; i < lines.length; i++) {
116
- const line = lines[i];
117
- const match = COMPILER_PATTERNS.errorLine.exec(line);
118
- if (match) {
119
- const [, filePath, lineStr, colStr, message] = match;
120
- // Collect additional context (symbol, location) from next lines
121
- const contextLines = [];
122
- for (let j = i + 1; j < Math.min(i + 5, lines.length); j++) {
123
- const nextLine = lines[j]?.trim();
124
- if (nextLine && !nextLine.startsWith('[') && (nextLine.startsWith('symbol:') || nextLine.startsWith('location:'))) {
125
- contextLines.push(nextLine);
126
- }
127
- else if (nextLine?.startsWith('[')) {
128
- // Hit next Maven log line
129
- break;
130
- }
131
- }
132
- const fullMessage = contextLines.length > 0
133
- ? `${message}\n${contextLines.join('\n')}`
134
- : message;
135
- compilationErrors.push({
136
- file: extractRelativePath(filePath),
137
- line: Number.parseInt(lineStr, 10),
138
- column: colStr ? Number.parseInt(colStr, 10) : undefined,
139
- message: fullMessage.trim(),
140
- });
141
- }
142
- }
143
- // Remove duplicates (Maven sometimes reports errors twice)
144
- const uniqueErrors = deduplicateErrors(compilationErrors);
145
- // Convert to FormattedError format
146
- const errors = uniqueErrors.slice(0, MAX_ERRORS_IN_ARRAY).map((e) => ({
147
- file: e.file,
148
- line: e.line,
149
- column: e.column,
150
- message: e.message,
151
- }));
152
- // Group by file for summary
153
- const fileGroups = groupByFile(uniqueErrors);
154
- const summary = `${uniqueErrors.length} compilation error(s) in ${fileGroups.size} file(s)`;
155
- // Generate guidance
156
- const guidance = uniqueErrors.length > 0
157
- ? `Fix Java compilation errors. Run ${command ?? 'mvn compile'} to see all details.`
158
- : undefined;
159
- // Create error summary
160
- const errorSummary = errors.length > 0
161
- ? errors.map((e, i) => {
162
- const location = e.column ? `${e.file}:${e.line}:${e.column}` : `${e.file}:${e.line}`;
163
- return `[Error ${i + 1}/${errors.length}] ${location}\n${e.message}`;
164
- }).join('\n\n')
165
- : undefined;
166
- return {
167
- summary,
168
- totalErrors: uniqueErrors.length,
169
- errors,
170
- guidance,
171
- errorSummary,
172
- metadata: {
173
- detection: {
174
- extractor: 'maven-compiler',
175
- confidence: detection.confidence,
176
- patterns: detection.patterns,
177
- reason: detection.reason,
178
- },
179
- confidence: 100,
180
- completeness: 100,
181
- issues: [],
182
- },
183
- };
184
- }
185
- // Relative path extraction moved to maven-utils.ts (shared with maven-checkstyle-extractor)
186
- /**
187
- * Deduplicate compilation errors
188
- */
189
- function deduplicateErrors(errors) {
190
- const seen = new Set();
191
- const unique = [];
192
- for (const e of errors) {
193
- const key = `${e.file}:${e.line}:${e.column}:${e.message.split('\n')[0]}`;
194
- if (!seen.has(key)) {
195
- seen.add(key);
196
- unique.push(e);
197
- }
198
- }
199
- return unique;
200
- }
201
- /**
202
- * Group errors by file
203
- */
204
- function groupByFile(errors) {
205
- const groups = new Map();
206
- for (const error of errors) {
207
- const file = error.file || 'unknown';
208
- if (!groups.has(file)) {
209
- groups.set(file, []);
210
- }
211
- const group = groups.get(file);
212
- if (group) {
213
- group.push(error);
214
- }
215
- }
216
- return groups;
217
- }
218
- //# sourceMappingURL=maven-compiler-extractor.js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;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * Maven Surefire/Failsafe (JUnit) error extractor
3
- *
4
- * Extracts test failures from Maven Surefire and Failsafe plugin output.
5
- * Supports JUnit 4, JUnit 5, and AssertJ assertion failures.
6
- */
7
- import type { ErrorExtractorResult } from './types.js';
8
- /**
9
- * Detects if output is from Maven Surefire/Failsafe
10
- */
11
- export declare function detectMavenSurefire(output: string): {
12
- confidence: number;
13
- patterns: string[];
14
- reason: string;
15
- };
16
- /**
17
- * Extracts test failures from Maven Surefire/Failsafe output
18
- */
19
- export declare function extractMavenSurefire(output: string, command?: string): ErrorExtractorResult;
20
- //# sourceMappingURL=maven-surefire-extractor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"maven-surefire-extractor.d.ts","sourceRoot":"","sources":["../src/maven-surefire-extractor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAkB,MAAM,YAAY,CAAC;AAkCvE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CA2CA;AAED;;GAEG;AAEH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,GACf,oBAAoB,CAsLtB"}
@@ -1,228 +0,0 @@
1
- /**
2
- * Maven Surefire/Failsafe (JUnit) error extractor
3
- *
4
- * Extracts test failures from Maven Surefire and Failsafe plugin output.
5
- * Supports JUnit 4, JUnit 5, and AssertJ assertion failures.
6
- */
7
- import { MAX_ERRORS_IN_ARRAY } from './result-schema.js';
8
- /* eslint-disable sonarjs/slow-regex -- All regexes safe: Maven Surefire output is structured with limited line length */
9
- const SUREFIRE_PATTERNS = {
10
- // [ERROR] Tests run: 12, Failures: 8, Errors: 3, Skipped: 1
11
- testSummary: /^\[ERROR\]\s+Tests run:\s+(\d+),\s+Failures:\s+(\d+),\s+Errors:\s+(\d+)/,
12
- // [ERROR] com.example.FooTest.testBar:42 Expected 5 but was 3
13
- errorShort: /^\[ERROR\]\s+([^:]+)\.([^:]+):(\d+)\s+(\w+(?:Error|Exception|Failure))?\s*(.+)$/,
14
- // [ERROR] com.example.FooTest.testBar -- Time elapsed: 0.123 s <<< FAILURE!
15
- errorHeader: /^\[ERROR\]\s+([^.]+)\.([^\s]+)\s+.*<<<\s+(FAILURE|ERROR)!/,
16
- // Exception type line
17
- exceptionType: /^([\w.]+(?:Error|Exception|AssertionError|AssertionFailedError)):\s*(.*)$/,
18
- // "at package.Class.method(File.java:123)"
19
- stackTraceLine: /^\s+at\s+([^(]+)\(([^:]+):(\d+)\)/,
20
- };
21
- /* eslint-enable sonarjs/slow-regex */
22
- /**
23
- * Detects if output is from Maven Surefire/Failsafe
24
- */
25
- export function detectMavenSurefire(output) {
26
- const lines = output.split('\n');
27
- let score = 0;
28
- const foundPatterns = [];
29
- for (const line of lines) {
30
- if (line.includes('maven-surefire-plugin') ?? line.includes('maven-failsafe-plugin')) {
31
- score += 40;
32
- foundPatterns.push('Maven test plugin reference');
33
- }
34
- if (SUREFIRE_PATTERNS.testSummary.exec(line)) {
35
- score += 40;
36
- foundPatterns.push('Test summary (Tests run, Failures, Errors)');
37
- }
38
- if (line.includes('<<< FAILURE!') || line.includes('<<< ERROR!')) {
39
- score += 20;
40
- foundPatterns.push('Test failure markers');
41
- }
42
- if (line.includes('[ERROR] Failures:') || line.includes('[ERROR] Errors:')) {
43
- score += 15;
44
- foundPatterns.push('Test failure section headers');
45
- }
46
- if (/AssertionError|AssertionFailedError/.exec(line)) {
47
- score += 10;
48
- foundPatterns.push('JUnit assertion errors');
49
- }
50
- }
51
- // Determine reason based on score
52
- let reason;
53
- if (score >= 70) {
54
- reason = 'Maven Surefire/Failsafe test output detected';
55
- }
56
- else if (score >= 40) {
57
- reason = 'Possible Maven test output';
58
- }
59
- else {
60
- reason = 'Not Maven test output';
61
- }
62
- return {
63
- confidence: Math.min(score, 100),
64
- patterns: foundPatterns,
65
- reason,
66
- };
67
- }
68
- /**
69
- * Extracts test failures from Maven Surefire/Failsafe output
70
- */
71
- // eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 43 acceptable for Maven Surefire parser (handles multiple test output formats with state machine)
72
- export function extractMavenSurefire(output, command) {
73
- const detection = detectMavenSurefire(output);
74
- if (detection.confidence < 40) {
75
- return {
76
- summary: 'Not Maven test output',
77
- totalErrors: 0,
78
- errors: [],
79
- metadata: {
80
- detection: {
81
- extractor: 'maven-surefire',
82
- confidence: detection.confidence,
83
- patterns: detection.patterns,
84
- reason: detection.reason,
85
- },
86
- confidence: detection.confidence,
87
- completeness: 100,
88
- issues: [],
89
- },
90
- };
91
- }
92
- const failures = [];
93
- const lines = output.split('\n');
94
- // Extract test summary for metadata
95
- let totalFailures = 0;
96
- let totalErrors = 0;
97
- for (const line of lines) {
98
- const summaryMatch = SUREFIRE_PATTERNS.testSummary.exec(line);
99
- if (summaryMatch) {
100
- // totalTests would be summaryMatch[1] if needed
101
- totalFailures = Number.parseInt(summaryMatch[2], 10);
102
- totalErrors = Number.parseInt(summaryMatch[3], 10);
103
- }
104
- }
105
- // Parse failure details
106
- let currentFailure = null;
107
- let inStackTrace = false;
108
- for (const line of lines) {
109
- // Check for error header: [ERROR] Class.method -- Time elapsed: ... <<< FAILURE!
110
- const headerMatch = SUREFIRE_PATTERNS.errorHeader.exec(line);
111
- if (headerMatch) {
112
- // Save previous failure if exists
113
- if (currentFailure?.testClass && currentFailure?.testMethod) {
114
- failures.push(currentFailure);
115
- }
116
- const [, testClass, testMethod, errorType] = headerMatch;
117
- currentFailure = {
118
- testClass: testClass.trim(),
119
- testMethod: testMethod.trim(),
120
- errorType: errorType,
121
- message: '',
122
- stackTrace: [],
123
- };
124
- inStackTrace = false;
125
- continue;
126
- }
127
- // Check for short error format: [ERROR] Class.method:line Message
128
- const shortMatch = SUREFIRE_PATTERNS.errorShort.exec(line);
129
- if (shortMatch && !currentFailure) {
130
- const [, fullMethod, testMethod, lineStr, exceptionType, message] = shortMatch;
131
- const testClass = fullMethod.substring(0, fullMethod.lastIndexOf('.'));
132
- failures.push({
133
- testClass,
134
- testMethod,
135
- line: Number.parseInt(lineStr, 10),
136
- errorType: 'FAILURE',
137
- exceptionType: exceptionType ?? undefined,
138
- message: message.trim(),
139
- });
140
- continue;
141
- }
142
- // Parse exception type and message
143
- if (currentFailure && !currentFailure.message) {
144
- const exceptionMatch = SUREFIRE_PATTERNS.exceptionType.exec(line);
145
- if (exceptionMatch) {
146
- const [, exceptionType, message] = exceptionMatch;
147
- currentFailure.exceptionType = exceptionType;
148
- currentFailure.message = message.trim();
149
- inStackTrace = true;
150
- continue;
151
- }
152
- }
153
- // Parse stack trace
154
- if (currentFailure && inStackTrace) {
155
- const stackMatch = SUREFIRE_PATTERNS.stackTraceLine.exec(line);
156
- if (stackMatch) {
157
- const [, method, file, lineStr] = stackMatch;
158
- // Extract file and line from first stack frame
159
- if (!currentFailure.file && file.endsWith('.java')) {
160
- currentFailure.file = file;
161
- currentFailure.line = Number.parseInt(lineStr, 10);
162
- }
163
- currentFailure.stackTrace = currentFailure.stackTrace ?? [];
164
- currentFailure.stackTrace.push(` at ${method}(${file}:${lineStr})`);
165
- // Limit stack trace depth
166
- if (currentFailure.stackTrace.length >= 3) {
167
- inStackTrace = false;
168
- }
169
- }
170
- }
171
- // End of error block
172
- if (line.trim() === '' && currentFailure) {
173
- inStackTrace = false;
174
- }
175
- }
176
- // Save last failure
177
- if (currentFailure?.testClass && currentFailure?.testMethod) {
178
- failures.push(currentFailure);
179
- }
180
- // Convert to FormattedError format
181
- const errors = failures.slice(0, MAX_ERRORS_IN_ARRAY).map((f) => {
182
- const testId = `${f.testClass}.${f.testMethod}`;
183
- let message = f.message ?? 'Test failed';
184
- // Include exception type if available
185
- if (f.exceptionType && !message.includes(f.exceptionType)) {
186
- message = `${f.exceptionType}: ${message}`;
187
- }
188
- // Add stack trace preview (first line only)
189
- if (f.stackTrace && f.stackTrace.length > 0) {
190
- message += `\n${f.stackTrace[0]}`;
191
- }
192
- return {
193
- file: f.file ?? `${f.testClass.replaceAll('.', '/')}.java`,
194
- line: f.line,
195
- message: `Test: ${testId}\n${message}`,
196
- };
197
- });
198
- const failureCount = totalFailures ?? failures.filter((f) => f.errorType === 'FAILURE').length;
199
- const errorCount = totalErrors ?? failures.filter((f) => f.errorType === 'ERROR').length;
200
- const summary = `${failureCount + errorCount} test failure(s): ${failureCount} failures, ${errorCount} errors`;
201
- // Generate guidance
202
- const guidance = failures.length > 0
203
- ? `Fix test failures. Run ${command ?? 'mvn test'} to see full details.`
204
- : undefined;
205
- // Create error summary
206
- const errorSummary = errors.length > 0
207
- ? errors.map((e, i) => `[Test ${i + 1}/${errors.length}] ${e.file}:${e.line ?? '?'}\n${e.message}`).join('\n\n')
208
- : undefined;
209
- return {
210
- summary,
211
- totalErrors: failures.length,
212
- errors,
213
- guidance,
214
- errorSummary,
215
- metadata: {
216
- detection: {
217
- extractor: 'maven-surefire',
218
- confidence: detection.confidence,
219
- patterns: detection.patterns,
220
- reason: detection.reason,
221
- },
222
- confidence: 95,
223
- completeness: 90,
224
- issues: failures.length > 20 ? ['Many test failures - output may be truncated'] : [],
225
- },
226
- };
227
- }
228
- //# sourceMappingURL=maven-surefire-extractor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"maven-surefire-extractor.js","sourceRoot":"","sources":["../src/maven-surefire-extractor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAazD,yHAAyH;AACzH,MAAM,iBAAiB,GAAG;IACxB,4DAA4D;IAC5D,WAAW,EAAE,yEAAyE;IAEtF,8DAA8D;IAC9D,UAAU,EACR,iFAAiF;IAEnF,4EAA4E;IAC5E,WAAW,EAAE,2DA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,IAAI,CAAC,CAAC,IAAI,IAAG,GAAG,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QAC/G,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO;QACL,OAAO;QACP,WAAW,EAAE,QAAQ,CAAC,MAAM;QAC5B,MAAM;QACN,QAAQ;QACR,YAAY;QACZ,QAAQ,EAAE;YACR,SAAS,EAAE;gBACT,SAAS,EAAE,gBAAgB;gBAC3B,UAAU,EAAE,SAAS,CAAC,UAAU;gBAChC,QAAQ,EAAE,SAAS,CAAC,QAAQ;gBAC5B,MAAM,EAAE,SAAS,CAAC,MAAM;aACzB;YACD,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,EAAE;YAChB,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,8CAA8C,CAAC,CAAC,CAAC,CAAC,EAAE;SACrF;KACF,CAAC;AACJ,CAAC"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Mocha Error Extractor
3
- *
4
- * Parses Mocha test output and formats failures for LLM consumption.
5
- *
6
- * @package @vibe-validate/extractors
7
- */
8
- import type { ErrorExtractorResult } from './types.js';
9
- /**
10
- * Extract errors from Mocha test output
11
- *
12
- * @param output - Mocha text output
13
- * @returns Structured error information
14
- *
15
- * @example
16
- * ```typescript
17
- * const mochaOutput = execSync('mocha tests/**\/*.test.js', { encoding: 'utf-8' });
18
- * const result = extractMochaErrors(mochaOutput);
19
- * console.log(result.summary); // "5 test(s) failed"
20
- * ```
21
- */
22
- export declare function extractMochaErrors(output: string): ErrorExtractorResult;
23
- //# sourceMappingURL=mocha-extractor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mocha-extractor.d.ts","sourceRoot":"","sources":["../src/mocha-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAGvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAkCvE"}