MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / streamToBuffer

Function streamToBuffer

packages/kaos/test/ssh.test.ts:28–34  ·  view source on GitHub ↗
(stream: NodeJS.ReadableStream)

Source from the content-addressed store, hash-verified

26const S_IFREG = 0o100000;
27
28async function streamToBuffer(stream: NodeJS.ReadableStream): Promise<Buffer> {
29 const chunks: Buffer[] = [];
30 for await (const chunk of stream) {
31 chunks.push(Buffer.from(chunk as Buffer));
32 }
33 return Buffer.concat(chunks);
34}
35
36// Explicit opt-in smoke: set KAOS_SSH_SMOKE=1 plus SSH credentials.
37describe.skipIf(process.platform === 'win32' || !SSH_SMOKE)('SSHKaos smoke', () => {

Callers 1

ssh.test.tsFile · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected