bunite-core 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bunite-core",
3
3
  "description": "Uniting UI and Bun",
4
- "version": "0.17.0",
4
+ "version": "0.17.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "setup:cef": "bun ../tools/bunite-dev/scripts/setup-cef.ts",
package/src/host/paths.ts CHANGED
@@ -105,10 +105,14 @@ function resolveCefDir(searchDirs: string[]): string | null {
105
105
  return null;
106
106
  }
107
107
 
108
- /** Entry script dir (dev) or exe dir (compiled binary). */
108
+ /** Entry-script dir (dev) or real exe dir (compiled binary). */
109
109
  export function getBaseDir(): string {
110
110
  const main = Bun.main;
111
- if (main && existsSync(main)) return dirname(main);
111
+ // Compiled standalone: Bun.main is a virtual embedded-fs path (win `B:/~BUN/…`,
112
+ // posix `/$bunfs/…`) for which existsSync() returns true — so it can't gate the
113
+ // dev branch. Detect the virtual root and use the real executable dir instead.
114
+ const compiled = main.includes("~BUN") || main.includes("$bunfs");
115
+ if (!compiled && main && existsSync(main)) return dirname(main);
112
116
  return dirname(process.execPath);
113
117
  }
114
118