@proton-app/main 0.0.6 → 0.0.7

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.
@@ -1,5 +1,5 @@
1
1
  import Storage from "electron-store";
2
- export declare function setupAppIpc<T extends Record<string, unknown>>(storage: Storage<T>): void;
2
+ export declare function setupAppIpc<T extends Record<string, any>>(storage: Storage<T>): void;
3
3
  export type IpcSchema = Record<string, Record<string, {
4
4
  input?: unknown;
5
5
  result: unknown;
@@ -30,6 +30,10 @@ function setupAppIpc(storage) {
30
30
  electron_1.ipcMain.handle("app:get-value", (_, key) => {
31
31
  return storage.get(key);
32
32
  });
33
+ electron_1.ipcMain.handle("app:set-value", (_, key, value) => {
34
+ storage.set(key, value);
35
+ return value;
36
+ });
33
37
  }
34
38
  class IpcManager {
35
39
  delimiter;
package/dist/ipc.d.ts CHANGED
@@ -11,6 +11,7 @@ declare global {
11
11
  choosePath: (opts: ChoosePathProps) => Promise<string | null>;
12
12
  openLink: (url: string) => void;
13
13
  getValue: <T>(key: string) => T;
14
+ setValue: <T>(key: string, value: T) => T;
14
15
  };
15
16
  }
16
17
  interface Window {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@proton-app/main",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "description": "",
6
6
  "keywords": [],
7
7
  "author": "",