@vitest-agent/reporter 2.0.10 → 2.0.11
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.
- package/defaultReporter.js +12 -6
- package/index.js +1 -1
- package/package.json +3 -3
package/defaultReporter.js
CHANGED
|
@@ -88,9 +88,10 @@ const shouldRenderForMode = (mode) => mode === "agent";
|
|
|
88
88
|
* @public
|
|
89
89
|
*/
|
|
90
90
|
const renderAgentStringForReport = (report) => {
|
|
91
|
-
const
|
|
91
|
+
const events = synthesizeFromAgentReport(report);
|
|
92
|
+
const state = reduceRenderStateAll(events);
|
|
92
93
|
const projects = [summarizeProject(report)];
|
|
93
|
-
|
|
94
|
+
const inputs = {
|
|
94
95
|
state,
|
|
95
96
|
shape: classifyRunShape(state, projects),
|
|
96
97
|
outcome: classifyOutcome(state),
|
|
@@ -98,7 +99,8 @@ const renderAgentStringForReport = (report) => {
|
|
|
98
99
|
trend: null,
|
|
99
100
|
belowTarget: collectBelowTarget([report]),
|
|
100
101
|
runCommand: null
|
|
101
|
-
}
|
|
102
|
+
};
|
|
103
|
+
return dispatch(inputs, {
|
|
102
104
|
noColor: true,
|
|
103
105
|
osc8: (_url, label) => label
|
|
104
106
|
});
|
|
@@ -114,7 +116,8 @@ const renderAgentStringForReport = (report) => {
|
|
|
114
116
|
*/
|
|
115
117
|
const renderHumanStringForReport = async (report, options = {}) => {
|
|
116
118
|
const { renderToString } = await import("ink");
|
|
117
|
-
const
|
|
119
|
+
const events = synthesizeFromAgentReport(report);
|
|
120
|
+
const state = reduceRenderStateAll(events);
|
|
118
121
|
const projects = [summarizeProject(report)];
|
|
119
122
|
const inputs = {
|
|
120
123
|
state,
|
|
@@ -193,8 +196,11 @@ const DefaultVitestAgentReporter = (kit) => {
|
|
|
193
196
|
return { render(input, renderKit) {
|
|
194
197
|
const out = [];
|
|
195
198
|
if (shouldRenderForMode(renderKit.config.consoleMode)) {
|
|
196
|
-
const
|
|
197
|
-
const
|
|
199
|
+
const events = input.reports.flatMap((r) => synthesizeFromAgentReport(r));
|
|
200
|
+
const state = reduceRenderStateAll(events);
|
|
201
|
+
const inputs = buildDispatchInputs(state, input, { runCommand: renderKit.config.runCommand ?? null });
|
|
202
|
+
const opts = resolveCellOptions(renderKit);
|
|
203
|
+
const content = dispatch(inputs, opts);
|
|
198
204
|
if (content.length > 0) out.push({
|
|
199
205
|
target: "stdout",
|
|
200
206
|
content,
|
package/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { DefaultVitestAgentReporter, buildDispatchInputs, renderAgentStringForRe
|
|
|
9
9
|
*
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
const CURRENT_REPORTER_VERSION = "2.0.
|
|
12
|
+
const CURRENT_REPORTER_VERSION = "2.0.11";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
export { CURRENT_REPORTER_VERSION, DefaultVitestAgentReporter, createLiveInk as _createLiveInk, buildDispatchInputs, renderAgentStringForReport, renderHumanStringForReport, resolveCellOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/reporter",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Named VitestAgentReporterFactory implementations for the vitest-agent ecosystem.",
|
|
6
6
|
"keywords": [
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@effect/platform-node": "4.0.0-beta.101",
|
|
43
43
|
"@effect/sql-sqlite-node": "4.0.0-beta.101",
|
|
44
|
-
"@vitest-agent/sdk": "2.0.
|
|
45
|
-
"@vitest-agent/ui": "2.0.
|
|
44
|
+
"@vitest-agent/sdk": "2.0.11",
|
|
45
|
+
"@vitest-agent/ui": "2.0.11",
|
|
46
46
|
"effect": "4.0.0-beta.101",
|
|
47
47
|
"ink": "^7.1.1",
|
|
48
48
|
"react": "^19.2.8"
|