@dimensional-innovations/electron-background 2.0.7 → 2.0.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/BrowserWindow.js +5 -1
- package/dist/DevTools.d.ts +12 -3
- package/dist/DevTools.js +12 -6
- package/package.json +5 -3
package/dist/BrowserWindow.js
CHANGED
|
@@ -31,9 +31,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
34
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
38
|
exports.FullScreenBrowserWindow = exports.KioskBrowserWindow = exports.DefaultBrowserWindow = void 0;
|
|
36
39
|
const electron_1 = require("electron");
|
|
40
|
+
const lodash_merge_1 = __importDefault(require("lodash.merge"));
|
|
37
41
|
/**
|
|
38
42
|
* Applies default options to the browser window. If `appHeight`, `appWidth`, or `backgroundColor` are included in
|
|
39
43
|
* app config, they will be added to the window options as well.
|
|
@@ -49,7 +53,7 @@ class DefaultBrowserWindow {
|
|
|
49
53
|
}
|
|
50
54
|
afterReady(context) {
|
|
51
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
context.browserWindowOptions =
|
|
56
|
+
context.browserWindowOptions = (0, lodash_merge_1.default)({}, this.getDefaultWindowOptions(), this.getWindowOptionsFromConfig(context.config), context.browserWindowOptions, this.options, { closable: true });
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
59
|
getDefaultWindowOptions() {
|
package/dist/DevTools.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExtensionReference } from 'electron-devtools-installer';
|
|
2
2
|
import { BrowserWindowInitContext, InitPlugin } from './init';
|
|
3
|
-
export type Extension =
|
|
3
|
+
export type Extension = ExtensionReference;
|
|
4
|
+
export declare const DevToolExtensions: {
|
|
5
|
+
readonly EMBER_INSPECTOR: ExtensionReference;
|
|
6
|
+
readonly REACT_DEVELOPER_TOOLS: ExtensionReference;
|
|
7
|
+
readonly BACKBONE_DEBUGGER: ExtensionReference;
|
|
8
|
+
readonly JQUERY_DEBUGGER: ExtensionReference;
|
|
9
|
+
readonly VUEJS_DEVTOOLS: ExtensionReference;
|
|
10
|
+
readonly REDUX_DEVTOOLS: ExtensionReference;
|
|
11
|
+
readonly MOBX_DEVTOOLS: ExtensionReference;
|
|
12
|
+
};
|
|
4
13
|
/**
|
|
5
14
|
* Installs dev tools extensions and opens the devTools panel.
|
|
6
15
|
*/
|
|
@@ -13,6 +22,6 @@ export declare class DevTools implements InitPlugin {
|
|
|
13
22
|
* @param devTools - The extensions to install.
|
|
14
23
|
* @param enabled - Indicates if the plugin is enabled. Used to disable the plugin when the app is packaged. Defaults to `!app.isPackaged`.
|
|
15
24
|
*/
|
|
16
|
-
constructor(devTools: Array<
|
|
25
|
+
constructor(devTools: Array<ExtensionReference>, enabled?: boolean);
|
|
17
26
|
beforeLoad({ browserWindow }: BrowserWindowInitContext): Promise<void>;
|
|
18
27
|
}
|
package/dist/DevTools.js
CHANGED
|
@@ -8,13 +8,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.DevTools = void 0;
|
|
12
|
+
exports.DevTools = exports.DevToolExtensions = void 0;
|
|
16
13
|
const electron_1 = require("electron");
|
|
17
|
-
const electron_devtools_installer_1 =
|
|
14
|
+
const electron_devtools_installer_1 = require("electron-devtools-installer");
|
|
15
|
+
exports.DevToolExtensions = {
|
|
16
|
+
EMBER_INSPECTOR: electron_devtools_installer_1.EMBER_INSPECTOR,
|
|
17
|
+
REACT_DEVELOPER_TOOLS: electron_devtools_installer_1.REACT_DEVELOPER_TOOLS,
|
|
18
|
+
BACKBONE_DEBUGGER: electron_devtools_installer_1.BACKBONE_DEBUGGER,
|
|
19
|
+
JQUERY_DEBUGGER: electron_devtools_installer_1.JQUERY_DEBUGGER,
|
|
20
|
+
VUEJS_DEVTOOLS: electron_devtools_installer_1.VUEJS_DEVTOOLS,
|
|
21
|
+
REDUX_DEVTOOLS: electron_devtools_installer_1.REDUX_DEVTOOLS,
|
|
22
|
+
MOBX_DEVTOOLS: electron_devtools_installer_1.MOBX_DEVTOOLS,
|
|
23
|
+
};
|
|
18
24
|
/**
|
|
19
25
|
* Installs dev tools extensions and opens the devTools panel.
|
|
20
26
|
*/
|
|
@@ -36,7 +42,7 @@ class DevTools {
|
|
|
36
42
|
}
|
|
37
43
|
browserWindow.on('ready-to-show', () => browserWindow.webContents.openDevTools());
|
|
38
44
|
try {
|
|
39
|
-
yield (0, electron_devtools_installer_1.
|
|
45
|
+
yield (0, electron_devtools_installer_1.installExtension)(this.devTools);
|
|
40
46
|
}
|
|
41
47
|
catch (error) {
|
|
42
48
|
console.error(`Failed to install dev tools: ${this.devTools.join(',')}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimensional-innovations/electron-background",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "the background script for electron apps",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,11 +31,13 @@
|
|
|
31
31
|
"homepage": "https://github.com/ditech/electron-background",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"axios": "^1.6.7",
|
|
34
|
-
"electron-devtools-installer": "^
|
|
34
|
+
"electron-devtools-installer": "^4.0.0",
|
|
35
35
|
"electron-log": "^5.1.1",
|
|
36
|
-
"electron-updater": "^6.1.7"
|
|
36
|
+
"electron-updater": "^6.1.7",
|
|
37
|
+
"lodash.merge": "^4.6.2"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
40
|
+
"@types/lodash.merge": "^4.6.9",
|
|
39
41
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
40
42
|
"@typescript-eslint/parser": "^6.21.0",
|
|
41
43
|
"electron": "^28.2.1",
|