ee-core 4.1.3 → 4.1.4

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.
Files changed (131) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +65 -65
  3. package/app/application.d.ts +5 -5
  4. package/app/application.js +30 -30
  5. package/app/boot.d.ts +5 -5
  6. package/app/boot.js +80 -80
  7. package/app/dir.d.ts +1 -1
  8. package/app/dir.js +26 -26
  9. package/app/events.d.ts +14 -14
  10. package/app/events.js +55 -55
  11. package/app/index.d.ts +2 -2
  12. package/app/index.js +6 -6
  13. package/config/config_loader.d.ts +13 -13
  14. package/config/config_loader.js +65 -65
  15. package/config/default_config.d.ts +95 -95
  16. package/config/default_config.js +111 -111
  17. package/config/index.d.ts +28 -28
  18. package/config/index.js +24 -24
  19. package/const/channel.d.ts +16 -16
  20. package/const/channel.js +27 -27
  21. package/controller/controller_loader.d.ts +9 -9
  22. package/controller/controller_loader.js +77 -77
  23. package/controller/index.d.ts +2 -2
  24. package/controller/index.js +24 -24
  25. package/core/index.d.ts +2 -2
  26. package/core/index.js +11 -11
  27. package/core/loader/file_loader.d.ts +66 -66
  28. package/core/loader/file_loader.js +211 -211
  29. package/core/utils/index.d.ts +12 -12
  30. package/core/utils/index.js +83 -83
  31. package/core/utils/timing.d.ts +22 -22
  32. package/core/utils/timing.js +78 -78
  33. package/cross/cross.d.ts +19 -19
  34. package/cross/cross.js +151 -151
  35. package/cross/crossProcess.d.ts +29 -29
  36. package/cross/crossProcess.js +172 -172
  37. package/cross/index.d.ts +2 -2
  38. package/cross/index.js +8 -8
  39. package/electron/app/index.d.ts +5 -5
  40. package/electron/app/index.js +48 -48
  41. package/electron/index.d.ts +3 -3
  42. package/electron/index.js +15 -15
  43. package/electron/window/index.d.ts +6 -6
  44. package/electron/window/index.js +268 -268
  45. package/exception/index.d.ts +9 -9
  46. package/exception/index.js +100 -100
  47. package/html/boot.html +98 -98
  48. package/html/cross-failure.html +28 -28
  49. package/html/failure.html +28 -28
  50. package/html/index.d.ts +1 -1
  51. package/html/index.js +10 -10
  52. package/index.d.ts +2 -2
  53. package/index.js +6 -6
  54. package/jobs/child/app.d.ts +1 -1
  55. package/jobs/child/app.js +69 -69
  56. package/jobs/child/index.d.ts +13 -13
  57. package/jobs/child/index.js +85 -85
  58. package/jobs/child/jobProcess.d.ts +16 -16
  59. package/jobs/child/jobProcess.js +133 -133
  60. package/jobs/child-pool/index.d.ts +26 -26
  61. package/jobs/child-pool/index.js +190 -190
  62. package/jobs/index.d.ts +3 -3
  63. package/jobs/index.js +6 -6
  64. package/jobs/load-balancer/algorithm/index.d.ts +4 -4
  65. package/jobs/load-balancer/algorithm/index.js +11 -11
  66. package/jobs/load-balancer/algorithm/minimumConnection.d.ts +2 -2
  67. package/jobs/load-balancer/algorithm/minimumConnection.js +18 -18
  68. package/jobs/load-balancer/algorithm/polling.d.ts +2 -2
  69. package/jobs/load-balancer/algorithm/polling.js +11 -11
  70. package/jobs/load-balancer/algorithm/random.d.ts +2 -2
  71. package/jobs/load-balancer/algorithm/random.js +9 -9
  72. package/jobs/load-balancer/algorithm/specify.d.ts +2 -2
  73. package/jobs/load-balancer/algorithm/specify.js +14 -14
  74. package/jobs/load-balancer/algorithm/weights.d.ts +2 -2
  75. package/jobs/load-balancer/algorithm/weights.js +21 -21
  76. package/jobs/load-balancer/algorithm/weightsMinimumConnection.d.ts +2 -2
  77. package/jobs/load-balancer/algorithm/weightsMinimumConnection.js +29 -29
  78. package/jobs/load-balancer/algorithm/weightsPolling.d.ts +2 -2
  79. package/jobs/load-balancer/algorithm/weightsPolling.js +22 -22
  80. package/jobs/load-balancer/algorithm/weightsRandom.d.ts +2 -2
  81. package/jobs/load-balancer/algorithm/weightsRandom.js +16 -16
  82. package/jobs/load-balancer/consts.d.ts +8 -8
  83. package/jobs/load-balancer/consts.js +9 -9
  84. package/jobs/load-balancer/index.d.ts +96 -96
  85. package/jobs/load-balancer/index.js +201 -201
  86. package/jobs/load-balancer/scheduler.d.ts +16 -16
  87. package/jobs/load-balancer/scheduler.js +31 -31
  88. package/loader/index.d.ts +9 -9
  89. package/loader/index.js +99 -98
  90. package/log/index.d.ts +5 -5
  91. package/log/index.js +85 -85
  92. package/log/logger.d.ts +1 -1
  93. package/log/logger.js +94 -94
  94. package/message/childMessage.d.ts +10 -10
  95. package/message/childMessage.js +43 -43
  96. package/message/index.d.ts +3 -3
  97. package/message/index.js +9 -9
  98. package/package.json +42 -42
  99. package/ps/index.d.ts +39 -39
  100. package/ps/index.js +294 -294
  101. package/socket/httpServer.d.ts +8 -8
  102. package/socket/httpServer.js +199 -199
  103. package/socket/index.d.ts +10 -10
  104. package/socket/index.js +64 -64
  105. package/socket/ipcServer.d.ts +9 -9
  106. package/socket/ipcServer.js +105 -105
  107. package/socket/socketServer.d.ts +10 -10
  108. package/socket/socketServer.js +81 -81
  109. package/storage/index.d.ts +4 -4
  110. package/storage/index.js +6 -6
  111. package/storage/sqliteStorage.d.ts +16 -16
  112. package/storage/sqliteStorage.js +123 -123
  113. package/tsconfig.json +13 -13
  114. package/utils/extend.d.ts +2 -2
  115. package/utils/extend.js +77 -77
  116. package/utils/helper.d.ts +14 -14
  117. package/utils/helper.js +206 -206
  118. package/utils/index.d.ts +10 -10
  119. package/utils/index.js +167 -167
  120. package/utils/ip.d.ts +2 -2
  121. package/utils/ip.js +221 -221
  122. package/utils/is.d.ts +14 -14
  123. package/utils/is.js +111 -111
  124. package/utils/json.d.ts +5 -5
  125. package/utils/json.js +79 -79
  126. package/utils/pargv.d.ts +3 -3
  127. package/utils/pargv.js +267 -267
  128. package/utils/port/index.d.ts +1 -1
  129. package/utils/port/index.js +125 -125
  130. package/utils/wrap.d.ts +4 -4
  131. package/utils/wrap.js +40 -40
@@ -1,173 +1,173 @@
1
- 'use strict';
2
-
3
- const EventEmitter = require('events');
4
- const path = require('path');
5
- const crossSpawn = require('cross-spawn');
6
- const { coreLogger } = require('../log');
7
- const { getExtraResourcesDir, isPackaged, isDev, getBaseDir } = require('../ps');
8
- const { Events } = require('../const/channel');
9
- const { getRandomString, getValueFromArgv } = require('../utils/helper');
10
- const { is } = require('../utils');
11
- const { parseArgv } = require('../utils/pargv');
12
- const { app: electronApp } = require('electron');
13
- const tkill = require('tree-kill');
14
-
15
- class CrossProcess {
16
- constructor(host, opt = {}) {
17
- this.emitter = new EventEmitter();
18
- this.host = host;
19
- this.child = undefined;
20
- this.pid = 0;
21
- this.port = 0;
22
- this.name = "";
23
- this.config = {};
24
- this._init(opt);
25
- }
26
-
27
- /**
28
- * 初始化子进程
29
- */
30
- _init(options = {}) {
31
- const { targetConf, port } = options;
32
- this.config = targetConf;
33
- this.port = port;
34
-
35
- // 该名称如果在childrenMap重复,会被重写
36
- this.name = targetConf.name;
37
-
38
- // Launch executable program
39
- let cmdPath = '';
40
- let cmdArgs = targetConf.args;
41
- let execDir = getExtraResourcesDir();
42
- let standardOutput = ['inherit', 'inherit', 'inherit', 'ipc'];
43
- if (isPackaged()) {
44
- standardOutput = ['ignore', 'ignore', 'ignore', 'ipc'];
45
- }
46
- if (targetConf.stdio) {
47
- standardOutput = targetConf.stdio;
48
- }
49
-
50
- const { cmd, directory } = targetConf;
51
- // use cmd first
52
- if (cmd) {
53
- if (!directory) {
54
- throw new Error(`[ee-core] [cross] The config [directory] attribute does not exist`);
55
- }
56
- cmdPath = cmd;
57
- if (!path.isAbsolute(cmd) && !isDev()) {
58
- cmdPath = path.join(getExtraResourcesDir(), cmd);
59
- }
60
- } else {
61
- cmdPath = path.join(getExtraResourcesDir(), targetConf.name);
62
- }
63
-
64
- // windows
65
- if (is.windows() && path.extname(cmdPath) != '.exe') {
66
- // Complete the executable program extension
67
- // notice: python.exe may bring up the App Store
68
- if (targetConf.windowsExtname === true || !isDev()) {
69
- cmdPath += ".exe";
70
- }
71
- }
72
-
73
- // executable program directory
74
- if (directory && path.isAbsolute(directory)) {
75
- execDir = directory;
76
- } else if (directory && !path.isAbsolute(directory)) {
77
- if (isDev()) {
78
- execDir = path.join(getBaseDir(), directory);
79
- } else {
80
- execDir = path.join(getExtraResourcesDir(), directory);
81
- }
82
- } else {
83
- execDir = getExtraResourcesDir();
84
- }
85
-
86
- coreLogger.info(`[ee-core] [cross/run] cmd: ${cmdPath}, args: ${cmdArgs}`);
87
- const coreProcess = crossSpawn(cmdPath, cmdArgs, {
88
- stdio: standardOutput,
89
- detached: false,
90
- cwd: execDir,
91
- maxBuffer: 1024 * 1024 * 1024
92
- });
93
- this.child = coreProcess;
94
- this.pid = coreProcess.pid;
95
-
96
- coreProcess.on('exit', (code, signal) => {
97
- let data = {
98
- pid: this.pid
99
- }
100
- this.host.emitter.emit(Events.childProcessExit, data);
101
- // Child process closed: The child process was killed externally or an internal error caused the application to stop, resulting in the application exiting
102
- coreLogger.info(`[ee-core] [corss/process] received a exit from child-process, code:${code}, signal:${signal}, pid:${this.pid}, cmd:${cmdPath}, args: ${cmdArgs}`);
103
- this._exitElectron();
104
- });
105
-
106
- coreProcess.on('error', (err) => {
107
- let data = {
108
- pid: this.pid
109
- }
110
- this.host.emitter.emit(Events.childProcessError, data);
111
- coreLogger.error(`[ee-core] [corss/process] received a error from child-process, error: ${err}, pid:${this.pid}`);
112
- this._exitElectron();
113
- });
114
- }
115
-
116
- /**
117
- * kill
118
- */
119
- kill(timeout = 1000) {
120
- tkill(this.pid, 'SIGINT', (err) => {
121
- if (err) {
122
- coreLogger.error(`[ee-core] [corss/process] kill cross-process, error: ${err}, pid:${this.pid}`);
123
- tkill(this.pid, 'SIGKILL');
124
- }
125
- setTimeout(() => {
126
- this._exitElectron();
127
- }, timeout)
128
- })
129
- }
130
-
131
- getUrl() {
132
- const ssl = getValueFromArgv(this.config.args, 'ssl');
133
- let hostname = getValueFromArgv(this.config.args, 'hostname')
134
- let protocol = 'http://';
135
- if (ssl && (ssl == 'true' || ssl == '1')) {
136
- protocol = 'https://';
137
- }
138
- hostname = hostname ? hostname : '127.0.0.1';
139
- const url = protocol + hostname + ":" + this.port;
140
-
141
- return url;
142
- }
143
-
144
- getArgsObj() {
145
- const obj = parseArgv(this.config.args);
146
- return obj;
147
- }
148
-
149
- setPort(port) {
150
- this.port = parseInt(port);
151
- }
152
-
153
- _generateId() {
154
- const rid = getRandomString();
155
- return `node:${this.pid}:${rid}`;
156
- }
157
-
158
- /**
159
- * exit electron
160
- */
161
- _exitElectron(timeout = 1000) {
162
- if (this.config.appExit) {
163
- setTimeout(() => {
164
- // 主进程退出
165
- electronApp.quit();
166
- }, timeout)
167
- }
168
- }
169
- }
170
-
171
- module.exports = {
172
- CrossProcess
1
+ 'use strict';
2
+
3
+ const EventEmitter = require('events');
4
+ const path = require('path');
5
+ const crossSpawn = require('cross-spawn');
6
+ const { coreLogger } = require('../log');
7
+ const { getExtraResourcesDir, isPackaged, isDev, getBaseDir } = require('../ps');
8
+ const { Events } = require('../const/channel');
9
+ const { getRandomString, getValueFromArgv } = require('../utils/helper');
10
+ const { is } = require('../utils');
11
+ const { parseArgv } = require('../utils/pargv');
12
+ const { app: electronApp } = require('electron');
13
+ const tkill = require('tree-kill');
14
+
15
+ class CrossProcess {
16
+ constructor(host, opt = {}) {
17
+ this.emitter = new EventEmitter();
18
+ this.host = host;
19
+ this.child = undefined;
20
+ this.pid = 0;
21
+ this.port = 0;
22
+ this.name = "";
23
+ this.config = {};
24
+ this._init(opt);
25
+ }
26
+
27
+ /**
28
+ * 初始化子进程
29
+ */
30
+ _init(options = {}) {
31
+ const { targetConf, port } = options;
32
+ this.config = targetConf;
33
+ this.port = port;
34
+
35
+ // 该名称如果在childrenMap重复,会被重写
36
+ this.name = targetConf.name;
37
+
38
+ // Launch executable program
39
+ let cmdPath = '';
40
+ let cmdArgs = targetConf.args;
41
+ let execDir = getExtraResourcesDir();
42
+ let standardOutput = ['inherit', 'inherit', 'inherit', 'ipc'];
43
+ if (isPackaged()) {
44
+ standardOutput = ['ignore', 'ignore', 'ignore', 'ipc'];
45
+ }
46
+ if (targetConf.stdio) {
47
+ standardOutput = targetConf.stdio;
48
+ }
49
+
50
+ const { cmd, directory } = targetConf;
51
+ // use cmd first
52
+ if (cmd) {
53
+ if (!directory) {
54
+ throw new Error(`[ee-core] [cross] The config [directory] attribute does not exist`);
55
+ }
56
+ cmdPath = cmd;
57
+ if (!path.isAbsolute(cmd) && !isDev()) {
58
+ cmdPath = path.join(getExtraResourcesDir(), cmd);
59
+ }
60
+ } else {
61
+ cmdPath = path.join(getExtraResourcesDir(), targetConf.name);
62
+ }
63
+
64
+ // windows
65
+ if (is.windows() && path.extname(cmdPath) != '.exe') {
66
+ // Complete the executable program extension
67
+ // notice: python.exe may bring up the App Store
68
+ if (targetConf.windowsExtname === true || !isDev()) {
69
+ cmdPath += ".exe";
70
+ }
71
+ }
72
+
73
+ // executable program directory
74
+ if (directory && path.isAbsolute(directory)) {
75
+ execDir = directory;
76
+ } else if (directory && !path.isAbsolute(directory)) {
77
+ if (isDev()) {
78
+ execDir = path.join(getBaseDir(), directory);
79
+ } else {
80
+ execDir = path.join(getExtraResourcesDir(), directory);
81
+ }
82
+ } else {
83
+ execDir = getExtraResourcesDir();
84
+ }
85
+
86
+ coreLogger.info(`[ee-core] [cross/run] cmd: ${cmdPath}, args: ${cmdArgs}`);
87
+ const coreProcess = crossSpawn(cmdPath, cmdArgs, {
88
+ stdio: standardOutput,
89
+ detached: false,
90
+ cwd: execDir,
91
+ maxBuffer: 1024 * 1024 * 1024
92
+ });
93
+ this.child = coreProcess;
94
+ this.pid = coreProcess.pid;
95
+
96
+ coreProcess.on('exit', (code, signal) => {
97
+ let data = {
98
+ pid: this.pid
99
+ }
100
+ this.host.emitter.emit(Events.childProcessExit, data);
101
+ // Child process closed: The child process was killed externally or an internal error caused the application to stop, resulting in the application exiting
102
+ coreLogger.info(`[ee-core] [corss/process] received a exit from child-process, code:${code}, signal:${signal}, pid:${this.pid}, cmd:${cmdPath}, args: ${cmdArgs}`);
103
+ this._exitElectron();
104
+ });
105
+
106
+ coreProcess.on('error', (err) => {
107
+ let data = {
108
+ pid: this.pid
109
+ }
110
+ this.host.emitter.emit(Events.childProcessError, data);
111
+ coreLogger.error(`[ee-core] [corss/process] received a error from child-process, error: ${err}, pid:${this.pid}`);
112
+ this._exitElectron();
113
+ });
114
+ }
115
+
116
+ /**
117
+ * kill
118
+ */
119
+ kill(timeout = 1000) {
120
+ tkill(this.pid, 'SIGINT', (err) => {
121
+ if (err) {
122
+ coreLogger.error(`[ee-core] [corss/process] kill cross-process, error: ${err}, pid:${this.pid}`);
123
+ tkill(this.pid, 'SIGKILL');
124
+ }
125
+ setTimeout(() => {
126
+ this._exitElectron();
127
+ }, timeout)
128
+ })
129
+ }
130
+
131
+ getUrl() {
132
+ const ssl = getValueFromArgv(this.config.args, 'ssl');
133
+ let hostname = getValueFromArgv(this.config.args, 'hostname')
134
+ let protocol = 'http://';
135
+ if (ssl && (ssl == 'true' || ssl == '1')) {
136
+ protocol = 'https://';
137
+ }
138
+ hostname = hostname ? hostname : '127.0.0.1';
139
+ const url = protocol + hostname + ":" + this.port;
140
+
141
+ return url;
142
+ }
143
+
144
+ getArgsObj() {
145
+ const obj = parseArgv(this.config.args);
146
+ return obj;
147
+ }
148
+
149
+ setPort(port) {
150
+ this.port = parseInt(port);
151
+ }
152
+
153
+ _generateId() {
154
+ const rid = getRandomString();
155
+ return `node:${this.pid}:${rid}`;
156
+ }
157
+
158
+ /**
159
+ * exit electron
160
+ */
161
+ _exitElectron(timeout = 1000) {
162
+ if (this.config.appExit) {
163
+ setTimeout(() => {
164
+ // 主进程退出
165
+ electronApp.quit();
166
+ }, timeout)
167
+ }
168
+ }
169
+ }
170
+
171
+ module.exports = {
172
+ CrossProcess
173
173
  };
package/cross/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { Cross, cross } from "./cross";
2
- export { Cross, cross };
1
+ import { Cross, cross } from "./cross";
2
+ export { Cross, cross };
package/cross/index.js CHANGED
@@ -1,8 +1,8 @@
1
- 'use strict';
2
-
3
- const { Cross, cross} = require('./cross');
4
-
5
- module.exports = {
6
- Cross,
7
- cross
8
- };
1
+ 'use strict';
2
+
3
+ const { Cross, cross} = require('./cross');
4
+
5
+ module.exports = {
6
+ Cross,
7
+ cross
8
+ };
@@ -1,5 +1,5 @@
1
- /**
2
- * 创建electron应用
3
- */
4
- export declare function createElectron(): void;
5
- export { electronApp };
1
+ /**
2
+ * 创建electron应用
3
+ */
4
+ export declare function createElectron(): void;
5
+ export { electronApp };
@@ -1,48 +1,48 @@
1
- 'use strict';
2
-
3
- const { app: electronApp } = require('electron');
4
- const { coreLogger } = require('../../log');
5
- const { is } = require('../../utils');
6
- const { cross } = require('../../cross');
7
- const { createMainWindow, setCloseAndQuit, loadServer } = require('../window');
8
- const { eventBus, ElectronAppReady, BeforeClose, Preload } = require('../../app/events');
9
- const { getConfig } = require('../../config');
10
-
11
- /**
12
- * 创建electron应用
13
- */
14
- function createElectron() {
15
- const { singleLock } = getConfig();
16
- // 允许多个实例
17
- const gotTheLock = electronApp.requestSingleInstanceLock();
18
- if (singleLock && !gotTheLock) {
19
- electronApp.quit();
20
- return;
21
- }
22
-
23
- electronApp.whenReady().then(() => {
24
- createMainWindow();
25
- eventBus.emitLifecycle(Preload);
26
- loadServer();
27
- })
28
-
29
- electronApp.on('window-all-closed', () => {
30
- if (!is.macOS()) {
31
- coreLogger.info('[ee-core] [lib/eeApp] window-all-closed quit');
32
- electronApp.quit();
33
- }
34
- })
35
-
36
- electronApp.on('before-quit', () => {
37
- setCloseAndQuit(true);
38
- eventBus.emitLifecycle(BeforeClose);
39
- cross.killAll();
40
- })
41
-
42
- eventBus.emitLifecycle(ElectronAppReady);
43
- }
44
-
45
- module.exports = {
46
- electronApp,
47
- createElectron,
48
- };
1
+ 'use strict';
2
+
3
+ const { app: electronApp } = require('electron');
4
+ const { coreLogger } = require('../../log');
5
+ const { is } = require('../../utils');
6
+ const { cross } = require('../../cross');
7
+ const { createMainWindow, setCloseAndQuit, loadServer } = require('../window');
8
+ const { eventBus, ElectronAppReady, BeforeClose, Preload } = require('../../app/events');
9
+ const { getConfig } = require('../../config');
10
+
11
+ /**
12
+ * 创建electron应用
13
+ */
14
+ function createElectron() {
15
+ const { singleLock } = getConfig();
16
+ // 允许多个实例
17
+ const gotTheLock = electronApp.requestSingleInstanceLock();
18
+ if (singleLock && !gotTheLock) {
19
+ electronApp.quit();
20
+ return;
21
+ }
22
+
23
+ electronApp.whenReady().then(() => {
24
+ createMainWindow();
25
+ eventBus.emitLifecycle(Preload);
26
+ loadServer();
27
+ })
28
+
29
+ electronApp.on('window-all-closed', () => {
30
+ if (!is.macOS()) {
31
+ coreLogger.info('[ee-core] [lib/eeApp] window-all-closed quit');
32
+ electronApp.quit();
33
+ }
34
+ })
35
+
36
+ electronApp.on('before-quit', () => {
37
+ setCloseAndQuit(true);
38
+ eventBus.emitLifecycle(BeforeClose);
39
+ cross.killAll();
40
+ })
41
+
42
+ eventBus.emitLifecycle(ElectronAppReady);
43
+ }
44
+
45
+ module.exports = {
46
+ electronApp,
47
+ createElectron,
48
+ };
@@ -1,3 +1,3 @@
1
- import { getMainWindow, setCloseAndQuit, getCloseAndQuit } from "./window";
2
- export declare function loadElectron(): void;
3
- export { getMainWindow, setCloseAndQuit, getCloseAndQuit };
1
+ import { getMainWindow, setCloseAndQuit, getCloseAndQuit } from "./window";
2
+ export declare function loadElectron(): void;
3
+ export { getMainWindow, setCloseAndQuit, getCloseAndQuit };
package/electron/index.js CHANGED
@@ -1,16 +1,16 @@
1
- 'use strict';
2
-
3
- const { createElectron } = require("./app");
4
- const { getMainWindow, setCloseAndQuit, getCloseAndQuit } = require("./window");
5
-
6
- // load socket server
7
- function loadElectron() {
8
- createElectron();
9
- }
10
-
11
- module.exports = {
12
- loadElectron,
13
- getMainWindow,
14
- setCloseAndQuit,
15
- getCloseAndQuit
1
+ 'use strict';
2
+
3
+ const { createElectron } = require("./app");
4
+ const { getMainWindow, setCloseAndQuit, getCloseAndQuit } = require("./window");
5
+
6
+ // load socket server
7
+ function loadElectron() {
8
+ createElectron();
9
+ }
10
+
11
+ module.exports = {
12
+ loadElectron,
13
+ getMainWindow,
14
+ setCloseAndQuit,
15
+ getCloseAndQuit
16
16
  };
@@ -1,6 +1,6 @@
1
- export declare function getMainWindow(): any;
2
- export declare function createMainWindow(): any;
3
- export declare function restoreMainWindow(): void;
4
- export declare function setCloseAndQuit(flag: any): void;
5
- export declare function getCloseAndQuit(): boolean;
6
- export declare function loadServer(): Promise<void>;
1
+ export declare function getMainWindow(): any;
2
+ export declare function createMainWindow(): any;
3
+ export declare function restoreMainWindow(): void;
4
+ export declare function setCloseAndQuit(flag: any): void;
5
+ export declare function getCloseAndQuit(): boolean;
6
+ export declare function loadServer(): Promise<void>;