Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function getFaastCompiler(
config: DuckConfig
): Promise> {
logger.info("Initializing batch mode");
const batch = assertNonNullable(config.batch);
const batchOptions = getBatchOptions(config);
const m =
batch === "aws"
? await faastAws(compilerFaastFunctions, batchOptions as AwsOptions)
: batch === "local"
? await faastLocal(compilerFaastFunctions, batchOptions as LocalOptions)
: null;
if (!m) {
throw new TypeError(`Unsupported batch mode: ${batch}`);
}
return m;
}