import { ScriptLine, define } from "./types.js" type RedirectOutputOpts = { output: string } export type HasRedirectOutput = { redirectOutput(childCommand: ScriptLine, opts: RedirectOutputOpts): string } export const redirectOutput = { bash: define({ redirectOutput: (childCommand, opts) => `${childCommand} > ${opts.output}`, }), powershell: define({ redirectOutput: (childCommand, opts) => `${childCommand} | Out-File ${opts.output} -Encoding UTF8`, }), }