@vitest-agent/sdk 7.0.5 → 8.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.
@@ -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 };