Commit Graph

123 Commits

Author SHA1 Message Date
Jonathan Rainville 2a24c3cbf0
remove use of initConfig 2018-10-23 10:05:20 +02:00
Jonathan Rainville da6956695d
set isDev as default if there is no blockchain file 2018-10-23 10:05:20 +02:00
Richard Ramos 8861588726
Adding base command logic for scaffolding generation 2018-10-23 09:57:16 +02:00
Richard Ramos 668a25221f
Fixing framework loading 2018-10-23 09:42:09 +02:00
Richard Ramos 0eaafb77f1
Adding base command logic for scaffolding generation 2018-10-23 09:42:08 +02:00
Pascal Precht df2aa30fb4
fix(core/cmd_controller): ensure webserver host and port aren't set to undefined
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`.
2018-10-22 19:54:50 +02:00
Michael Bradley, Jr 6eae7a9a31
use a customized require/.resolve instead of relying on NODE_PATH
# Conflicts:
#	cmd/cmd.js
2018-10-22 19:54:49 +02:00
Jonathan Rainville ce3f9bdf25
fix a couple of bugs caused by bounties 2018-10-22 19:54:48 +02:00
Jonathan Rainville 7a70f5df26
use constants instead of magic numbers 2018-10-22 19:54:47 +02:00
Jonathan Rainville df218397cd
use lowercase for loglevel 2018-10-22 19:54:47 +02:00
Jonathan Rainville 0ef879d6a6
exit with 1 if there is an error in tests 2018-10-22 19:54:47 +02:00
Jonathan Rainville fe0b84349a
update noserver and nobrowser and fix noserver 2018-10-22 19:54:47 +02:00
Jonathan Rainville 75d9998c57
refactor to not use the blockchain_connector directly 2018-10-22 19:54:47 +02:00
Jonathan Rainville 7a83b02db5
fix logLevel 2018-10-22 19:54:46 +02:00
Jonathan Rainville f4d7636b7a
make code coverage work with refactored tests 2018-10-22 19:54:45 +02:00
Jonathan Rainville ddc8b36329
make tests work by using events 2018-10-22 19:54:45 +02:00
Jonathan Rainville ca3aea7923
BROKEN: solc doesnt load 2018-10-22 19:54:45 +02:00
Jonathan Rainville e8574f33eb
conflict in run_tests 2018-10-22 19:54:44 +02:00
Jonathan Rainville e6cad1675a
move test files to a module folder 2018-10-22 19:54:44 +02:00
Cryptomental 47dcb1552c
console, dashboard: Add persistent, automatically loaded history.
Add persistent automatically loaded history file for repl console
and Embark dashboard.

Default location of the history file is stored in DEFAULT_CMD_HISTORY_PATH
pointing to DAPP_PATH/.embark/cmd_history.

The history is automatically saved and loaded on startup.

test/console: Pass Embark object to constructor.

Update console test to pass Embark object to constructor.

Refs: https://github.com/embark-framework/embark/issues/939
2018-10-22 19:54:43 +02:00
Subramanian Venkatesan f686fec74a
ens resolve 2018-10-22 19:53:50 +02:00
Giuseppe Bertone 81e798c89c
Add support for Parity
Addons
 - New chain initialization and genesis management
 - Option to choose client to use
 - Option to "ping forever" for Geth
 - Creation and unlock of accounts at client's start
 - Utility to fund accounts with ethers
 - Miner settings inside the ethereum client
 - Workaround to CORS problem: origin is now http://embark
 - Several double callback's checks

Updates
 - Boilerplate, templates, configuration files and demo stuff
 - Messages and i18n strings
 - Tests

Fixes
 - Geth client now uses miner.gastarget instead of the deprecated targetGasLimit
 - Workaround for shh_version with Parity

Reworks of other PRs into the new code
 - Included delayed proxy
 - Send ready only when the proxy is started
 - Start HTTP and WS proxies individually
 - Async setupProxy
 - Fixed datadir for GethMiner
2018-10-22 19:53:49 +02:00
Pascal Precht 5fc9f076dd
fix(commands/graph): don't start blockchain node when generating graphs 2018-10-22 19:40:52 +02:00
Pascal Precht 80c80e9beb
fix(commands/build): don't start blockchain node when `--contracts` is used
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.
2018-10-22 19:40:52 +02:00
Michael Bradley, Jr 965c22d108
bin/embark handles checkDeps 2018-10-22 19:39:27 +02:00
Michael Bradley, Jr fd856f8163
PKG_PATH, pkgPath 2018-10-22 19:39:26 +02:00
hodlbank f41bcd55d6
[f] Fix for #971 - "Fatal error when Ethereum node going offline".
[a] Added .once() into Events.
2018-10-22 19:39:26 +02:00
Subramanian Venkatesan ee77ac7f7f
Adds solc option to tests. Runs smart contract tests using remix-tests
Ref: #817
2018-10-22 19:39:24 +02:00
Pascal Precht a0ef234fea
feat(modules/pipeline): move pipeline into its own module plugin
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.
2018-10-22 19:35:58 +02:00
Michael Bradley, Jr 882271dc60
rev file name to better reflect its purpose 2018-10-22 19:35:56 +02:00
Michael Bradley, Jr ae878fd7c8
extract copy/preserve logic into a helper in lib/core/fs
preserved files should end with <number>.<ext> vs. <ext>.<number>
2018-10-22 19:35:55 +02:00
Michael Bradley, Jr b2f56a9eb1
eject webpack overrides 2018-10-22 19:35:52 +02:00
Cryptomental 10bf3e4412
cmd, cmd_controller, graph: Add --output option to graph.
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
2018-10-22 19:25:18 +02:00
Cryptomental 0483920421
cmd, run_tests: Add --nobrowser option for runCoverage.
Do not start browser during coverage run when --nobrowser option is passed.

Refs: https://github.com/embark-framework/embark/issues/941
2018-10-22 19:25:18 +02:00
Anthony Laibe 7e12f80eda
Address PR feedback 2018-10-22 19:25:16 +02:00
Anthony Laibe 850a80c90c
ENS config use the actual network ID
Instead of relying on the name of network.
Fetch the real network id and configure ENS
based on that value
2018-10-22 19:25:16 +02:00
Anthony Laibe e593ba5e42
Remove unneeded logger.error
The pipeline and the deployer/compiler display
the error themselves
2018-10-22 19:25:15 +02:00
Iuri Matias 1fd3cd268f
Merge pull request #907 from embark-framework/bug_fix/upload-cmd-ens-setprovider-missing
upload command should unconditionally start the "namingSystem" service
2018-09-26 09:20:46 -04:00
Michael Bradley, Jr 79af0c0186 `embark upload` unconditionally starts the "namingSystem" service 2018-09-25 11:09:38 -05:00
Michael Bradley, Jr 0e5989bf40 rev --template
if option is used, param must be supplied

"GitHub repository" -> "git host" in help output
2018-09-24 17:46:29 -05:00
Iuri Matias 9ac3f56c98 update template option message 2018-09-21 18:18:21 -04:00
Iuri Matias af823f98b6 clarify template option; hide ens option; update typo suggestion list 2018-09-21 17:51:33 -04:00
Anthony Laibe 09de3201a1 Set default account back 2018-09-20 11:49:05 +01:00
Iuri Matias 501ddd610e
Merge pull request #869 from embark-framework/cli/coverage-only-with-vm
--coverage requires --node be "vm"
2018-09-19 11:58:39 -04:00
Michael Bradley, Jr a6231851b0 consistent quotes 2018-09-18 15:06:27 -05:00
Michael Bradley, Jr fc68e9be3c rev --gasDetails help output 2018-09-18 15:06:04 -05:00
Michael Bradley, Jr b2c7ef37b7 rev --node help output 2018-09-18 15:06:04 -05:00
Michael Bradley, Jr dbac72ea7d --coverage option only support "vm" node 2018-09-18 15:05:52 -05:00
Michael Bradley, Jr 3806dd6cd1 `embark reset` should remove a dapp's coverage/ subdir 2018-09-18 14:22:47 -05:00
Michael Bradley, Jr 1f652a7672 deploy -> deployment 2018-09-18 12:55:37 -05:00