Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await Promise.all(urlAssets.map(async (asset) => {
if (!await exists(asset.path)) {
throw this._makeError(
'Invalid url() in css output',
`url("${asset.requestUrl}") resolves to "${asset.path}", which does not exist.\n` +
` Make sure that the request is relative to "${asset.root}"`
);
}
if (!isPathInside(asset.path, asset.boundry)) {
throw this._makeError(
'Invalid url() in css output',
`url("${asset.requestUrl}") resolves to "${asset.path}"\n` +
` which is outside of "${asset.boundry}"`
);
}
}));