UNPKG

@onboardbase/cli

Version:

[![Version](https://img.shields.io/npm/v/@onboardbase/cli.svg)](https://www.npmjs.com/package/@onboardbase/cli) [![Downloads/week](https://img.shields.io/npm/dw/@onboardbase/cli.svg)](https://www.npmjs.com/package/@onboardbase/cli) [![License](https://img

24 lines (23 loc) 872 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const command_1 = require("@oclif/command"); const chalk = require("chalk"); const config_1 = require("../../configuration/config"); class ConfigGetToken extends command_1.Command { async run() { // Init config manager await config_1.default.init(); const { flags: { scope }, } = this.parse(ConfigGetToken); const configs = await config_1.default.getConfigs(); console.log(scope !== undefined ? configs[scope] !== undefined ? configs[scope] : chalk.red("Error: No config found for this scope") : configs); } } exports.default = ConfigGetToken; ConfigGetToken.description = "Get all tokens"; ConfigGetToken.flags = { scope: command_1.flags.string({ char: "S", description: "scope" }), };