mirror of https://github.com/embarklabs/embark.git
cb5a346b9f
The console was not working correctly with the latest VM2/monorepo updates. This PR addresses namely fixes this problem, but also adds a few more notable changes: * SIGNIFICANT improvement in loading time for `embark console` with an already running `embark run`. This is due to removing unneeded services starting, and instead forwarding user input to the main `embark run` process. * All user input commands are now forwarded to the `embark run` process via IPC insteaad of evaluating the command in the `embark console` process. * Removed IPC console history as it's no longer needed due to the above. Side effects: ** The signature of the `runcode:eval` and `runcode:register` events was changed to remove the `toRecord` parameter. ** Old `runcode:eval` signature: `events.request("runcode:eval", "code to be evaluated", (err, result) => {}, isNotUserInput, tolerateError)` ** New `runcode:eval` signature: `events.request("runcode:eval", "code to be evaluated", (err, result) => {}, tolerateError)` ** Old `runcode:register` signature: `events.request("runcode:register", "varName", variableValue, toRecord, (err, result) => {})` ** New `runcode:register` signature: `events.request("runcode:register", "varName", variableValue, (err, result) => {})` * Removed unneeded `forceRegister` flag. * Removed the `VM.getWeb3Config` method as it's no longer being used (EmbarkJS contracts are pulled out from the VM instead). * Updated `web3Connector` `blockchain:connector:ready` to allow for event requests or event emissions. * In the tests, removed the initial `initWeb3Provider` in the `init` as it was being called twice. * In the tests, removed the `web3Connector` check message as the tests are now using the Console, and the console does this check. This was causing duplicate messages to be displayed in the output. * Fix `web3 is not defined` browser error |
||
---|---|---|
.. | ||
index.js | ||
package.json | ||
web3Connector.js |