@itwin/core-electron 4.0.0-dev.28 → 4.0.0-dev.30

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.
Files changed (42) hide show
  1. package/lib/cjs/ElectronBackend.d.ts +1 -1
  2. package/lib/cjs/ElectronBackend.js +17 -17
  3. package/lib/cjs/ElectronBackend.js.map +1 -1
  4. package/lib/cjs/ElectronFrontend.d.ts +1 -1
  5. package/lib/cjs/ElectronFrontend.js +17 -17
  6. package/lib/cjs/ElectronFrontend.js.map +1 -1
  7. package/lib/cjs/__DOC_ONLY__.d.ts +3 -3
  8. package/lib/cjs/__DOC_ONLY__.js +22 -22
  9. package/lib/cjs/__DOC_ONLY__.js.map +1 -1
  10. package/lib/cjs/backend/ElectronHost.d.ts +104 -104
  11. package/lib/cjs/backend/ElectronHost.js +240 -240
  12. package/lib/cjs/backend/ElectronPreload.d.ts +1 -1
  13. package/lib/cjs/backend/ElectronPreload.js +39 -39
  14. package/lib/cjs/backend/ElectronPreload.js.map +1 -1
  15. package/lib/cjs/common/ElectronIpcInterface.d.ts +7 -7
  16. package/lib/cjs/common/ElectronIpcInterface.js +5 -5
  17. package/lib/cjs/common/ElectronIpcInterface.js.map +1 -1
  18. package/lib/cjs/common/ElectronIpcTransport.d.ts +44 -44
  19. package/lib/cjs/common/ElectronIpcTransport.js +186 -186
  20. package/lib/cjs/common/ElectronIpcTransport.js.map +1 -1
  21. package/lib/cjs/common/ElectronManagerLoggerCategory.d.ts +10 -10
  22. package/lib/cjs/common/ElectronManagerLoggerCategory.js +18 -18
  23. package/lib/cjs/common/ElectronManagerLoggerCategory.js.map +1 -1
  24. package/lib/cjs/common/ElectronPush.d.ts +20 -20
  25. package/lib/cjs/common/ElectronPush.js +48 -48
  26. package/lib/cjs/common/ElectronPush.js.map +1 -1
  27. package/lib/cjs/common/ElectronRpcManager.d.ts +26 -26
  28. package/lib/cjs/common/ElectronRpcManager.js +65 -65
  29. package/lib/cjs/common/ElectronRpcManager.js.map +1 -1
  30. package/lib/cjs/common/ElectronRpcProtocol.d.ts +34 -34
  31. package/lib/cjs/common/ElectronRpcProtocol.js +58 -58
  32. package/lib/cjs/common/ElectronRpcProtocol.js.map +1 -1
  33. package/lib/cjs/common/ElectronRpcRequest.d.ts +19 -19
  34. package/lib/cjs/common/ElectronRpcRequest.js +56 -56
  35. package/lib/cjs/common/ElectronRpcRequest.js.map +1 -1
  36. package/lib/cjs/common/ITwinElectronApi.d.ts +10 -10
  37. package/lib/cjs/common/ITwinElectronApi.js +6 -6
  38. package/lib/cjs/common/ITwinElectronApi.js.map +1 -1
  39. package/lib/cjs/frontend/ElectronApp.d.ts +35 -35
  40. package/lib/cjs/frontend/ElectronApp.js +73 -73
  41. package/lib/cjs/frontend/ElectronApp.js.map +1 -1
  42. package/package.json +14 -14
@@ -1,57 +1,57 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ElectronRpcRequest = void 0;
8
- const core_common_1 = require("@itwin/core-common");
9
- /* eslint-disable deprecation/deprecation */
10
- /** @internal */
11
- class ElectronRpcRequest extends core_common_1.RpcRequest {
12
- constructor() {
13
- super(...arguments);
14
- this._res = () => undefined;
15
- this._fulfillment = undefined;
16
- /** Convenience access to the protocol of this request. */
17
- this.protocol = this.client.configuration.protocol;
18
- }
19
- /** Sends the request. */
20
- async send() {
21
- try {
22
- this.protocol.requests.set(this.id, this);
23
- const request = await this.protocol.serialize(this);
24
- this.protocol.transport.sendRequest(request);
25
- }
26
- catch (e) {
27
- this.protocol.events.raiseEvent(core_common_1.RpcProtocolEvent.ConnectionErrorReceived, this);
28
- }
29
- return new Promise((resolve) => {
30
- this._res = resolve;
31
- });
32
- }
33
- /** Loads the request. */
34
- async load() {
35
- const fulfillment = this._fulfillment;
36
- if (!fulfillment) {
37
- throw new Error("No request fulfillment available.");
38
- }
39
- return fulfillment.result;
40
- }
41
- /** Sets request header values. */
42
- setHeader(_name, _value) {
43
- // No implementation
44
- }
45
- /** @internal */
46
- notifyResponse(fulfillment) {
47
- this._fulfillment = fulfillment;
48
- this._res(fulfillment.status);
49
- }
50
- /** @internal */
51
- dispose() {
52
- this.protocol.requests.delete(this.id);
53
- super.dispose();
54
- }
55
- }
56
- exports.ElectronRpcRequest = ElectronRpcRequest;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ElectronRpcRequest = void 0;
8
+ const core_common_1 = require("@itwin/core-common");
9
+ /* eslint-disable deprecation/deprecation */
10
+ /** @internal */
11
+ class ElectronRpcRequest extends core_common_1.RpcRequest {
12
+ constructor() {
13
+ super(...arguments);
14
+ this._res = () => undefined;
15
+ this._fulfillment = undefined;
16
+ /** Convenience access to the protocol of this request. */
17
+ this.protocol = this.client.configuration.protocol;
18
+ }
19
+ /** Sends the request. */
20
+ async send() {
21
+ try {
22
+ this.protocol.requests.set(this.id, this);
23
+ const request = await this.protocol.serialize(this);
24
+ this.protocol.transport.sendRequest(request);
25
+ }
26
+ catch (e) {
27
+ this.protocol.events.raiseEvent(core_common_1.RpcProtocolEvent.ConnectionErrorReceived, this);
28
+ }
29
+ return new Promise((resolve) => {
30
+ this._res = resolve;
31
+ });
32
+ }
33
+ /** Loads the request. */
34
+ async load() {
35
+ const fulfillment = this._fulfillment;
36
+ if (!fulfillment) {
37
+ throw new Error("No request fulfillment available.");
38
+ }
39
+ return fulfillment.result;
40
+ }
41
+ /** Sets request header values. */
42
+ setHeader(_name, _value) {
43
+ // No implementation
44
+ }
45
+ /** @internal */
46
+ notifyResponse(fulfillment) {
47
+ this._fulfillment = fulfillment;
48
+ this._res(fulfillment.status);
49
+ }
50
+ /** @internal */
51
+ dispose() {
52
+ this.protocol.requests.delete(this.id);
53
+ super.dispose();
54
+ }
55
+ }
56
+ exports.ElectronRpcRequest = ElectronRpcRequest;
57
57
  //# sourceMappingURL=ElectronRpcRequest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ElectronRpcRequest.js","sourceRoot":"","sources":["../../../src/common/ElectronRpcRequest.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,oDAAyF;AAGzF,4CAA4C;AAE5C,gBAAgB;AAChB,MAAa,kBAAmB,SAAQ,wBAAU;IAAlD;;QACU,SAAI,GAA4B,GAAG,EAAE,CAAC,SAAS,CAAC;QAChD,iBAAY,GAAsC,SAAS,CAAC;QAEpE,0DAA0D;QACjC,aAAQ,GAAwB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAe,CAAC;IA2CrG,CAAC;IAzCC,yBAAyB;IACf,KAAK,CAAC,IAAI;QAClB,IAAI;YACF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YAC1C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACpD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;SAC9C;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,8BAAgB,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;SACjF;QAED,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;YACrC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,yBAAyB;IACf,KAAK,CAAC,IAAI;QAClB,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;SACtD;QAED,OAAO,WAAW,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED,kCAAkC;IACxB,SAAS,CAAC,KAAa,EAAE,MAAc;QAC/C,oBAAoB;IACtB,CAAC;IAED,gBAAgB;IACT,cAAc,CAAC,WAAkC;QACtD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,gBAAgB;IACA,OAAO;QACrB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACvC,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF;AAhDD,gDAgDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { RpcProtocolEvent, RpcRequest, RpcRequestFulfillment } from \"@itwin/core-common\";\nimport { ElectronRpcProtocol } from \"./ElectronRpcProtocol\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** @internal */\nexport class ElectronRpcRequest extends RpcRequest {\n private _res: (value: number) => void = () => undefined;\n private _fulfillment: RpcRequestFulfillment | undefined = undefined;\n\n /** Convenience access to the protocol of this request. */\n public override readonly protocol: ElectronRpcProtocol = this.client.configuration.protocol as any;\n\n /** Sends the request. */\n protected async send() {\n try {\n this.protocol.requests.set(this.id, this);\n const request = await this.protocol.serialize(this);\n this.protocol.transport.sendRequest(request);\n } catch (e) {\n this.protocol.events.raiseEvent(RpcProtocolEvent.ConnectionErrorReceived, this);\n }\n\n return new Promise<number>((resolve) => {\n this._res = resolve;\n });\n }\n\n /** Loads the request. */\n protected async load() {\n const fulfillment = this._fulfillment;\n if (!fulfillment) {\n throw new Error(\"No request fulfillment available.\");\n }\n\n return fulfillment.result;\n }\n\n /** Sets request header values. */\n protected setHeader(_name: string, _value: string): void {\n // No implementation\n }\n\n /** @internal */\n public notifyResponse(fulfillment: RpcRequestFulfillment) {\n this._fulfillment = fulfillment;\n this._res(fulfillment.status);\n }\n\n /** @internal */\n public override dispose() {\n this.protocol.requests.delete(this.id);\n super.dispose();\n }\n}\n"]}
1
+ {"version":3,"file":"ElectronRpcRequest.js","sourceRoot":"","sources":["../../../src/common/ElectronRpcRequest.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,oDAAyF;AAGzF,4CAA4C;AAE5C,gBAAgB;AAChB,MAAa,kBAAmB,SAAQ,wBAAU;IAAlD;;QACU,SAAI,GAA4B,GAAG,EAAE,CAAC,SAAS,CAAC;QAChD,iBAAY,GAAsC,SAAS,CAAC;QAEpE,0DAA0D;QACjC,aAAQ,GAAwB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAe,CAAC;IA2CrG,CAAC;IAzCC,yBAAyB;IACf,KAAK,CAAC,IAAI;QAClB,IAAI;YACF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YAC1C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACpD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;SAC9C;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,8BAAgB,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;SACjF;QAED,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;YACrC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,yBAAyB;IACf,KAAK,CAAC,IAAI;QAClB,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;SACtD;QAED,OAAO,WAAW,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED,kCAAkC;IACxB,SAAS,CAAC,KAAa,EAAE,MAAc;QAC/C,oBAAoB;IACtB,CAAC;IAED,gBAAgB;IACT,cAAc,CAAC,WAAkC;QACtD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,gBAAgB;IACA,OAAO;QACrB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACvC,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF;AAhDD,gDAgDC","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\nimport { RpcProtocolEvent, RpcRequest, RpcRequestFulfillment } from \"@itwin/core-common\";\r\nimport { ElectronRpcProtocol } from \"./ElectronRpcProtocol\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** @internal */\r\nexport class ElectronRpcRequest extends RpcRequest {\r\n private _res: (value: number) => void = () => undefined;\r\n private _fulfillment: RpcRequestFulfillment | undefined = undefined;\r\n\r\n /** Convenience access to the protocol of this request. */\r\n public override readonly protocol: ElectronRpcProtocol = this.client.configuration.protocol as any;\r\n\r\n /** Sends the request. */\r\n protected async send() {\r\n try {\r\n this.protocol.requests.set(this.id, this);\r\n const request = await this.protocol.serialize(this);\r\n this.protocol.transport.sendRequest(request);\r\n } catch (e) {\r\n this.protocol.events.raiseEvent(RpcProtocolEvent.ConnectionErrorReceived, this);\r\n }\r\n\r\n return new Promise<number>((resolve) => {\r\n this._res = resolve;\r\n });\r\n }\r\n\r\n /** Loads the request. */\r\n protected async load() {\r\n const fulfillment = this._fulfillment;\r\n if (!fulfillment) {\r\n throw new Error(\"No request fulfillment available.\");\r\n }\r\n\r\n return fulfillment.result;\r\n }\r\n\r\n /** Sets request header values. */\r\n protected setHeader(_name: string, _value: string): void {\r\n // No implementation\r\n }\r\n\r\n /** @internal */\r\n public notifyResponse(fulfillment: RpcRequestFulfillment) {\r\n this._fulfillment = fulfillment;\r\n this._res(fulfillment.status);\r\n }\r\n\r\n /** @internal */\r\n public override dispose() {\r\n this.protocol.requests.delete(this.id);\r\n super.dispose();\r\n }\r\n}\r\n"]}
@@ -1,11 +1,11 @@
1
- import type { IpcRendererEvent } from "electron";
2
- /** These methods are stored on `window.itwinjs` */
3
- export interface ITwinElectronApi {
4
- addListener: (channel: string, listener: ElectronListener) => void;
5
- removeListener: (channel: string, listener: ElectronListener) => void;
6
- invoke: (channel: string, ...data: any[]) => Promise<any>;
7
- once: (channel: string, listener: (event: any, ...args: any[]) => void) => void;
8
- send: (channel: string, ...data: any[]) => void;
9
- }
10
- export declare type ElectronListener = (event: IpcRendererEvent, ...args: any[]) => void;
1
+ import type { IpcRendererEvent } from "electron";
2
+ /** These methods are stored on `window.itwinjs` */
3
+ export interface ITwinElectronApi {
4
+ addListener: (channel: string, listener: ElectronListener) => void;
5
+ removeListener: (channel: string, listener: ElectronListener) => void;
6
+ invoke: (channel: string, ...data: any[]) => Promise<any>;
7
+ once: (channel: string, listener: (event: any, ...args: any[]) => void) => void;
8
+ send: (channel: string, ...data: any[]) => void;
9
+ }
10
+ export declare type ElectronListener = (event: IpcRendererEvent, ...args: any[]) => void;
11
11
  //# sourceMappingURL=ITwinElectronApi.d.ts.map
@@ -1,7 +1,7 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  //# sourceMappingURL=ITwinElectronApi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ITwinElectronApi.js","sourceRoot":"","sources":["../../../src/common/ITwinElectronApi.ts"],"names":[],"mappings":";AAAA;;;+FAG+F","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport type { IpcRendererEvent } from \"electron\";\n\n/** These methods are stored on `window.itwinjs` */\nexport interface ITwinElectronApi {\n addListener: (channel: string, listener: ElectronListener) => void;\n removeListener: (channel: string, listener: ElectronListener) => void;\n invoke: (channel: string, ...data: any[]) => Promise<any>;\n once: (channel: string, listener: (event: any, ...args: any[]) => void) => void;\n send: (channel: string, ...data: any[]) => void; // only valid for render -> main\n}\n\nexport type ElectronListener = (event: IpcRendererEvent, ...args: any[]) => void;\n"]}
1
+ {"version":3,"file":"ITwinElectronApi.js","sourceRoot":"","sources":["../../../src/common/ITwinElectronApi.ts"],"names":[],"mappings":";AAAA;;;+FAG+F","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\nimport type { IpcRendererEvent } from \"electron\";\r\n\r\n/** These methods are stored on `window.itwinjs` */\r\nexport interface ITwinElectronApi {\r\n addListener: (channel: string, listener: ElectronListener) => void;\r\n removeListener: (channel: string, listener: ElectronListener) => void;\r\n invoke: (channel: string, ...data: any[]) => Promise<any>;\r\n once: (channel: string, listener: (event: any, ...args: any[]) => void) => void;\r\n send: (channel: string, ...data: any[]) => void; // only valid for render -> main\r\n}\r\n\r\nexport type ElectronListener = (event: IpcRendererEvent, ...args: any[]) => void;\r\n"]}
@@ -1,36 +1,36 @@
1
- import { PromiseReturnType } from "@itwin/core-bentley";
2
- import { NativeAppOpts } from "@itwin/core-frontend";
3
- import { DialogModuleMethod } from "../common/ElectronIpcInterface";
4
- import type { ITwinElectronApi } from "../common/ITwinElectronApi";
5
- declare global {
6
- interface Window {
7
- itwinjs: ITwinElectronApi;
8
- }
9
- }
10
- /** @beta */
11
- export declare type ElectronAppOpts = NativeAppOpts;
12
- /**
13
- * Frontend of an Electron App.
14
- * @beta
15
- */
16
- export declare class ElectronApp {
17
- private static _ipc?;
18
- static get isValid(): boolean;
19
- /**
20
- * Start the frontend of an Electron application.
21
- * @param opts Options for your ElectronApp
22
- * @note This method must only be called from the frontend of an Electron app (i.e. when [ProcessDetector.isElectronAppFrontend]($bentley) is `true`).
23
- */
24
- static startup(opts?: ElectronAppOpts): Promise<void>;
25
- static shutdown(): Promise<void>;
26
- /**
27
- * Call an asynchronous method in the [Electron.Dialog](https://www.electronjs.org/docs/api/dialog) interface from a previously initialized ElectronFrontend.
28
- * @param methodName the name of the method to call
29
- * @param args arguments to method
30
- * @deprecated in 3.x. use [[dialogIpc]]
31
- */
32
- static callDialog<T extends DialogModuleMethod>(methodName: T, ...args: Parameters<Electron.Dialog[T]>): Promise<PromiseReturnType<Electron.Dialog[T]>>;
33
- /** Proxy object for calling methods of `Electron.Dialog` */
34
- static dialogIpc: import("@itwin/core-bentley").PickAsyncMethods<Electron.Dialog>;
35
- }
1
+ import { PromiseReturnType } from "@itwin/core-bentley";
2
+ import { NativeAppOpts } from "@itwin/core-frontend";
3
+ import { DialogModuleMethod } from "../common/ElectronIpcInterface";
4
+ import type { ITwinElectronApi } from "../common/ITwinElectronApi";
5
+ declare global {
6
+ interface Window {
7
+ itwinjs: ITwinElectronApi;
8
+ }
9
+ }
10
+ /** @beta */
11
+ export declare type ElectronAppOpts = NativeAppOpts;
12
+ /**
13
+ * Frontend of an Electron App.
14
+ * @beta
15
+ */
16
+ export declare class ElectronApp {
17
+ private static _ipc?;
18
+ static get isValid(): boolean;
19
+ /**
20
+ * Start the frontend of an Electron application.
21
+ * @param opts Options for your ElectronApp
22
+ * @note This method must only be called from the frontend of an Electron app (i.e. when [ProcessDetector.isElectronAppFrontend]($bentley) is `true`).
23
+ */
24
+ static startup(opts?: ElectronAppOpts): Promise<void>;
25
+ static shutdown(): Promise<void>;
26
+ /**
27
+ * Call an asynchronous method in the [Electron.Dialog](https://www.electronjs.org/docs/api/dialog) interface from a previously initialized ElectronFrontend.
28
+ * @param methodName the name of the method to call
29
+ * @param args arguments to method
30
+ * @deprecated in 3.x. use [[dialogIpc]]
31
+ */
32
+ static callDialog<T extends DialogModuleMethod>(methodName: T, ...args: Parameters<Electron.Dialog[T]>): Promise<PromiseReturnType<Electron.Dialog[T]>>;
33
+ /** Proxy object for calling methods of `Electron.Dialog` */
34
+ static dialogIpc: import("@itwin/core-bentley").PickAsyncMethods<Electron.Dialog>;
35
+ }
36
36
  //# sourceMappingURL=ElectronApp.d.ts.map
@@ -1,74 +1,74 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ElectronApp = void 0;
4
- /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
8
- const core_bentley_1 = require("@itwin/core-bentley");
9
- const core_frontend_1 = require("@itwin/core-frontend");
10
- const ElectronIpcInterface_1 = require("../common/ElectronIpcInterface");
11
- const ElectronRpcManager_1 = require("../common/ElectronRpcManager");
12
- /**
13
- * Frontend Ipc support for Electron apps.
14
- */
15
- class ElectronIpc {
16
- constructor() {
17
- // use the methods on window.itwinjs exposed by ElectronPreload.ts, or ipcRenderer directly if running with nodeIntegration=true (**only** for tests).
18
- // Note that `require("electron")` doesn't work with nodeIntegration=false - that's what it stops
19
- // eslint-disable-next-line @typescript-eslint/no-var-requires
20
- this._api = window.itwinjs ?? require("electron").ipcRenderer;
21
- }
22
- addListener(channelName, listener) {
23
- this._api.addListener(channelName, listener);
24
- return () => this._api.removeListener(channelName, listener);
25
- }
26
- removeListener(channelName, listener) {
27
- this._api.removeListener(channelName, listener);
28
- }
29
- send(channel, ...data) {
30
- this._api.send(channel, ...data);
31
- }
32
- async invoke(channel, ...args) {
33
- return this._api.invoke(channel, ...args);
34
- }
35
- }
36
- /**
37
- * Frontend of an Electron App.
38
- * @beta
39
- */
40
- class ElectronApp {
41
- static get isValid() { return undefined !== this._ipc; }
42
- /**
43
- * Start the frontend of an Electron application.
44
- * @param opts Options for your ElectronApp
45
- * @note This method must only be called from the frontend of an Electron app (i.e. when [ProcessDetector.isElectronAppFrontend]($bentley) is `true`).
46
- */
47
- static async startup(opts) {
48
- if (!core_bentley_1.ProcessDetector.isElectronAppFrontend)
49
- throw new Error("Not running under Electron");
50
- if (!this.isValid) {
51
- this._ipc = new ElectronIpc();
52
- ElectronRpcManager_1.ElectronRpcManager.initializeFrontend(this._ipc, opts?.iModelApp?.rpcInterfaces);
53
- }
54
- await core_frontend_1.NativeApp.startup(this._ipc, opts);
55
- }
56
- static async shutdown() {
57
- this._ipc = undefined;
58
- await core_frontend_1.NativeApp.shutdown();
59
- ElectronRpcManager_1.ElectronRpcManager.terminateFrontend();
60
- }
61
- /**
62
- * Call an asynchronous method in the [Electron.Dialog](https://www.electronjs.org/docs/api/dialog) interface from a previously initialized ElectronFrontend.
63
- * @param methodName the name of the method to call
64
- * @param args arguments to method
65
- * @deprecated in 3.x. use [[dialogIpc]]
66
- */
67
- static async callDialog(methodName, ...args) {
68
- return core_frontend_1.IpcApp.callIpcChannel(ElectronIpcInterface_1.dialogChannel, "callDialog", methodName, ...args);
69
- }
70
- }
71
- exports.ElectronApp = ElectronApp;
72
- /** Proxy object for calling methods of `Electron.Dialog` */
73
- ElectronApp.dialogIpc = core_frontend_1.IpcApp.makeIpcFunctionProxy(ElectronIpcInterface_1.dialogChannel, "callDialog");
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ElectronApp = void 0;
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ const core_bentley_1 = require("@itwin/core-bentley");
9
+ const core_frontend_1 = require("@itwin/core-frontend");
10
+ const ElectronIpcInterface_1 = require("../common/ElectronIpcInterface");
11
+ const ElectronRpcManager_1 = require("../common/ElectronRpcManager");
12
+ /**
13
+ * Frontend Ipc support for Electron apps.
14
+ */
15
+ class ElectronIpc {
16
+ constructor() {
17
+ // use the methods on window.itwinjs exposed by ElectronPreload.ts, or ipcRenderer directly if running with nodeIntegration=true (**only** for tests).
18
+ // Note that `require("electron")` doesn't work with nodeIntegration=false - that's what it stops
19
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
20
+ this._api = window.itwinjs ?? require("electron").ipcRenderer;
21
+ }
22
+ addListener(channelName, listener) {
23
+ this._api.addListener(channelName, listener);
24
+ return () => this._api.removeListener(channelName, listener);
25
+ }
26
+ removeListener(channelName, listener) {
27
+ this._api.removeListener(channelName, listener);
28
+ }
29
+ send(channel, ...data) {
30
+ this._api.send(channel, ...data);
31
+ }
32
+ async invoke(channel, ...args) {
33
+ return this._api.invoke(channel, ...args);
34
+ }
35
+ }
36
+ /**
37
+ * Frontend of an Electron App.
38
+ * @beta
39
+ */
40
+ class ElectronApp {
41
+ static get isValid() { return undefined !== this._ipc; }
42
+ /**
43
+ * Start the frontend of an Electron application.
44
+ * @param opts Options for your ElectronApp
45
+ * @note This method must only be called from the frontend of an Electron app (i.e. when [ProcessDetector.isElectronAppFrontend]($bentley) is `true`).
46
+ */
47
+ static async startup(opts) {
48
+ if (!core_bentley_1.ProcessDetector.isElectronAppFrontend)
49
+ throw new Error("Not running under Electron");
50
+ if (!this.isValid) {
51
+ this._ipc = new ElectronIpc();
52
+ ElectronRpcManager_1.ElectronRpcManager.initializeFrontend(this._ipc, opts?.iModelApp?.rpcInterfaces);
53
+ }
54
+ await core_frontend_1.NativeApp.startup(this._ipc, opts);
55
+ }
56
+ static async shutdown() {
57
+ this._ipc = undefined;
58
+ await core_frontend_1.NativeApp.shutdown();
59
+ ElectronRpcManager_1.ElectronRpcManager.terminateFrontend();
60
+ }
61
+ /**
62
+ * Call an asynchronous method in the [Electron.Dialog](https://www.electronjs.org/docs/api/dialog) interface from a previously initialized ElectronFrontend.
63
+ * @param methodName the name of the method to call
64
+ * @param args arguments to method
65
+ * @deprecated in 3.x. use [[dialogIpc]]
66
+ */
67
+ static async callDialog(methodName, ...args) {
68
+ return core_frontend_1.IpcApp.callIpcChannel(ElectronIpcInterface_1.dialogChannel, "callDialog", methodName, ...args);
69
+ }
70
+ }
71
+ exports.ElectronApp = ElectronApp;
72
+ /** Proxy object for calling methods of `Electron.Dialog` */
73
+ ElectronApp.dialogIpc = core_frontend_1.IpcApp.makeIpcFunctionProxy(ElectronIpcInterface_1.dialogChannel, "callDialog");
74
74
  //# sourceMappingURL=ElectronApp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ElectronApp.js","sourceRoot":"","sources":["../../../src/frontend/ElectronApp.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,sDAAyE;AAEzE,wDAAwE;AAExE,yEAAmF;AACnF,qEAAkE;AASlE;;GAEG;AACH,MAAM,WAAW;IAef;QACE,sJAAsJ;QACtJ,iGAAiG;QACjG,8DAA8D;QAC9D,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC;IAChE,CAAC;IAlBM,WAAW,CAAC,WAAmB,EAAE,QAAqB;QAC3D,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC7C,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC;IACM,cAAc,CAAC,WAAmB,EAAE,QAAqB;QAC9D,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IACM,IAAI,CAAC,OAAe,EAAE,GAAG,IAAW;QACzC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACnC,CAAC;IACM,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,GAAG,IAAW;QACjD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC5C,CAAC;CAOF;AAKD;;;GAGG;AACH,MAAa,WAAW;IAEf,MAAM,KAAK,OAAO,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAExE;;;;OAIG;IACI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAsB;QAChD,IAAI,CAAC,8BAAe,CAAC,qBAAqB;YACxC,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;YAC9B,uCAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;SAClF;QACD,MAAM,yBAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAK,EAAE,IAAI,CAAC,CAAC;IAC5C,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;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAA+B,UAAa,EAAE,GAAG,IAAoC;QACjH,OAAO,sBAAM,CAAC,cAAc,CAAC,oCAAa,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAA0C,CAAC;IAC1H,CAAC;;AAjCH,kCAqCC;AAFC,4DAA4D;AAC9C,qBAAS,GAAG,sBAAM,CAAC,oBAAoB,CAAkB,oCAAa,EAAE,YAAY,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { ProcessDetector, PromiseReturnType } from \"@itwin/core-bentley\";\nimport { IpcListener, IpcSocketFrontend } from \"@itwin/core-common\";\nimport { IpcApp, NativeApp, NativeAppOpts } from \"@itwin/core-frontend\";\nimport type { IpcRenderer } from \"electron\";\nimport { dialogChannel, DialogModuleMethod } from \"../common/ElectronIpcInterface\";\nimport { ElectronRpcManager } from \"../common/ElectronRpcManager\";\nimport type { ITwinElectronApi } from \"../common/ITwinElectronApi\";\n\ndeclare global {\n interface Window {\n itwinjs: ITwinElectronApi;\n }\n}\n\n/**\n * Frontend Ipc support for Electron apps.\n */\nclass ElectronIpc implements IpcSocketFrontend {\n private _api: ITwinElectronApi | IpcRenderer;\n public addListener(channelName: string, listener: IpcListener) {\n this._api.addListener(channelName, listener);\n return () => this._api.removeListener(channelName, listener);\n }\n public removeListener(channelName: string, listener: IpcListener) {\n this._api.removeListener(channelName, listener);\n }\n public send(channel: string, ...data: any[]) {\n this._api.send(channel, ...data);\n }\n public async invoke(channel: string, ...args: any[]) {\n return this._api.invoke(channel, ...args);\n }\n constructor() {\n // use the methods on window.itwinjs exposed by ElectronPreload.ts, or ipcRenderer directly if running with nodeIntegration=true (**only** for tests).\n // Note that `require(\"electron\")` doesn't work with nodeIntegration=false - that's what it stops\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n this._api = window.itwinjs ?? require(\"electron\").ipcRenderer;\n }\n}\n\n/** @beta */\nexport type ElectronAppOpts = NativeAppOpts;\n\n/**\n * Frontend of an Electron App.\n * @beta\n */\nexport class ElectronApp {\n private static _ipc?: ElectronIpc;\n public static get isValid(): boolean { return undefined !== this._ipc; }\n\n /**\n * Start the frontend of an Electron application.\n * @param opts Options for your ElectronApp\n * @note This method must only be called from the frontend of an Electron app (i.e. when [ProcessDetector.isElectronAppFrontend]($bentley) is `true`).\n */\n public static async startup(opts?: ElectronAppOpts) {\n if (!ProcessDetector.isElectronAppFrontend)\n throw new Error(\"Not running under Electron\");\n if (!this.isValid) {\n this._ipc = new ElectronIpc();\n ElectronRpcManager.initializeFrontend(this._ipc, opts?.iModelApp?.rpcInterfaces);\n }\n await NativeApp.startup(this._ipc!, opts);\n }\n\n public static async shutdown() {\n this._ipc = undefined;\n await NativeApp.shutdown();\n ElectronRpcManager.terminateFrontend();\n }\n\n /**\n * Call an asynchronous method in the [Electron.Dialog](https://www.electronjs.org/docs/api/dialog) interface from a previously initialized ElectronFrontend.\n * @param methodName the name of the method to call\n * @param args arguments to method\n * @deprecated in 3.x. use [[dialogIpc]]\n */\n public static async callDialog<T extends DialogModuleMethod>(methodName: T, ...args: Parameters<Electron.Dialog[T]>) {\n return IpcApp.callIpcChannel(dialogChannel, \"callDialog\", methodName, ...args) as PromiseReturnType<Electron.Dialog[T]>;\n }\n\n /** Proxy object for calling methods of `Electron.Dialog` */\n public static dialogIpc = IpcApp.makeIpcFunctionProxy<Electron.Dialog>(dialogChannel, \"callDialog\");\n}\n"]}
1
+ {"version":3,"file":"ElectronApp.js","sourceRoot":"","sources":["../../../src/frontend/ElectronApp.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,sDAAyE;AAEzE,wDAAwE;AAExE,yEAAmF;AACnF,qEAAkE;AASlE;;GAEG;AACH,MAAM,WAAW;IAef;QACE,sJAAsJ;QACtJ,iGAAiG;QACjG,8DAA8D;QAC9D,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC;IAChE,CAAC;IAlBM,WAAW,CAAC,WAAmB,EAAE,QAAqB;QAC3D,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC7C,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC;IACM,cAAc,CAAC,WAAmB,EAAE,QAAqB;QAC9D,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IACM,IAAI,CAAC,OAAe,EAAE,GAAG,IAAW;QACzC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACnC,CAAC;IACM,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,GAAG,IAAW;QACjD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC5C,CAAC;CAOF;AAKD;;;GAGG;AACH,MAAa,WAAW;IAEf,MAAM,KAAK,OAAO,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAExE;;;;OAIG;IACI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAsB;QAChD,IAAI,CAAC,8BAAe,CAAC,qBAAqB;YACxC,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;YAC9B,uCAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;SAClF;QACD,MAAM,yBAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAK,EAAE,IAAI,CAAC,CAAC;IAC5C,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;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAA+B,UAAa,EAAE,GAAG,IAAoC;QACjH,OAAO,sBAAM,CAAC,cAAc,CAAC,oCAAa,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAA0C,CAAC;IAC1H,CAAC;;AAjCH,kCAqCC;AAFC,4DAA4D;AAC9C,qBAAS,GAAG,sBAAM,CAAC,oBAAoB,CAAkB,oCAAa,EAAE,YAAY,CAAC,CAAC","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\nimport { ProcessDetector, PromiseReturnType } from \"@itwin/core-bentley\";\r\nimport { IpcListener, IpcSocketFrontend } from \"@itwin/core-common\";\r\nimport { IpcApp, NativeApp, NativeAppOpts } from \"@itwin/core-frontend\";\r\nimport type { IpcRenderer } from \"electron\";\r\nimport { dialogChannel, DialogModuleMethod } 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-var-requires\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);\r\n }\r\n await NativeApp.startup(this._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 /**\r\n * Call an asynchronous method in the [Electron.Dialog](https://www.electronjs.org/docs/api/dialog) interface from a previously initialized ElectronFrontend.\r\n * @param methodName the name of the method to call\r\n * @param args arguments to method\r\n * @deprecated in 3.x. use [[dialogIpc]]\r\n */\r\n public static async callDialog<T extends DialogModuleMethod>(methodName: T, ...args: Parameters<Electron.Dialog[T]>) {\r\n return IpcApp.callIpcChannel(dialogChannel, \"callDialog\", methodName, ...args) as PromiseReturnType<Electron.Dialog[T]>;\r\n }\r\n\r\n /** Proxy object for calling methods of `Electron.Dialog` */\r\n public static dialogIpc = IpcApp.makeIpcFunctionProxy<Electron.Dialog>(dialogChannel, \"callDialog\");\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-electron",
3
- "version": "4.0.0-dev.28",
3
+ "version": "4.0.0-dev.30",
4
4
  "description": "iTwin.js ElectronHost and ElectronApp",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -20,22 +20,22 @@
20
20
  "url": "http://www.bentley.com"
21
21
  },
22
22
  "peerDependencies": {
23
- "@itwin/core-backend": "^4.0.0-dev.28",
24
- "@itwin/core-bentley": "^4.0.0-dev.28",
25
- "@itwin/core-common": "^4.0.0-dev.28",
26
- "@itwin/core-frontend": "^4.0.0-dev.28",
27
- "@itwin/presentation-common": "^4.0.0-dev.28",
23
+ "@itwin/core-backend": "^4.0.0-dev.30",
24
+ "@itwin/core-bentley": "^4.0.0-dev.30",
25
+ "@itwin/core-common": "^4.0.0-dev.30",
26
+ "@itwin/core-frontend": "^4.0.0-dev.30",
27
+ "@itwin/presentation-common": "^4.0.0-dev.30",
28
28
  "electron": "^23.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@itwin/build-tools": "4.0.0-dev.28",
32
- "@itwin/certa": "4.0.0-dev.28",
33
- "@itwin/core-backend": "4.0.0-dev.28",
34
- "@itwin/core-bentley": "4.0.0-dev.28",
35
- "@itwin/core-common": "4.0.0-dev.28",
36
- "@itwin/core-frontend": "4.0.0-dev.28",
37
- "@itwin/eslint-plugin": "4.0.0-dev.28",
38
- "@itwin/presentation-common": "4.0.0-dev.28",
31
+ "@itwin/build-tools": "4.0.0-dev.30",
32
+ "@itwin/certa": "4.0.0-dev.30",
33
+ "@itwin/core-backend": "4.0.0-dev.30",
34
+ "@itwin/core-bentley": "4.0.0-dev.30",
35
+ "@itwin/core-common": "4.0.0-dev.30",
36
+ "@itwin/core-frontend": "4.0.0-dev.30",
37
+ "@itwin/eslint-plugin": "4.0.0-dev.30",
38
+ "@itwin/presentation-common": "4.0.0-dev.30",
39
39
  "@types/chai": "4.3.1",
40
40
  "@types/mocha": "^8.2.2",
41
41
  "@types/node": "^18.11.5",