@liara/cli
Version:
The command line interface for Liara
24 lines (23 loc) • 751 B
JavaScript
import { ux, Flags } from '@oclif/core';
import Command from '../../base.js';
class EnvList extends Command {
async run() {
const { flags } = await this.parse(EnvList);
await this.setGotConfig(flags);
const app = flags.app || (await this.promptProject());
// TODO: Use proper type for project
const { project } = await this.got(`v1/projects/${app}`).json();
ux.table(project.envs, {
key: {},
value: {},
}, flags);
}
}
EnvList.description = 'list environment variables of an app';
EnvList.flags = {
...Command.flags,
app: Flags.string({ char: 'a', description: 'app id' }),
...ux.table.flags(),
};
EnvList.aliases = ['env:ls'];
export default EnvList;