@vitest-agent/cli 4.1.11 → 4.1.13
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/commands/agent.js +8 -2
- package/index.d.ts +12 -0
- package/main.d.ts +12 -0
- package/package.json +14 -14
- package/version.js +1 -1
package/commands/agent.js
CHANGED
|
@@ -10,7 +10,7 @@ import { Effect, Option } from "effect";
|
|
|
10
10
|
import { Argument, Command, Flag } from "effect/cli";
|
|
11
11
|
import { existsSync, readFileSync } from "node:fs";
|
|
12
12
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
13
|
-
import { findWorkspaceRootSync, getWorkspacePackagesSync } from "@effected/workspaces";
|
|
13
|
+
import { WorkspaceDiscoveryError, WorkspacePatternError, findWorkspaceRootSync, getWorkspacePackagesSync } from "@effected/workspaces";
|
|
14
14
|
import { nodeSyncOps } from "@effected/workspaces/node-sync";
|
|
15
15
|
import { VITEST_CONFIG_FILES, classifyTestPath, detectNonDefaultDiscoverStrategy, findOwningWorkspace } from "@vitest-agent/sdk";
|
|
16
16
|
import { injectEnv } from "@vitest-agent/sdk/dispatch";
|
|
@@ -179,7 +179,13 @@ function checkTestPath(path, from) {
|
|
|
179
179
|
if (root === null) return null;
|
|
180
180
|
const configSource = readWorkspaceVitestConfigSource(root);
|
|
181
181
|
if (configSource === null || detectNonDefaultDiscoverStrategy(configSource)) return null;
|
|
182
|
-
|
|
182
|
+
let packages;
|
|
183
|
+
try {
|
|
184
|
+
packages = getWorkspacePackagesSync(root, nodeSyncOps);
|
|
185
|
+
} catch (error) {
|
|
186
|
+
if (error instanceof WorkspaceDiscoveryError || error instanceof WorkspacePatternError) return null;
|
|
187
|
+
throw error;
|
|
188
|
+
}
|
|
183
189
|
const owner = findOwningWorkspace(packages, absolute);
|
|
184
190
|
if (owner === null) return null;
|
|
185
191
|
if (crossesNestedPackageBoundary(owner.path, absolute)) return null;
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vitest-agent/cli
|
|
3
|
+
*
|
|
4
|
+
* On-demand CLI for vitest-agent. Reads cached test data and
|
|
5
|
+
* reports status, overview, coverage, history, trends, and cache health.
|
|
6
|
+
*
|
|
7
|
+
* The default entry point is `bin.ts` (registered as the
|
|
8
|
+
* `vitest-agent` bin); this barrel exposes the package version for
|
|
9
|
+
* programmatic introspection.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
1
13
|
/**
|
|
2
14
|
* The version of this package, inlined at build time from
|
|
3
15
|
* `package.json#version` via rslib-builder's `__PACKAGE_VERSION__` substitution.
|
package/main.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assembled CLI program. Owns the process: resolves the project directory, wires the
|
|
3
|
+
* root platform (no database), and runs the root command through
|
|
4
|
+
* `@effected/cli-kit`'s `CliRuntime.main` under `NodeRuntime.runMain`.
|
|
5
|
+
*
|
|
6
|
+
* `bin.ts` is the published bin shim (`#!/usr/bin/env node` +
|
|
7
|
+
* `main()`); this module is also published as the `./main` subpath so the
|
|
8
|
+
* carrier (`@vitest-agent/plugin`) can ship the same program behind its own
|
|
9
|
+
* bin, threading its identity in through {@link MainOptions.distribution}.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
1
13
|
import { Distribution } from "@effected/kit";
|
|
2
14
|
/**
|
|
3
15
|
* Options the carrier's bin shim passes to {@link main}.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/cli",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "On-demand CLI for vitest-agent. Reads cached test data and reports status, overview, coverage, history, trends, and cache health.",
|
|
6
6
|
"keywords": [
|
|
@@ -43,19 +43,19 @@
|
|
|
43
43
|
"vitest-agent": "bin/vitest-agent.js"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@effect/platform-node": "4.1.
|
|
47
|
-
"@effect/sql-sqlite-node": "4.1.
|
|
48
|
-
"@effected/cli-kit": "
|
|
49
|
-
"@effected/config-file": "
|
|
50
|
-
"@effected/env": "
|
|
51
|
-
"@effected/glob": "
|
|
52
|
-
"@effected/kit": "
|
|
53
|
-
"@effected/walker": "
|
|
54
|
-
"@effected/workspaces": "
|
|
55
|
-
"@vitest-agent/engine": "3.2.
|
|
56
|
-
"@vitest-agent/sdk": "9.0.
|
|
57
|
-
"@vitest-agent/sidecar": "2.2.
|
|
58
|
-
"effect": "4.1.
|
|
46
|
+
"@effect/platform-node": "4.1.4",
|
|
47
|
+
"@effect/sql-sqlite-node": "4.1.4",
|
|
48
|
+
"@effected/cli-kit": "0.28.2",
|
|
49
|
+
"@effected/config-file": "0.27.1",
|
|
50
|
+
"@effected/env": "0.12.0",
|
|
51
|
+
"@effected/glob": "0.21.0",
|
|
52
|
+
"@effected/kit": "0.14.0",
|
|
53
|
+
"@effected/walker": "0.28.0",
|
|
54
|
+
"@effected/workspaces": "0.47.0",
|
|
55
|
+
"@vitest-agent/engine": "3.2.4",
|
|
56
|
+
"@vitest-agent/sdk": "9.0.5",
|
|
57
|
+
"@vitest-agent/sidecar": "2.2.20",
|
|
58
|
+
"effect": "4.1.4"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=24.11.0"
|