ee-core 2.0.0-beta.2 → 2.0.0-beta.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 (59) hide show
  1. package/index.js +12 -13
  2. package/{lib → module/app}/application.js +2 -2
  3. package/{lib → module/app}/baseApp.js +3 -3
  4. package/{lib → module/app}/eeApp.js +7 -7
  5. package/module/app/index.js +5 -0
  6. package/{bin → module/bin}/tools.js +1 -1
  7. package/{config → module/config}/config.default.js +2 -3
  8. package/module/const/channel.js +6 -0
  9. package/{core → module/core}/index.js +0 -2
  10. package/{core → module/core}/lib/ee.js +0 -2
  11. package/{core → module/core}/lib/loader/context_loader.js +2 -2
  12. package/{core → module/core}/lib/loader/ee_loader.js +5 -5
  13. package/{core → module/core}/lib/loader/file_loader.js +6 -6
  14. package/{core → module/core}/lib/loader/mixin/addon.js +1 -1
  15. package/{core → module/core}/lib/loader/mixin/config.js +1 -1
  16. package/{core → module/core}/lib/loader/mixin/controller.js +8 -8
  17. package/module/core/lib/utils/base_context_class.js +34 -0
  18. package/module/exception/index.js +75 -6
  19. package/module/httpclient/index.js +2 -2
  20. package/module/jobs/baseJobClass.js +16 -0
  21. package/module/jobs/child/app.js +53 -13
  22. package/module/jobs/child/forkProcess.js +33 -76
  23. package/module/jobs/child/index.js +69 -26
  24. package/module/jobs/childPool/app.js +68 -0
  25. package/module/jobs/childPool/forkProcess.js +81 -0
  26. package/module/jobs/childPool/index.js +71 -0
  27. package/module/jobs/childPool/pool.js +67 -0
  28. package/module/jobs/index.js +5 -54
  29. package/module/jobs/renderer/loadView.js +1 -1
  30. package/module/jobs/unification.js +64 -0
  31. package/module/loader/index.js +36 -14
  32. package/module/log/logger.js +1 -1
  33. package/module/message/childMessage.js +31 -0
  34. package/module/message/index.js +17 -9
  35. package/{utils → module/oldUtils}/index.js +6 -29
  36. package/module/{utils/ps.js → ps/index.js} +45 -0
  37. package/module/service/index.js +34 -0
  38. package/module/socket/httpServer.js +4 -3
  39. package/module/socket/io.js +2 -2
  40. package/module/socket/ipcServer.js +4 -7
  41. package/module/socket/socketClient.js +2 -5
  42. package/module/socket/socketServer.js +4 -6
  43. package/module/storage/jsondbStorage.js +1 -1
  44. package/module/storage/sqliteStorage.js +1 -1
  45. package/{tools → module/tools}/encrypt.js +10 -10
  46. package/{tools → module/tools}/replaceDist.js +6 -6
  47. package/module/utils/helper.js +0 -1
  48. package/module/utils/index.js +2 -36
  49. package/package.json +3 -2
  50. package/module/message/ipcMain.js +0 -160
  51. package/module/message/ipcRender.js +0 -0
  52. /package/{addon → module/addon}/window/index.js +0 -0
  53. /package/{lib → module/app}/appLoader.js +0 -0
  54. /package/{core/lib/utils/base_context_class.js → module/controller/index.js} +0 -0
  55. /package/{core → module/core}/lib/loader/mixin/service.js +0 -0
  56. /package/{core → module/core}/lib/utils/function.js +0 -0
  57. /package/{core → module/core}/lib/utils/index.js +0 -0
  58. /package/{core → module/core}/lib/utils/sequencify.js +0 -0
  59. /package/{core → module/core}/lib/utils/timing.js +0 -0
@@ -1,104 +1,61 @@
1
1
  const path = require('path');
2
2
  const { fork } = require('child_process');
3
+ const serialize = require('serialize-javascript');
4
+ const Log = require('../../log');
5
+ const Ps = require('../../ps');
6
+ const Channel = require('../../const/channel');
3
7
 
4
8
  class ForkProcess {
5
- constructor(host, modulePath, processArgs = [], processOptions = {}) {
9
+ constructor(host, opt = {}) {
10
+
11
+ let options = Object.assign({
12
+ processOptions: {
13
+ cwd: Ps.getHomeDir(),
14
+ env: Ps.allEnv(),
15
+ stdio: 'pipe'
16
+ }
17
+ }, opt);
18
+
6
19
  this.host = host;
7
- this.modulePath = modulePath;
8
- this.args;
9
- this.options = processOptions;
20
+ this.args = [];
10
21
  this.sleeping = false;
11
- this.activitiesCount = 0;
12
- this.activitiesMap = new Map();
13
22
 
14
23
  // 传递给子进程的参数
15
- let scriptArgs = {
16
- jobPath: modulePath
17
- }
18
- processArgs.push(JSON.stringify(scriptArgs));
19
- this.args = processArgs;
20
-
24
+ //this.args.push(JSON.stringify(options.params));
25
+
21
26
  const appPath = path.join(__dirname, 'app.js');
22
- this.child = fork(appPath, this.args, this.options);
27
+ this.child = fork(appPath, this.args, options.processOptions);
23
28
 
24
29
  this.pid = this.child.pid;
25
30
  this._init();
26
31
  }
27
32
 
28
- /**
29
- * 进程挂起
30
- */
31
- sleep() {
32
- if (this.activitiesCount) {
33
- if (this.sleeping) return;
34
- process.kill(this.pid, 'SIGSTOP');
35
- this.sleeping = true;
36
- }
37
- }
38
-
39
- /**
40
- * 进程唤醒
41
- */
42
- wakeup() {
43
- if (!this.sleeping) return;
44
- process.kill(this.pid, 'SIGCONT');
45
- this.sleeping = false;
46
- }
47
-
48
33
  /**
49
34
  * 进程初始化
50
35
  */
51
36
  _init() {
52
- this.child.on('message', (data) => {
53
- const id = data.id;
54
- this.connectionsCountMinus(id);
55
- delete data.id;
56
- delete data.action;
57
- //this.host.emit('forked_message', {data, id});
37
+ this.child.on('message', (m) => {
38
+ Log.coreLogger.info(`[ee-core] [jobs/child] received a message from child-process, message: ${serialize(m)}`);
39
+ if (m.channel == Channel.process.showException) {
40
+ Log.coreLogger.error(`${m.data}`);
41
+ }
42
+
43
+ // 收到子进程消息,转发到 event
44
+ if (m.channel == Channel.process.sendToMain) {
45
+ this.host.emit(m.event, m.data);
46
+ }
47
+
58
48
  });
49
+
59
50
  this.child.on('exit', (code, signal) => {
60
- // if (code !== 0 && code !== null) {
61
- // this.host.emit('forked_error', code, this.pid);
62
- // } else {
63
- // this.host.emit('forked_exit', this.pid);
64
- // }
51
+ Log.coreLogger.info(`[ee-core] [jobs/child] received a exit from child-process, code:${code}, signal:${signal}`);
65
52
  });
53
+
66
54
  this.child.on('error', (err) => {
67
- console.log('forked error: ', err);
68
- // this.host.emit('forked_error', err, this.pid);
55
+ Log.coreLogger.error(`[ee-core] [jobs/child] received a error from child-process, error: ${err} !`);
69
56
  });
70
57
  }
71
58
 
72
- /**
73
- * 向进程发消息
74
- */
75
- send(params) {
76
- if (this.sleeping) {
77
- this.wakeup();
78
- }
79
- this.connectionsCountPlus(params.id);
80
- this.child.send(params);
81
- }
82
-
83
- /**
84
- * 连接数+
85
- */
86
- _connectionsCountPlus(id) {
87
- this.activitiesMap.set(id, 1);
88
- this.activitiesCount += 1;
89
- this.host.connectionsMap[this.pid] = this.activitiesCount;
90
- }
91
-
92
- /**
93
- * 连接数-
94
- */
95
- _connectionsCountMinus(id) {
96
- if (this.activitiesMap.has(id)) {
97
- this.activitiesCount = (this.activitiesCount > 0) ? (this.activitiesCount - 1) : 0;
98
- this.activitiesMap.delete(id);
99
- }
100
- this.host.connectionsMap[this.pid] = this.activitiesCount;
101
- }
102
59
  }
103
60
 
104
61
  module.exports = ForkProcess;
@@ -1,35 +1,78 @@
1
- //require('bytenode');
1
+ const EventEmitter = require('events');
2
2
  const path = require('path');
3
+ const fs = require('fs');
3
4
  const ForkProcess = require('./forkProcess');
4
- const Ps = require('../../utils/ps');
5
- const Constants = require('../../const');
5
+ const Ps = require('../../ps');
6
+ const Loader = require('../../loader');
7
+ const Helper = require('../../utils/helper');
6
8
 
7
- class ChildJob {
9
+ class ChildJob extends EventEmitter {
10
+
11
+ constructor() {
12
+ super();
13
+ this.initEvents();
14
+ }
15
+
16
+ /**
17
+ * 初始化监听
18
+ */
19
+ initEvents = () => {
20
+
21
+ // this.on('forked_message', ({data, id}) => {
22
+ // this.onMessage({data, id});
23
+ // });
24
+ }
25
+
26
+ /**
27
+ * 执行一个job文件
28
+ */
29
+ exec(filepath, params = {}, opt = {}) {
30
+ const jobPath = this._getFullpath(filepath);
31
+
32
+ // 消息对象
33
+ const mid = Helper.getRandomString();
34
+ let msg = {
35
+ mid,
36
+ jobPath,
37
+ jobParams: params
38
+ }
39
+
40
+ let subProcess = new ForkProcess(this, opt);
41
+
42
+ // todo 是否会发生监听未完成时,接收不到消息?
43
+ // 发消息到子进程
44
+ subProcess.child.send(msg);
45
+
46
+ return subProcess;
47
+ }
8
48
 
9
49
  /**
10
- * constructor
11
- * @param {String} name - job name
12
- * @param {String} filepath - filepath
13
- * @param {Object} opt - child process options
14
- */
15
- constructor(name, filepath, opt = {}) {
16
- // todo
17
- //processArgs: Ps.isDev() ? [`--inspect=${Constants.jobs.inspectStartIndex}`] : [],
18
- let options = Object.assign({
19
- processArgs: Ps.isDev() ? [] : [],
20
- processOptions: {
21
- //cwd: path.dirname(filepath),
22
- env: Ps.allEnv(),
23
- stdio: 'pipe'
24
- }
25
- }, opt);
26
-
27
- this.childProcess = new ForkProcess(this, filepath, options.processArgs, options.processOptions);
28
-
29
- this.jobReady = false;
30
- this.exec = filepath;
31
- this.name = name;
50
+ * todo 运行job
51
+ */
52
+ run(name, filepath, opt = {}) {
53
+ let times = opt.times || 1;
54
+
55
+ for (let i = 1; i <= times; i++) {
56
+ this.exec(filepath, opt);
57
+ }
58
+
59
+ return;
32
60
  }
61
+
62
+ _getFullpath(filepath) {
63
+ const isAbsolute = path.isAbsolute(filepath);
64
+ if (!isAbsolute) {
65
+ filepath = path.join(Ps.getBaseDir(), filepath);
66
+ }
67
+
68
+ const fullpath = Loader.resolveModule(filepath);
69
+ if (!fs.existsSync(fullpath)) {
70
+ throw new Error(`[ee-core] [jobs/child] file ${fullpath} not exists`);
71
+ }
72
+
73
+ return fullpath;
74
+ }
75
+
33
76
  }
34
77
 
35
78
  module.exports = ChildJob;
@@ -0,0 +1,68 @@
1
+
2
+ const is = require('is-type-of');
3
+ let Exception;
4
+ let Loader;
5
+ let Log;
6
+ let UtilsCore;
7
+
8
+ // 开发环境下,ee-core是soft link
9
+ if (__dirname.indexOf("node_modules") == -1) {
10
+ Exception = require('../../exception');
11
+ Loader = require('../../loader');
12
+ Log = require('../../log');
13
+ UtilsCore = require('../../core/lib/utils');
14
+ } else {
15
+ Exception = require('ee-core/module/exception');
16
+ Loader = require('ee-core/module/loader');
17
+ Log = require('ee-core/module/log');
18
+ UtilsCore = require('../../core/lib/utils');
19
+ }
20
+
21
+ Exception.start();
22
+
23
+ class ChildApp {
24
+ constructor() {
25
+ this._initEvents();
26
+ }
27
+
28
+ /**
29
+ * 初始化事件监听
30
+ */
31
+ _initEvents() {
32
+ process.on('message', this._handleMessage.bind(this));
33
+ process.on('disconnect', () => {
34
+ Log.coreLogger.info(`[ee-core] [jobs/child] child process disconnected, pid:${process.pid}`);
35
+ });
36
+ process.on('exit', (code) => {
37
+ Log.coreLogger.info(`[ee-core] [jobs/child] child process exit code:${code}, pid:${process.pid}`);
38
+ });
39
+ }
40
+
41
+ /**
42
+ * 监听消息
43
+ */
44
+ _handleMessage(m) {
45
+ this.run(m);
46
+ Log.coreLogger.info(`[ee-core] [jobs/child] Received a message ${JSON.stringify(m)} from the mainProcess`);
47
+ }
48
+
49
+ /**
50
+ * 运行脚本
51
+ */
52
+ run(msg = {}) {
53
+ let filepath = msg.jobPath;
54
+ let params = msg.params;
55
+
56
+ let mod = Loader.loadJsFile(filepath);
57
+ if (is.class(mod) || UtilsCore.isBytecodeClass(mod)) {
58
+ let jobClass = new mod(params);
59
+ jobClass.handle();
60
+ } else if (is.function(mod)) {
61
+ mod(params);
62
+ }
63
+
64
+ Log.coreLogger.info('[ee-core] [child-process] job run');
65
+ }
66
+ }
67
+
68
+ new ChildApp();
@@ -0,0 +1,81 @@
1
+ const path = require('path');
2
+ const { fork } = require('child_process');
3
+ const serialize = require('serialize-javascript');
4
+ const Log = require('../../log');
5
+ const Ps = require('../../ps');
6
+ const Channel = require('../../const/channel');
7
+
8
+ class ForkProcess {
9
+ constructor(host, opt = {}) {
10
+
11
+ let options = Object.assign({
12
+ processOptions: {
13
+ cwd: Ps.getHomeDir(),
14
+ env: Ps.allEnv(),
15
+ stdio: 'pipe'
16
+ }
17
+ }, opt);
18
+
19
+ this.host = host;
20
+ this.args = [];
21
+ this.sleeping = false;
22
+
23
+ // 传递给子进程的参数
24
+ //this.args.push(JSON.stringify(options.params));
25
+
26
+ const appPath = path.join(__dirname, 'app.js');
27
+ this.child = fork(appPath, this.args, options.processOptions);
28
+
29
+ this.pid = this.child.pid;
30
+ this._init();
31
+ }
32
+
33
+ /**
34
+ * 进程初始化
35
+ */
36
+ _init() {
37
+ this.child.on('message', (m) => {
38
+ Log.coreLogger.info(`[ee-core] [jobs/child/forkProcess] from childProcess event-message: ${serialize(m)}`);
39
+ if (m.channel == Channel.process.showException) {
40
+ Log.coreLogger.error(`${m.data}`);
41
+ }
42
+ });
43
+
44
+ this.child.on('disconnect', () => {
45
+ Log.coreLogger.info(`[ee-core] [jobs/child/forkProcess] from childProcess event-disconnect !`);
46
+ });
47
+
48
+ this.child.on('close', (code, signal) => {
49
+ Log.coreLogger.info(`[ee-core] [jobs/child/forkProcess] from childProcess event-close code:${code}, signal:${signal}`);
50
+ });
51
+
52
+ this.child.on('exit', (code, signal) => {
53
+ Log.coreLogger.info(`[ee-core] [jobs/child/forkProcess] from childProcess event-exit code:${code}, signal:${signal}`);
54
+ });
55
+
56
+ this.child.on('error', (err) => {
57
+ Log.coreLogger.error(`[ee-core] [jobs/child/forkProcess] from childProcess event-error: ${err} !`);
58
+ });
59
+ }
60
+
61
+ /**
62
+ * 进程挂起
63
+ */
64
+ sleep() {
65
+ if (this.sleeping) return;
66
+ process.kill(this.pid, 'SIGSTOP');
67
+ this.sleeping = true;
68
+ }
69
+
70
+ /**
71
+ * 进程唤醒
72
+ */
73
+ wakeup() {
74
+ if (!this.sleeping) return;
75
+ process.kill(this.pid, 'SIGCONT');
76
+ this.sleeping = false;
77
+ }
78
+
79
+ }
80
+
81
+ module.exports = ForkProcess;
@@ -0,0 +1,71 @@
1
+ const EventEmitter = require('events');
2
+ const path = require('path');
3
+ const fs = require('fs');
4
+ const ForkProcess = require('./forkProcess');
5
+ const Ps = require('../../ps');
6
+ const Loader = require('../../loader');
7
+ const Helper = require('../../utils/helper');
8
+
9
+ class ChildJob extends EventEmitter {
10
+
11
+ constructor() {
12
+ super();
13
+ this.jobList = new Map();
14
+ }
15
+
16
+ /**
17
+ * 执行一个job文件
18
+ */
19
+ exec(filepath, opt = {}) {
20
+ const jobPath = this._getFullpath(filepath);
21
+ let options = Object.assign({
22
+ params: {},
23
+ }, opt);
24
+
25
+ // 消息对象
26
+ const mid = Helper.getRandomString();
27
+ let msg = {
28
+ mid,
29
+ jobPath,
30
+ params: options.params
31
+ }
32
+
33
+ let subProcess = new ForkProcess(this, options);
34
+
35
+ // todo 是否会发生监听未完成时,接收不到消息?
36
+ // 发消息到子进程,
37
+ subProcess.child.send(msg);
38
+
39
+ return subProcess;
40
+ }
41
+
42
+ /**
43
+ * todo 运行job
44
+ */
45
+ run(name, filepath, opt = {}) {
46
+ let times = opt.times || 1;
47
+
48
+ for (let i = 1; i <= times; i++) {
49
+ this.exec(filepath, opt);
50
+ }
51
+
52
+ return;
53
+ }
54
+
55
+ _getFullpath(filepath) {
56
+ const isAbsolute = path.isAbsolute(filepath);
57
+ if (!isAbsolute) {
58
+ filepath = path.join(Ps.getBaseDir(), filepath);
59
+ }
60
+
61
+ const fullpath = Loader.resolveModule(filepath);
62
+ if (!fs.existsSync(fullpath)) {
63
+ throw new Error(`[ee-core] [jobs/child] file ${fullpath} not exists`);
64
+ }
65
+
66
+ return fullpath;
67
+ }
68
+
69
+ }
70
+
71
+ module.exports = ChildJob;
@@ -0,0 +1,67 @@
1
+ const EventEmitter = require('events');
2
+ const path = require('path');
3
+ const fs = require('fs');
4
+ const ForkProcess = require('./forkProcess');
5
+ const Ps = require('../../ps');
6
+ const Loader = require('../../loader');
7
+ const Log = require('../../log');
8
+
9
+ class ChildJob {
10
+
11
+ /**
12
+ * constructor
13
+ */
14
+ constructor(name, filepath, opt) {
15
+ this.pools = new Map();
16
+ this.create(name, filepath, opt);
17
+ }
18
+
19
+ _initEvents() {
20
+ // ddd
21
+
22
+ }
23
+
24
+ create(name, filepath, opt = {}) {
25
+
26
+ const isAbsolute = path.isAbsolute(filepath);
27
+ if (!isAbsolute) {
28
+ filepath = path.join(Ps.getBaseDir(), filepath);
29
+ }
30
+
31
+ const fullpath = Loader.resolveModule(filepath);
32
+ if (!fs.existsSync(fullpath)) {
33
+ throw new Error(`[ee-core] [jobs/child] file ${fullpath} not exists`);
34
+ }
35
+
36
+ let options = Object.assign({
37
+ scriptArgs: {
38
+ name: name,
39
+ jobPath: fullpath
40
+ },
41
+ processArgs: [],
42
+ processOptions: {
43
+ //cwd: path.dirname(filepath),
44
+ env: Ps.allEnv(),
45
+ stdio: 'pipe'
46
+ }
47
+ }, opt);
48
+
49
+ const subProcess = new ForkProcess(this, options);
50
+ this.pools.set(subProcess.pid, subProcess);
51
+
52
+ return subProcess;
53
+ }
54
+
55
+ sendToChild(pid, message, ...other) {
56
+ if (!this.pools.has(pid)) {
57
+ Log.coreLogger.warn(`[ee-core] [jobs/child] process dose not exist ${pid}`);
58
+ return;
59
+ }
60
+ const subProcess = this.pools.get(pid);
61
+ subProcess.child.send(message, ...other);
62
+ return
63
+ }
64
+
65
+ }
66
+
67
+ module.exports = ChildJob;
@@ -1,56 +1,7 @@
1
- const path = require('path');
2
- const fs = require('fs');
3
- const RendererJob = require('./renderer');
4
1
  const ChildJob = require('./child');
5
- const Utils = require('../utils');
6
- const Loader = require('../loader');
7
-
8
- class Jobs {
9
- constructor() {
10
- this.type = undefined;
11
- this.instance = undefined;
12
- }
13
-
14
- /**
15
- * 创建 job
16
- */
17
- create (name, opt = {}) {
18
- this.type = opt.type || 'child';
19
- this.dev = opt.dev || false;
20
- this.winOptions = opt.winOptions || {};
21
- this.childOptions = opt.childOptions || {};
22
- this.path = opt.path || null;
23
-
24
-
25
- const isAbsolute = path.isAbsolute(this.path);
26
- if (!isAbsolute) {
27
- this.path = path.join(Utils.getBaseDir(), this.path);
28
- }
29
- const filepath = Loader.resolveModule(this.path);
30
-
31
- if (!fs.existsSync(filepath)) {
32
- throw new Error(`[ee-core] [jobs-create] file ${this.path} not exists`);
33
- }
34
-
35
- this.path = filepath;
36
- if (this.type == 'child') {
37
- this.instance = new ChildJob(name, filepath, this.childOptions);
38
- } else if (this.type == 'renderer') {
39
- this.instance = new RendererJob(name, filepath, this.winOptions);
40
- if (this.dev) {
41
- this.openDevTools();
42
- }
43
- }
44
-
45
- return;
46
- }
47
-
48
- /**
49
- * 显示开发者工具栏(仅支持 RendererJob)
50
- */
51
- openDevTools () {
52
- this.instance.openDevTools();
53
- }
54
- }
2
+ const RendererJob = require('./renderer');
55
3
 
56
- module.exports = Jobs;
4
+ module.exports = {
5
+ ChildJob,
6
+ RendererJob
7
+ };
@@ -1,4 +1,4 @@
1
- const Ps = require('../../utils/ps');
1
+ const Ps = require('../../ps');
2
2
 
3
3
  /**
4
4
  * loadView 生成BrowserWindow的html content
@@ -0,0 +1,64 @@
1
+ const path = require('path');
2
+ const fs = require('fs');
3
+ const RendererJob = require('./renderer');
4
+ const ChildJob = require('./child/pool');
5
+ const Ps = require('../ps');
6
+ const Loader = require('../loader');
7
+
8
+ class Jobs {
9
+ constructor() {
10
+ this.type;
11
+ this.dev;
12
+ this.path;
13
+ this.instance;
14
+ this.child;
15
+ this.childOptions;
16
+ this.renderer;
17
+ this.winOptions;
18
+ }
19
+
20
+ /**
21
+ * 创建 job
22
+ */
23
+ create (name, opt = {}) {
24
+ this.type = opt.type || 'child';
25
+ this.dev = opt.dev || false;
26
+ this.winOptions = opt.winOptions || {};
27
+ this.childOptions = opt.childOptions || {};
28
+ this.path = opt.path || null;
29
+
30
+ const isAbsolute = path.isAbsolute(this.path);
31
+ if (!isAbsolute) {
32
+ this.path = path.join(Ps.getBaseDir(), this.path);
33
+ }
34
+ const filepath = Loader.resolveModule(this.path);
35
+
36
+ if (!fs.existsSync(filepath)) {
37
+ throw new Error(`[ee-core] [jobs-create] file ${this.path} not exists`);
38
+ }
39
+
40
+ this.path = filepath;
41
+ if (this.type == 'child') {
42
+ this.instance = new ChildJob(name, filepath, this.childOptions);
43
+ this.child = this.instance;
44
+ } else if (this.type == 'renderer') {
45
+ this.instance = new RendererJob(name, filepath, this.winOptions);
46
+ this.renderer = this.instance;
47
+
48
+ if (this.dev) {
49
+ this.openDevTools();
50
+ }
51
+ }
52
+
53
+ return;
54
+ }
55
+
56
+ /**
57
+ * 显示开发者工具栏(仅支持 RendererJob)
58
+ */
59
+ openDevTools () {
60
+ this.instance.openDevTools();
61
+ }
62
+ }
63
+
64
+ module.exports = Jobs;