electrobun 0.0.16 → 0.0.18

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.
@@ -56,6 +56,7 @@ const menuConfigWithDefaults = (
56
56
  checked: Boolean(item.checked),
57
57
  hidden: Boolean(item.hidden),
58
58
  tooltip: item.tooltip || undefined,
59
+ accelerator: item.accelerator || undefined,
59
60
  ...(item.submenu
60
61
  ? { submenu: menuConfigWithDefaults(item.submenu) }
61
62
  : {}),
@@ -88,16 +88,13 @@ const Updater = {
88
88
  let currentHash = (await Updater.getLocallocalInfo()).hash;
89
89
  let latestHash = (await Updater.checkForUpdate()).hash;
90
90
 
91
- let currentTarPath = join(
92
- appDataFolder,
93
- "self-extraction",
94
- `${currentHash}.tar`
95
- );
96
- const latestTarPath = join(
97
- appDataFolder,
98
- "self-extraction",
99
- `${latestHash}.tar`
100
- );
91
+ const extractionFolder = join(appDataFolder, "self-extraction");
92
+ if (!(await Bun.file(extractionFolder).exists())) {
93
+ mkdirSync(extractionFolder, { recursive: true });
94
+ }
95
+
96
+ let currentTarPath = join(extractionFolder, `${currentHash}.tar`);
97
+ const latestTarPath = join(extractionFolder, `${latestHash}.tar`);
101
98
 
102
99
  const seenHashes = [];
103
100
 
@@ -276,6 +273,10 @@ const Updater = {
276
273
  if (updateInfo?.updateReady) {
277
274
  const appDataFolder = await Updater.appDataFolder();
278
275
  const extractionFolder = join(appDataFolder, "self-extraction");
276
+ if (!(await Bun.file(extractionFolder).exists())) {
277
+ mkdirSync(extractionFolder, { recursive: true });
278
+ }
279
+
279
280
  let latestHash = (await Updater.checkForUpdate()).hash;
280
281
  const latestTarPath = join(extractionFolder, `${latestHash}.tar`);
281
282
 
@@ -140,6 +140,7 @@ export type ApplicationMenuItemConfig =
140
140
  enabled?: boolean;
141
141
  checked?: boolean;
142
142
  hidden?: boolean;
143
+ accelerator?: string;
143
144
  }
144
145
  | {
145
146
  type?: "normal";
@@ -150,6 +151,7 @@ export type ApplicationMenuItemConfig =
150
151
  enabled?: boolean;
151
152
  checked?: boolean;
152
153
  hidden?: boolean;
154
+ accelerator?: string;
153
155
  };
154
156
 
155
157
  // todo (yoav): move this stuff to bun/rpc/zig.ts
package/dist/electrobun CHANGED
Binary file
package/dist/webview CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "Build ultra fast, tiny, and cross-platform desktop apps with Typescript.",
5
5
  "license": "MIT",
6
6
  "author": "Blackboard Technologies Inc.",