@ankimcp/anki-mcp-server
Version:
Model Context Protocol server for Anki - enables AI assistants to interact with your Anki flashcards
25 lines • 982 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleLogout = handleLogout;
const credentials_service_1 = require("../credentials.service");
async function handleLogout(cli) {
const credentialsService = new credentials_service_1.CredentialsService();
const hasCredentials = await credentialsService.hasCredentials();
if (!hasCredentials) {
cli.blank();
cli.info("Not logged in. Nothing to do.");
return;
}
try {
await credentialsService.clearCredentials();
cli.blank();
cli.success("Logged out successfully.");
cli.info(`Credentials removed from ${credentialsService.getCredentialsPath()}`);
}
catch (error) {
cli.blank();
cli.error(`Failed to remove credentials: ${error instanceof Error ? error.message : String(error)}`, error instanceof Error ? error : undefined);
process.exit(1);
}
}
//# sourceMappingURL=logout.command.js.map