(yargs: Argv)
| 25 | const describe = 'list devices using edge drivers' |
| 26 | |
| 27 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 28 | outputItemOrListBuilder(apiCommandBuilder(yargs)) |
| 29 | .positional('id-or-index', { describe: 'device id or number in list', type: 'string' }) |
| 30 | .option('hub', { alias: 'H', describe: 'hub id', type: 'string' }) |
| 31 | .option('driver', { alias: 'D', describe: 'driver id', type: 'string' }) |
| 32 | .example([ |
| 33 | ['$0 edge:drivers:devices', 'list all devices using edge drivers'], |
| 34 | [ |
| 35 | '$0 edge:drivers:devices 3', |
| 36 | 'display details about the third device listed in the above command', |
| 37 | ], |
| 38 | [ |
| 39 | '$0 edge:drivers:devices dfda0a8e-55d6-445b-ace5-db828679bcb3', |
| 40 | 'display details about a device by id', |
| 41 | ], |
| 42 | [ |
| 43 | '$0 edge:edge:drivers:devices --hub a9108ab1-7087-4c10-9781-a0627b084fce', |
| 44 | 'list all devices using edge drivers on the specified hub', |
| 45 | ], |
| 46 | [ |
| 47 | '$0 edge:drivers:devices --driver b67a134c-ace8-4b8d-9a0e-444ad78b4455', |
| 48 | 'list devices that use the specified driver', |
| 49 | ], |
| 50 | ]) |
| 51 | .epilog(buildEpilog({ command, apiDocs: ['getDevices', 'listDrivers', 'getDriver', 'getDriverRevision'] })) |
| 52 | |
| 53 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 54 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected