// log info about test mode const logTestMode = isTestMode => { if (isTestMode) { spinner .info( 'moro running in test mode, a temporary db will be used: ', dbTestFile ) .start() } }
info(text) { this._spinner.info(text); }
/** * Subscribes to task events */ subscribeToEvents() { this.tasks.forEach((task) => { task.subscribe(({type}) => { if (type !== 'STATE') { return; } if (task.isCompleted()) { this.spinner[this.options.clearOnSuccess ? 'stop' : 'succeed'](task.title); } if (task.isSkipped()) { if (task.output && typeof task.output === 'string') { this.ui.log(task.output, 'yellow'); } this.spinner.info(`${task.title} ${chalk.gray('[skipped]')}`); } if (task.hasFailed()) { this.spinner.fail(task.title); } }); }); }