Add Chromium-only Blender WebEngine parity work
This commit is contained in:
31
web/protocol/capability-gates.ts
Normal file
31
web/protocol/capability-gates.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { ErrorCode } from "./error";
|
||||
|
||||
export interface CapabilityIssue {
|
||||
code: ErrorCode;
|
||||
message: string;
|
||||
path?: string;
|
||||
recoverable: boolean;
|
||||
}
|
||||
|
||||
export interface CapabilityGateResult {
|
||||
taskId: "N-011" | "N-012" | "N-013" | "N-014" | "N-015" | "N-018" | "N-020" | "N-021" | "N-022" | "N-023" | "N-024" | "N-025" | "N-026" | "PBR-007" | "PBR-008" | "PBR-009" | "PBR-010" | "PBR-011" | "PBR-012";
|
||||
capability: string;
|
||||
status: "READY" | "BLOCKED";
|
||||
issues: CapabilityIssue[];
|
||||
}
|
||||
|
||||
export function readyGate(taskId: CapabilityGateResult["taskId"], capability: string): CapabilityGateResult {
|
||||
return { taskId, capability, status: "READY", issues: [] };
|
||||
}
|
||||
|
||||
export function blockedGate(
|
||||
taskId: CapabilityGateResult["taskId"],
|
||||
capability: string,
|
||||
issues: CapabilityIssue[],
|
||||
): CapabilityGateResult {
|
||||
return { taskId, capability, status: "BLOCKED", issues };
|
||||
}
|
||||
|
||||
export function capabilityIssue(code: ErrorCode, message: string, path?: string, recoverable = true): CapabilityIssue {
|
||||
return { code, message, path, recoverable };
|
||||
}
|
||||
Reference in New Issue
Block a user