(Init): Added shit

This commit is contained in:
2026-05-28 23:46:40 +00:00
parent a5250706cb
commit 8410600c63
46 changed files with 3898 additions and 228 deletions

View File

@@ -0,0 +1,43 @@
/**
* Error types raised by the config and env loaders.
*
* These are deliberately distinct from `Error` subclasses inside `@elly/core`
* or `@elly/bot` — they cross the workspace boundary and must be importable
* by both runtimes without dragging unrelated dependencies along.
*/
export class ConfigError extends Error {
readonly path: string;
constructor(message: string, path: string) {
super(message);
this.name = "ConfigError";
this.path = path;
}
}
export class ConfigValidationError extends ConfigError {
readonly issues: readonly ConfigValidationIssue[];
constructor(message: string, path: string, issues: readonly ConfigValidationIssue[]) {
super(message, path);
this.name = "ConfigValidationError";
this.issues = issues;
}
}
export interface ConfigValidationIssue {
readonly path: string;
readonly message: string;
readonly code: string;
}
export class EnvValidationError extends Error {
readonly issues: readonly ConfigValidationIssue[];
constructor(message: string, issues: readonly ConfigValidationIssue[]) {
super(message);
this.name = "EnvValidationError";
this.issues = issues;
}
}