UNPKG

@haechi-labs/henesis-cli

Version:

🚀 Command Line Interface tool to Utilize henesis

32 lines • 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const user_1 = tslib_1.__importDefault(require("../../rpc/user")); const base_1 = tslib_1.__importDefault(require("../../common/base")); const configstore_1 = tslib_1.__importDefault(require("../../common/configstore")); class Describe extends base_1.default { async run() { const user = configstore_1.default.get('user'); if (!user) { this.error('In order to use the Henesis CLI, you need to login first.\n' + 'Please use the henesis login command to get started.', { code: '460' }); //TODO: Enhancement: redirect to login prompt } try { const userResponse = await user_1.default.describe(); this.log(`Email: ${userResponse.email}`); this.log(`Name: ${userResponse.name}`); this.log(`Organization: ${userResponse.organization}`); this.log(`ClientId: ${userResponse.clientId}`); } catch (err) { this.error(err.message); } } } exports.default = Describe; Describe.description = 'describe account information'; Describe.examples = [`$ henesis account:describe`]; Describe.flags = {}; Describe.args = []; //# sourceMappingURL=describe.js.map