@flighthq/host-electron 0.5.1-next.903.f434bc2 → 0.5.1-next.905.5fbf787

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/README.md CHANGED
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/host-electron`. The
13
13
  This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
14
 
15
15
  - [Flight project](https://github.com/flighthq/flight)
16
- - [Source for @flighthq/host-electron@0.5.1-next.903.f434bc2](https://github.com/flighthq/flight/tree/f434bc233778d75aeea61995df3a8cfaec459a85/packages/host-electron)
17
- - [License](https://github.com/flighthq/flight/blob/f434bc233778d75aeea61995df3a8cfaec459a85/LICENSE.md)
16
+ - [Source for @flighthq/host-electron@0.5.1-next.905.5fbf787](https://github.com/flighthq/flight/tree/5fbf7874064c384307542d68b4dcb6a895ff0dcf/packages/host-electron)
17
+ - [License](https://github.com/flighthq/flight/blob/5fbf7874064c384307542d68b4dcb6a895ff0dcf/LICENSE.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/host-electron",
3
- "version": "0.5.1-next.903.f434bc2",
3
+ "version": "0.5.1-next.905.5fbf787",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,25 +38,25 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/entity": "0.5.1-next.903.f434bc2",
42
- "@flighthq/app": "0.5.1-next.903.f434bc2",
43
- "@flighthq/application": "0.5.1-next.903.f434bc2",
44
- "@flighthq/clipboard": "0.5.1-next.903.f434bc2",
45
- "@flighthq/dialog": "0.5.1-next.903.f434bc2",
46
- "@flighthq/ipc": "0.5.1-next.903.f434bc2",
47
- "@flighthq/menu": "0.5.1-next.903.f434bc2",
48
- "@flighthq/notification": "0.5.1-next.903.f434bc2",
49
- "@flighthq/platform": "0.5.1-next.903.f434bc2",
50
- "@flighthq/power": "0.5.1-next.903.f434bc2",
51
- "@flighthq/protocol": "0.5.1-next.903.f434bc2",
52
- "@flighthq/shell": "0.5.1-next.903.f434bc2",
53
- "@flighthq/screen": "0.5.1-next.903.f434bc2",
54
- "@flighthq/shortcut": "0.5.1-next.903.f434bc2",
55
- "@flighthq/signals": "0.5.1-next.903.f434bc2",
56
- "@flighthq/storage": "0.5.1-next.903.f434bc2",
57
- "@flighthq/tray": "0.5.1-next.903.f434bc2",
58
- "@flighthq/types": "0.5.1-next.903.f434bc2",
59
- "@flighthq/updater": "0.5.1-next.903.f434bc2"
41
+ "@flighthq/entity": "0.5.1-next.905.5fbf787",
42
+ "@flighthq/app": "0.5.1-next.905.5fbf787",
43
+ "@flighthq/application": "0.5.1-next.905.5fbf787",
44
+ "@flighthq/clipboard": "0.5.1-next.905.5fbf787",
45
+ "@flighthq/dialog": "0.5.1-next.905.5fbf787",
46
+ "@flighthq/ipc": "0.5.1-next.905.5fbf787",
47
+ "@flighthq/menu": "0.5.1-next.905.5fbf787",
48
+ "@flighthq/notification": "0.5.1-next.905.5fbf787",
49
+ "@flighthq/platform": "0.5.1-next.905.5fbf787",
50
+ "@flighthq/power": "0.5.1-next.905.5fbf787",
51
+ "@flighthq/protocol": "0.5.1-next.905.5fbf787",
52
+ "@flighthq/shell": "0.5.1-next.905.5fbf787",
53
+ "@flighthq/screen": "0.5.1-next.905.5fbf787",
54
+ "@flighthq/shortcut": "0.5.1-next.905.5fbf787",
55
+ "@flighthq/signals": "0.5.1-next.905.5fbf787",
56
+ "@flighthq/storage": "0.5.1-next.905.5fbf787",
57
+ "@flighthq/tray": "0.5.1-next.905.5fbf787",
58
+ "@flighthq/types": "0.5.1-next.905.5fbf787",
59
+ "@flighthq/updater": "0.5.1-next.905.5fbf787"
60
60
  },
61
61
  "devDependencies": {
62
62
  "typescript": "^5.3.0"
@@ -2,7 +2,37 @@ import type { ElectronApi, ElectronMenu, ElectronMenuItemOptions } from '@flight
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
  import { describe, expect, it, vi } from 'vitest';
4
4
 
5
- import { createElectronAppCapabilities } from './electronApp';
5
+ import {
6
+ createElectronAppCapabilities,
7
+ initializeAppActivateBackend,
8
+ initializeAppActivationPolicyBackend,
9
+ initializeAppAllWindowsClosedBackend,
10
+ initializeAppBadgeBackend,
11
+ initializeAppDockBackend,
12
+ initializeAppFocusBackend,
13
+ initializeAppHideBackend,
14
+ initializeAppLocaleBackend,
15
+ initializeAppLoginItemBackend,
16
+ initializeAppNameBackend,
17
+ initializeAppNameWriteBackend,
18
+ initializeAppOpenFileBackend,
19
+ initializeAppPathBackend,
20
+ initializeAppQuitBackend,
21
+ initializeAppQuitRequestBackend,
22
+ initializeAppReadyBackend,
23
+ initializeAppRecentDocumentsBackend,
24
+ initializeAppRelaunchBackend,
25
+ initializeAppSecondInstanceBackend,
26
+ initializeAppShowBackend,
27
+ initializeAppSingleInstanceBackend,
28
+ initializeAppUserModelIdBackend,
29
+ initializeAppVersionBackend,
30
+ initializeAppVisibilityQueryBackend,
31
+ initializeElectronCommonAppCapabilities,
32
+ initializeElectronLinuxAppCapabilities,
33
+ initializeElectronMacosAppCapabilities,
34
+ initializeElectronWindowsAppCapabilities,
35
+ } from './electronApp';
6
36
 
7
37
  function fakeElectron() {
8
38
  const calls: string[] = [];
@@ -144,3 +174,170 @@ describe('createElectronAppCapabilities', () => {
144
174
  expect(() => createElectronAppCapabilities(electron, 'macos')).toThrow('require app.dock');
145
175
  });
146
176
  });
177
+ describe('initializeAppActivateBackend', () => {
178
+ it('is the construction initializer of createAppActivateBackend', () => {
179
+ expect(typeof initializeAppActivateBackend).toBe('function');
180
+ });
181
+ });
182
+
183
+ describe('initializeAppActivationPolicyBackend', () => {
184
+ it('is the construction initializer of createAppActivationPolicyBackend', () => {
185
+ expect(typeof initializeAppActivationPolicyBackend).toBe('function');
186
+ });
187
+ });
188
+
189
+ describe('initializeAppAllWindowsClosedBackend', () => {
190
+ it('is the construction initializer of createAppAllWindowsClosedBackend', () => {
191
+ expect(typeof initializeAppAllWindowsClosedBackend).toBe('function');
192
+ });
193
+ });
194
+
195
+ describe('initializeAppBadgeBackend', () => {
196
+ it('is the construction initializer of createAppBadgeBackend', () => {
197
+ expect(typeof initializeAppBadgeBackend).toBe('function');
198
+ });
199
+ });
200
+
201
+ describe('initializeAppDockBackend', () => {
202
+ it('is the construction initializer of createAppDockBackend', () => {
203
+ expect(typeof initializeAppDockBackend).toBe('function');
204
+ });
205
+ });
206
+
207
+ describe('initializeAppFocusBackend', () => {
208
+ it('is the construction initializer of createAppFocusBackend', () => {
209
+ expect(typeof initializeAppFocusBackend).toBe('function');
210
+ });
211
+ });
212
+
213
+ describe('initializeAppHideBackend', () => {
214
+ it('is the construction initializer of createAppHideBackend', () => {
215
+ expect(typeof initializeAppHideBackend).toBe('function');
216
+ });
217
+ });
218
+
219
+ describe('initializeAppLocaleBackend', () => {
220
+ it('is the construction initializer of createAppLocaleBackend', () => {
221
+ expect(typeof initializeAppLocaleBackend).toBe('function');
222
+ });
223
+ });
224
+
225
+ describe('initializeAppLoginItemBackend', () => {
226
+ it('is the construction initializer of createAppLoginItemBackend', () => {
227
+ expect(typeof initializeAppLoginItemBackend).toBe('function');
228
+ });
229
+ });
230
+
231
+ describe('initializeAppNameBackend', () => {
232
+ it('is the construction initializer of createAppNameBackend', () => {
233
+ expect(typeof initializeAppNameBackend).toBe('function');
234
+ });
235
+ });
236
+
237
+ describe('initializeAppNameWriteBackend', () => {
238
+ it('is the construction initializer of createAppNameWriteBackend', () => {
239
+ expect(typeof initializeAppNameWriteBackend).toBe('function');
240
+ });
241
+ });
242
+
243
+ describe('initializeAppOpenFileBackend', () => {
244
+ it('is the construction initializer of createAppOpenFileBackend', () => {
245
+ expect(typeof initializeAppOpenFileBackend).toBe('function');
246
+ });
247
+ });
248
+
249
+ describe('initializeAppPathBackend', () => {
250
+ it('is the construction initializer of createAppPathBackend', () => {
251
+ expect(typeof initializeAppPathBackend).toBe('function');
252
+ });
253
+ });
254
+
255
+ describe('initializeAppQuitBackend', () => {
256
+ it('is the construction initializer of createAppQuitBackend', () => {
257
+ expect(typeof initializeAppQuitBackend).toBe('function');
258
+ });
259
+ });
260
+
261
+ describe('initializeAppQuitRequestBackend', () => {
262
+ it('is the construction initializer of createAppQuitRequestBackend', () => {
263
+ expect(typeof initializeAppQuitRequestBackend).toBe('function');
264
+ });
265
+ });
266
+
267
+ describe('initializeAppReadyBackend', () => {
268
+ it('is the construction initializer of createAppReadyBackend', () => {
269
+ expect(typeof initializeAppReadyBackend).toBe('function');
270
+ });
271
+ });
272
+
273
+ describe('initializeAppRecentDocumentsBackend', () => {
274
+ it('is the construction initializer of createAppRecentDocumentsBackend', () => {
275
+ expect(typeof initializeAppRecentDocumentsBackend).toBe('function');
276
+ });
277
+ });
278
+
279
+ describe('initializeAppRelaunchBackend', () => {
280
+ it('is the construction initializer of createAppRelaunchBackend', () => {
281
+ expect(typeof initializeAppRelaunchBackend).toBe('function');
282
+ });
283
+ });
284
+
285
+ describe('initializeAppSecondInstanceBackend', () => {
286
+ it('is the construction initializer of createAppSecondInstanceBackend', () => {
287
+ expect(typeof initializeAppSecondInstanceBackend).toBe('function');
288
+ });
289
+ });
290
+
291
+ describe('initializeAppShowBackend', () => {
292
+ it('is the construction initializer of createAppShowBackend', () => {
293
+ expect(typeof initializeAppShowBackend).toBe('function');
294
+ });
295
+ });
296
+
297
+ describe('initializeAppSingleInstanceBackend', () => {
298
+ it('is the construction initializer of createAppSingleInstanceBackend', () => {
299
+ expect(typeof initializeAppSingleInstanceBackend).toBe('function');
300
+ });
301
+ });
302
+
303
+ describe('initializeAppUserModelIdBackend', () => {
304
+ it('is the construction initializer of createAppUserModelIdBackend', () => {
305
+ expect(typeof initializeAppUserModelIdBackend).toBe('function');
306
+ });
307
+ });
308
+
309
+ describe('initializeAppVersionBackend', () => {
310
+ it('is the construction initializer of createAppVersionBackend', () => {
311
+ expect(typeof initializeAppVersionBackend).toBe('function');
312
+ });
313
+ });
314
+
315
+ describe('initializeAppVisibilityQueryBackend', () => {
316
+ it('is the construction initializer of createAppVisibilityQueryBackend', () => {
317
+ expect(typeof initializeAppVisibilityQueryBackend).toBe('function');
318
+ });
319
+ });
320
+
321
+ describe('initializeElectronCommonAppCapabilities', () => {
322
+ it('is the construction initializer of createElectronCommonAppCapabilities', () => {
323
+ expect(typeof initializeElectronCommonAppCapabilities).toBe('function');
324
+ });
325
+ });
326
+
327
+ describe('initializeElectronLinuxAppCapabilities', () => {
328
+ it('is the construction initializer of createElectronLinuxAppCapabilities', () => {
329
+ expect(typeof initializeElectronLinuxAppCapabilities).toBe('function');
330
+ });
331
+ });
332
+
333
+ describe('initializeElectronMacosAppCapabilities', () => {
334
+ it('is the construction initializer of createElectronMacosAppCapabilities', () => {
335
+ expect(typeof initializeElectronMacosAppCapabilities).toBe('function');
336
+ });
337
+ });
338
+
339
+ describe('initializeElectronWindowsAppCapabilities', () => {
340
+ it('is the construction initializer of createElectronWindowsAppCapabilities', () => {
341
+ expect(typeof initializeElectronWindowsAppCapabilities).toBe('function');
342
+ });
343
+ });
@@ -1,7 +1,7 @@
1
1
  import type { ElectronApi, ElectronNativeImage } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
 
4
- import { createElectronClipboardBackend } from './electronClipboard';
4
+ import { createElectronClipboardBackend, initializeElectronClipboardBackend } from './electronClipboard';
5
5
 
6
6
  function fakeElectron(): ElectronApi {
7
7
  const store = { text: '', html: '', rtf: '', imageDataUrl: '', bookmarkTitle: '', bookmarkUrl: '' };
@@ -88,3 +88,8 @@ describe('createElectronClipboardBackend', () => {
88
88
  expect(await backend.readText()).toBe('');
89
89
  });
90
90
  });
91
+ describe('initializeElectronClipboardBackend', () => {
92
+ it('is the construction initializer of createElectronClipboardBackend', () => {
93
+ expect(typeof initializeElectronClipboardBackend).toBe('function');
94
+ });
95
+ });
@@ -11,6 +11,10 @@ import {
11
11
  createElectronFileOpenDialogBackend,
12
12
  createElectronFileSaveDialogBackend,
13
13
  createElectronMessageDialogBackend,
14
+ initializeElectronDirectoryOpenDialogBackend,
15
+ initializeElectronFileOpenDialogBackend,
16
+ initializeElectronFileSaveDialogBackend,
17
+ initializeElectronMessageDialogBackend,
14
18
  } from './electronDialog';
15
19
 
16
20
  function fakeElectron(overrides: {
@@ -161,3 +165,26 @@ describe('createElectronMessageDialogBackend', () => {
161
165
  expect(calls.messageOptions?.signal).toBe(signal);
162
166
  });
163
167
  });
168
+ describe('initializeElectronDirectoryOpenDialogBackend', () => {
169
+ it('is the construction initializer of createElectronDirectoryOpenDialogBackend', () => {
170
+ expect(typeof initializeElectronDirectoryOpenDialogBackend).toBe('function');
171
+ });
172
+ });
173
+
174
+ describe('initializeElectronFileOpenDialogBackend', () => {
175
+ it('is the construction initializer of createElectronFileOpenDialogBackend', () => {
176
+ expect(typeof initializeElectronFileOpenDialogBackend).toBe('function');
177
+ });
178
+ });
179
+
180
+ describe('initializeElectronFileSaveDialogBackend', () => {
181
+ it('is the construction initializer of createElectronFileSaveDialogBackend', () => {
182
+ expect(typeof initializeElectronFileSaveDialogBackend).toBe('function');
183
+ });
184
+ });
185
+
186
+ describe('initializeElectronMessageDialogBackend', () => {
187
+ it('is the construction initializer of createElectronMessageDialogBackend', () => {
188
+ expect(typeof initializeElectronMessageDialogBackend).toBe('function');
189
+ });
190
+ });
@@ -7,6 +7,11 @@ import {
7
7
  createElectronIpcMessageBackend,
8
8
  createElectronIpcSendBackend,
9
9
  createElectronIpcTargetedSendBackend,
10
+ initializeElectronIpcHandleBackend,
11
+ initializeElectronIpcInvokeBackend,
12
+ initializeElectronIpcMessageBackend,
13
+ initializeElectronIpcSendBackend,
14
+ initializeElectronIpcTargetedSendBackend,
10
15
  } from './electronIpc';
11
16
 
12
17
  function fakeElectron(): {
@@ -167,3 +172,32 @@ describe('createElectronIpcTargetedSendBackend', () => {
167
172
  expect(EntityRuntimeKey in backend).toBe(true);
168
173
  });
169
174
  });
175
+ describe('initializeElectronIpcHandleBackend', () => {
176
+ it('is the construction initializer of createElectronIpcHandleBackend', () => {
177
+ expect(typeof initializeElectronIpcHandleBackend).toBe('function');
178
+ });
179
+ });
180
+
181
+ describe('initializeElectronIpcInvokeBackend', () => {
182
+ it('is the construction initializer of createElectronIpcInvokeBackend', () => {
183
+ expect(typeof initializeElectronIpcInvokeBackend).toBe('function');
184
+ });
185
+ });
186
+
187
+ describe('initializeElectronIpcMessageBackend', () => {
188
+ it('is the construction initializer of createElectronIpcMessageBackend', () => {
189
+ expect(typeof initializeElectronIpcMessageBackend).toBe('function');
190
+ });
191
+ });
192
+
193
+ describe('initializeElectronIpcSendBackend', () => {
194
+ it('is the construction initializer of createElectronIpcSendBackend', () => {
195
+ expect(typeof initializeElectronIpcSendBackend).toBe('function');
196
+ });
197
+ });
198
+
199
+ describe('initializeElectronIpcTargetedSendBackend', () => {
200
+ it('is the construction initializer of createElectronIpcTargetedSendBackend', () => {
201
+ expect(typeof initializeElectronIpcTargetedSendBackend).toBe('function');
202
+ });
203
+ });
@@ -2,7 +2,13 @@ import type { MenuApplicationBackend, MenuPopupBackend, MenuSelectBackend } from
2
2
  import type { ElectronApi, ElectronMenu, ElectronMenuItemOptions } from '@flighthq/types/contract';
3
3
  import { EntityRuntimeKey } from '@flighthq/types/contract';
4
4
 
5
- import { createElectronMenuBackends } from './electronMenu';
5
+ import {
6
+ createElectronMenuBackends,
7
+ initializeElectronMenuCapabilities,
8
+ initializeMenuApplicationBackend,
9
+ initializeMenuPopupBackend,
10
+ initializeMenuSelectBackend,
11
+ } from './electronMenu';
6
12
 
7
13
  function fakeElectron(): {
8
14
  electron: ElectronApi;
@@ -149,3 +155,26 @@ function _slots(api: ElectronApi): {
149
155
  subscribeSelect: select.subscribe,
150
156
  };
151
157
  }
158
+ describe('initializeElectronMenuCapabilities', () => {
159
+ it('is the construction initializer of createElectronMenuCapabilities', () => {
160
+ expect(typeof initializeElectronMenuCapabilities).toBe('function');
161
+ });
162
+ });
163
+
164
+ describe('initializeMenuApplicationBackend', () => {
165
+ it('is the construction initializer of createMenuApplicationBackend', () => {
166
+ expect(typeof initializeMenuApplicationBackend).toBe('function');
167
+ });
168
+ });
169
+
170
+ describe('initializeMenuPopupBackend', () => {
171
+ it('is the construction initializer of createMenuPopupBackend', () => {
172
+ expect(typeof initializeMenuPopupBackend).toBe('function');
173
+ });
174
+ });
175
+
176
+ describe('initializeMenuSelectBackend', () => {
177
+ it('is the construction initializer of createMenuSelectBackend', () => {
178
+ expect(typeof initializeMenuSelectBackend).toBe('function');
179
+ });
180
+ });
@@ -2,7 +2,11 @@ import { closeNotification } from '@flighthq/notification/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
  import type { ElectronApi, ElectronNotificationOptions } from '@flighthq/types/contract';
4
4
 
5
- import { createElectronNotificationCapabilities } from './electronNotification';
5
+ import {
6
+ createElectronNotificationCapabilities,
7
+ initializeElectronMacosNotificationCapabilities,
8
+ initializeElectronNotificationCapabilities,
9
+ } from './electronNotification';
6
10
 
7
11
  interface FakeNotification {
8
12
  close(): void;
@@ -186,3 +190,14 @@ describe('createElectronNotificationCapabilities', () => {
186
190
  expect(secondCloses).toBe(2);
187
191
  });
188
192
  });
193
+ describe('initializeElectronMacosNotificationCapabilities', () => {
194
+ it('is the construction initializer of createElectronMacosNotificationCapabilities', () => {
195
+ expect(typeof initializeElectronMacosNotificationCapabilities).toBe('function');
196
+ });
197
+ });
198
+
199
+ describe('initializeElectronNotificationCapabilities', () => {
200
+ it('is the construction initializer of createElectronNotificationCapabilities', () => {
201
+ expect(typeof initializeElectronNotificationCapabilities).toBe('function');
202
+ });
203
+ });
@@ -1,7 +1,7 @@
1
1
  import type { PlatformInfo, ElectronApi } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
 
4
- import { createElectronPlatformBackend } from './electronPlatform';
4
+ import { createElectronPlatformBackend, initializeElectronPlatformBackend } from './electronPlatform';
5
5
 
6
6
  function fakeElectron(): ElectronApi {
7
7
  return {
@@ -30,3 +30,8 @@ describe('createElectronPlatformBackend', () => {
30
30
  expect(typeof out.version).toBe('string');
31
31
  });
32
32
  });
33
+ describe('initializeElectronPlatformBackend', () => {
34
+ it('is the construction initializer of createElectronPlatformBackend', () => {
35
+ expect(typeof initializeElectronPlatformBackend).toBe('function');
36
+ });
37
+ });
@@ -1,7 +1,18 @@
1
1
  import type { PowerStatus, ElectronApi } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
 
4
- import { createElectronPowerBackends } from './electronPower';
4
+ import {
5
+ createElectronPowerBackends,
6
+ initializeElectronPowerCapabilities,
7
+ initializePowerBatteryHealthBackend,
8
+ initializePowerChangeBackend,
9
+ initializePowerIdleBackend,
10
+ initializePowerKeepAwakeBackend,
11
+ initializePowerSessionLockBackend,
12
+ initializePowerStatusBackend,
13
+ initializePowerSuspensionBackend,
14
+ initializePowerThermalBackend,
15
+ } from './electronPower';
5
16
 
6
17
  function emptyStatus(): PowerStatus {
7
18
  return {
@@ -165,3 +176,56 @@ describe('electron power slot coverage', () => {
165
176
  expect('destroy' in slots.status).toBe(false);
166
177
  });
167
178
  });
179
+ describe('initializeElectronPowerCapabilities', () => {
180
+ it('is the construction initializer of createElectronPowerCapabilities', () => {
181
+ expect(typeof initializeElectronPowerCapabilities).toBe('function');
182
+ });
183
+ });
184
+
185
+ describe('initializePowerBatteryHealthBackend', () => {
186
+ it('is the construction initializer of createPowerBatteryHealthBackend', () => {
187
+ expect(typeof initializePowerBatteryHealthBackend).toBe('function');
188
+ });
189
+ });
190
+
191
+ describe('initializePowerChangeBackend', () => {
192
+ it('is the construction initializer of createPowerChangeBackend', () => {
193
+ expect(typeof initializePowerChangeBackend).toBe('function');
194
+ });
195
+ });
196
+
197
+ describe('initializePowerIdleBackend', () => {
198
+ it('is the construction initializer of createPowerIdleBackend', () => {
199
+ expect(typeof initializePowerIdleBackend).toBe('function');
200
+ });
201
+ });
202
+
203
+ describe('initializePowerKeepAwakeBackend', () => {
204
+ it('is the construction initializer of createPowerKeepAwakeBackend', () => {
205
+ expect(typeof initializePowerKeepAwakeBackend).toBe('function');
206
+ });
207
+ });
208
+
209
+ describe('initializePowerSessionLockBackend', () => {
210
+ it('is the construction initializer of createPowerSessionLockBackend', () => {
211
+ expect(typeof initializePowerSessionLockBackend).toBe('function');
212
+ });
213
+ });
214
+
215
+ describe('initializePowerStatusBackend', () => {
216
+ it('is the construction initializer of createPowerStatusBackend', () => {
217
+ expect(typeof initializePowerStatusBackend).toBe('function');
218
+ });
219
+ });
220
+
221
+ describe('initializePowerSuspensionBackend', () => {
222
+ it('is the construction initializer of createPowerSuspensionBackend', () => {
223
+ expect(typeof initializePowerSuspensionBackend).toBe('function');
224
+ });
225
+ });
226
+
227
+ describe('initializePowerThermalBackend', () => {
228
+ it('is the construction initializer of createPowerThermalBackend', () => {
229
+ expect(typeof initializePowerThermalBackend).toBe('function');
230
+ });
231
+ });
@@ -2,7 +2,15 @@ import type { ElectronApi } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
  import { describe, expect, it } from 'vitest';
4
4
 
5
- import { createElectronProtocolCapabilities } from './electronProtocol';
5
+ import {
6
+ createElectronProtocolCapabilities,
7
+ initializeElectronProtocolCapabilities,
8
+ initializeProtocolDefaultBackend,
9
+ initializeProtocolOpenBackend,
10
+ initializeProtocolRegistrationBackend,
11
+ initializeProtocolRegistrationQueryBackend,
12
+ initializeProtocolUnregistrationBackend,
13
+ } from './electronProtocol';
6
14
 
7
15
  function fakeElectron() {
8
16
  const listeners = new Map<string, ((...args: unknown[]) => void)[]>();
@@ -63,3 +71,38 @@ describe('createElectronProtocolCapabilities', () => {
63
71
  expect(fake.listeners.get('open-url')).toHaveLength(0);
64
72
  });
65
73
  });
74
+ describe('initializeElectronProtocolCapabilities', () => {
75
+ it('is the construction initializer of createElectronProtocolCapabilities', () => {
76
+ expect(typeof initializeElectronProtocolCapabilities).toBe('function');
77
+ });
78
+ });
79
+
80
+ describe('initializeProtocolDefaultBackend', () => {
81
+ it('is the construction initializer of createProtocolDefaultBackend', () => {
82
+ expect(typeof initializeProtocolDefaultBackend).toBe('function');
83
+ });
84
+ });
85
+
86
+ describe('initializeProtocolOpenBackend', () => {
87
+ it('is the construction initializer of createProtocolOpenBackend', () => {
88
+ expect(typeof initializeProtocolOpenBackend).toBe('function');
89
+ });
90
+ });
91
+
92
+ describe('initializeProtocolRegistrationBackend', () => {
93
+ it('is the construction initializer of createProtocolRegistrationBackend', () => {
94
+ expect(typeof initializeProtocolRegistrationBackend).toBe('function');
95
+ });
96
+ });
97
+
98
+ describe('initializeProtocolRegistrationQueryBackend', () => {
99
+ it('is the construction initializer of createProtocolRegistrationQueryBackend', () => {
100
+ expect(typeof initializeProtocolRegistrationQueryBackend).toBe('function');
101
+ });
102
+ });
103
+
104
+ describe('initializeProtocolUnregistrationBackend', () => {
105
+ it('is the construction initializer of createProtocolUnregistrationBackend', () => {
106
+ expect(typeof initializeProtocolUnregistrationBackend).toBe('function');
107
+ });
108
+ });
@@ -3,7 +3,7 @@ import { readClipboardText } from '@flighthq/clipboard/contract';
3
3
  import { EntityRuntimeKey } from '@flighthq/types/contract';
4
4
  import type { ElectronApi } from '@flighthq/types/contract';
5
5
 
6
- import { registerElectronBackends } from './electronRegister';
6
+ import { initializeElectronHost, registerElectronBackends } from './electronRegister';
7
7
 
8
8
  // A fake Electron module broad enough that every createElectron*Backend constructs without touching
9
9
  // missing members. Backends close over `electron` and only call into it when their methods run, so a
@@ -47,6 +47,11 @@ function fakeElectron(): ElectronApi {
47
47
  } as unknown as ElectronApi;
48
48
  }
49
49
 
50
+ describe('initializeElectronHost', () => {
51
+ it('is the construction initializer of createElectronHost', () => {
52
+ expect(typeof initializeElectronHost).toBe('function');
53
+ });
54
+ });
50
55
  describe('registerElectronBackends', () => {
51
56
  it('routes capability seams to the Electron backends without throwing', async () => {
52
57
  const host = registerElectronBackends(fakeElectron(), {
@@ -1,7 +1,12 @@
1
1
  import type { ScreenInfo, ElectronApi, ElectronDisplay } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
 
4
- import { createElectronScreenCapabilities } from './electronScreen';
4
+ import {
5
+ createElectronScreenCapabilities,
6
+ initializeEmptyScreenInfo,
7
+ initializeScreenChangeBackend,
8
+ initializeScreenQueryBackend,
9
+ } from './electronScreen';
5
10
 
6
11
  function display(id: number, x: number): ElectronDisplay {
7
12
  return {
@@ -98,3 +103,20 @@ describe('createElectronScreenCapabilities', () => {
98
103
  expect(fake.listeners.get('display-metrics-changed')).toHaveLength(0);
99
104
  });
100
105
  });
106
+ describe('initializeEmptyScreenInfo', () => {
107
+ it('is the construction initializer of createEmptyScreenInfo', () => {
108
+ expect(typeof initializeEmptyScreenInfo).toBe('function');
109
+ });
110
+ });
111
+
112
+ describe('initializeScreenChangeBackend', () => {
113
+ it('is the construction initializer of createScreenChangeBackend', () => {
114
+ expect(typeof initializeScreenChangeBackend).toBe('function');
115
+ });
116
+ });
117
+
118
+ describe('initializeScreenQueryBackend', () => {
119
+ it('is the construction initializer of createScreenQueryBackend', () => {
120
+ expect(typeof initializeScreenQueryBackend).toBe('function');
121
+ });
122
+ });
@@ -1,12 +1,55 @@
1
1
  import type { ElectronApi } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
 
4
- import { makeElectronShellCapabilities } from './electronShell';
4
+ import {
5
+ initializeShellBeepBackend,
6
+ initializeShellExternalBackend,
7
+ initializeShellPathOpenBackend,
8
+ initializeShellPathRevealBackend,
9
+ initializeShellShortcutLinkBackend,
10
+ initializeShellTrashBackend,
11
+ makeElectronShellCapabilities,
12
+ } from './electronShell';
5
13
 
6
14
  function fakeElectron(shell: Partial<ElectronApi['shell']>): ElectronApi {
7
15
  return { shell } as unknown as ElectronApi;
8
16
  }
9
17
 
18
+ describe('initializeShellBeepBackend', () => {
19
+ it('is the construction initializer of createShellBeepBackend', () => {
20
+ expect(typeof initializeShellBeepBackend).toBe('function');
21
+ });
22
+ });
23
+ describe('initializeShellExternalBackend', () => {
24
+ it('is the construction initializer of createShellExternalBackend', () => {
25
+ expect(typeof initializeShellExternalBackend).toBe('function');
26
+ });
27
+ });
28
+
29
+ describe('initializeShellPathOpenBackend', () => {
30
+ it('is the construction initializer of createShellPathOpenBackend', () => {
31
+ expect(typeof initializeShellPathOpenBackend).toBe('function');
32
+ });
33
+ });
34
+
35
+ describe('initializeShellPathRevealBackend', () => {
36
+ it('is the construction initializer of createShellPathRevealBackend', () => {
37
+ expect(typeof initializeShellPathRevealBackend).toBe('function');
38
+ });
39
+ });
40
+
41
+ describe('initializeShellShortcutLinkBackend', () => {
42
+ it('is the construction initializer of createShellShortcutLinkBackend', () => {
43
+ expect(typeof initializeShellShortcutLinkBackend).toBe('function');
44
+ });
45
+ });
46
+
47
+ describe('initializeShellTrashBackend', () => {
48
+ it('is the construction initializer of createShellTrashBackend', () => {
49
+ expect(typeof initializeShellTrashBackend).toBe('function');
50
+ });
51
+ });
52
+
10
53
  describe('makeElectronShellCapabilities', () => {
11
54
  it('constructs every Windows provider as an Entity', () => {
12
55
  const capabilities = makeElectronShellCapabilities(fakeElectron({}), 'windows');
@@ -1,7 +1,11 @@
1
1
  import type { ElectronApi } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
 
4
- import { createElectronShortcutQueryBackend, createElectronShortcutTriggerBackend } from './electronShortcut';
4
+ import {
5
+ createElectronShortcutQueryBackend,
6
+ createElectronShortcutTriggerBackend,
7
+ initializeElectronShortcutQueryBackend,
8
+ } from './electronShortcut';
5
9
 
6
10
  function fakeElectron() {
7
11
  const callbacks = new Map<string, () => void>();
@@ -77,3 +81,8 @@ describe('createElectronShortcutTriggerBackend', () => {
77
81
  expect(fake.unregisterCalls).toEqual(['Control+A', 'Control+B', 'Control+A']);
78
82
  });
79
83
  });
84
+ describe('initializeElectronShortcutQueryBackend', () => {
85
+ it('is the construction initializer of createElectronShortcutQueryBackend', () => {
86
+ expect(typeof initializeElectronShortcutQueryBackend).toBe('function');
87
+ });
88
+ });
@@ -1,7 +1,7 @@
1
1
  import type { ElectronApi } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
 
4
- import { createElectronStorageBackend } from './electronStorage';
4
+ import { createElectronStorageBackend, initializeElectronStorageBackend } from './electronStorage';
5
5
 
6
6
  const STORAGE_PATH = '/userData/storage.json';
7
7
 
@@ -179,3 +179,8 @@ describe('createElectronStorageBackend', () => {
179
179
  expect(backend.getItem('a')).toEqual({ reason: 'ok', value: 'visible' });
180
180
  });
181
181
  });
182
+ describe('initializeElectronStorageBackend', () => {
183
+ it('is the construction initializer of createElectronStorageBackend', () => {
184
+ expect(typeof initializeElectronStorageBackend).toBe('function');
185
+ });
186
+ });
@@ -17,7 +17,24 @@ import type {
17
17
  } from '@flighthq/types/contract';
18
18
  import { describe, expect, it, vi } from 'vitest';
19
19
 
20
- import { createElectronTrayCapabilities } from './electronTray';
20
+ import {
21
+ createElectronTrayCapabilities,
22
+ initializeTrayBalloonBackend,
23
+ initializeTrayBalloonEventsBackend,
24
+ initializeTrayBoundsBackend,
25
+ initializeTrayDoubleClickPolicyBackend,
26
+ initializeTrayDropEventsBackend,
27
+ initializeTrayImageBackend,
28
+ initializeTrayInteractionEventsBackend,
29
+ initializeTrayLifecycleBackend,
30
+ initializeTrayMenuBackend,
31
+ initializeTrayMenuSelectionEventsBackend,
32
+ initializeTrayPopupMenuBackend,
33
+ initializeTrayPressedImageBackend,
34
+ initializeTrayTemplateImageBackend,
35
+ initializeTrayTitleBackend,
36
+ initializeTrayTooltipBackend,
37
+ } from './electronTray';
21
38
 
22
39
  interface FakeImage extends ElectronNativeImage {
23
40
  source: string;
@@ -238,3 +255,92 @@ describe('createElectronTrayCapabilities', () => {
238
255
  expect((await displayTrayBalloon(tray, { text: 'Done', title: 'Flight' })).outcome).toBe('displayed');
239
256
  });
240
257
  });
258
+ describe('initializeTrayBalloonBackend', () => {
259
+ it('is the construction initializer of createTrayBalloonBackend', () => {
260
+ expect(typeof initializeTrayBalloonBackend).toBe('function');
261
+ });
262
+ });
263
+
264
+ describe('initializeTrayBalloonEventsBackend', () => {
265
+ it('is the construction initializer of createTrayBalloonEventsBackend', () => {
266
+ expect(typeof initializeTrayBalloonEventsBackend).toBe('function');
267
+ });
268
+ });
269
+
270
+ describe('initializeTrayBoundsBackend', () => {
271
+ it('is the construction initializer of createTrayBoundsBackend', () => {
272
+ expect(typeof initializeTrayBoundsBackend).toBe('function');
273
+ });
274
+ });
275
+
276
+ describe('initializeTrayDoubleClickPolicyBackend', () => {
277
+ it('is the construction initializer of createTrayDoubleClickPolicyBackend', () => {
278
+ expect(typeof initializeTrayDoubleClickPolicyBackend).toBe('function');
279
+ });
280
+ });
281
+
282
+ describe('initializeTrayDropEventsBackend', () => {
283
+ it('is the construction initializer of createTrayDropEventsBackend', () => {
284
+ expect(typeof initializeTrayDropEventsBackend).toBe('function');
285
+ });
286
+ });
287
+
288
+ describe('initializeTrayImageBackend', () => {
289
+ it('is the construction initializer of createTrayImageBackend', () => {
290
+ expect(typeof initializeTrayImageBackend).toBe('function');
291
+ });
292
+ });
293
+
294
+ describe('initializeTrayInteractionEventsBackend', () => {
295
+ it('is the construction initializer of createTrayInteractionEventsBackend', () => {
296
+ expect(typeof initializeTrayInteractionEventsBackend).toBe('function');
297
+ });
298
+ });
299
+
300
+ describe('initializeTrayLifecycleBackend', () => {
301
+ it('is the construction initializer of createTrayLifecycleBackend', () => {
302
+ expect(typeof initializeTrayLifecycleBackend).toBe('function');
303
+ });
304
+ });
305
+
306
+ describe('initializeTrayMenuBackend', () => {
307
+ it('is the construction initializer of createTrayMenuBackend', () => {
308
+ expect(typeof initializeTrayMenuBackend).toBe('function');
309
+ });
310
+ });
311
+
312
+ describe('initializeTrayMenuSelectionEventsBackend', () => {
313
+ it('is the construction initializer of createTrayMenuSelectionEventsBackend', () => {
314
+ expect(typeof initializeTrayMenuSelectionEventsBackend).toBe('function');
315
+ });
316
+ });
317
+
318
+ describe('initializeTrayPopupMenuBackend', () => {
319
+ it('is the construction initializer of createTrayPopupMenuBackend', () => {
320
+ expect(typeof initializeTrayPopupMenuBackend).toBe('function');
321
+ });
322
+ });
323
+
324
+ describe('initializeTrayPressedImageBackend', () => {
325
+ it('is the construction initializer of createTrayPressedImageBackend', () => {
326
+ expect(typeof initializeTrayPressedImageBackend).toBe('function');
327
+ });
328
+ });
329
+
330
+ describe('initializeTrayTemplateImageBackend', () => {
331
+ it('is the construction initializer of createTrayTemplateImageBackend', () => {
332
+ expect(typeof initializeTrayTemplateImageBackend).toBe('function');
333
+ });
334
+ });
335
+
336
+ describe('initializeTrayTitleBackend', () => {
337
+ it('is the construction initializer of createTrayTitleBackend', () => {
338
+ expect(typeof initializeTrayTitleBackend).toBe('function');
339
+ });
340
+ });
341
+
342
+ describe('initializeTrayTooltipBackend', () => {
343
+ it('is the construction initializer of createTrayTooltipBackend', () => {
344
+ expect(typeof initializeTrayTooltipBackend).toBe('function');
345
+ });
346
+ });
@@ -1,7 +1,7 @@
1
1
  import type { ElectronApi } from '@flighthq/types/contract';
2
2
  import { EntityRuntimeKey } from '@flighthq/types/contract';
3
3
 
4
- import { createElectronUpdaterBackend } from './electronUpdater';
4
+ import { createElectronUpdaterBackend, initializeElectronUpdaterBackend } from './electronUpdater';
5
5
 
6
6
  type NativeListener = (...args: unknown[]) => void;
7
7
 
@@ -203,3 +203,8 @@ describe('createElectronUpdaterBackend', () => {
203
203
  expect(calls.feedUrls).toEqual([]);
204
204
  });
205
205
  });
206
+ describe('initializeElectronUpdaterBackend', () => {
207
+ it('is the construction initializer of createElectronUpdaterBackend', () => {
208
+ expect(typeof initializeElectronUpdaterBackend).toBe('function');
209
+ });
210
+ });
@@ -7,6 +7,7 @@ import {
7
7
  getApplicationWindowForElectronId,
8
8
  getElectronBrowserWindow,
9
9
  getElectronWindowId,
10
+ initializeElectronWindowBackend,
10
11
  resetElectronWindowBackendForTest,
11
12
  } from './electronWindow';
12
13
 
@@ -329,6 +330,11 @@ describe('getElectronWindowId', () => {
329
330
  });
330
331
  });
331
332
 
333
+ describe('initializeElectronWindowBackend', () => {
334
+ it('is the construction initializer of createElectronWindowBackend', () => {
335
+ expect(typeof initializeElectronWindowBackend).toBe('function');
336
+ });
337
+ });
332
338
  describe('resetElectronWindowBackendForTest', () => {
333
339
  it('clears the window identity maps', () => {
334
340
  const { electron, created } = fakeElectron();