(argv: ArgumentsCamelCase<CommandArgs>)
| 59 | })) |
| 60 | |
| 61 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 62 | const command = await apiOrganizationCommand(argv) |
| 63 | |
| 64 | const id = await chooseDeviceProfile(command, argv.idOrIndex, { allowIndex: true }) |
| 65 | |
| 66 | const profile = await command.client.deviceProfiles.get(id) |
| 67 | if (!profile.metadata) { |
| 68 | return fatalError('No presentation defined for device profile') |
| 69 | } |
| 70 | |
| 71 | const presentation = await command.client.presentation.getPresentation(profile.metadata.vid, profile.metadata.mnmn) |
| 72 | await formatAndWriteItem( |
| 73 | command, |
| 74 | { buildTableOutput: data => buildTableOutput(command.tableGenerator, data) }, |
| 75 | presentation, |
| 76 | ) |
| 77 | } |
| 78 | |
| 79 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 80 | export default cmd |
nothing calls this directly
no test coverage detected