Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
diveIntoAngularMethodCall(argumentNodes, templateCacheVariableName);
stackPosition -= 2;
}
}
if (node.expression instanceof uglifyJs.AST_Symbol && node.expression.name === 'INCLUDE') {
if (node.args.length === 1 && node.args[0] instanceof uglifyJs.AST_String) {
outgoingRelations.push(new AssetGraph.JavaScriptInclude({
from: this,
to: {
url: node.args[0].value
},
node: node,
detachableNode: parentNode instanceof uglifyJs.AST_Seq ? node : parentNode,
parentNode: parentNode instanceof uglifyJs.AST_Seq ? parentNode : parentParentNode
}));
} else {
syntaxErrors.push(new errors.SyntaxError({
message: 'Invalid INCLUDE syntax: Must take a single string argument:' + node.print_to_string(),
asset: this
}));
}
} else if (node.expression instanceof uglifyJs.AST_Symbol && node.expression.name === 'GETTEXT') {
if (node.args.length === 1) {
// TRHTML(GETTEXT(...)) is covered by TRHTML below:
if (!(parentNode instanceof uglifyJs.AST_Call) || !(parentNode.expression instanceof uglifyJs.AST_Symbol) || parentNode.expression.name !== 'TRHTML') {
node.args[0] = tryFoldConstantToString(node.args[0]);
if (node.args[0] instanceof uglifyJs.AST_String) {
outgoingRelations.push(new AssetGraph.JavaScriptGetText({
parentNode: parentNode,
from: this,
} else if (seenDefine && isNamedDefineNode(_node)) {
isSucceededByDefineWithStringArg = true;
}
};
OUTER:
while (parentIndex >= 0) {
if (stack[parentIndex] instanceof uglifyJs.AST_Block) {
var blockNode = stack[parentIndex];
for (var i = blockNode.body.indexOf(stack[parentIndex + 1]) ; i < blockNode.body.length ; i += 1) {
if (blockNode.body[i] instanceof uglifyJs.AST_SimpleStatement && isNamedDefineNode(blockNode.body[i].body)) {
isSucceededByDefineWithStringArg = true;
break OUTER;
}
}
break OUTER;
} else if (stack[parentIndex] instanceof uglifyJs.AST_Seq) {
stack[parentIndex].walk(new uglifyJs.TreeWalker(walkFn));
break OUTER;
} else {
parentIndex -= 1;
}
}
if (!isSucceededByDefineWithStringArg) {
var arrayNode = node.args[0];
arrayNode.elements.forEach(function (arrayItemAst, i) {
arrayItemAst = arrayNode.elements[i] = tryFoldConstantToString(arrayItemAst);
if (arrayItemAst instanceof uglifyJs.AST_String) {
if (['require', 'exports', 'module'].indexOf(arrayItemAst.value) === -1) {
outgoingRelations.push(new AssetGraph.JavaScriptAmdRequire({
from: this,
callNode: node,