Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// @flow strict-local
import type {ReporterEvent} from '@parcel/types';
import {render} from 'ink';
import {Reporter} from '@parcel/plugin';
import React from 'react';
import {ValueEmitter} from '@parcel/events';
import UI from './UI';
let rendered = false;
let events = new ValueEmitter();
export default new Reporter({
report({event, options}) {
if (!rendered) {
render();
rendered = true;
}
events.emit(event);
},
});