UNPKG

@adinsure-ops/ops-cli

Version:

Operations CLI for working with AdInsure

27 lines (26 loc) 901 B
import { __awaiter } from "tslib"; import chalk from 'chalk'; import CommandBase from '../../command.base.js'; import OpsConfig from '../../lib/config.js'; class ConfigList extends CommandBase { run() { const _super = Object.create(null, { run: { get: () => super.run } }); return __awaiter(this, void 0, void 0, function* () { _super.run.call(this); const configPath = this.security.getConfigPath(); const config = new OpsConfig(configPath); const allConfig = config.list(); this.log(chalk.green("config.json:")); this.log(JSON.stringify(allConfig, null, 2)); }); } } ConfigList.aliases = ['config:list']; ConfigList.description = 'List all configuration values'; ConfigList.usage = 'config:list'; ConfigList.examples = [ '$ ops config:list' ]; export default ConfigList;