fix(target): explain the JavaScript directory analysis route (#733)

This commit is contained in:
N0zoM1z0
2026-10-06 19:53:08 +08:00
committed by GitHub
parent 9dd6cef90a
commit 8d44b3edd3
15 changed files with 181 additions and 16 deletions
+9 -2
View File
@@ -15,14 +15,21 @@ export class NoBinaryOpenError extends AnalysisError {
}
}
/** Additional constraints identified while admitting a filesystem target. */
export interface BinaryTargetErrorOptions extends ErrorOptions {
readonly constraint?: "directory_requires_file";
}
/** A supplied target path could not be safely opened as a supported app or binary. */
export class BinaryTargetError extends AnalysisError {
readonly _tag = "BinaryTargetError";
readonly constraint: BinaryTargetErrorOptions["constraint"];
constructor(
readonly path: string,
reason: string,
options?: ErrorOptions,
readonly reason: string,
options?: BinaryTargetErrorOptions,
) {
super(`Cannot open artifact: ${reason}`, options);
this.constraint = options?.constraint;
}
}