Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(opts: Opts) {
this.config = opts.config;
this.options = opts.options;
this.pluginOptions = new PluginOptions(this.options);
logger.onLog(event => this.report(event));
// Convert any internal bundles back to their public equivalents as reporting
// is public api
bus.on('reporterEvent', event => {
if (event.bundle == null) {
this.report(event);
} else {
this.report({
...event,
bundle: new NamedBundle(
event.bundle,
event.bundleGraph,
this.options,
),
});
}
});
if (this.options.patchConsole) {
patchConsole();