@vitest-agent/reporter 4.0.1 → 4.1.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.
package/index.d.ts CHANGED
@@ -108,6 +108,21 @@ declare const RenderState: Schema.Struct<{
108
108
  readonly scoped: Schema.optional<Schema.Boolean>;
109
109
  readonly scopedFiles: Schema.optional<Schema.Number>;
110
110
  readonly totalFiles: Schema.optional<Schema.Number>;
111
+ readonly globShortfalls: Schema.optional<Schema.$Array<Schema.Struct<{
112
+ readonly pattern: Schema.String;
113
+ readonly summary: Schema.Struct<{
114
+ readonly statements: Schema.Number;
115
+ readonly branches: Schema.Number;
116
+ readonly functions: Schema.Number;
117
+ readonly lines: Schema.Number;
118
+ }>;
119
+ readonly thresholds: Schema.Struct<{
120
+ readonly lines: Schema.optional<Schema.Number>;
121
+ readonly functions: Schema.optional<Schema.Number>;
122
+ readonly branches: Schema.optional<Schema.Number>;
123
+ readonly statements: Schema.optional<Schema.Number>;
124
+ }>;
125
+ }>>>;
111
126
  }>>;
112
127
  readonly trend: Schema.NullOr<Schema.Struct<{
113
128
  readonly direction: Schema.Literals<readonly ["improving", "regressing", "stable"]>;
@@ -458,6 +473,21 @@ declare const AgentReport: Schema.Struct<{
458
473
  readonly uncoveredLines: Schema.String;
459
474
  }>>>;
460
475
  readonly belowTargetFiles: Schema.optional<Schema.$Array<Schema.String>>;
476
+ readonly globShortfalls: Schema.optional<Schema.$Array<Schema.Struct<{
477
+ readonly pattern: Schema.String;
478
+ readonly summary: Schema.Struct<{
479
+ readonly statements: Schema.Number;
480
+ readonly branches: Schema.Number;
481
+ readonly functions: Schema.Number;
482
+ readonly lines: Schema.Number;
483
+ }>;
484
+ readonly thresholds: Schema.Struct<{
485
+ readonly lines: Schema.optional<Schema.Number>;
486
+ readonly functions: Schema.optional<Schema.Number>;
487
+ readonly branches: Schema.optional<Schema.Number>;
488
+ readonly statements: Schema.optional<Schema.Number>;
489
+ }>;
490
+ }>>>;
461
491
  }>>;
462
492
  readonly tagCounts: Schema.optional<Schema.$Record<Schema.String, Schema.Struct<{
463
493
  readonly passed: Schema.optional<Schema.Number>;
@@ -680,6 +710,21 @@ declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted",
680
710
  readonly scoped: Schema.optional<Schema.Boolean>;
681
711
  readonly scopedFiles: Schema.optional<Schema.Number>;
682
712
  readonly totalFiles: Schema.optional<Schema.Number>;
713
+ readonly globShortfalls: Schema.optional<Schema.$Array<Schema.Struct<{
714
+ readonly pattern: Schema.String;
715
+ readonly summary: Schema.Struct<{
716
+ readonly statements: Schema.Number;
717
+ readonly branches: Schema.Number;
718
+ readonly functions: Schema.Number;
719
+ readonly lines: Schema.Number;
720
+ }>;
721
+ readonly thresholds: Schema.Struct<{
722
+ readonly lines: Schema.optional<Schema.Number>;
723
+ readonly functions: Schema.optional<Schema.Number>;
724
+ readonly branches: Schema.optional<Schema.Number>;
725
+ readonly statements: Schema.optional<Schema.Number>;
726
+ }>;
727
+ }>>>;
683
728
  }>, Schema.TaggedStruct<"ThresholdViolation", {
684
729
  readonly metric: Schema.Literals<readonly ["lines", "branches", "functions", "statements"]>;
685
730
  readonly expected: Schema.Number;
package/index.js CHANGED
@@ -8,7 +8,7 @@ import { DefaultVitestAgentReporter, buildDispatchInputs, renderAgentStringForRe
8
8
  *
9
9
  * @public
10
10
  */
11
- const CURRENT_REPORTER_VERSION = "4.0.1";
11
+ const CURRENT_REPORTER_VERSION = "4.1.1";
12
12
 
13
13
  //#endregion
14
14
  export { CURRENT_REPORTER_VERSION, DefaultVitestAgentReporter, buildDispatchInputs, renderAgentStringForReport, renderHumanStringForReport, resolveCellOptions };
package/liveView.js CHANGED
@@ -1,7 +1,7 @@
1
- import { CliEnv } from "@effected/cli";
1
+ import { CliEnv, Doc } from "@effected/cli";
2
2
  import { CliUi } from "@effected/cli/ui";
3
3
  import { initialRenderState } from "@vitest-agent/sdk";
4
- import { SPINNER_FRAME_MS, StreamApp, reduceRenderState } from "@vitest-agent/ui";
4
+ import { SPINNER_FRAME_MS, StreamApp, reduceRenderState, renderAgent } from "@vitest-agent/ui";
5
5
  import { Cause, Deferred, Effect, Exit, Layer, PubSub, Scope } from "effect";
6
6
  import { createElement } from "react";
7
7
  import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -16,10 +16,12 @@ import * as NodeServices from "@effect/platform-node/NodeServices";
16
16
  * says), redraws on every event and on an 80 ms tick, and commits its final
17
17
  * frame to scrollback at the terminal event (`RunFinished` /
18
18
  * `RunTimedOut`), never clearing the screen. The next run in watch mode
19
- * mounts afresh below it. When the run is not interactive (piped, an agent
20
- * audience, CI) nothing is mounted and, in the `owned` mode, each run's final
21
- * frame is written once to stdout as a string, so a `vitest run | cat` still
22
- * receives the result.
19
+ * mounts afresh below it. When the run is not interactive (piped, CI) nothing
20
+ * is mounted: each run's `final` document is written once to stdout instead,
21
+ * so a `vitest run | cat` still receives the result. That document is the
22
+ * plain report `renderAgent` builds from the same state (header, failures,
23
+ * modules, coverage, suggested actions), each line kept whole; it does not
24
+ * try to reproduce the Ink frame, and drawing it never renders through Ink.
23
25
  *
24
26
  * Lifetime: one scope per live view, held for the reporter's whole life. The
25
27
  * subscription is made in it synchronously, before the factory returns, so
@@ -52,7 +54,8 @@ const liveViewOptions = {
52
54
  isTerminal: (event) => event._tag === "RunFinished" || event._tag === "RunTimedOut",
53
55
  begins: (event, before, after) => event._tag === "RunStarted" || before.phase === "idle" && after.phase !== "idle",
54
56
  mode: "owned",
55
- tickMillis: SPINNER_FRAME_MS
57
+ tickMillis: SPINNER_FRAME_MS,
58
+ final: (state) => renderAgent(state).trimEnd().split("\n").map((line) => Doc.line(line, { wrap: false }))
56
59
  };
57
60
  /**
58
61
  * The environment a Vitest-hosted live view reads: the kit's `CliEnv` over
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/reporter",
3
- "version": "4.0.1",
3
+ "version": "4.1.1",
4
4
  "private": false,
5
5
  "description": "Named VitestAgentReporterFactory implementations for the vitest-agent ecosystem.",
6
6
  "keywords": [
@@ -40,14 +40,14 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@effect/platform-node": "^4.0.0",
43
- "@vitest-agent/sdk": "6.0.0",
44
- "@vitest-agent/ui": "4.0.0",
43
+ "@vitest-agent/sdk": "6.1.0",
44
+ "@vitest-agent/ui": "4.1.0",
45
45
  "effect": "^4.0.0",
46
46
  "ink": "^7.1.1",
47
47
  "react": "^19.3.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@effected/cli": "^0.11.0",
50
+ "@effected/cli": "^0.12.0",
51
51
  "@effected/env": "^0.1.0",
52
52
  "@effected/glob": "^0.10.0",
53
53
  "@effected/walker": "^0.15.0",