electrobun 0.0.19-beta.16 → 0.0.19-beta.17

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli/index.ts +22 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "0.0.19-beta.16",
3
+ "version": "0.0.19-beta.17",
4
4
  "description": "Build ultra fast, tiny, and cross-platform desktop apps with Typescript.",
5
5
  "license": "MIT",
6
6
  "author": "Blackboard Technologies Inc.",
package/src/cli/index.ts CHANGED
@@ -114,13 +114,13 @@ async function ensureCoreDependencies() {
114
114
 
115
115
  const platformName = OS === 'macos' ? 'darwin' : OS === 'win' ? 'win32' : 'linux';
116
116
  const archName = ARCH;
117
- const mainTarballUrl = `https://github.com/blackboardsh/electrobun/releases/download/${version}/electrobun-${platformName}-${archName}.tar.gz`;
117
+ const coreTarballUrl = `https://github.com/blackboardsh/electrobun/releases/download/${version}/electrobun-core-${platformName}-${archName}.tar.gz`;
118
118
 
119
- console.log(`Downloading core binaries from: ${mainTarballUrl}`);
119
+ console.log(`Downloading core binaries from: ${coreTarballUrl}`);
120
120
 
121
121
  try {
122
- // Download main tarball
123
- const response = await fetch(mainTarballUrl);
122
+ // Download core binaries tarball
123
+ const response = await fetch(coreTarballUrl);
124
124
  if (!response.ok) {
125
125
  throw new Error(`Failed to download binaries: ${response.status} ${response.statusText}`);
126
126
  }
@@ -477,10 +477,26 @@ if (commandArg === "init") {
477
477
  // mkdirSync(destLauncherFolder, {recursive: true});
478
478
  // }
479
479
  // cpSync(zigLauncherBinarySource, zigLauncherDestination, {recursive: true, dereference: true});
480
+ // For dev builds, use the actual CLI binary that's currently running
481
+ // It could be in .cache (npm install) or bin (local dev)
482
+ let devLauncherPath = PATHS.LAUNCHER_DEV;
483
+ if (buildEnvironment === "dev" && !existsSync(devLauncherPath)) {
484
+ // Check .cache location (npm installed)
485
+ const cachePath = join(ELECTROBUN_DEP_PATH, ".cache", "electrobun") + binExt;
486
+ if (existsSync(cachePath)) {
487
+ devLauncherPath = cachePath;
488
+ } else {
489
+ // Check bin location (local dev)
490
+ const binPath = join(ELECTROBUN_DEP_PATH, "bin", "electrobun") + binExt;
491
+ if (existsSync(binPath)) {
492
+ devLauncherPath = binPath;
493
+ }
494
+ }
495
+ }
496
+
480
497
  const bunCliLauncherBinarySource =
481
498
  buildEnvironment === "dev"
482
- ? // Note: in dev use the cli as the launcher
483
- PATHS.LAUNCHER_DEV
499
+ ? devLauncherPath
484
500
  : // Note: for release use the zig launcher optimized for smol size
485
501
  PATHS.LAUNCHER_RELEASE;
486
502
  const bunCliLauncherDestination = join(appBundleMacOSPath, "launcher") + binExt;