Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// error in a dependency not directly handled by Parcel.
if (processed.error !== null) {
throw processed.error;
}
// Store resolved assets in their original order
dependencies.forEach((dep, i) => {
asset.dependencies.set(dep.name, dep);
let assetDep = assetDeps[i];
if (assetDep) {
asset.depAssets.set(dep, assetDep);
dep.resolved = assetDep.name;
}
});
logger.verbose({
origin: '',
message: `Built ${asset.relativeName}...`,
});
if (this.cache && cacheMiss) {
this.cache.write(asset.name, processed);
}
}
logAccessIfVerbose(req: Request) {
logger.verbose(`Request: ${req.headers.host}${req.originalUrl || req.url}`);
}
bus.on('logEvent', (e: LogEvent) => {
switch (e.level) {
case 'info':
invariant(typeof e.message === 'string');
Logger.info(e.message);
break;
case 'progress':
invariant(typeof e.message === 'string');
Logger.progress(e.message);
break;
case 'verbose':
invariant(typeof e.message === 'string');
Logger.verbose(e.message);
break;
case 'warn':
Logger.warn(e.message);
break;
case 'error':
Logger.error(e.message);
break;
default:
throw new Error('Unknown log level');
}
});
}