Files
hapi/hub/src/utils/bunCompiled.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

6 lines
262 B
TypeScript

/** Bun embeds compiled code in a virtual filesystem: /$bunfs/ (Linux/macOS) or /~BUN/ (Windows) */
export function isBunCompiled(): boolean {
const bunMain = globalThis.Bun?.main ?? '';
return bunMain.includes('$bunfs') || bunMain.includes('/~BUN/');
}