UNPKG

@enspirit/emb

Version:

A replacement for our Makefile-for-monorepos

24 lines (23 loc) 804 B
import { Flags } from '@oclif/core'; import { FlavoredCommand, getContext } from '../index.js'; import { ComposePsOperation } from '../../docker/index.js'; export default class PsCommand extends FlavoredCommand { static description = 'Lists the containers running in the project.'; static enableJsonFlag = false; static examples = ['<%= config.bin %> <%= command.id %>']; static flags = { all: Flags.boolean({ char: 'a', default: false, description: 'Show all stopped containers', name: 'all', }), }; async run() { const { flags } = await this.parse(PsCommand); const { monorepo } = getContext(); await monorepo.run(new ComposePsOperation(), { all: flags.all, }); } }