(commands: Array<{ command: CommandConstructor, path: string[] }>, format: string)
| 194 | // aligned rows. Keeps `<group> --help -o json` machine-readable like every |
| 195 | // other help surface. |
| 196 | export function formatCommandList(commands: Array<{ command: CommandConstructor, path: string[] }>, format: string): string { |
| 197 | if (isStructured(format)) |
| 198 | return serialize({ commands: commands.map(({ command, path }) => describeCommand(command, path.join(' '))) }, format) |
| 199 | |
| 200 | return `COMMANDS\n${renderCommandRows(commands)}\n` |
| 201 | } |
| 202 | |
| 203 | // Curated onboarding examples for the top-level overview (gh-style): the |
| 204 | // shortest path from zero to a structured app run. Editorial, not an exhaustive |
no test coverage detected