@bouko/electron 1.0.6 → 1.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.
@@ -0,0 +1,2 @@
1
+ export * from "./dialog";
2
+ export * from "./paths";
@@ -0,0 +1,2 @@
1
+ export * from "./dialog";
2
+ export * from "./paths";
@@ -1 +1,2 @@
1
1
  export declare const getUserDataPath: (x: string) => string;
2
+ export declare const getAppDataPath: (x: string) => string;
@@ -1,3 +1,4 @@
1
1
  import { app } from "electron";
2
2
  import { join } from "path";
3
3
  export const getUserDataPath = (x) => join(app.getPath("userData"), x);
4
+ export const getAppDataPath = (x) => join(app.getPath("appData"), x);
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from "./ipc";
2
2
  export * from "./csp";
3
- export * from "./files";
3
+ export * from "./files/_";
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from "./ipc";
2
2
  export * from "./csp";
3
- export * from "./files";
3
+ export * from "./files/_";
package/dist/ipc/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ipcMain, BrowserWindow } from "electron";
1
+ import { ipcMain, BrowserWindow, shell } from "electron";
2
2
  import { choosePath } from "../files/dialog";
3
3
  export class IpcManager {
4
4
  id;
@@ -18,7 +18,11 @@ export function setupAppIpc() {
18
18
  const window = BrowserWindow.fromWebContents(event.sender);
19
19
  window?.close();
20
20
  });
21
- ipcMain.on("app:choose-path", async (event) => {
21
+ ipcMain.on("app:open", (_, url) => {
22
+ if (url)
23
+ shell.openExternal(url);
24
+ });
25
+ ipcMain.handle("app:choose-path", async (event) => {
22
26
  const window = BrowserWindow.fromWebContents(event.sender);
23
27
  if (!window)
24
28
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@bouko/electron",
4
- "version": "1.0.6",
4
+ "version": "1.0.7",
5
5
  "description": "",
6
6
  "keywords": [],
7
7
  "author": "",