Windows: MCP entries start through cmd /c npx or bun cli/index.ts (npx.cmd and the sh launcher cannot be spawned, pitfall 94); desktop download streams with progress and fails after 60 s without data (pitfall 95); getting-started Windows note

This commit is contained in:
CRTkafa 2026-10-21 22:21:49 +08:00
parent e5dffb5533
commit 0ac3cd02b0
6 changed files with 77 additions and 9 deletions

View file

@ -106,6 +106,9 @@ describe('latest.json and downloads', () => {
await expect(download({ ...d, file: 'c.dmg', sha256: sha }, dir, serve(evil), k.pub)).rejects.toThrow(/signature/);
await expect(download({ ...d, file: 'e.dmg' }, dir, serve(data.subarray(1)), k.pub)).rejects.toThrow(/bytes/);
await expect(download({ ...d, file: 'f.dmg' }, dir, async () => new Response('', { status: 404 }), k.pub)).rejects.toThrow(/404/);
// a body that never sends a byte fails after the stall timeout instead of hanging forever (pitfall 95)
const silent = async () => new Response(new ReadableStream({ start() {} }));
await expect(download({ ...d, file: 'g.dmg' }, dir, silent, k.pub, 50, () => {})).rejects.toThrow(/stalled/);
for (const f of ['b.dmg', 'c.dmg', 'e.dmg', 'f.dmg']) expect(existsSync(join(dir, f))).toBe(false);
});
});