@openfin/core 27.71.2 → 27.71.5
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/OpenFin.d.ts +3 -1
- package/package.json +1 -1
- package/src/util/normalize-config.js +6 -1
package/OpenFin.d.ts
CHANGED
|
@@ -254,6 +254,8 @@ declare namespace OpenFin {
|
|
|
254
254
|
|
|
255
255
|
export type WindowOptions = MutableWindowOptions & ConstWindowOptions;
|
|
256
256
|
|
|
257
|
+
export type WindowState = 'maximized' | 'minimized' | 'normal';
|
|
258
|
+
|
|
257
259
|
export type ConstWindowOptions = {
|
|
258
260
|
accelerator: Partial<Accelerator>;
|
|
259
261
|
api: Api;
|
|
@@ -281,7 +283,7 @@ declare namespace OpenFin {
|
|
|
281
283
|
saveWindowState: boolean;
|
|
282
284
|
shadow: boolean;
|
|
283
285
|
smallWindow: boolean;
|
|
284
|
-
state:
|
|
286
|
+
state: WindowState;
|
|
285
287
|
taskbarIcon: string;
|
|
286
288
|
taskbarIconGroup: string;
|
|
287
289
|
url: string;
|
package/package.json
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateConfig = exports.normalizeConfig = void 0;
|
|
4
4
|
const fs = require("fs");
|
|
5
|
+
const url_1 = require("url");
|
|
5
6
|
const wire_1 = require("../transport/wire");
|
|
6
7
|
const promises_1 = require("./promises");
|
|
7
8
|
const http_1 = require("./http");
|
|
8
9
|
async function readLocalConfig(location) {
|
|
9
|
-
|
|
10
|
+
let pathToFile = location;
|
|
11
|
+
if (location.startsWith('file')) {
|
|
12
|
+
pathToFile = url_1.fileURLToPath(location);
|
|
13
|
+
}
|
|
14
|
+
const txt = await promises_1.promisify(fs.readFile)(pathToFile);
|
|
10
15
|
return JSON.parse(txt.toString());
|
|
11
16
|
}
|
|
12
17
|
async function loadConfig(config) {
|