embark/packages/core
emizzle 74e2935846 fix(@embark/profiler): Fix profile output and update messaging
The profiler was not formatted correctly in the console as `util.inspect` was being applied to the ASCII table before being output to the console REPL.

In addition, functions containing solidity assertions (require, revert, assert) that cause the function to fail when estimating gas would print an error to embark’s console log, and would show nothing as their gas estimate in the table.

Do not `util.inspect` command output if the result is a string. For API commands being run, allow the command to specify whether or not the output of the command should be HTML escaped. This could pose security risks!

For functions that have errors during gas estimation, add a message in the embark console explaining that the error may be due to solidity assertions in the function that prevent the gas from being estimated correctly. For functions that error, show `-ERROR-` in the gas estimation column. Additionally, show a description in the table footer explaining that the error may be due to solidity assertions in the function.

For events with no gas estimate, show `-EVENT-` in the gas estimate column of the profile table, and a description in the table footer explaining that there is no gas estimate for events.

### Warnings
This PR allows the console command to specify whether or not it should allow for a string result of the command to be HTML-escaped before being sent in the API response. Combining this with Cockpit’s `dangerouslySetInnerHTML`, this could allow a plugin to register a console command that injects XSS in to Cockpit.

![Imgur](https://i.imgur.com/1Rqkjyx.png)
![Imgur](https://i.imgur.com/s6Y1Ecy.png)
![Imgur](https://i.imgur.com/BhsjkBs.png)
2020-02-26 17:11:01 -05:00
..
code-runner chore(prerelease): 5.2.4-nightly.0 2020-02-26 00:14:00 +00:00
console fix(@embark/profiler): Fix profile output and update messaging 2020-02-26 17:11:01 -05:00
core chore(prerelease): 5.2.4-nightly.0 2020-02-26 00:14:00 +00:00
engine chore(prerelease): 5.2.4-nightly.0 2020-02-26 00:14:00 +00:00
i18n chore(release): 5.2.3 2020-02-25 15:09:29 -06:00
logger chore(prerelease): 5.2.4-nightly.0 2020-02-26 00:14:00 +00:00
reset chore(release): 5.2.3 2020-02-25 15:09:29 -06:00
utils chore(prerelease): 5.2.4-nightly.0 2020-02-26 00:14:00 +00:00