2024-02-08 18:00:19 +01:00
|
|
|
import { contextBridge } from "electron";
|
|
|
|
|
2023-11-09 12:48:18 +01:00
|
|
|
import auth from "./auth/preload";
|
2024-09-30 18:14:32 +02:00
|
|
|
import keyManagement from "./key-management/preload";
|
2023-10-12 11:50:17 +02:00
|
|
|
import platform from "./platform/preload";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bitwarden Preload script.
|
|
|
|
*
|
|
|
|
* This file contains the "glue" between the main process and the renderer process. Please ensure
|
|
|
|
* that you have read through the following articles before modifying any preload script.
|
|
|
|
*
|
|
|
|
* https://www.electronjs.org/docs/latest/tutorial/tutorial-preload
|
|
|
|
* https://www.electronjs.org/docs/latest/api/context-bridge
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Each team owns a subspace of the `ipc` global variable in the renderer.
|
|
|
|
export const ipc = {
|
2023-11-09 12:48:18 +01:00
|
|
|
auth,
|
2023-10-12 11:50:17 +02:00
|
|
|
platform,
|
2024-09-30 18:14:32 +02:00
|
|
|
keyManagement,
|
2023-10-12 11:50:17 +02:00
|
|
|
};
|
|
|
|
|
2024-02-08 18:00:19 +01:00
|
|
|
contextBridge.exposeInMainWorld("ipc", ipc);
|