mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(cli): add single executable with embedded web assets support
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
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
"build:cli": "cd cli && bun run build",
|
||||
"build:cli:exe": "cd cli && bun run build:exe",
|
||||
"build:cli:exe:all": "cd cli && bun run build:exe:all",
|
||||
"build:single-exe": "bun run build:web && (cd server && bun run generate:embedded-web-assets) && (cd cli && bun run build:exe:allinone)",
|
||||
"build:single-exe:all": "bun run build:web && (cd server && bun run generate:embedded-web-assets) && (cd cli && bun run build:exe:allinone:all)",
|
||||
"build:server": "cd server && bun run build",
|
||||
"build:web": "cd web && bun run build",
|
||||
"dev:server": "cd server && bun run dev",
|
||||
|
||||
Reference in New Issue
Block a user