(tree: CommandTree, format: string)
| 236 | } |
| 237 | |
| 238 | export function formatTopLevelHelp(tree: CommandTree, format: string): string { |
| 239 | if (isStructured(format)) { |
| 240 | return serialize({ |
| 241 | bin: BIN, |
| 242 | contract: CONTRACT, |
| 243 | commands: collectCommands(tree).map(({ command, path }) => describeCommand(command, path.join(' '))), |
| 244 | topics: TOPICS.map(t => ({ name: t.name, summary: t.summary })), |
| 245 | }, format) |
| 246 | } |
| 247 | |
| 248 | return formatTopLevelHelpText(tree) |
| 249 | } |
no test coverage detected