Commit Graph

61 Commits

Author SHA1 Message Date
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
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 0ef879d6a6
exit with 1 if there is an error in tests 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 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
Subramanian Venkatesan f686fec74a
ens resolve 2018-10-22 19:53:50 +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
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
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
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
Michael Bradley, Jr 79af0c0186 `embark upload` unconditionally starts the "namingSystem" service 2018-09-25 11:09:38 -05:00
Anthony Laibe 09de3201a1 Set default account back 2018-09-20 11:49:05 +01: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 c360975e8f webServer svc doesn't need to handle cli opts (handled in core/config) 2018-09-17 17:59:52 -05:00
Michael Bradley, Jr 2b5268dc84 test null when populating webserver config derived from cli 2018-09-17 17:59:52 -05:00
Iuri Matias 9f1cb71117
Merge pull request #837 from embark-framework/eject_msg
modify eject msg
2018-09-14 18:20:42 -04:00
Iuri Matias 98b999618b modify eject msg 2018-09-13 16:43:43 -04:00
Anthony Laibe c22901ab95 Fix circular JSON and swarm api require 2018-09-13 11:21:17 +01:00
Anthony Laibe 1b242baefd No webserver and no ipc server on console 2018-09-13 09:19:57 +01:00
Iuri Matias f270002c81
Merge pull request #819 from embark-framework/features/contarct-option-no-ipfs
Do not start storage and code_generator on --contracts
2018-09-12 18:44:33 -04:00
Jonathan Rainville afaf29d403 do not start storage and code_generator on --contracts 2018-09-12 11:10:39 -04:00
Subramanian Venkatesan fe0bbc3559 changes from the code review 2018-09-10 22:38:17 +05:30
Subramanian Venkatesan 74f0d05ca0 Plugin Command 2018-09-09 23:07:55 +05:30
Iuri Matias 10035fe46b
Merge pull request #786 from embark-framework/bug_fix/upload-simple
Fix uploading a simple app
2018-09-05 18:23:27 -04:00
Iuri Matias 6f7c999091
Merge pull request #784 from embark-framework/bugfix/typo
Fix typo
2018-09-05 18:21:30 -04:00
Jonathan Rainville 74e9974c00 exit with 1 2018-09-05 11:48:14 -04:00
Jonathan Rainville 047286b46d skip webpack if no js files 2018-09-05 11:38:09 -04:00
Anthony Laibe ad118f42c0 Fix typo 2018-09-05 14:29:26 +01:00
Anthony Laibe c92f6f8865 Fix dynamic IPC 2018-09-05 10:40:37 +01:00
Iuri Matias a1c2d7e77a
Merge pull request #756 from embark-framework/feature/console-ipc-server-client
Console can be a client or server ipc
2018-08-31 07:58:55 -04:00
Anthony Laibe e0f73c7d22 Make console a module 2018-08-31 09:36:50 +01:00
Anthony Laibe 59e82d5fc6 Console can be a client or server ipc 2018-08-30 15:45:01 +01:00
Anthony Laibe 31cb79bf5b PR feedback 2018-08-30 10:41:13 +01:00
Anthony Laibe 307b7dc8e7 EmbarkJS available 2018-08-30 10:04:58 +01:00
Michael Bradley, Jr 4c63c5adef --pipeline option (default: production) for `embark upload` command 2018-08-28 15:44:13 -05:00
Michael Bradley, Jr d14ee86c32 if dapp has a webpack.config.js, make a backup copy and proceed 2018-08-24 15:04:16 -05:00
Michael Bradley, Jr e0fda460ba --pipeline option for `embark console`, defaults to 'development' 2018-08-24 15:04:16 -05:00
Michael Bradley, Jr e1fb746aa7 relocate webpack.config.js under lib/pipeline/ 2018-08-24 15:04:16 -05:00