MCPcopy Index your code
hub / github.com/MiniMax-AI/cli / pump

Function pump

src/update/self-update.ts:116–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114 await new Promise<void>((resolve, reject) => {
115 writer.on('error', reject);
116 const pump = async () => {
117 try {
118 while (true) {
119 const { done, value } = await reader.read();
120 if (done) { writer.end(); break; }
121 writer.write(value);
122 received += value.length;
123 if (onProgress && total > 0) onProgress(Math.round(received / total * 100));
124 }
125 resolve();
126 } catch (e) { reject(e); }
127 };
128 pump();
129 });
130}

Callers 1

downloadFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected