- Created an “embark” module so that an “embark” process could be registered in the correct way. This service is only used on `embark run` (can be extended to other commands if needed).
- extracted “embark” to a const `DEFAULT_PROCESS` param in the `Console` component.
- extracted commands result rendering to it’s own function to keep the `renderTabs` function from getting cluttered
- Added sorting of logs by timestamp
- Added milliseconds to the log file data (which helps in sorting log messages).
We've introduced a regression in 6d75a4c6c4 where running
`embark run` breaks due to webserver options not being defined.
The reason this happened is because in the mentioned commit, we're checking given
webserver options with an identity check against `null` and only set dedicated
options, if that condition is true.
E.g.:
```
if (options.runWebserver !== null) {
webServerConfig.enabled = options.runWebserver;
}
```
Unfortunately, due to one of JavaScript design flaws, this condition behaves totally
different when no identity check is done, which causes Embark to break.
Meaning that in JavaScript:
```
undefined != null // false
undefined !== null // true
```
In other words, after the mentioned commit, the condition is true, resulting
in several webserver configurations to be set to `undefined`.
This conflicts at runtime when we compose webserver configurations out of user input
and Embark's defaults here: dc5de7c1b4/lib/core/config.js (L392)
In other words, since webserver config options are already set to `undefined`,
they don't get overridden by our config algorithm.
This commit ensures that webserver config values are not set when their values
are either `null` or `undefined`.
Prior to this commit `$ embark build --contracts` spinned up a blockchain node
which is not necessary as `--contracts` can be seen as a "compile only" option.
This commit ensures we don't start any web3 services with `--contracts` is used.
This is the first step of refactoring Embark's pipeline abstraction into
dedicated plugin modules that take advantage of Embark's event system.
With this commit we're moving `Pipeline` into `lib/modules/pipeline` and
introduce a new command handler `pipeline:build`. Embark's engine now
requests builds via this command handler.
Notice that `Watch` still lives in `lib/pipeline` as this is a step-by-step
refactoring to reduce chances of introducing regressions.
Add optional --output argument to graph generator. The argument allows
to specify a filepath for graph output. Default filepath is ./diagram.svg
if the argument is not specified.
Refs: https://github.com/embark-framework/embark/issues/944