@xwiki/cristal-electron-main 0.14.0 → 0.15.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-electron-main",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -13,16 +13,17 @@
13
13
  "url": "https://jira.xwiki.org/projects/CRISTAL/"
14
14
  },
15
15
  "dependencies": {
16
- "electron": "34.0.0",
17
- "@xwiki/cristal-browser-electron": "0.14.0",
18
- "@xwiki/cristal-configuration-electron-main": "0.14.0",
19
- "@xwiki/cristal-electron-storage": "0.14.0",
20
- "@xwiki/cristal-electron-authentication-xwiki-main": "0.14.0"
16
+ "electron": "34.0.2",
17
+ "@xwiki/cristal-browser-electron": "0.15.0",
18
+ "@xwiki/cristal-configuration-electron-main": "0.15.0",
19
+ "@xwiki/cristal-electron-authentication-xwiki-main": "0.15.0",
20
+ "@xwiki/cristal-electron-storage": "0.15.0",
21
+ "@xwiki/cristal-electron-authentication-github-main": "0.15.0"
21
22
  },
22
23
  "devDependencies": {
23
- "@types/node": "22.10.7",
24
+ "@types/node": "22.13.1",
24
25
  "typescript": "5.7.3",
25
- "vite": "6.0.11"
26
+ "vite": "6.1.0"
26
27
  },
27
28
  "scripts": {
28
29
  "build": "tsc --project tsconfig.json && vite build",
package/src/index.ts CHANGED
@@ -24,12 +24,17 @@ import "./security-restrictions";
24
24
  // @ts-expect-error shouldn't happen, but we need to generate the types for the whole project once.
25
25
  import loadBrowser from "@xwiki/cristal-browser-electron/main";
26
26
  import { load as loadConfiguration } from "@xwiki/cristal-configuration-electron-main";
27
- import { load as loadAuthentication } from "@xwiki/cristal-electron-authentication-xwiki-main";
27
+ import { load as loadGitHubAuthentication } from "@xwiki/cristal-electron-authentication-github-main";
28
+ import { load as loadXWikiAuthentication } from "@xwiki/cristal-electron-authentication-xwiki-main";
28
29
  // @ts-expect-error shouldn't happen, but we need to generate the types for the whole project once.
29
30
  import load from "@xwiki/cristal-electron-storage/main";
30
31
  import { BrowserWindow, app } from "electron";
31
32
  import { platform } from "node:process";
32
33
 
34
+ // Set up IPC listener for configuration loading before the app actually starts
35
+ // It needs to be setup before the preload script runs, which means the first window mustn't have been created
36
+ loadConfiguration();
37
+
33
38
  /**
34
39
  * Prevent electron from running multiple instances.
35
40
  */
@@ -68,8 +73,8 @@ app
68
73
  await load();
69
74
  restoreOrCreateWindow().then((w) => {
70
75
  loadBrowser(w);
71
- loadAuthentication(w, loadFile);
72
- loadConfiguration();
76
+ loadGitHubAuthentication(w, loadFile);
77
+ loadXWikiAuthentication(w, loadFile);
73
78
  });
74
79
  /**
75
80
  * @see https://www.electronjs.org/docs/latest/api/app#event-activate-macos Event: 'activate'.