Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
try {
rule.selector = localizeSelectors(
rule.selector,
options.mode === "global" ? "global" : "local",
getAlias
);
} catch (e) {
throw rule.error(e.message);
}
});
result.messages.push(...getMessages(aliases));
// contracts
const composedExports = composeExports(result.messages);
const exports = Object.assign({}, icssExports, composedExports);
css.prepend(createICSSRules(icssImports, exports));
});
);
}
walkDecls(rule, decl => {
const { names, path } = parseComposes(decl.value);
const composed = path
? names.map(name => getImportedName(path, name))
: names;
composedMessages.push(...combineIntoMessages(classes, composed));
decl.remove();
});
});
const composedExports = composeAliases(localsToScoped, composedMessages);
const exports = Object.assign({}, icssExports, composedExports);
const imports = combineImports(icssImports, composedImports);
css.prepend(createICSSRules(imports, exports));
result.messages.push(...composedMessages);
});
});
}
}
atrule.remove();
});
const scopedAliases = getScopedAliases(result.messages, valuesExports);
replaceSymbols(css, Object.assign({}, valuesExports, scopedAliases));
Object.keys(icssExports).forEach(key => {
icssExports[key] = replaceValueSymbols(icssExports[key], scopedAliases);
});
css.prepend(
createICSSRules(icssImports, Object.assign({}, icssExports, valuesExports))
);
result.messages.push(...getMessages(valuesExports));
});