(argv: ArgumentsCamelCase<CommandArgs>)
| 51 | .epilog(buildEpilog({ command, apiDocs: 'getCurrentMode' })) |
| 52 | |
| 53 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 54 | const command = await apiCommand(argv) |
| 55 | |
| 56 | const config: FormatAndWriteItemConfig<Mode & WithNamedLocation> = { |
| 57 | tableFieldDefinitions, |
| 58 | } |
| 59 | if (argv.verbose) { |
| 60 | config.tableFieldDefinitions = tableFieldDefinitionsWithLocationName |
| 61 | } |
| 62 | const locationId = await chooseLocation(command, argv.location, { autoChoose: true }) |
| 63 | const currentMode = await command.client.modes.getCurrent(locationId) |
| 64 | const mode = argv.verbose ? await withLocation(command.client, { ...currentMode, locationId }) : currentMode |
| 65 | await formatAndWriteItem<Mode & WithNamedLocation>(command, config, mode) |
| 66 | } |
| 67 | |
| 68 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 69 | export default cmd |
nothing calls this directly
no test coverage detected