feat(cli): refactor embedded assets with Bun-specific and stub implementations

Split embedded assets loading into runtime-specific variants using package.json imports field. Bun-compiled binaries use the full implementation with file assets, while stub fallback provides clear error for non-Bun runtimes.
This commit is contained in:
weishu
2025-12-20 23:46:02 +08:00
parent be655f9fcf
commit cf04937355
6 changed files with 21 additions and 4 deletions
+7 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hapi",
"version": "0.12.0-0",
"version": "0.12.0-1",
"description": "Mobile and Web client for Claude Code and Codex",
"author": "Kirill Dubovitskiy",
"license": "MIT",
@@ -51,6 +51,12 @@
}
}
},
"imports": {
"#embedded-assets": {
"bun": "./src/runtime/embeddedAssets.bun.ts",
"default": "./src/runtime/embeddedAssets.stub.ts"
}
},
"files": [
"dist",
"bin",