(argv: ArgumentsCamelCase<CommandArgs>)
| 34 | .epilog(buildEpilog({ command, apiDocs: ['updateDevice'] })) |
| 35 | |
| 36 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 37 | const command = await apiCommand(argv) |
| 38 | |
| 39 | const id = await chooseDevice(command, argv.id) |
| 40 | |
| 41 | const label = argv.newLabel ?? await stringInput('Enter new device label:') |
| 42 | |
| 43 | await outputItem( |
| 44 | command, |
| 45 | { buildTableOutput: data => buildTableOutput(command.tableGenerator, data) }, |
| 46 | () => command.client.devices.update(id, { label }), |
| 47 | ) |
| 48 | } |
| 49 | |
| 50 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 51 | export default cmd |
nothing calls this directly
no test coverage detected