()
| 34 | } |
| 35 | |
| 36 | initWorker() { |
| 37 | if (this._fs.existsSync(this._buildConfigPath)) { |
| 38 | this._worker = fork(this._buildConfigPath, [], { cwd: this._workDir }); |
| 39 | this._worker.on('message', (message) => { |
| 40 | if (message === 'ready') { |
| 41 | this._workerIsReady = true; |
| 42 | this._onReadyCallbacks.forEach((callback) => callback()); |
| 43 | } |
| 44 | }); |
| 45 | } |
| 46 | return this; |
| 47 | } |
| 48 | |
| 49 | stopWorker(signal = 'SIGTERM') { |
| 50 | this._worker.kill(signal); |
no outgoing calls
no test coverage detected