@itwin/core-electron 5.8.0-dev.8 → 5.8.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
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
# Change Log - @itwin/core-electron
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 02 Apr 2026 18:19:33 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.8.0
|
|
6
|
+
Thu, 02 Apr 2026 18:19:33 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Add support for Electron 41
|
|
11
|
+
|
|
12
|
+
## 5.7.3
|
|
13
|
+
Tue, 24 Mar 2026 14:29:17 GMT
|
|
14
|
+
|
|
15
|
+
_Version update only_
|
|
16
|
+
|
|
17
|
+
## 5.7.2
|
|
18
|
+
Thu, 12 Mar 2026 14:12:44 GMT
|
|
19
|
+
|
|
20
|
+
_Version update only_
|
|
4
21
|
|
|
5
22
|
## 5.7.1
|
|
6
23
|
Mon, 09 Mar 2026 14:41:48 GMT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElectronApp.d.ts","sourceRoot":"","sources":["../../../src/frontend/ElectronApp.ts"],"names":[],"mappings":"AAWA,OAAO,EAAsC,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,EAAE,gBAAgB,CAAC;KAC3B;CACF;AA4BD,YAAY;AACZ,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;AAE5C;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAc;IAClC,WAAkB,OAAO,IAAI,OAAO,CAAoC;IAExE;;;;OAIG;WACiB,OAAO,CAAC,IAAI,CAAC,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"ElectronApp.d.ts","sourceRoot":"","sources":["../../../src/frontend/ElectronApp.ts"],"names":[],"mappings":"AAWA,OAAO,EAAsC,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,EAAE,gBAAgB,CAAC;KAC3B;CACF;AA4BD,YAAY;AACZ,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;AAE5C;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAc;IAClC,WAAkB,OAAO,IAAI,OAAO,CAAoC;IAExE;;;;OAIG;WACiB,OAAO,CAAC,IAAI,CAAC,EAAE,eAAe;WAW9B,QAAQ;IAM5B,4DAA4D;IAC5D,OAAc,SAAS,kEAAgG;CACxH"}
|
|
@@ -56,7 +56,8 @@ class ElectronApp {
|
|
|
56
56
|
this._ipc = new ElectronIpc();
|
|
57
57
|
ElectronRpcManager_1.ElectronRpcManager.initializeFrontend(this._ipc, opts?.iModelApp?.rpcInterfaces); // eslint-disable-line @typescript-eslint/no-deprecated
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
const ipc = (0, core_bentley_1.expectDefined)(this._ipc, "Electron IPC channel was not initialized.");
|
|
60
|
+
await core_frontend_1.NativeApp.startup(ipc, opts);
|
|
60
61
|
}
|
|
61
62
|
static async shutdown() {
|
|
62
63
|
this._ipc = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElectronApp.js","sourceRoot":"","sources":["../../../src/frontend/ElectronApp.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"ElectronApp.js","sourceRoot":"","sources":["../../../src/frontend/ElectronApp.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AA4B,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;YAC9B,uCAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,uDAAuD;QAC3I,CAAC;QACD,MAAM,GAAG,GAAG,IAAA,4BAAa,EAAC,IAAI,CAAC,IAAI,EAAE,2CAA2C,CAAC,CAAC;QAClF,MAAM,yBAAS,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,QAAQ;QAC1B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,MAAM,yBAAS,CAAC,QAAQ,EAAE,CAAC;QAC3B,uCAAkB,CAAC,iBAAiB,EAAE,CAAC;IACzC,CAAC;IAED,4DAA4D;IACrD,MAAM,CAAC,SAAS,GAAG,sBAAM,CAAC,oBAAoB,CAAkB,yCAAkB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;;AA3BzH,kCA4BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Renderer\r\n */\r\n\r\nimport { expectDefined, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport { IpcListener, IpcSocketFrontend } from \"@itwin/core-common\";\r\nimport { _callIpcChannel, IpcApp, NativeApp, NativeAppOpts } from \"@itwin/core-frontend\";\r\nimport type { IpcRenderer } from \"electron\";\r\nimport { electronIpcStrings } from \"../common/ElectronIpcInterface\";\r\nimport { ElectronRpcManager } from \"../common/ElectronRpcManager\";\r\nimport type { ITwinElectronApi } from \"../common/ITwinElectronApi\";\r\n\r\ndeclare global {\r\n interface Window {\r\n itwinjs: ITwinElectronApi;\r\n }\r\n}\r\n\r\n/**\r\n * Frontend Ipc support for Electron apps.\r\n */\r\nclass ElectronIpc implements IpcSocketFrontend {\r\n private _api: ITwinElectronApi | IpcRenderer;\r\n public addListener(channelName: string, listener: IpcListener) {\r\n this._api.addListener(channelName, listener);\r\n return () => this._api.removeListener(channelName, listener);\r\n }\r\n public removeListener(channelName: string, listener: IpcListener) {\r\n this._api.removeListener(channelName, listener);\r\n }\r\n public send(channel: string, ...data: any[]) {\r\n this._api.send(channel, ...data);\r\n }\r\n public async invoke(channel: string, ...args: any[]) {\r\n return this._api.invoke(channel, ...args);\r\n }\r\n constructor() {\r\n // use the methods on window.itwinjs exposed by ElectronPreload.ts, or ipcRenderer directly if running with nodeIntegration=true (**only** for tests).\r\n // Note that `require(\"electron\")` doesn't work with nodeIntegration=false - that's what it stops\r\n // eslint-disable-next-line @typescript-eslint/no-require-imports\r\n this._api = window.itwinjs ?? require(\"electron\").ipcRenderer;\r\n }\r\n}\r\n\r\n/** @beta */\r\nexport type ElectronAppOpts = NativeAppOpts;\r\n\r\n/**\r\n * Frontend of an Electron App.\r\n * @beta\r\n */\r\nexport class ElectronApp {\r\n private static _ipc?: ElectronIpc;\r\n public static get isValid(): boolean { return undefined !== this._ipc; }\r\n\r\n /**\r\n * Start the frontend of an Electron application.\r\n * @param opts Options for your ElectronApp\r\n * @note This method must only be called from the frontend of an Electron app (i.e. when [ProcessDetector.isElectronAppFrontend]($bentley) is `true`).\r\n */\r\n public static async startup(opts?: ElectronAppOpts) {\r\n if (!ProcessDetector.isElectronAppFrontend)\r\n throw new Error(\"Not running under Electron\");\r\n if (!this.isValid) {\r\n this._ipc = new ElectronIpc();\r\n ElectronRpcManager.initializeFrontend(this._ipc, opts?.iModelApp?.rpcInterfaces); // eslint-disable-line @typescript-eslint/no-deprecated\r\n }\r\n const ipc = expectDefined(this._ipc, \"Electron IPC channel was not initialized.\");\r\n await NativeApp.startup(ipc, opts);\r\n }\r\n\r\n public static async shutdown() {\r\n this._ipc = undefined;\r\n await NativeApp.shutdown();\r\n ElectronRpcManager.terminateFrontend();\r\n }\r\n\r\n /** Proxy object for calling methods of `Electron.Dialog` */\r\n public static dialogIpc = IpcApp.makeIpcFunctionProxy<Electron.Dialog>(electronIpcStrings.dialogChannel, \"callDialog\");\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-electron",
|
|
3
|
-
"version": "5.8.0
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "iTwin.js ElectronHost and ElectronApp",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"url": "http://www.bentley.com"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"electron": "^35.0.0 || ^36.0.0 || ^37.0.0 || ^38.0.0 || ^39.0.0 || ^40.0.0",
|
|
22
|
-
"@itwin/core-backend": "5.8.0
|
|
23
|
-
"@itwin/core-bentley": "5.8.0
|
|
24
|
-
"@itwin/core-frontend": "5.8.0
|
|
25
|
-
"@itwin/core-common": "5.8.0
|
|
21
|
+
"electron": "^35.0.0 || ^36.0.0 || ^37.0.0 || ^38.0.0 || ^39.0.0 || ^40.0.0 || ^41.0.0",
|
|
22
|
+
"@itwin/core-backend": "5.8.0",
|
|
23
|
+
"@itwin/core-bentley": "5.8.0",
|
|
24
|
+
"@itwin/core-frontend": "5.8.0",
|
|
25
|
+
"@itwin/core-common": "5.8.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@itwin/eslint-plugin": "^6.0.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/node": "~20.17.0",
|
|
32
32
|
"chai": "^4.3.10",
|
|
33
33
|
"cpx2": "^8.0.0",
|
|
34
|
-
"electron": "^
|
|
34
|
+
"electron": "^41.0.0",
|
|
35
35
|
"eslint": "^9.31.0",
|
|
36
36
|
"glob": "^10.5.0",
|
|
37
37
|
"mocha": "^11.1.0",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"typescript": "~5.6.2",
|
|
41
41
|
"webpack": "^5.97.1",
|
|
42
42
|
"webpack-cli": "^5.0.1",
|
|
43
|
-
"@itwin/build-tools": "5.8.0
|
|
44
|
-
"@itwin/
|
|
45
|
-
"@itwin/core-
|
|
46
|
-
"@itwin/core-
|
|
47
|
-
"@itwin/core-
|
|
48
|
-
"@itwin/
|
|
43
|
+
"@itwin/build-tools": "5.8.0",
|
|
44
|
+
"@itwin/certa": "5.8.0",
|
|
45
|
+
"@itwin/core-common": "5.8.0",
|
|
46
|
+
"@itwin/core-bentley": "5.8.0",
|
|
47
|
+
"@itwin/core-backend": "5.8.0",
|
|
48
|
+
"@itwin/core-frontend": "5.8.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@openid/appauth": "^1.3.2",
|