@vitest-agent/plugin 4.1.0 → 4.1.2
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 +21 -13
- package/layers/ReporterLive.js +6 -0
- package/package.json +10 -10
- package/plugin.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { EnvironmentDetector, PlatformOptions, SettingsInput, StackFrameInput } from "@vitest-agent/engine";
|
|
1
|
+
import { EnvironmentDetector, PlatformOptions, PlatformServices, SettingsInput, StackFrameInput } from "@vitest-agent/engine";
|
|
2
2
|
import { AgentPluginOptions, AgentReporterOptions, ConsoleMode, CoverageBaselines, CoverageInput, CoverageLevel, CoverageLevelName, CoverageLevelName as CoverageLevelName$1, CoverageReport, OutputFormat, ResolvedReporterConfig, ResolvedThresholds, RunEvent, Transport, VitestAgentReporterFactory, resolveCoverageInput, validateCoverageConfig } from "@vitest-agent/sdk";
|
|
3
3
|
import { Context, Effect, Layer, Option } from "effect";
|
|
4
4
|
import { TestProjectInlineConfiguration, TestTagDefinition } from "vitest/config";
|
|
5
5
|
import { ResolvedConfig, VitestPluginContext } from "vitest/node";
|
|
6
6
|
import { SourceMap } from "magic-string";
|
|
7
7
|
import { WorkspacesSyncOptions } from "@effected/workspaces/node-sync";
|
|
8
|
+
import { MigrationError } from "effect/unstable/sql/Migrator";
|
|
9
|
+
import { SqlError } from "effect/unstable/sql/SqlError";
|
|
8
10
|
//#region src/utils/tag.d.ts
|
|
9
11
|
/**
|
|
10
12
|
* Options for a `Tag`, mirroring `TestTagDefinition` minus the `name` field.
|
|
@@ -1218,18 +1220,6 @@ export declare function combineClassifiers(...fns: ReadonlyArray<ClassifyFn>): C
|
|
|
1218
1220
|
*/
|
|
1219
1221
|
export declare function findTestFiles(dir: string, patterns: ReadonlyArray<string>, fs?: WalkerFileSystem): Promise<ReadonlyArray<string>>;
|
|
1220
1222
|
//#endregion
|
|
1221
|
-
//#region src/layers/ReporterLive.d.ts
|
|
1222
|
-
/**
|
|
1223
|
-
* Composition layer for a single `AgentReporter` run: the engine's
|
|
1224
|
-
* `PlatformLive` (SQLite, migrations, Node platform services, logger and
|
|
1225
|
-
* the shared service layers) plus the plugin-only `CoverageAnalyzer`.
|
|
1226
|
-
*
|
|
1227
|
-
* @param options - forwarded to `PlatformLive`; the reporter passes
|
|
1228
|
-
* `process.env` as `env`
|
|
1229
|
-
* @public
|
|
1230
|
-
*/
|
|
1231
|
-
export declare const ReporterLive: (options: PlatformOptions) => Layer.Layer<CoverageAnalyzer | import("@vitest-agent/engine").PlatformServices, import("@effect/sql-sqlite-node/SqliteMigrator").MigrationError | import("effect/unstable/sql/SqlError").SqlError, never>;
|
|
1232
|
-
//#endregion
|
|
1233
1223
|
//#region src/services/CoverageAnalyzer.d.ts
|
|
1234
1224
|
/**
|
|
1235
1225
|
* Options passed to `CoverageAnalyzer.process` and `CoverageAnalyzer.processScoped`.
|
|
@@ -1277,6 +1267,24 @@ declare const CoverageAnalyzer_base: Context.ServiceClass<CoverageAnalyzer, "vit
|
|
|
1277
1267
|
*/
|
|
1278
1268
|
export declare class CoverageAnalyzer extends CoverageAnalyzer_base {}
|
|
1279
1269
|
//#endregion
|
|
1270
|
+
//#region src/layers/ReporterLive.d.ts
|
|
1271
|
+
/**
|
|
1272
|
+
* Composition layer for a single `AgentReporter` run: the engine's
|
|
1273
|
+
* `PlatformLive` (SQLite, migrations, Node platform services, logger and
|
|
1274
|
+
* the shared service layers) plus the plugin-only `CoverageAnalyzer`.
|
|
1275
|
+
*
|
|
1276
|
+
* The return type is spelled out so the emitted declaration names
|
|
1277
|
+
* `MigrationError` through `effect/unstable/sql/Migrator`; left to
|
|
1278
|
+
* inference it is emitted via `@effect/sql-sqlite-node/SqliteMigrator`,
|
|
1279
|
+
* which this package does not depend on and a root typecheck cannot
|
|
1280
|
+
* resolve.
|
|
1281
|
+
*
|
|
1282
|
+
* @param options - forwarded to `PlatformLive`; the reporter passes
|
|
1283
|
+
* `process.env` as `env`
|
|
1284
|
+
* @public
|
|
1285
|
+
*/
|
|
1286
|
+
export declare const ReporterLive: (options: PlatformOptions) => Layer.Layer<CoverageAnalyzer | PlatformServices, MigrationError | SqlError>;
|
|
1287
|
+
//#endregion
|
|
1280
1288
|
//#region src/layers/CoverageAnalyzerLive.d.ts
|
|
1281
1289
|
/**
|
|
1282
1290
|
* Live implementation of the CoverageAnalyzer service backed by istanbul.
|
package/layers/ReporterLive.js
CHANGED
|
@@ -8,6 +8,12 @@ import { Layer } from "effect";
|
|
|
8
8
|
* `PlatformLive` (SQLite, migrations, Node platform services, logger and
|
|
9
9
|
* the shared service layers) plus the plugin-only `CoverageAnalyzer`.
|
|
10
10
|
*
|
|
11
|
+
* The return type is spelled out so the emitted declaration names
|
|
12
|
+
* `MigrationError` through `effect/unstable/sql/Migrator`; left to
|
|
13
|
+
* inference it is emitted via `@effect/sql-sqlite-node/SqliteMigrator`,
|
|
14
|
+
* which this package does not depend on and a root typecheck cannot
|
|
15
|
+
* resolve.
|
|
16
|
+
*
|
|
11
17
|
* @param options - forwarded to `PlatformLive`; the reporter passes
|
|
12
18
|
* `process.env` as `env`
|
|
13
19
|
* @public
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/plugin",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vitest plugin for the vitest-agent ecosystem: owns persistence, classification, baselines, trends, and dispatches rendering to a configurable reporter.",
|
|
6
6
|
"keywords": [
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"vitest-agent-mcp": "bin/vitest-agent-mcp.js"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@effect/platform-node": "4.0.0-rc.
|
|
47
|
-
"@effected/glob": "^0.
|
|
48
|
-
"@effected/workspaces": "^0.
|
|
49
|
-
"@vitest-agent/cli": "3.1.
|
|
50
|
-
"@vitest-agent/engine": "0.2.
|
|
51
|
-
"@vitest-agent/mcp": "4.
|
|
52
|
-
"@vitest-agent/reporter": "3.1.
|
|
53
|
-
"@vitest-agent/sdk": "5.1.
|
|
54
|
-
"effect": "4.0.0-rc.
|
|
46
|
+
"@effect/platform-node": "4.0.0-rc.116",
|
|
47
|
+
"@effected/glob": "^0.7.0",
|
|
48
|
+
"@effected/workspaces": "^0.23.0",
|
|
49
|
+
"@vitest-agent/cli": "3.1.2",
|
|
50
|
+
"@vitest-agent/engine": "0.2.2",
|
|
51
|
+
"@vitest-agent/mcp": "4.2.0",
|
|
52
|
+
"@vitest-agent/reporter": "3.1.1",
|
|
53
|
+
"@vitest-agent/sdk": "5.1.1",
|
|
54
|
+
"effect": "4.0.0-rc.116",
|
|
55
55
|
"magic-string": "^1.4.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
package/plugin.js
CHANGED
|
@@ -147,7 +147,7 @@ const reportedConfigDiagnosticsByVitest = /* @__PURE__ */ new WeakMap();
|
|
|
147
147
|
*
|
|
148
148
|
* @public
|
|
149
149
|
*/
|
|
150
|
-
const CURRENT_PLUGIN_VERSION = "4.1.
|
|
150
|
+
const CURRENT_PLUGIN_VERSION = "4.1.2";
|
|
151
151
|
const TEST_FILE_DIR_RE = new RegExp(`/(?:${SRC_DIR}|${TEST_DIR})/`);
|
|
152
152
|
const isTestFile = (id) => isTestFileName(id) && TEST_FILE_DIR_RE.test(id);
|
|
153
153
|
/**
|