Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const createPipeline = (text) => {
try {
const jsText = transpiler[SHELL][JS].compile(text);
const js = parseFilter(jsText);
return js.map((stage) => {
return createStage(
Object.keys(stage)[0],
toShellString(Object.values(stage)[0], INDENT),
null
);
});
} catch (e) {
return [ createStage(null, '', e.message) ];
}
};