(yargs: Argv)
| 17 | const describe = 'set the current mode' |
| 18 | |
| 19 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 20 | apiCommandBuilder(yargs) |
| 21 | .positional('id', { describe: 'mode id', type: 'string' }) |
| 22 | .option('location', { alias: 'l', describe: 'a specific location to query', type: 'string' }) |
| 23 | .example([ |
| 24 | [ |
| 25 | '$0 locations:modes:setcurrent', |
| 26 | 'select a mode from a list of all modes and set it to be current for its location', |
| 27 | ], |
| 28 | [ |
| 29 | '$0 locations:modes:setcurrent --location 5dfd6626-ab1d-42da-bb76-90def3153998', |
| 30 | 'select a mode from a list of modes in the specified location and set it to be current', |
| 31 | ], |
| 32 | [ |
| 33 | '$0 locations:modes:setcurrent 636169e4-8b9f-4438-a941-953b0d617231', |
| 34 | 'set the specified mode to be current for its location', |
| 35 | ], |
| 36 | ]) |
| 37 | .epilog(buildEpilog({ command, apiDocs: 'changeMode' })) |
| 38 | |
| 39 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 40 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected