There are three separate instances of process log APIs: embark logs, blockchain logs (when in standalone mode), and child process logs (storage, communication, blockchain, etc). Each one was repeating the implementation of creating a process log API endpoint. This commit centralises the API declaration by using the class `ProcessLogsApi`.
`ProcessLogsApi` is started for all three components mentioned above: blockchain (in standalone) in the `BlockchainListener` module, embark in the `EmbarkListener` module, and for all child processes in the `ProcessLauncher`.
These listeners have two functions:
1. Create the process logs API endpoints for `get` and `ws`, and
2. Ensure that all logs are logged through the `LogHandler`, which normalises the output of the log and ensures each log has a timestamp and id (used in the cockpit for log ordering).
Also, this commit moved the pipeline in to a module, so that the `embark` object could be passed to the `ProcessLogsApi` (to be used for registering API endpoints).
Added catch to live-plugin-manager install promise running in child process
Removed some `else`'s ;)
Only showing solc downloading spinner when `--nodashboard` option is used.
When installing package in main process and simultaneous downloads fail, all callbacks called with error.
Updated logging in npmTimer.
Added better error checking for solidity compilation errors
Extracted timer functionality for downloading packages so it works across the main process and child processes.
Npm class is instantiated only once and reused for event commands.
Npm class can handle concurrent requests for the same package and callback the installation result for each request.
Moved the instantiation of the live-plugin-manager in to the child solc process. This allowed us to use the live-plugin-manager to require the installed solc file.
If the module is the same version as used by embark, the module is still loading using the normal require (from node_modules), as before.
Added better error checking for solidity compilation errors
Extracted timer functionality for downloading packages so it works across the main process and child processes.
Npm class is instantiated only once and reused for event commands.
Npm class can handle concurrent requests for the same package and callback the installation result for each request.
Moved the instantiation of the live-plugin-manager in to the child solc process. This allowed us to use the live-plugin-manager to require the installed solc file.
If the module is the same version as used by embark, the module is still loading using the normal require (from node_modules), as before.