(argv: ArgumentsCamelCase<CommandArgs>)
| 65 | })) |
| 66 | |
| 67 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 68 | const command = await apiOrganizationCommand(argv) |
| 69 | |
| 70 | const config: OutputItemOrListConfig<EdgeDriver & WithOrganization> = { |
| 71 | primaryKeyName: 'driverId', |
| 72 | sortKeyName: 'name', |
| 73 | buildTableOutput: (driver: EdgeDriver) => buildTableOutput(command.tableGenerator, driver), |
| 74 | listTableFieldDefinitions, |
| 75 | } |
| 76 | |
| 77 | if (argv.allOrganizations) { |
| 78 | config.listTableFieldDefinitions.push('organization') |
| 79 | } |
| 80 | |
| 81 | const getDriver = (id: string): Promise<EdgeDriver> => |
| 82 | argv.driverVersion |
| 83 | ? command.client.drivers.getRevision(id, argv.driverVersion) |
| 84 | : command.client.drivers.get(id) |
| 85 | |
| 86 | await outputItemOrList<EdgeDriver & WithOrganization>(command, config, argv.idOrIndex, |
| 87 | () => listDrivers(command.client, argv.allOrganizations), |
| 88 | getDriver) |
| 89 | } |
| 90 | |
| 91 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 92 | export default cmd |
nothing calls this directly
no test coverage detected