(yargs: Argv)
| 21 | const describe = 'rename a device' |
| 22 | |
| 23 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 24 | outputItemBuilder(apiCommandBuilder(yargs)) |
| 25 | .positional('id', { describe: 'device id', type: 'string' }) |
| 26 | .positional('new-label', { describe: 'new device label', type: 'string' }) |
| 27 | .example([ |
| 28 | ['$0 devices:rename', 'prompt for a device and a new label and rename the chosen device'], |
| 29 | [ |
| 30 | '$0 devices:rename f22bb71f-b6a0-43de-9131-20e7dfc0f973 "New Name"', |
| 31 | 'rename the specified device with the specified name', |
| 32 | ], |
| 33 | ]) |
| 34 | .epilog(buildEpilog({ command, apiDocs: ['updateDevice'] })) |
| 35 | |
| 36 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 37 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected