import loadEmscriptenModuleNode from './internal/load-emscripten-module-node.js';
import runPipelineEmscripten from './internal/run-pipeline-emscripten.js';
async function runPipelineNode(pipelinePath, args, outputs, inputs, mountDirs) {
    const Module = (await loadEmscriptenModuleNode(pipelinePath));
    const mountedDirs = new Set();
    if (typeof mountDirs !== 'undefined') {
        mountDirs.forEach((dir) => {
            mountedDirs.add(Module.mountDir(dir));
        });
    }
    const result = runPipelineEmscripten(Module, args, outputs, inputs);
    if (typeof mountDirs !== 'undefined') {
        mountedDirs.forEach((dir) => {
            Module.unmountDir(dir);
        });
    }
    return result;
}
export default runPipelineNode;
//# sourceMappingURL=run-pipeline-node.js.map