(yargs: Argv)
| 29 | const describe = 'get details of current mode' |
| 30 | |
| 31 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 32 | formatAndWriteItemBuilder(apiCommandBuilder(yargs)) |
| 33 | .positional('id', { describe: 'mode id', type: 'string' }) |
| 34 | .option('location', { alias: 'l', describe: 'a specific location to query', type: 'string' }) |
| 35 | .option('verbose', |
| 36 | { alias: 'v', describe: 'include location name in output', type: 'boolean', default: false }) |
| 37 | .example([ |
| 38 | [ |
| 39 | '$0 locations:modes:getcurrent', |
| 40 | 'get details of current mode, prompting for a location if there are more than one', |
| 41 | ], |
| 42 | [ |
| 43 | '$0 locations:modes:getcurrent --verbose', |
| 44 | 'include location name and id in the output', |
| 45 | ], |
| 46 | [ |
| 47 | '$0 locations:modes:getcurrent --location 5dfd6626-ab1d-42da-bb76-90def3153998', |
| 48 | 'get the current mode for a specified location', |
| 49 | ], |
| 50 | ]) |
| 51 | .epilog(buildEpilog({ command, apiDocs: 'getCurrentMode' })) |
| 52 | |
| 53 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 54 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected