@vitest-agent/sdk 4.0.0 → 5.0.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
|
@@ -2682,14 +2682,18 @@ export type AgentReporterOptions = typeof AgentReporterOptions.Type;
|
|
|
2682
2682
|
//#endregion
|
|
2683
2683
|
//#region src/schemas/RunReportFile.d.ts
|
|
2684
2684
|
/**
|
|
2685
|
-
* Canonical `$schema` URL for `RunReportFile`
|
|
2685
|
+
* Canonical `$schema` URL for `RunReportFile` — the `schemas/5.0/run.json`
|
|
2686
|
+
* document GitHub serves raw from this repository.
|
|
2686
2687
|
*
|
|
2687
2688
|
* Written as the first key of `run.json` so an editor or a JSON Schema
|
|
2688
2689
|
* validator can resolve the contract without knowing about vitest-agent.
|
|
2690
|
+
* The same value is derived in `lib/configs/run-report-schema.ts` from
|
|
2691
|
+
* `HostedSchema.github` (this module cannot import `@effected/*`); the drift
|
|
2692
|
+
* test pins the two together.
|
|
2689
2693
|
*
|
|
2690
2694
|
* @public
|
|
2691
2695
|
*/
|
|
2692
|
-
export declare const RUN_REPORT_FILE_SCHEMA_URL = "https://vitest-agent
|
|
2696
|
+
export declare const RUN_REPORT_FILE_SCHEMA_URL = "https://raw.githubusercontent.com/spencerbeggs/vitest-agent/main/schemas/5.0/run.json";
|
|
2693
2697
|
/**
|
|
2694
2698
|
* Envelope for the `run.json` report file.
|
|
2695
2699
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Platform-free core for the vitest-agent package family: Effect Schema definitions, reporter and dispatcher contracts, errors, formatters, and pure utilities.",
|
|
6
6
|
"keywords": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://vitest-agent
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/spencerbeggs/vitest-agent/main/schemas/5.0/run.json",
|
|
4
4
|
"$ref": "#/$defs/RunReportFile",
|
|
5
5
|
"$defs": {
|
|
6
6
|
"IsoInstant": {
|
package/schemas/RunReportFile.js
CHANGED
|
@@ -11,14 +11,18 @@ import { Schema } from "effect";
|
|
|
11
11
|
* `AgentReport` per Vitest project in the run.
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
|
-
* Canonical `$schema` URL for `RunReportFile`
|
|
14
|
+
* Canonical `$schema` URL for `RunReportFile` — the `schemas/5.0/run.json`
|
|
15
|
+
* document GitHub serves raw from this repository.
|
|
15
16
|
*
|
|
16
17
|
* Written as the first key of `run.json` so an editor or a JSON Schema
|
|
17
18
|
* validator can resolve the contract without knowing about vitest-agent.
|
|
19
|
+
* The same value is derived in `lib/configs/run-report-schema.ts` from
|
|
20
|
+
* `HostedSchema.github` (this module cannot import `@effected/*`); the drift
|
|
21
|
+
* test pins the two together.
|
|
18
22
|
*
|
|
19
23
|
* @public
|
|
20
24
|
*/
|
|
21
|
-
const RUN_REPORT_FILE_SCHEMA_URL = "https://vitest-agent
|
|
25
|
+
const RUN_REPORT_FILE_SCHEMA_URL = "https://raw.githubusercontent.com/spencerbeggs/vitest-agent/main/schemas/5.0/run.json";
|
|
22
26
|
/**
|
|
23
27
|
* ISO-8601 instant, the shape `Date.prototype.toISOString` produces.
|
|
24
28
|
* `Date.parse` alone is too permissive — it accepts `"Sep 7 2026"` and
|
|
@@ -9,7 +9,26 @@
|
|
|
9
9
|
* safe direction.
|
|
10
10
|
*/
|
|
11
11
|
function stripComments(source) {
|
|
12
|
-
|
|
12
|
+
let out = "";
|
|
13
|
+
let i = 0;
|
|
14
|
+
const n = source.length;
|
|
15
|
+
while (i < n) {
|
|
16
|
+
const c = source[i];
|
|
17
|
+
const next = source[i + 1];
|
|
18
|
+
if (c === "/" && next === "*") {
|
|
19
|
+
const close = source.indexOf("*/", i + 2);
|
|
20
|
+
i = close === -1 ? n : close + 2;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (c === "/" && next === "/") {
|
|
24
|
+
const eol = source.indexOf("\n", i + 2);
|
|
25
|
+
i = eol === -1 ? n : eol;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
out += c;
|
|
29
|
+
i++;
|
|
30
|
+
}
|
|
31
|
+
return out;
|
|
13
32
|
}
|
|
14
33
|
const DISCOVER_STRATEGY_OPTION_RE = /\bdiscoverStrategy\s*:/;
|
|
15
34
|
const ADD_PROJECT_MARKER = ".addProject(";
|