MCPcopy Create free account
hub / github.com/commandoperator/cmdop-sdk / ensureStarted

Method ensureStarted

node/src/transport.ts:133–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131 });
132 this.#child = child;
133 this.#stdin = child.stdin;
134 child.stderr.on("data", () => {});
135 child.on("exit", () => this.#failAll(new ConnectionError("cmdop-core exited", "transport")));
136 child.on("error", (error) =>
137 this.#failAll(new ConnectionError(`cmdop-core spawn failed: ${error.message}`, "transport")),
138 );
139 this.#startReader(child.stdout);
140 }
141
142 #startReader(stdout: Readable): void {
143 void (async () => {
144 try {
145 for await (const envelope of sizeDelimitedDecodeStream(EnvelopeSchema, stdout)) {

Callers 3

callUnaryMethod · 0.95
envelopesMethod · 0.80
answerMethod · 0.80

Calls 1

#spawnMethod · 0.95

Tested by

no test coverage detected