@vitest-agent/sdk 7.1.0 → 9.0.0
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/errors/ProjectIdentityError.js +25 -1
- package/index.d.ts +701 -751
- package/index.js +8 -14
- package/package.json +1 -1
- package/schemas/5.0/run.json +113 -222
- package/schemas/AgentReport.js +12 -12
- package/schemas/Common.js +22 -1
- package/schemas/ConsoleLeaks.js +6 -5
- package/schemas/Coverage.js +6 -5
- package/schemas/RenderState.js +8 -1
- package/schemas/RunDiagnostics.js +61 -0
- package/schemas/RunEvent.js +8 -1
- package/schemas/RunReportFile.js +3 -1
- package/schemas/StrayOutput.js +5 -4
- package/schemas/Thresholds.js +5 -4
- package/tsdoc-metadata.json +1 -1
- package/utils/ansi.js +1 -35
- package/utils/console-leaks.js +27 -1
- package/utils/run-diagnostics-actions.js +58 -0
- package/utils/vitest-config-files.js +24 -0
- package/version.js +1 -1
- package/utils/compress-lines.js +0 -44
- package/utils/detect-pm.js +0 -57
- package/utils/format-console.js +0 -222
- package/utils/format-fatal-error.js +0 -46
- package/utils/format-gfm.js +0 -160
- package/utils/hyperlink.js +0 -10
- package/utils/normalize-workspace-key.js +0 -33
- package/utils/probe-host-metadata.js +0 -98
- package/utils/safe-filename.js +0 -33
|
@@ -24,5 +24,29 @@ var ProjectIdentityNotResolvableError = class extends Data.TaggedError("ProjectI
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Raised by `ProjectIdentity.resolve` when a source that IS present cannot
|
|
29
|
+
* be used: a malformed `vitest-agent.config.toml`, an unreadable or
|
|
30
|
+
* malformed root `package.json`, or a workspace manifest discovery rejects.
|
|
31
|
+
*
|
|
32
|
+
* Distinct from `ProjectIdentityNotResolvableError`, which means every
|
|
33
|
+
* source was absent or empty. An operator with a broken config file must
|
|
34
|
+
* see this rather than silently receive the default identity (issue 321);
|
|
35
|
+
* `cause` carries the kit's structured failure for callers that branch on
|
|
36
|
+
* it, and `detail` its one-line message.
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
var ProjectIdentitySourceError = class extends Data.TaggedError("ProjectIdentitySourceError") {
|
|
40
|
+
constructor(args) {
|
|
41
|
+
super(args);
|
|
42
|
+
const what = args.source === "toml" ? "vitest-agent.config.toml" : args.source === "package-json" ? "root package.json" : "workspace discovery";
|
|
43
|
+
Object.defineProperty(this, "message", {
|
|
44
|
+
value: `Project identity source ${what} at ${args.path} could not be used: ${args.detail}. Fix the file, or set projectId explicitly in vitest.config.ts.`,
|
|
45
|
+
enumerable: true,
|
|
46
|
+
writable: false,
|
|
47
|
+
configurable: true
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
27
51
|
|
|
28
|
-
export { ProjectIdentityNotResolvableError };
|
|
52
|
+
export { ProjectIdentityNotResolvableError, ProjectIdentitySourceError };
|