Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) =>
jscrambler.downloadSourceMaps(
Object.assign({}, jscrambler.config, {stream: false, protectionId}),
(res, error) => {
if (error) {
console.error(error);
return reject(error);
}
return this.processSourceMaps(res, this.outputPath, resolve);
}
));
}
processResult(protectionId, compilation, callback) {
const results = this.protectionResult;
for (const result of results) {
compilation.assets[result.filename] = {
source() {
return result.content;
},
size() {
return result.content.length;
}
};
}
if (sourceMaps) {
client.downloadSourceMaps(
Object.assign({}, client.config, {stream: false, protectionId}),
res => this.processSourceMaps(res, compilation, callback)
);
return;
}
callback();
}
}