(argv: ArgumentsCamelCase<CommandArgs>)
| 30 | })) |
| 31 | |
| 32 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 33 | const command = await smartThingsCommand(argv) |
| 34 | |
| 35 | const message = 'Are you sure you want to clear saved answers to questions' + |
| 36 | `${command.profileName === 'default' ? '' : ` for the profile ${command.profileName}`}?` |
| 37 | const confirmed = await booleanInput(message, { default: false }) |
| 38 | |
| 39 | if (confirmed) { |
| 40 | await resetManagedConfig(command.cliConfig, command.profileName) |
| 41 | console.log('Configuration has been reset.') |
| 42 | } else { |
| 43 | console.log('Configuration reset canceled.') |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 48 | export default cmd |
nothing calls this directly
no test coverage detected