UNPKG

@xgheaven/nos-cli

Version:
34 lines (33 loc) 1.39 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var config_1 = require("../../config"); var base_command_1 = require("../base-command"); var AccountLogoutCommand = /** @class */ (function (_super) { __extends(AccountLogoutCommand, _super); function AccountLogoutCommand() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.command = 'logout'; _this.describe = 'Logout a account'; return _this; } AccountLogoutCommand.prototype.handler = function (args) { var config = this.config; delete config.accounts[args.account]; config_1.setConfig(config); }; return AccountLogoutCommand; }(base_command_1.BaseCommand)); exports.AccountLogoutCommand = AccountLogoutCommand;