Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/evals / cli
cli
CLI integration helpers. Convenience wrappers that combine the runner + a reporter + an exit-code mapping so consumer scripts can stay short.
Typical use from a package.json script:
jsonc
{
"scripts": {
"eval": "node ./scripts/run-evals.mjs"
}
}Where run-evals.mjs looks like:
ts
import { runEvals, exitOnFailures, renderTerminalReport } from '@graphorin/evals';
const report = await runEvals({...});
console.log(renderTerminalReport(report));
exitOnFailures(report);Interfaces
| Interface | Description |
|---|---|
| WriteReportsOptions | - |
| WrittenReport | - |
Type Aliases
| Type Alias | Description |
|---|---|
| ReporterFormat | Reporter ids accepted by writeReports. |
Functions
| Function | Description |
|---|---|
| exitOnFailures | Set process.exitCode to 1 when at least one case failed, or when a regression report contains findings. Uses exitCode rather than process.exit so other async tasks finish cleanly. |
| writeReports | Render the report in every requested format and write each one to a file. Returns the manifest of written files. |
References
detectRegressions
Re-exports detectRegressions
RegressionOptions
Re-exports RegressionOptions