mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
1028547a3a783b92a86f3a8371947fec160dfd83
Implement support for bundling web assets into CLI single executable binaries. When built with --with-web-assets, the executable includes the compiled web application and serves it directly without file system access. A stub generator creates empty manifests for normal builds to maintain compatibility. Key changes: - Add --with-web-assets flag to build-executable.ts with manifest validation - Generate embeddedAssets.ts manifest from web/dist during build - Serve embedded assets in web server with fallback to file system - Add hapi server subcommand to start API + web server - Include server sources in CLI tsconfig for compilation scope - Add workspace-level build:single-exe scripts for production builds
hapi
Monorepo with three Bun workspace packages:
cli/(hapi): CLI (single executable) exposinghapi/hapi mcpserver/(hapi-server): backend API + Telegram bot server, servesweb/dist/web/(hapi-web): web frontend (Vite) building toweb/dist/
Commands
Run from the repo root:
bun install
bun run typecheck
bun run build
bun run build:cli:exe
bun run build:cli:exe -- --target bun-darwin-x64
Languages
TypeScript
99.5%
CSS
0.2%
JavaScript
0.2%
HTML
0.1%