rules/workflows/report.js
Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.
statusReport()
statusReport(units, { order, colors, summary })
Render { key, status, output? }[] as a report: one column-aligned, colored line per unit (sorted by status severity per order, then by key), then each unit's output block (if any), then summary(counts)'s line.
| Parameter | Type | Description |
|---|---|---|
| units | Array<{key: string, status: string, output?: string}> | |
| opts | object | |
| opts.order | string[] | Status values, most severe first. |
| opts.colors | Record<string, "red" | "yellow" |
| opts.summary | (counts: Record<string, number>) => string |
Returns: string