(argv: ArgumentsCamelCase<CommandArgs>)
| 78 | export type CapabilitySummaryWithLocales = CapabilitySummaryWithNamespace & WithLocales |
| 79 | |
| 80 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 81 | const command = await apiOrganizationCommand(argv) |
| 82 | |
| 83 | const capabilityId = await chooseCapability( |
| 84 | command, |
| 85 | argv.idOrIndex, |
| 86 | argv.capabilityVersion, |
| 87 | { namespace: argv.namespace, allowIndex: true, verbose: argv.verbose }, |
| 88 | ) |
| 89 | |
| 90 | const config: OutputItemOrListConfig<DeviceProfileTranslations, LocaleReference> = { |
| 91 | primaryKeyName: 'tag', |
| 92 | sortKeyName: 'tag', |
| 93 | listTableFieldDefinitions: ['tag'], |
| 94 | buildTableOutput: data => buildTableOutput(command.tableGenerator, data), |
| 95 | } |
| 96 | |
| 97 | await outputItemOrList( |
| 98 | command, |
| 99 | config, |
| 100 | argv.tag, |
| 101 | () => command.client.capabilities.listLocales(capabilityId.id, capabilityId.version), |
| 102 | tag => command.client.capabilities.getTranslations(capabilityId.id, capabilityId.version, tag), |
| 103 | true, |
| 104 | ) |
| 105 | } |
| 106 | |
| 107 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 108 | export default cmd |
nothing calls this directly
no test coverage detected