MCPcopy Index your code
hub / github.com/inkeep/open-knowledge / makeShellDir

Function makeShellDir

packages/server/src/mcp-mount.test.ts:453–464  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

451 const SHELL_FONT_BYTES = Buffer.from('woff2-bundle-bytes', 'utf-8');
452
453 function makeShellDir(): string {
454 const dir = mkdtempSync(join(tmpdir(), 'ok-mcp-mount-shell-'));
455 tmpDirs.push(dir);
456 writeFileSync(
457 join(dir, 'index.html'),
458 '<!DOCTYPE html><html><body data-test="shell">ok</body></html>',
459 );
460 mkdirSync(join(dir, 'assets'));
461 writeFileSync(join(dir, 'assets', 'app-abc123.js'), 'console.log("bundle");');
462 writeFileSync(join(dir, 'assets', 'inter-cafebabe.woff2'), SHELL_FONT_BYTES);
463 return dir;
464 }
465
466 async function startWithShell(opts?: {
467 contentAssetMiddleware?: MountMcpAndApiOptions['contentAssetMiddleware'];

Callers 1

startWithShellFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected