UNPKG

alia

Version:
22 lines (21 loc) 556 B
import logger from '../utils/logger.js'; export class InputService { flagService; commandService; constructor(flagService, commandService) { this.flagService = flagService; this.commandService = commandService; } async read() { try { const argv = process.argv.slice(2); const flag = await this.flagService.run(argv); if (!flag) { this.commandService.run(argv); } } catch (error) { logger.error(error); } } }