UNPKG

rdme

Version:

ReadMe's official CLI and GitHub Action.

12 lines (11 loc) 497 B
import BaseCommand from '../lib/baseCommand.js'; import configStore from '../lib/configstore.js'; export default class LogoutCommand extends BaseCommand { static description = 'Logs the currently authenticated user out of ReadMe.'; async run() { if (configStore.has('email') && configStore.has('project')) { configStore.clear(); } return Promise.resolve(`You have logged out of ReadMe. Please use \`${this.config.bin} login\` to login again.`); } }