fix(coding-agent): honor PI_PACKAGE_DIR for bun asset paths closes #3074
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
### Fixed
|
||||
|
||||
- Fixed missing root exports for `RpcClient` and RPC protocol types from `@mariozechner/pi-coding-agent`, so ESM consumers can import them from the main package entrypoint ([#3275](https://github.com/badlogic/pi-mono/issues/3275))
|
||||
- Fixed Bun binary asset path resolution to honor `PI_PACKAGE_DIR` for built-in themes, HTML export templates, and interactive bundled assets ([#3074](https://github.com/badlogic/pi-mono/issues/3074))
|
||||
|
||||
## [0.67.6] - 2026-04-16
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ export function getPackageDir(): string {
|
||||
*/
|
||||
export function getThemesDir(): string {
|
||||
if (isBunBinary) {
|
||||
return join(dirname(process.execPath), "theme");
|
||||
return join(getPackageDir(), "theme");
|
||||
}
|
||||
// Theme is in modes/interactive/theme/ relative to src/ or dist/
|
||||
const packageDir = getPackageDir();
|
||||
@@ -126,7 +126,7 @@ export function getThemesDir(): string {
|
||||
*/
|
||||
export function getExportTemplateDir(): string {
|
||||
if (isBunBinary) {
|
||||
return join(dirname(process.execPath), "export-html");
|
||||
return join(getPackageDir(), "export-html");
|
||||
}
|
||||
const packageDir = getPackageDir();
|
||||
const srcOrDist = existsSync(join(packageDir, "src")) ? "src" : "dist";
|
||||
@@ -166,7 +166,7 @@ export function getChangelogPath(): string {
|
||||
*/
|
||||
export function getInteractiveAssetsDir(): string {
|
||||
if (isBunBinary) {
|
||||
return join(dirname(process.execPath), "assets");
|
||||
return join(getPackageDir(), "assets");
|
||||
}
|
||||
const packageDir = getPackageDir();
|
||||
const srcOrDist = existsSync(join(packageDir, "src")) ? "src" : "dist";
|
||||
|
||||
Reference in New Issue
Block a user