(yargs: Argv)
| 23 | |
| 24 | |
| 25 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 26 | apiCommandBuilder(yargs) |
| 27 | .positional('driver-id', { describe: 'id of driver to install', type: 'string' }) |
| 28 | .option('hub', { alias: 'H', describe: 'hub on which to install the driver', type: 'string' }) |
| 29 | .option('channel', { alias: 'C', describe: 'channel that contains the driver being installed', type: 'string' }) |
| 30 | .example([ |
| 31 | ['$0 edge:drivers:install', 'install a driver in interactive mode'], |
| 32 | [ |
| 33 | '$0 edge:drivers:install --hub 5dfd6626-ab1d-42da-bb76-90def3153998', |
| 34 | 'specify the hub on the command line, other fields will be asked for', |
| 35 | ], |
| 36 | [ |
| 37 | '$0 edge:drivers:install --hub 5dfd6626-ab1d-42da-bb76-90def3153998' + |
| 38 | ' --channel da1774a6-1901-44f2-90ad-972a85f9bd8a d6a4ad8f-a855-444d-b06b-1a64ab8aa130', |
| 39 | 'install a driver from a channel on an enrolled hub', |
| 40 | ], |
| 41 | ]) |
| 42 | .epilog(buildEpilog({ command, apiDocs: 'installDrivers' })) |
| 43 | |
| 44 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 45 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected