electrobun 1.11.5-beta.2 → 1.11.5-beta.4

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.
@@ -500,7 +500,7 @@ const Updater = {
500
500
 
501
501
  // Read the hash from the patched tar without full extraction:
502
502
  // - macOS/Windows: Resources/version.json (inside the app bundle directory)
503
- // - Linux: metadata.json (alongside the AppImage, since AppImage is opaque)
503
+ // - Linux: metadata.json (alongside the app bundle)
504
504
  const resourcesDir = "Resources";
505
505
  const patchedTarBytes = await Bun.file(
506
506
  tmpPatchedTarFilePath,
@@ -791,12 +791,11 @@ const Updater = {
791
791
  await latestArchive.extract(extractionDir);
792
792
 
793
793
  if (currentOS === "macos") {
794
- // Find the .app bundle by scanning extracted file paths
795
- const extractedFiles = await latestArchive.files();
796
- for (const [filePath] of extractedFiles) {
797
- const appMatch = filePath.match(/^([^/]+\.app)\//);
798
- if (appMatch) {
799
- appBundleSubpath = appMatch[1] + "/";
794
+ // Find the .app bundle by scanning extracted directory
795
+ const extractedFiles = readdirSync(extractionDir);
796
+ for (const file of extractedFiles) {
797
+ if (file.endsWith('.app')) {
798
+ appBundleSubpath = file + "/";
800
799
  break;
801
800
  }
802
801
  }
@@ -819,10 +818,20 @@ const Updater = {
819
818
  // Platform-specific path handling
820
819
  let newAppBundlePath: string;
821
820
  if (currentOS === "linux") {
822
- // On Linux, the tarball contains a directory bundle, not an AppImage
823
- // Structure: extractionDir/{appBundleName}
824
- const appBundleName = `${localInfo.name.replace(/ /g, "").replace(/\./g, "")}-${localInfo.channel}`;
825
- newAppBundlePath = join(extractionDir, appBundleName);
821
+ // On Linux, the tarball contains a directory bundle
822
+ // Find the actual extracted app directory name instead of guessing
823
+ const extractedFiles = readdirSync(extractionDir);
824
+ const appBundleDir = extractedFiles.find(file => {
825
+ const filePath = join(extractionDir, file);
826
+ return statSync(filePath).isDirectory() && !file.endsWith('.tar');
827
+ });
828
+
829
+ if (!appBundleDir) {
830
+ console.error("Could not find app bundle directory in extraction");
831
+ return;
832
+ }
833
+
834
+ newAppBundlePath = join(extractionDir, appBundleDir);
826
835
 
827
836
  // Verify the app bundle directory exists
828
837
  const bundleStats = statSync(newAppBundlePath, { throwIfNoEntry: false });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "1.11.5-beta.2",
3
+ "version": "1.11.5-beta.4",
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
@@ -1206,9 +1206,8 @@ async function createLinuxInstallerArchive(
1206
1206
  console.log("Creating Linux installer archive...");
1207
1207
 
1208
1208
  // Create installer name using sanitized app file name (no spaces, URL-safe)
1209
- const installerName = buildEnvironment === "stable"
1210
- ? `${appFileName}-Setup`
1211
- : `${appFileName}-Setup-${buildEnvironment}`;
1209
+ // Note: appFileName already includes the channel suffix for non-stable builds
1210
+ const installerName = `${appFileName}-Setup`;
1212
1211
 
1213
1212
  // Create temp directory for staging
1214
1213
  const stagingDir = join(buildFolder, `${installerName}-staging`);