UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

29 lines (27 loc) 739 B
const require_runtime = require('../_virtual/_rolldown/runtime.cjs'); let execa = require("execa"); //#region src/utils/run.ts async function run(cmd, args, options = {}) { const proc = await (0, execa.execa)(cmd, args, { cwd: options.cwd, env: options.env ? { ...process.env, ...options.env } : process.env, stdio: options.capture ? "pipe" : "inherit", reject: false }); if (!options.capture) { const exitCode = proc.exitCode ?? 0; if (exitCode !== 0) throw new Error(`${cmd} ${args.join(" ")} failed with exit code ${exitCode}`); return; } return { stdout: proc.stdout ?? "", stderr: proc.stderr ?? "", exitCode: proc.exitCode ?? 0 }; } //#endregion exports.run = run; //# sourceMappingURL=run.cjs.map