@proton-app/main 0.1.8 → 0.1.9

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/dist/files.d.ts CHANGED
@@ -9,4 +9,13 @@ type SystemFolder = Parameters<typeof app.getPath>[0];
9
9
  export declare const getSystemPath: (folder: SystemFolder, ...segments: string[]) => string;
10
10
  export declare const getUserDataPath: (...segments: string[]) => string;
11
11
  export declare const getAppDataPath: (...segments: string[]) => string;
12
+ /**
13
+ * Resolves a path inside the app's resources directory.
14
+ *
15
+ * Uses Electron's resources directory in packaged builds
16
+ * and the project's resources directory during development.
17
+ *
18
+ * @param segments - Path segments inside the resources directory.
19
+ **/
20
+ export declare const getResourcePath: (...segments: string[]) => string;
12
21
  export {};
package/dist/files.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAppDataPath = exports.getUserDataPath = exports.getSystemPath = void 0;
3
+ exports.getResourcePath = exports.getAppDataPath = exports.getUserDataPath = exports.getSystemPath = void 0;
4
4
  exports.choosePath = choosePath;
5
5
  const electron_1 = require("electron");
6
6
  const path_1 = require("path");
@@ -21,3 +21,13 @@ const getUserDataPath = (...segments) => (0, path_1.join)(electron_1.app.getPath
21
21
  exports.getUserDataPath = getUserDataPath;
22
22
  const getAppDataPath = (...segments) => (0, path_1.join)(electron_1.app.getPath("appData"), ...segments);
23
23
  exports.getAppDataPath = getAppDataPath;
24
+ /**
25
+ * Resolves a path inside the app's resources directory.
26
+ *
27
+ * Uses Electron's resources directory in packaged builds
28
+ * and the project's resources directory during development.
29
+ *
30
+ * @param segments - Path segments inside the resources directory.
31
+ **/
32
+ const getResourcePath = (...segments) => (0, path_1.join)(electron_1.app.isPackaged ? process.resourcesPath : (0, path_1.join)(electron_1.app.getAppPath(), "resources"), ...segments);
33
+ exports.getResourcePath = getResourcePath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proton-app/main",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
 
5
5
  "description": "",
6
6