(argv: ArgumentsCamelCase<CommandArgs>)
| 20 | .epilog(buildEpilog({ command })) |
| 21 | |
| 22 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 23 | const command = await apiCommand(argv) |
| 24 | |
| 25 | if (command.token || !command.authenticator.logout) { |
| 26 | const errorMsg = command.profile.token |
| 27 | ? `Profile ${command.profileName} is set up using a bearer token.` |
| 28 | : 'Cannot log out with a bearer token.' |
| 29 | return fatalError(errorMsg) |
| 30 | } |
| 31 | |
| 32 | await command.authenticator.logout() |
| 33 | console.log('logged out') |
| 34 | } |
| 35 | |
| 36 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 37 | export default cmd |
nothing calls this directly
no test coverage detected