mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-09 11:51:15 +02:00
60 lines
1.8 KiB
TypeScript
60 lines
1.8 KiB
TypeScript
import * as Schema from "effect/Schema";
|
|
|
|
export class ServerCliCommandExitError extends Schema.TaggedError<ServerCliCommandExitError>()(
|
|
"ServerCliCommandExitError",
|
|
{
|
|
command: Schema.String,
|
|
args: Schema.Array(Schema.String),
|
|
cwd: Schema.optional(Schema.String),
|
|
exitCode: Schema.Int,
|
|
},
|
|
) {
|
|
override get message(): string {
|
|
return `Command exited with non-zero exit code (${this.exitCode})`;
|
|
}
|
|
}
|
|
|
|
export class ServerCliDevelopmentIconSourceMissingError extends Schema.TaggedError<ServerCliDevelopmentIconSourceMissingError>()(
|
|
"ServerCliDevelopmentIconSourceMissingError",
|
|
{
|
|
sourcePath: Schema.String,
|
|
},
|
|
) {
|
|
override get message(): string {
|
|
return `Missing development icon source: ${this.sourcePath}`;
|
|
}
|
|
}
|
|
|
|
export class ServerCliDevelopmentIconTargetMissingError extends Schema.TaggedError<ServerCliDevelopmentIconTargetMissingError>()(
|
|
"ServerCliDevelopmentIconTargetMissingError",
|
|
{
|
|
targetPath: Schema.String,
|
|
},
|
|
) {
|
|
override get message(): string {
|
|
return `Missing development icon target: ${this.targetPath}. Build web first.`;
|
|
}
|
|
}
|
|
|
|
export class ServerCliBuildAssetMissingError extends Schema.TaggedError<ServerCliBuildAssetMissingError>()(
|
|
"ServerCliBuildAssetMissingError",
|
|
{
|
|
assetPath: Schema.String,
|
|
},
|
|
) {
|
|
override get message(): string {
|
|
return `Missing build asset: ${this.assetPath}. Run the build subcommand first.`;
|
|
}
|
|
}
|
|
|
|
export class ServerCliExecutableImportError extends Schema.TaggedError<ServerCliExecutableImportError>()(
|
|
"ServerCliExecutableImportError",
|
|
{
|
|
bundlePath: Schema.String,
|
|
specifiers: Schema.Array(Schema.String),
|
|
},
|
|
) {
|
|
override get message(): string {
|
|
return `${this.bundlePath} imports file-backed packages that a single-executable cannot resolve: ${this.specifiers.join(", ")}. Load them through createRequire instead.`;
|
|
}
|
|
}
|