MCPcopy Create free account
hub / github.com/freecodexyz/free-code / constructor

Method constructor

src/utils/ShellCommand.ts:73–80  ·  view source on GitHub ↗
(stream: Readable, taskOutput: TaskOutput, isStderr: boolean)

Source from the content-addressed store, hash-verified

71 #onData = this.#dataHandler.bind(this)
72
73 constructor(stream: Readable, taskOutput: TaskOutput, isStderr: boolean) {
74 this.#stream = stream
75 this.#taskOutput = taskOutput
76 this.#isStderr = isStderr
77 // Emit strings instead of Buffers - avoids repeated .toString() calls
78 stream.setEncoding('utf-8')
79 stream.on('data', this.#onData)
80 }
81
82 #dataHandler(data: Buffer | string): void {
83 const str = typeof data === 'string' ? data : data.toString()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected