UNPKG

@papavault/cli

Version:

CLI tool for Papa Vault Secret Manager

22 lines (21 loc) 827 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.logoutCommand = logoutCommand; const chalk_1 = __importDefault(require("chalk")); const config_1 = require("../utils/config"); function logoutCommand(program) { program .command('logout') .description('Log out from Papa Vault by removing the stored API token') .action(() => { if (!(0, config_1.isAuthenticated)()) { console.log(chalk_1.default.yellow('You are not currently logged in.')); return; } (0, config_1.removeToken)(); console.log(chalk_1.default.green('Successfully logged out from Papa Vault.')); }); }