@mojaloop/ml-schema-transformer-lib
Version:
Shared component for ML schemas translation
15 lines • 521 B
JavaScript
// src/lib/transforms/pipeline.ts
var runPipeline = async (source, target, options) => {
if (!options.hasOwnProperty("pipelineSteps") || !Array.isArray(options.pipelineSteps)) {
throw new Error("runPipeline: options.pipelineSteps must be an array");
}
const { pipelineSteps, logger, ...stepOptions } = options;
for (const step of pipelineSteps) {
target = await step({ source, target, options: stepOptions, logger });
}
return target;
};
export {
runPipeline
};
//# sourceMappingURL=pipeline.mjs.map