Files
diagrams-drawio/scripts/src/actions/what-if/action.ts
T

4 lines
475 B
TypeScript

import { simulateFailure } from "../../services/semantic-lifecycle/analysis.js";
import { loadIR, type LifecycleActionOptions } from "../../services/semantic-lifecycle/lifecycle-io.js";
export function run(filePath: string, _page = 0, _output?: string, options: LifecycleActionOptions = {}): Record<string, unknown> { if (!options.fail) throw new Error("what-if requires --fail <node-id>"); return { action: "what-if", ...simulateFailure(loadIR(filePath), options.fail) }; }