Files
hapi/hub/src/web/embeddedAssets.ts
T
weishu 37e10a831b feat: rename server package to hub
Rename the `server/` directory to `hub/` and update all references
across CLI, docs, web, and workspace configuration.
2026-01-27 19:51:21 +08:00

16 lines
517 B
TypeScript

import type { EmbeddedWebAsset } from './embeddedAssets.generated';
let embeddedAssetMap: Map<string, EmbeddedWebAsset> | null = null;
export type { EmbeddedWebAsset };
export async function loadEmbeddedAssetMap(): Promise<Map<string, EmbeddedWebAsset>> {
if (embeddedAssetMap) {
return embeddedAssetMap;
}
const { embeddedAssets } = await import('./embeddedAssets.generated');
embeddedAssetMap = new Map(embeddedAssets.map((asset) => [asset.path, asset]));
return embeddedAssetMap;
}