Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options.step = 0;
options.tally = 4;
return of(context).pipe(
concatMap( results => ngc(options, context) ),
(options.compilationMode !== 'aot') ? concatMap( results => of(results) ) : concatMap( results => compileMain(options, context) ),
concatMap( results => rollup(options, context) ),
mapTo({ success: true }),
catchError(error => {
context.reportStatus('Error: ' + error);
return [{ success: false }];
})
);
}
export default createBuilder & RollupBuilderSchema>(executeRollup);
return of(context).pipe(
concatMap( results => ngc(options, context) ),
(options.compilationMode !== 'aot') ? concatMap( results => of(results) ) : concatMap( results => compileMain(options, context) ),
concatMap( results => optimizeBuild(options, context)),
concatMap( results => handleEnvironment(options, context)),
concatMap( results => closure(options, context) ),
mapTo({ success: true }),
catchError(error => {
context.reportStatus('Error: ' + error);
return [{ success: false }];
}),
);
}
export default createBuilder & ClosureBuilderSchema>(executeClosure);
}
exports.rollup = rollup;
async function build(options, context) {
await ngc(options, context);
await rollup(options, context);
return options;
}
function execute(options, context) {
context.reportProgress(2, 5, 'ngc');
return rxjs_1.from(build(options, context)).pipe(operators_1.mapTo({ success: true }), operators_1.catchError(error => {
context.reportStatus('Error: ' + error);
return [{ success: false }];
}));
}
exports.execute = execute;
exports.default = index2_1.createBuilder(execute);