MCPcopy Create free account
hub / github.com/Effect-TS/effect / flatten

Function flatten

packages/platform/node-shared/src/NodeChildProcessSpawner.ts:697–713  ·  view source on GitHub ↗
(cmd: ChildProcess.Command)

Source from the content-addressed store, hash-verified

695 const pipeOptions: Array<ChildProcess.PipeOptions> = []
696
697 const flatten = (cmd: ChildProcess.Command): void => {
698 switch (cmd._tag) {
699 case "StandardCommand": {
700 commands.push(cmd)
701 break
702 }
703 case "PipedCommand": {
704 // Recursively flatten left side first
705 flatten(cmd.left)
706 // Store the pipe options for this connection
707 pipeOptions.push(cmd.options)
708 // Then flatten right side
709 flatten(cmd.right)
710 break
711 }
712 }
713 }
714
715 flatten(command)
716

Callers 1

flattenCommandFunction · 0.70

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected