@xwiki/cristal-electron-main 0.14.0 → 0.16.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/CHANGELOG.md +31 -0
- package/dist/index.cjs +31 -34
- package/package.json +12 -9
- package/src/index.ts +11 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-electron-main",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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,19 @@
|
|
|
13
13
|
"url": "https://jira.xwiki.org/projects/CRISTAL/"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"electron": "
|
|
17
|
-
"
|
|
18
|
-
"@xwiki/cristal-
|
|
19
|
-
"@xwiki/cristal-electron-
|
|
20
|
-
"@xwiki/cristal-electron-
|
|
16
|
+
"electron": "35.0.1",
|
|
17
|
+
"reflect-metadata": "0.2.2",
|
|
18
|
+
"@xwiki/cristal-browser-electron": "0.16.0",
|
|
19
|
+
"@xwiki/cristal-electron-authentication-github-main": "0.16.0",
|
|
20
|
+
"@xwiki/cristal-configuration-electron-main": "0.16.0",
|
|
21
|
+
"@xwiki/cristal-electron-authentication-xwiki-main": "0.16.0",
|
|
22
|
+
"@xwiki/cristal-electron-authentication-nextcloud-main": "0.16.0",
|
|
23
|
+
"@xwiki/cristal-electron-storage": "0.16.0"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
23
|
-
"@types/node": "22.10
|
|
24
|
-
"typescript": "5.
|
|
25
|
-
"vite": "6.
|
|
26
|
+
"@types/node": "22.13.10",
|
|
27
|
+
"typescript": "5.8.2",
|
|
28
|
+
"vite": "6.2.2"
|
|
26
29
|
},
|
|
27
30
|
"scripts": {
|
|
28
31
|
"build": "tsc --project tsconfig.json && vite build",
|
package/src/index.ts
CHANGED
|
@@ -18,18 +18,25 @@
|
|
|
18
18
|
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
import "reflect-metadata";
|
|
21
22
|
import { restoreOrCreateWindow } from "./mainWindow";
|
|
22
23
|
import { loadFile } from "./reload";
|
|
23
24
|
import "./security-restrictions";
|
|
24
25
|
// @ts-expect-error shouldn't happen, but we need to generate the types for the whole project once.
|
|
25
26
|
import loadBrowser from "@xwiki/cristal-browser-electron/main";
|
|
26
27
|
import { load as loadConfiguration } from "@xwiki/cristal-configuration-electron-main";
|
|
27
|
-
import { load as
|
|
28
|
+
import { load as loadGitHubAuthentication } from "@xwiki/cristal-electron-authentication-github-main";
|
|
29
|
+
import { load as loadNextcloudAuthentication } from "@xwiki/cristal-electron-authentication-nextcloud-main";
|
|
30
|
+
import { load as loadXWikiAuthentication } from "@xwiki/cristal-electron-authentication-xwiki-main";
|
|
28
31
|
// @ts-expect-error shouldn't happen, but we need to generate the types for the whole project once.
|
|
29
32
|
import load from "@xwiki/cristal-electron-storage/main";
|
|
30
33
|
import { BrowserWindow, app } from "electron";
|
|
31
34
|
import { platform } from "node:process";
|
|
32
35
|
|
|
36
|
+
// Set up IPC listener for configuration loading before the app actually starts
|
|
37
|
+
// It needs to be setup before the preload script runs, which means the first window mustn't have been created
|
|
38
|
+
loadConfiguration();
|
|
39
|
+
|
|
33
40
|
/**
|
|
34
41
|
* Prevent electron from running multiple instances.
|
|
35
42
|
*/
|
|
@@ -68,8 +75,9 @@ app
|
|
|
68
75
|
await load();
|
|
69
76
|
restoreOrCreateWindow().then((w) => {
|
|
70
77
|
loadBrowser(w);
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
loadGitHubAuthentication(w, loadFile);
|
|
79
|
+
loadNextcloudAuthentication(w, loadFile);
|
|
80
|
+
loadXWikiAuthentication(w, loadFile);
|
|
73
81
|
});
|
|
74
82
|
/**
|
|
75
83
|
* @see https://www.electronjs.org/docs/latest/api/app#event-activate-macos Event: 'activate'.
|