Merge pull request #806 from embark-framework/feature/new-repl-command

Adding new repl options
This commit is contained in:
Anthony Laibe 2018-09-12 15:07:45 +01:00 committed by GitHub
commit da0b2f4e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,10 @@ const vm = require('vm');
class RunCode { class RunCode {
constructor({logger}) { constructor({logger}) {
this.logger = logger; this.logger = logger;
this.context = Object.assign({}, {global, console, exports, require, module, __filename, __dirname}); this.context = Object.assign({}, {
global, console, exports, require, module, __filename, __dirname, process,
setTimeout, setInterval, clearTimeout, clearInterval
});
} }
doEval(code) { doEval(code) {