Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
node.body instanceof uglifyJs.AST_Call &&
node.body.expression instanceof uglifyJs.AST_Dot &&
node.body.expression.property === 'config' &&
node.body.expression.expression instanceof uglifyJs.AST_SymbolRef &&
node.body.args[0] instanceof uglifyJs.AST_Object &&
(node.body.expression.expression.name === 'require' || node.body.expression.expression.name === 'requirejs')) {
outgoingRelations.push(new AssetGraph.JavaScriptRequireJsConfig({
from: this,
node: node.body.args[0],
parentNode: node.body,
to: new AssetGraph.RequireJsConfig({
parseTree: node.body.args[0].transform(deepCloneTransform)
})
}));
} else if (node instanceof uglifyJs.AST_Var) {
node.definitions.forEach(function (varDefNode) {
if (varDefNode.name.name === 'require' && varDefNode.value instanceof uglifyJs.AST_Object) {
outgoingRelations.push(new AssetGraph.JavaScriptRequireJsConfig({
isRequireVar: true,
from: this,
parentNode: varDefNode,
node: varDefNode.value,
to: new AssetGraph.RequireJsConfig({
parseTree: varDefNode.value.transform(deepCloneTransform)
})
}));
}
}, this);
} else if (node instanceof uglifyJs.AST_Call) {
var parentParentNode = stack[stack.length - 3];
if (node.expression instanceof uglifyJs.AST_Dot && node.expression.property === 'module' &&