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

Function assertWebAssets

packages/server/src/routes/webAssets.ts:24–35  ·  view source on GitHub ↗
(assetsDir: string)

Source from the content-addressed store, hash-verified

22}
23
24async function assertWebAssets(assetsDir: string): Promise<void> {
25 try {
26 const info = await stat(join(assetsDir, 'index.html'));
27 if (!info.isFile()) {
28 throw new Error('index.html is not a file');
29 }
30 } catch {
31 throw new Error(
32 `Kimi web assets were not found at ${assetsDir}. Run the package build before starting the server.`,
33 );
34 }
35}
36
37async function serveWebAsset(
38 req: FastifyRequest,

Callers 1

registerWebAssetRoutesFunction · 0.85

Calls 1

statFunction · 0.50

Tested by

no test coverage detected