Commit Graph

821 Commits

Author SHA1 Message Date
dependabot-preview[bot] 6695ab9d23 build(deps): bump mocha from 6.2.0 to 6.2.2
Bumps [mocha](https://github.com/mochajs/mocha) from 6.2.0 to 6.2.2.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v6.2.0...v6.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-22 09:50:51 -06:00
Michael Bradley, Jr 4ebbb4488e fix(@embark/rpc-manager): implement missing RPC modifier for eth_sign 2019-11-22 08:29:15 -06:00
Jonathan Rainville 14dbb63775
chore(@embark/whisper): add warning if comm port is the same as node
Co-Authored-By: Eric Mastro <ericmastro@status.im>
2019-11-22 11:37:16 +01:00
Jonathan Rainville 23f9a8c49c
fix(@embark/whisper): show message when geth port is already taken 2019-11-22 11:37:08 +01:00
emizzle dba5f771f2 fix(@embark/simulator): fix port used in simulator
When using websockets, the simulator was starting on port `8545` instead of `8546`, so the blockchain check was failing.

Update the simulator port to be websockets port from the config when using websockets.
2019-11-22 11:25:02 +01:00
emizzle cb0f8b011e chore(@embark/whisper): improve whisper startup logging
When whisper was being started in a new process, the message displayed in the console was “Starting Blockchain node in another process”. This is misleading as it is the same message that geth/parity use to start up their processes.

Update whisper initialisation process messaging so it states “Starting Whisper node in another process”.
2019-11-22 11:24:20 +01:00
emizzle 23e94d6197 fix(@embark/tests): Improve expiration unit test
Improve the reliability of the expiration unit test in the test dapp by explicitly setting the `block.timestamp` and comparing an expiration value against that.

This improves on the current implementation that relies on time passed which varies depending on the speed of unit tests run (CPU speed, logs shown, etc).
2019-11-22 11:23:18 +01:00
emizzle 6f9e82d8b9 chore(@embark/geth): remove unneeded APIs 2019-11-22 11:22:43 +01:00
emizzle f6f45077e9
fix(@embark/proxy): Fix unsubsribe handling and add new provider
When `eth_unsubscribe` is received in the proxy, ensure this request is forwarded through on the correct socket (the same socket that was used for the corresponding `eth_subscribe`).

Move subscription handling for `eth_subscribe` and `eth_unsubscribe` to RpcModifiers (in `rpc-manager` package).

For each `eth_subscribe` request, a new `RequestManager` is created. Since the endpoint property on the proxy class was updated to be a provider, the same provider was being assigned to each new `RequestManager` and thus creating multiple event handlers for each subscription created. To circumvent this, we are now creating a new provider for each `RequestManager`.

Co-authored-by: Pascal Precht <pascal.precht@googlemail.com>
2019-11-21 15:38:48 +01:00
Jonathan Rainville 3c760c3515 fix(@embark/library-manager): add web3 to versions list
This is needed by the cockpit for the communication component
2019-11-21 08:46:55 -05:00
Jonathan Rainville ebdd573548 chore: small fixes to cockpit 2019-11-21 08:46:55 -05:00
Michael Bradley, Jr d5ebdafb55 refactor(@embark): remove unnecessary `undefined` argument in calls of registerActionForEvent 2019-11-19 13:59:39 -06:00
Michael Bradley, Jr b28054530d refactor(@embark/cmd_controller): remove logger call in initConfig 2019-11-19 13:56:25 -06:00
emizzle c7ec49a38f feat(@embark/embark-rpc-manager): Add support for `eth_signTypedData_v3`
This PR adds support for EIP-712 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md), by allowing the signing of typed data transactions using the `eth_signTypeData_v3` or `eth_signTypedData` request.

Add a module called `embark-rpc-manager` to handle all RPC transaction modifications.

The internal events management module extracted to `embark-core`. This allows other modules (ie plugins) to use a private instance of Embark’s event API.

Remove transaction modifications in `embark-accounts-manager` and leave only the functionality in this module that handle account management (ie funding of accounts). Other functionality was moved to `embark-rpc-manager`.

- Transactions should now reflect when a new node account is added via `personal_newAccount` or via the node itself (and once `eth_accounts` is requested).
- In the proxy, errors are handled for all cases and are now JSON-RPC spec-compliant.
- Always register `eth_signTypedData` RPC response and display error message if account cannot be found.

NOTE: Updated yarn.lock due to conflict after rebase.

Avoid race condition with rpc modifications

Refactor proxy to make request handling asynchronous, and to allow circumvention of forwarding requests to the node in cases where it is not needed.

Move loading of plugins to after core and stack components (in cmd_controller).

We should load custom plugins LAST (ie after all core and stack components, and after all Embark plugins). To do this, we disable automatic loading of plugins in the config, and allow them to be loading explicitly in cmd_controller.

Create a system that allows registration of custom plugins. Each plugin is generated in EmbarkJS by instantiating the registered class. For example, we can register a Plasma plugin and it will be generated in to EmbarkJS.Plasma with an instantiation of `embarkjs-plasma`. The DApp itself can then do what it wants with `EmbarkJS.Plasma` (ie call `EmbarkJS.Plasma.init()`.

NOTE: loading of custom plugins needs to be applied to all other commands in `cmd_controller`. This PR only loads custom plugins for the `run` command.

NOTE: This PR is based on branch fix/ws-eth-subscribe (#1850). I will rebase this PR when (and if) #1850 is merged.
2019-11-18 13:36:37 -06:00
Pascal Precht 5dc4b2134e fix(@embark/core): ensure type declaration for Plugin.registerActionForEvent() is legit
In 776db1b7f7 (diff-5cab125016e6d753f03b6cd0241d5ebbR267) we've introduced the ability to add
a `priority` parameter to plugin actions, so the order of actions can be semi-ensured.

That commit also introduced typings for that new API but it actually didn't match the
implementation of the API, namely that the second parameter of `Plugin.registerActionForEvent()`
can be either an options object **or** a callback function.

This forces consumers to call the API as `registerActoniForEvent(name, undefined|null, callback)`
which shouldn't be necessary.
2019-11-18 18:05:47 +01:00
Michael Bradley, Jr 978e17daa1 build(deps): bump deprecated ipfs-api@17.2.4 to ipfs-http-client@39.0.2
BREAKING CHANGE:

Related to #1985. Prior to Embark's minimum supported version of Node.js being
bumped to to 10.17.0, Embark was incompatible with any relatively recent
release of the `ipfs-http-client` package.

While *internal* changes are needed re: ipfs's `Buffer` export for
e.g. `embark_demo` to function correctly *(and this PR makes those changes)*,
Embark otherwise runs/tests okay.

Keep in mind #2033.

However, if a dApp author were to explicitly `require('ifps-api')` in the
front-end that wouldn't work as before; and swapping `"ipfs-http-client"` for
`"ipfs-api"` might also not be enough — there are API changes that dApp authors
would need to consider, regardless of Embark presently supplying the dependency
and EmbarkJS wrapping around it.

Closes #1994.
2019-11-18 09:41:24 -06:00
Michael Bradley, Jr 08933dec90 refactor(@embark/plugins/profiler): re-enable embark-profiler plugin
Hook `embark-profiler` into the engine's contracts group.

Adjust `request` signatures to match v5 usage.

Ensure gas numbers are formatted consistently in the ascii table.

Display non-json output in cockpit's console as monospace/pre to preserve
profiler table formatting.
2019-11-18 09:02:05 -06:00
dependabot-preview[bot] 92c5062e3e build(deps-dev): bump @types/async from 2.0.50 to 3.0.3
Bumps [@types/async](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/async) from 2.0.50 to 3.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/async)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-14 09:26:22 -06:00
Pascal Precht 00ad5321bd chore(@embark/utils): improve error handling for downloading file contents
Embark's `File.content` is an asynchrononus getter that potentially downloads the
contents of a file from its `externalUrl`. This can potentially fail but is not properly
reported to the user as the error itself is ignored.

This commit ensures errors are propagated and displayed to the user.
2019-11-14 15:36:18 +01:00
emizzle 7482107374 refactor(@embark/blockchain): Move check for blockchain started
The blockchain module should not contain any ethereum-specific code, and currently it contains a check to see if the blockchain has already been started.

This PR moves this check to blockchain client (ie geth or parity). This check function is registered along with the started callback.

style(@embark/stack/blockchain): add missing semicolon
2019-11-14 15:35:09 +01:00
Pascal Precht 0d20cb5d86 fix(@embark/ens): don't break when determining contract addresses
Turns out that, when Embark tries to replace ENS subdomains, it would fail
if `subdomains` aren't defined in the namesystem configuration.

This commit adds a safeguard so that not defining `subdomains` is fine.
2019-11-14 12:28:41 +01:00
Michael Bradley, Jr 5d61faa550 build(deps): bump ora from 2.1.0 to 4.0.3 2019-11-13 11:18:45 -06:00
Iuri Matias af51e2d793 bugfix (@embark/stack/embarkjs): set default gas so it's an optional parameter for onDeploy directives in the contracts config 2019-11-12 17:08:48 -05:00
Jonathan Rainville aecb99d428 feat(@embark/tests): enable comms and storage in tests
But only enabled at the start and not changed per test
2019-11-12 09:31:05 -05:00
Jonathan Rainville de9e667794 feat(@embark/ens): enable changing namesystem config per test
Adds back the feature to change ENS config per test
Fixes ENS not working in the console because EmbarkJS was not ready
2019-11-12 09:31:05 -05:00
Pascal Precht b4478a9c46 fix(@embark/ens): don't change shape of Smart Contract args in action hooks
This commit fixes the issue that it wasn't possible anymore to use named constructor arguments
in Smart Contract configurations.

For example, the following Smart Contract expects two constructor arguments:

```solidity
contract SomeContract {
  constructor(address[] _addresses, int initialValue) public {}
}
```

The first being a list of addresses, the second one a number. This can be configured as:

```js
SomeContract: {
  args: [
    ["$MyToken2", "$SimpleStorage"],
    123
  ]
}
```

Notice how the order of arguments matters here. `_addresses` come first in the constructor,
so they have to be defined first in the configuration as well.

Another way to configure this is using named arguments, which is what's broken prior to this commit:

```js
SomeContract: {
  args: {
    initialValue: 123,
    _addresses: ["$MyToken2", "$SimpleStorage"]
  }
}
```

Using a notation like this ^ the order no longer matters as Embark will figure out the right
values for the constructor arguments by their names.

The reason this is broken is because there are several modules in Embark that register and
run a `deployment:contract:beforeDeploy` action, which are allowed to mutate this configuration
object. One of those modules is the `ens` module, which searches for ENS names in the arguments
and figure out whether it has to replace it with a resolved address.

One thing that particular module didn't take into account is that `args` could be either and
array, or an object and will always return an array, changing the shape of `args` in case it was
an object.

This is a problem because another module, `ethereum-blockchain-client`, another action is registered
that takes this mutated object in `determineArguments()` and ensure that, if `args` is actually an
object, the values are put in the correct position matching the constructor of the Smart Contract in
question.

One way to solve this was to use the newly introduced [priority](https://github.com/embark-framework/embark/pull/2031) and ensure
that `ens` action is executed after `ethereum-blockchain-client`'s.

However, the actual bug here is that the ENS module changes the shape of `args` in the first place,
so this commit ensures that it preserves it.
2019-11-11 14:01:48 -05:00
Iuri Matias 41c943f052
bugfix (@embark/embarkjs): fix required Web3 object so it can support brave and other browser not injecting a Web3 object with websockets (#2036) 2019-11-11 13:59:56 -05:00
Pascal Precht d2556af8ba refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
Jonathan Rainville 8733ca911c chore(@embark/deploy-tracker): fix tests and make them run in CI 2019-11-08 16:53:57 -06:00
Michael Bradley, Jr 25d0510d5b feat(@embark/plugins/geth): bump min supported geth version from 1.8.14 to 1.9.7
This is not a breaking change because Embark doesn't strictly enforce the
mininum version, it only prints a warning.
2019-11-08 12:45:45 -06:00
Michael Bradley, Jr 4ee900480d fix(@cockpit/console): show contract names in the suggestions list
Update event name `"deploy:contract:deployed"` to
`"deployment:contract:deployed"`.

Also, listen one time for `"deployment:deployContracts:afterAll"` and then
request the full contracts list so as to pickup contract names that were
already deployed. This is necessary for subsequent `embark run` (without
reset), otherwise the suggestions list will be missing contracts.
2019-11-08 12:43:08 -06:00
Michael Bradley, Jr 7b991bb58a refactor(@embark/plugins/geth): don't run empty commands
The `WhisperGethClient` returns empty strings for its "new account" and "list
accounts" commands; if a command is an empty string then `Blockchain` should
not execute it.
2019-11-08 11:28:03 -06:00
Michael Bradley, Jr 2543acad75 refactor(@embark/library-manager): restrict versionable packages to only solc
BREAKING CHANGE:

Remove support for specifying the versions of `web3` and `ipfs-api` in a
project's `embark.json`.
2019-11-08 11:27:20 -06:00
dependabot-preview[bot] 98b688cc1a build(deps): bump remix-tests from 0.1.14 to 0.1.20
Bumps [remix-tests](https://github.com/ethereum/remix-tests) from 0.1.14 to 0.1.20.
- [Release notes](https://github.com/ethereum/remix-tests/releases)
- [Commits](https://github.com/ethereum/remix-tests/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 11:12:43 -06:00
Jonathan Rainville 95b5ae48c6 fix(@embark/accounts-manager): limit funding accounts to 1 at a time 2019-11-08 08:46:32 -05:00
Jonathan Rainville 776db1b7f7 feat(@embark/plugin): add priority to regsiterActionForEvents 2019-11-08 08:46:32 -05:00
dependabot-preview[bot] 6afe1ace08 build(deps-dev): bump @coreui/coreui from 2.1.0 to 2.1.16
Bumps [@coreui/coreui](https://github.com/coreui/coreui) from 2.1.0 to 2.1.16.
- [Release notes](https://github.com/coreui/coreui/releases)
- [Changelog](https://github.com/coreui/coreui/blob/v2.1.16/CHANGELOG.md)
- [Commits](https://github.com/coreui/coreui/compare/v2.1.0...v2.1.16)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 13:44:25 -06:00
Michael Bradley, Jr fccda21623 chore(release): 5.0.0-alpha.1 2019-11-05 14:55:06 -06:00
dependabot-preview[bot] 6bfbedb8f7 build(deps-dev): bump qs from 6.5.2 to 6.9.0
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.9.0.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-05 11:28:03 -06:00
Michael Bradley 1a43dcaa79 fix(@cockpit/dashboard): "Deployed Contracts" should auto-update after deployment (#2020) 2019-11-05 12:07:59 -05:00
Michael Bradley, Jr c320dcfbb5 refactor(@embark/core/console): silence errors when autocomplete is attempted on bad reference
Previously, in the embark cli dashboard/console, if you were to type `Foo.` and
hit tab for autocomplete then (assuming you hadn't defined `Foo`) there would
be unhandled errors and the console could even become unusable.

Refactor `packages/core/console` and related code so that nothing happens when
you attempt to autocomplete a bad reference (the same behavior as Node's own
REPL).
2019-11-05 11:01:43 -06:00
Michael Bradley, Jr 6b405d1d7e build(deps-dev): bump react-treebeard from 3.1.0 to 3.2.4
Also bump peerDeps: @emotion/core from 0.13.1 to 10.0.22 and @emotion/styled
from 0.10.6 to 10.0.23. Satisfy @babel/runtime peerDep with 7.6.3.

Make small refactors in components/FileExplorer and
containers/FileExplorerRowContainer re: the package upgrades.

Replaces #1998
2019-11-05 11:01:21 -06:00
Jonathan Rainville 863ae51a2f Fix embark test with --node (#2021)
* fix(@embark/solidity): fix solidity ipc connection with blockchain

When blockchain was run in another process, the IPC was connected,
but the compiler was not loaded, so the IPC calls never returned

* fix(@embark/geth): fix cb is not a fn because it needs request2
2019-11-05 12:00:42 -05:00
Iuri Matias dc64b99779
Remove unnecessary messages/traces from logs when not debugging (#1986)
* bugfix(@embark/stack/blockchain): fix issue with calling wrong callback variable

* chore(@embark/): remove unnecessary messages/warnings when not in debug mode

* refactor(@embark/core/events): add debugEventsEnabled method
2019-11-05 10:35:37 -05:00
Iuri Matias 830e91de7f
bugfix(@embark): fix upload and graph command (#1993)
bugfix(@embark): fix upload command

bugfix(@embark): fix graph command

update graph cmd

update upload cmd
2019-11-05 10:34:33 -05:00
Pascal Precht b0e71d9427 fix(@embark/console): ensure Cockpit is only started in non-secondary mode (#2026)
`embark console` registers and tries to spin up `Cockpit`, even when there's already
a Cockpit instance running and thefore exits with an error that a certain port is already
in use.

This commit ensures that Cockpit is only bootstrapped when `embark console` is
executed as a non-secondary process, meaning that there's no other `embark run`
process active that might occupy Cockpit's default port.
2019-11-05 10:22:11 -05:00
Pascal Precht abe79c87f4 fix(@embark/cockpit): ensure correct data is send to web3's `ecRecover` (#2024)
We've introduced a regression in https://github.com/embark-framework/embark/commit/f9557d4c9 where invalid data
has been sent to web3's `ecRecover()` method to verify signed messages.

This causes an internal server error and the utility feature inside Cockpit
unsuable.

This commit ensures that the correct data is sent to `ecRecover()` making verifying
messages through Cockpit functional again.
2019-11-05 10:21:43 -05:00
dependabot-preview[bot] d0f4236aff build(deps): bump core-js from 3.3.4 to 3.3.5
Bumps [core-js](https://github.com/zloirock/core-js) from 3.3.4 to 3.3.5.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.3.4...v3.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-01 12:21:12 -05:00
Jonathan Rainville 9e654c533e fix: fix ws providers to have the patch for a bigger threshold (#2017)
* fix: fix ws providers to have the patch for a bigger threshold

* chore (@embark/dapps): add big contract to test WS issue with large contracts
2019-10-30 16:02:17 -04:00
Iuri Matias ee15cd4c87
feature (@embark/core): show origin of each log in the logfile logs (#2018) 2019-10-30 16:01:59 -04:00
Jonathan Rainville fe3e604fec fix(@embark/test-runner): fix test contracts being tracked 2019-10-30 12:39:21 -05:00
Jonathan Rainville 72278aad72 fix(@embark/deploy-tracker): fix not storing different chains 2019-10-30 12:39:21 -05:00
Iuri Matias b8f7ec20d4 fix(@embark/core): set loglevel back to info 2019-10-30 12:19:24 -05:00
emizzle f9ad486edb fix(@embark/proxy): Fix contract event subscriptions
Fix the proxy’s handling of WebSocket connections when subscribing to contract events and node data using the `eth_subscribe` RPC request.

Previously, the client connection that the subscription data was sent to was often in a closed state. It was determined that this connection was the wrong connection to forward the data in the first place. The connection was in fact generally the connection created for the Ethereum service check which was then (correctly and subsequently) closed after it had finished its operation.

The flow of a proxy request handling a WebSocket “eth_subscribe” RPC request is now as follows:
1. A WebSocket RPC request `”eth_subscribe”` is sent from a client to the proxy.
2. Proxy forwards the request to the node by way of a new instance of `RequestManager`.
3. When the node receives an event matching the subscription, it sends the event data back to same socket connection it received the request on (ie the specific instance of `RequestManager`).
4. The `RequestManager` fires the `”data”` event containing the subscription data, and this event is picked up in the proxy.
5. The proxy then forwards the subscription data on to the originating WS client connection.

All other requests (ie non-WS or WS RPC requests that are not `eth_subscribe`) will be serviced to/from the node using a single `RequestManager` instance.

Co-authored-by: Pascal Precht <pascal.precht@gmail.com>
2019-10-30 12:19:24 -05:00
Michael Bradley, Jr 85235f88b2 chore(release): 5.0.0-alpha.0 2019-10-28 16:05:13 -05:00
Iuri Matias 867a55c98a
Revert "fix(@embark/proxy): Fix contract event subscriptions" (#2005)
* Revert "fix(@embark/core): set loglevel back to info"

This reverts commit a03ffd56e5.

* Revert "fix(@embark/proxy): Fix contract event subscriptions"

This reverts commit 173d53de2f.
2019-10-28 16:20:14 -04:00
Jonathan Rainville 395ae83f9c fix(@embark/transaction-logger): don't show logs for stray receipts 2019-10-28 13:20:25 -05:00
Michael Bradley, Jr 6ee2ca2b8d refactor(@embark/cmd): exit with error when command is unknown
Example: `embark rest && embark run`

The command/s following `&&` shouldn't run after the first one fails and prints
an "unknown command" message.
2019-10-28 13:00:50 -05:00
Iuri Matias a03ffd56e5 fix(@embark/core): set loglevel back to info 2019-10-28 13:00:18 -05:00
emizzle 173d53de2f fix(@embark/proxy): Fix contract event subscriptions
Fix the proxy’s handling of WebSocket connections when subscribing to contract events and node data using the `eth_subscribe` RPC request.

Previously, the client connection that the subscription data was sent to was often in a closed state. It was determined that this connection was the wrong connection to forward the data in the first place. The connection was in fact generally the connection created for the Ethereum service check which was then (correctly and subsequently) closed after it had finished its operation.

The flow of a proxy request handling a WebSocket “eth_subscribe” RPC request is now as follows:
1. A WebSocket RPC request `”eth_subscribe”` is sent from a client to the proxy.
2. Proxy forwards the request to the node by way of a new instance of `RequestManager`.
3. When the node receives an event matching the subscription, it sends the event data back to same socket connection it received the request on (ie the specific instance of `RequestManager`).
4. The `RequestManager` fires the `”data”` event containing the subscription data, and this event is picked up in the proxy.
5. The proxy then forwards the subscription data on to the originating WS client connection.

All other requests (ie non-WS or WS RPC requests that are not `eth_subscribe`) will be serviced to/from the node using a single `RequestManager` instance.

Co-authored-by: Pascal Precht <pascal.precht@gmail.com>
2019-10-28 13:00:18 -05:00
Jonathan Rainville a4b3ef454a fix(@embark/parity): fix version result not available 2019-10-28 12:10:34 -05:00
Jonathan Rainville 9803507221 fix(@embark/geth): fix version result not available 2019-10-28 12:10:34 -05:00
Jonathan Rainville 1302f9fb48 fix(@embark/ens): fix trying to resolve when ENS is not registered 2019-10-28 12:10:34 -05:00
Pascal Precht 8fee0b8ccc fix(@embark/core): make blockchain command work again
Running embark's `blockchain` command resulted in a runtime error where the `blockchain`
module couldn't be found. This is a bug introduced in ed0d3afb4f where
we forgot to update `blockchainStackComponents` in Embark's engine accordingly.

Fixing this results in `embark blockchain` hanging. This is because there's a similar bug
in `blockchainStackCopmnonents` introduced in 3b8f8f9ea7.

This commit fixes both bugs by ensuring `embark-blockchain` and `embark-blockchain-client`
packages are loaded using the correct APIs.
2019-10-28 11:55:09 -05:00
Michael Bradley, Jr db66f0e197 refactor(@embark/template_generator): account for prerelease in embark version
If the version in the embark package's own `package.json` has a prerelease
identifier then appending `.x` to the major version isn't viable for resolving
the latest version of the template package that's in the same prerelease line;
a more complex semver range must be used:

```
"${pkg}@^${major}.${minor}.${patch}- <${major}.${minor}.${patch}"
```
2019-10-28 11:43:00 -05:00
Michael Bradley, Jr 1225cb14e8 build(deps): add core-js@3 as a dep to all pkgs that have @babel/runtime-corejs3 dep
When making use of the `useBuiltIns: 'usage'` option for @babel/preset-env
(which is the case for all transpiled packages in Embark's monorepo) a package
needs to have both @babel/runtime-corejs3 and core-js@3 specified as
dependencies.
2019-10-28 11:40:48 -05:00
Michael Bradley, Jr 2407df5d11 test(@embark/stack/compiler): add tests for the compiler 2019-10-25 14:12:00 -05:00
Pascal Precht f289a6fc6a feat(@embark/testing): introduce plugin APIs to register compilers
Embark relies on certain specific plugin properties, e.g. registered compilers,
and retrieves them using `plugins.getPluginProperties('compilers', 'compilers')`.

In order to make this work in the testing environment, we need those same APIs
in the `embark-testing` package as well.

This commit adds necessary APIs to `Plugins` and `Plugin` to make registering and
loading compiler plugins work.
2019-10-25 14:12:00 -05:00
Michael Bradley, Jr f519befe1d build(deps-dev): bump remaining @storybook/* from 5.1.11 to 5.2.5 2019-10-25 12:34:25 -05:00
dependabot-preview[bot] a4128232a7 build(deps-dev): bump @storybook/react from 5.1.11 to 5.2.5
Bumps [@storybook/react](https://github.com/storybookjs/storybook/tree/HEAD/app/react) from 5.1.11 to 5.2.5.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v5.2.5/app/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-25 12:34:25 -05:00
Michael Bradley b66d664c92 build(deps): upgrade create-react-app for cockpit by bumping react-scripts to latest (#1991)
* build(deps): move deps needed by embark-basic-pipeline from packages/embark

Introduce additional refactors to ensure the packages can be resolved by the
basic pipeline's webpack child process.

* build(deps): move @types/os-locale from packages/embark to packages/core/i18n

* build(deps) move @types/globule from packages/embark to packages/plugins/coverage

* build(deps): refactor stack/{api,proxy,webserver} deps relative to packages/embark

* build(deps): remove unneeded @types/async dep from packages/stack/test-runner

* build(deps): remove unneeded deps from packages/embark

* build(deps): upgrade create-react-app for cockpit by bumping react-scripts to latest

Also get rid of a peer dependency warning related to storybook. After some
investigation it seems that storybook can't practically (at present) be made
aware of CRA in the same project satisfying storybook's peer deps, so it's best
to just satisfy all of them explicitly, which in any case won't interfere with
CRA (react-scripts).
2019-10-25 13:05:16 -04:00
Michael Bradley d22cd58db3 reorg some deps from packages/embark to the packages that actually depend on them (#1990)
* build(deps): move @types/os-locale from packages/embark to packages/core/i18n

* build(deps) move @types/globule from packages/embark to packages/plugins/coverage

* build(deps): refactor stack/{api,proxy,webserver} deps relative to packages/embark

* build(deps): remove unneeded @types/async dep from packages/stack/test-runner

* build(deps): remove unneeded deps from packages/embark
2019-10-25 13:04:51 -04:00
Michael Bradley, Jr a4ee9f8739 test(@embark/stack/test-runner): enable test-runner's test suite
Introduce some light refactoring related to embark-testing facilities, and also
a configurable stdout option so the output of the reporter implemented in this
package isn't confusingly mixed into unit test reporting for this package.
2019-10-25 11:32:48 -05:00
Michael Bradley, Jr 0af6e13779 build(deps): move deps needed by embark-basic-pipeline from packages/embark
Introduce additional refactors to ensure the packages can be resolved by the
basic pipeline's webpack child process.
2019-10-25 11:13:49 -05:00
Michael Bradley d17fe33339 build: update babel and webpack dependencies (#1987)
Includes a switch from core-js@2 to core-js@3
2019-10-24 17:41:28 -04:00
Michael Bradley ed02cc849f build: bump all packages' engines settings (#1985)
BREAKING CHANGE:

node: >=10.17.0 <12.0.0
npm: >=6.11.3
yarn: >=1.19.1

node v10.17.0 is the latest in the 10.x series and is still in the Active LTS
lifecycle. Embark is still not compatible with node's 12.x and 13.x
series (because of some dependencies), otherwise it would probably make sense
to bump our minimum supported node version all the way to the most recent 12.x
release.

npm v6.11.3 is the version that's bundled with node v10.17.0.

yarn v1.19.1 is the most recent version as of the time node v10.17.0 was
released.
2019-10-24 09:52:05 -04:00
Jonathan Rainville 6e9635c12b fix(@contract-app): fix contracts app tests (#1982)
* refactor(@embark/dapps/tests/app): use function syntax

These changes don't fix the race conditions related to the test dapp's tests
but are a step in the right direction.

* refactor(@embark/dapps/tests/contracts): adjustments to get tests passing

Further refactoring is needed re: potentially duplicated or overlapping logic
in `packages/plugins/solidity-tests` and
`packages/core/utils/src/solidity/remapImports.ts`, as well in disabled test
dapp tests

* test(dapps/tests/app): temporarily disable intermittently failing tests

They are failing because of a race condition; once that race condition has been
fixed these tests should be reenabled.

* fix(@embark/solidity-tests): fix importing the library for the tests
2019-10-23 14:58:40 -04:00
Michael Bradley 183d9a05b5 Fix/solo spawn (#1981)
* build(@embark/stack/blockchain-client): remove unneeded typescript related scripts and deps

In addition to being unneeded their presence is causing build errors.

* build(embark): remove unneeded typescript related scripts and deps

In addition to being unneeded their presence is causing build errors.

* build(@embark/plugins/ethereum-blockchain-client): remove unneeded typescript related scripts, deps

In addition to being unneeded their presence is causing build errors.

* build(@embark/plugins/ganache): remove unneeded typescript related scripts and deps

In addition to being unneeded their presence is causing build errors.

* build(@embark/plugins/geth): remove unneeded typescript related scripts and deps

In addition to being unneeded their presence is causing build errors.

* fix(@embark/plugins/transaction-logger): require 'web3' not 'Web3'

* fix(@embark/utils/solo): spawn npm(.cmd) instead of npx(.cmd)

* test(@embark/plugins/basic-pipeline): add test stub

* test(@embark/stack/blockchain): add test stub
2019-10-22 09:27:28 -04:00
Jonathan Rainville 2193d82399 fix(test-app): make test app test all pass (#1980)
Fix a lot of bugs and reenable a couple of modules
Some tests were kept disabled, mostly the ENS and EmbarkJS tests
Those need to add back a fairly significant feature to work
Add back missing solidity contracts
2019-10-22 09:27:22 -04:00
Pascal Precht 7881e6a3ac test(@embark/communication): fix failing test (#1979)
In d6bf5c24b9 we've ensured that certain modules of
embark only executed if their functionality is actually enabled.
This broke one of our tests in the communication module.
This commit fixes the test by explicitly enabling the module's functionality.
2019-10-21 13:23:43 -04:00
Eric Mastro db71a93bba fix(@embark/proxy): Check if WebSocket open before sending (#1978)
Add error handling to the proxy so that websocket frames are not sent on a socket that is not open.
2019-10-21 13:23:34 -04:00
Jonathan Rainville a3b52676fc Fix part of the test app and add new test util functions (#1977)
* fix: fix tests hanging because the console is not started

* fix(@embark/proxy): send back errors correctly to the client

Code originally by @emizzle and fixed by me

* feat(@embark/test-runner): add assert.reverts to test reverts

* fix: make test app actually run its test and not hang

* fix(@embark/proxy): fix listening to contract event in the proxy

* feat(@embark/test-runner): add assertion for events being triggered

* docs(@embark/site): add docs for the new assert functions

* feat(@embark/test-runner): add increaseTime util function to globals

* docs(@embark/site): add docs for increaseTime
2019-10-17 14:39:25 -04:00
Iuri Matias cb0995f3f6
chore(@embark/stack/blockchain-client): re-add missing file (#1973) 2019-10-16 11:00:26 -04:00
Eric Mastro 9b57a912cf refactor(@embark/ethereum-blockchain-client): move module into own package (#1956) 2019-10-16 10:02:05 -04:00
Eric Mastro 3b8f8f9ea7 refactor(@embark/blockchain-client): move module into own package (#1955)
refactor(@embark/blockchain-client): move module into own package

update package.json
2019-10-16 09:41:17 -04:00
Eric Mastro e2efbbd846 refactor(@embark/parity): move module into own package (#1951)
Contains bug fixes to get parity to work as a blockchain client.

**NOTE:** Please merge https://github.com/embark-framework/embark/pull/1950 first before merging this PR, as this PR contains removal of dependencies from `packages/embark` that are needed for geth. So if this is merged first, and the geth PR (https://github.com/embark-framework/embark/pull/1950) is not merged, then geth will not have some of the dependencies it needs.
2019-10-16 09:35:26 -04:00
Eric Mastro ed0d3afb4f refactor(@embark/blockchain): move module into own package (#1942) 2019-10-16 09:30:14 -04:00
dependabot-preview[bot] 85be192879 build(deps-dev): bump @types/request from 2.48.1 to 2.48.3 (#1957)
Bumps [@types/request](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/request) from 2.48.1 to 2.48.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/request)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-16 09:11:53 -04:00
Jonathan Rainville 08c97a2964 fix: fix windows build for pipeline and embarkjs (#1971) 2019-10-16 09:07:42 -04:00
Eric Mastro 908064f4e1 refactor(@embark/ganache): move module into own package (#1952)
**NOTE:** Running a dapp with `client: “vm”` does not work, however I am not sure if that is intentional in v5 or not.

**NOTE:** Running `embark test` in the demo DApp does work, although there is an error that I am assuming does actually pertain to this PR:
```
made request without listener: whisper:node:register
Trace:
    at EmbarkEmitter.trace [as request] (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/lib/core/events.js:142:13)
    at new request (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/lib/modules/geth/index.js:49:17)
    at Plugin.loadInternalPlugin (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/lib/core/plugin.js:117:10)
    at Plugins.loadInternalPlugin (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/lib/core/plugins.js:96:40)
    at Engine.loadInternalPlugin [as registerModule] (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/lib/core/engine.js:69:18)
    at Engine.registerModule [as blockchainComponents] (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/lib/core/engine.js:183:10)
    at Engine.apply [as registerModuleGroup] (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/lib/core/engine.js:104:18)
    at registerModuleGroup (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/cmd/cmd_controller.js:740:16)
    at nextTask (/Users/emizzle/Code/__Github/embk-fw/embark/node_modules/async/dist/async.js:5324:14)
    at next (/Users/emizzle/Code/__Github/embk-fw/embark/node_modules/async/dist/async.js:5331:9)
    at /Users/emizzle/Code/__Github/embk-fw/embark/node_modules/async/dist/async.js:969:16
    at callback (/Users/emizzle/Code/__Github/embk-fw/embark/packages/embark/src/lib/core/engine.js:47:9)
    at Client.done (/Users/emizzle/Code/__Github/embk-fw/embark/packages/core/core/src/ipc.js:46:11)
    at Client.emit (/Users/emizzle/Code/__Github/embk-fw/embark/node_modules/event-pubsub/es5.js:74:21)
    at Socket.connectionClosed (/Users/emizzle/Code/__Github/embk-fw/embark/node_modules/node-ipc/dao/client.js:201:20)
    at Socket.emit (events.js:198:13)
```
2019-10-14 16:28:54 +09:00
Eric Mastro 8aa6496f93 refactor(@embark/geth): move module into own package (#1950) 2019-10-14 16:14:07 +09:00
Eric Mastro e03ae120fe refactor(@embark/embarkjs): move module into own package (#1943) 2019-10-14 16:08:21 +09:00
Eric Mastro 3f7842cf24 refactor(@embark/embarkjs): move module into own package (#1945)
**TODO:** The `embark eject-webpack` command needs to be updated. @michaelsbradleyjr - do you have suggestions as to how we could port this over? We could **assume** that the `basic-pipeline` plugin will be installed, and then read the embark config and overrides from the file system, however this feels like we are sort adding a dependency to a plugin, which is not right. Any suggestions?
2019-10-14 16:05:17 +09:00
Eric Mastro 5dbc1c791a fix(@embark/basic-pipeline): Remove `_1_` from pipeline output (#1941) 2019-10-14 16:01:18 +09:00
Jonathan Rainville 915b9493ef feat(@embark/cmd_controller): add back embark simulator (#1965) 2019-10-14 15:59:37 +09:00
Jonathan Rainville 637e4f965d Show TX reason when there is a failure (#1970)
* feat(@embark/transactions-logger): show reason of failure in tx log

* feat(@embark/ui): show tx failure reason in cockpit contract logs
2019-10-14 11:00:24 +09:00
Jonathan Rainville 918a00c24c fix: add back log command for modules (#1969) 2019-10-14 10:58:57 +09:00
Jonathan Rainville af3c0f0bcb Fix whisper callback and start (#1968)
* fix(@embark/geth/whisper): add ipcdisable for whisper geth client

* fix(@embarkjs/whisper): fix callback not used in send
2019-10-14 10:55:37 +09:00
Jonathan Rainville 4b947bb5c2 fix: fix error logs in the cockpit due from negative blocks numbers (#1967) 2019-10-14 10:53:14 +09:00
Jonathan Rainville d86c26d71a Fix VM as a client and cleanup template configs (#1966)
* chore(templates): clean up template configs

* fix: enable vm as a client

Bug was caused by the web3 listening to events too late (race)
2019-10-14 10:42:13 +09:00
Jonathan Rainville 913267b1ce fix: fix process logs not showing on errors (#1962) 2019-10-14 10:31:20 +09:00
Jonathan Rainville 80df4fa11d fix: patch for infinite loop with panic override (#1964) 2019-10-12 12:17:33 +09:00
Jonathan Rainville 5b72620c92 fix: re-enable plugin command module and clean up engine (#1961) 2019-10-12 12:06:29 +09:00
Jonathan Rainville 6f90099d47 Add tests for ENS (#1933)
* add basic test to ens

* add more tests

* test arguments for test
2019-10-12 11:42:16 +09:00
Michael Bradley, Jr 3f65077268 build(deps): downgrade ethereumjs-tx to 1.3.7 2019-10-09 22:30:06 +09:00
Jonathan Rainville 2f09a88b2d feat(deployement): add back deployment message with hash 2019-10-04 11:36:33 -04:00
Jonathan Rainville 7fae609d87 fix(template_generator): fix condition for windows 2019-10-04 10:12:46 -04:00
Jonathan Rainville d6bf5c24b9 fix: do not start modules if they are disabled 2019-10-04 10:12:16 -04:00
Jonathan Rainville c54b8d9e44 feat: call action before starting the blockchain node 2019-10-04 10:12:16 -04:00
Michael Bradley, Jr 1bb25b9082 build(deps): remove unused http-shutdown package 2019-10-03 12:06:13 -05:00
Michael Bradley, Jr 3f4ce3b549 build: fix win compat for collective build and embark-solo cli 2019-10-02 16:23:57 -05:00
Pascal Precht 7ea9aa417d test(@embark/commmunication): add test for artifact generation
This also makes `fakeEmbark` configurable
2019-10-02 17:40:44 +02:00
Iuri Matias 67207a239a
fix modules in console cmd controller (#1947) 2019-10-02 11:27:44 -04:00
Michael Bradley, Jr 17ccd5c1bd build: tidy up the monorepo in prep for v5.0.0-alpha.0 2019-10-01 13:29:53 -05:00
Michael Bradley, Jr 3b649fa455 build: phase 1 of introducing embark-collective 2019-10-01 13:28:13 -05:00
Iuri Matias de85076d48
Console fix (#1940)
* bugfix(@embark/embark): fix default values so choosing different environment doesn't cause hang

* bugfix(@embark/stack/watcher): add callback so initializating watcher does not hang cmd controller
2019-10-01 14:18:16 -04:00
Iuri Matias eb23acb0f8
bugfix(@embark/embark): fix default values so choosing different environment doesn't cause hang (#1939) 2019-10-01 14:18:10 -04:00
dependabot-preview[bot] c03a2588fe build(deps-dev): bump @types/body-parser from 1.17.0 to 1.17.1
Bumps [@types/body-parser](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/body-parser) from 1.17.0 to 1.17.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/body-parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-27 12:00:59 -05:00
dependabot-preview[bot] 17c98d9ada build(deps): bump webpack from 4.39.2 to 4.41.0
Bumps [webpack](https://github.com/webpack/webpack) from 4.39.2 to 4.41.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.39.2...v4.41.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-25 09:36:07 -05:00
Michael Bradley, Jr 166f339a03 refactor(@cockpit/ui/utils): adjust date-fns imports/usage re: changes in 2.x 2019-09-25 09:35:05 -05:00
dependabot-preview[bot] ec4e3cd9d0 build(deps-dev): bump date-fns from 1.30.1 to 2.3.0
Bumps [date-fns](https://github.com/date-fns/date-fns) from 1.30.1 to 2.3.0.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md)
- [Commits](https://github.com/date-fns/date-fns/compare/v1.30.1...v2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-25 09:35:05 -05:00
Michael Bradley, Jr 7063ac2963 build(deps-dev): bump react-scripts from 3.1.1 to 3.1.2 2019-09-24 11:39:06 -05:00
dependabot-preview[bot] 0804525b02 build(deps): bump sass-loader from 7.1.0 to 8.0.0
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 7.1.0 to 8.0.0.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v7.1.0...v8.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-24 11:32:51 -05:00
Michael Bradley, Jr 14d20e1b6f test(@embark/core/console): fix bad setUpEnv path 2019-09-24 10:51:27 -05:00
Michael Bradley, Jr d4deb8b990 refactor(@embark/services_monitor): use Object.keys instead of Object.entries 2019-09-24 10:51:27 -05:00
Michael Bradley, Jr 98400dcef7 fix(@embark/cmd_controller): use the correct path for eject-webpack 2019-09-24 10:51:27 -05:00
Michael Bradley, Jr ff75fe98a1 refactor(@embark/template_generator): use embark-utils monorepo APIs 2019-09-24 10:51:27 -05:00
Michael Bradley, Jr 686b327bd0 refactor(@embark/stack/api): use embark-utils monorepo APIs 2019-09-24 10:51:27 -05:00
Michael Bradley, Jr de0e12d039 feat(@embark/utils): "inside monorepo" APIs 2019-09-24 10:51:27 -05:00
Michael Bradley, Jr 1ba9e4b0a2 test(@embark/communication): remove test stub 2019-09-24 10:14:32 -05:00
Pascal Precht 633683e12f test(@embark/communication): add test for embark communication module (#1908) 2019-09-24 09:44:57 -04:00
dependabot-preview[bot] 6f766e1e3e build(deps): bump @babel/preset-typescript from 7.1.0 to 7.6.0
Bumps [@babel/preset-typescript](https://github.com/babel/babel) from 7.1.0 to 7.6.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.1.0...v7.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 10:42:49 -05:00
dependabot-preview[bot] 2c6ed2727b build(deps): bump glob from 7.1.3 to 7.1.4
Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.3 to 7.1.4.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/master/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v7.1.3...v7.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 10:42:30 -05:00
Michael Bradley, Jr 924ae38799 refactor(@cockpit/editor): Resizable component is strictly a named export for re-resizable >4.1.1 2019-09-17 12:20:46 -05:00
dependabot-preview[bot] e4e856f274 build(deps-dev): bump re-resizable from 4.9.3 to 6.0.0
Bumps [re-resizable](https://github.com/bokuweb/react-resizable-box) from 4.9.3 to 6.0.0.
- [Release notes](https://github.com/bokuweb/react-resizable-box/releases)
- [Changelog](https://github.com/bokuweb/re-resizable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bokuweb/react-resizable-box/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-17 12:20:46 -05:00
Michael Bradley, Jr 316a91dfa5 build(deps): removed unused ethereumjs-tx from packages/embark 2019-09-17 11:58:08 -05:00
dependabot-preview[bot] c3061e316d build(deps): bump ethereumjs-tx from 1.3.7 to 2.1.1
Bumps [ethereumjs-tx](https://github.com/ethereumjs/ethereumjs-tx) from 1.3.7 to 2.1.1.
- [Release notes](https://github.com/ethereumjs/ethereumjs-tx/releases)
- [Changelog](https://github.com/ethereumjs/ethereumjs-tx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ethereumjs/ethereumjs-tx/compare/v1.3.7...v2.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-17 11:58:08 -05:00
Michael Bradley b74debfb8d refactor(@cockpit/ui): use non-ejected create-react-app (#1910)
Change components/TexEditor re: how monaco-editor is loaded, since difficulties
with monaco-editor were the original motivation for "ejecting" the CRA setup.

Specify "nohoist" for `embark-ui/react-scripts` and all its dependencies to
avoid potential headaches when upgrading the react-scripts, i.e. upgrading to
newer versions of create-react-app.
2019-09-17 17:32:45 +02:00
Michael Bradley fe107546a8 refactor(@embark): remove the embark-async-wrapper package (#1911)
It's principal use was in `stack/compiler`, but that package was refactored
in #1878 to use async/await. There was a replica in
`packages/embark/src/lib/utils/async_extend.js` but it wasn't being used to do
async operations and could be replaced with `Object.entries().forEach()`. It
was required by `plugins/vyper` but the wrapper's custom `eachObject` method
wasn't being used. `stack/api` had it as a dependency but wasn't using it.
2019-09-17 17:31:57 +02:00
dependabot-preview[bot] 6c5a4ce536 build(deps): bump axios from 0.18.1 to 0.19.0
Bumps [axios](https://github.com/axios/axios) from 0.18.1 to 0.19.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.18.1...v0.19.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 10:12:55 -05:00
Michael Bradley, Jr 86a97667e8 fix(@embark/stack/pipeline): set missing `this.fs` to `embark.fs` 2019-09-15 15:17:45 -05:00
Michael Bradley, Jr c69a4734d3 test(@embark/plugins/snark): fix some small typos/errors in the tests 2019-09-15 15:17:45 -05:00
Michael Bradley, Jr ba671b9953 test: refactor some recent jest-tests' configuration, placement, and related babel configuration 2019-09-13 19:31:38 -05:00
Michael Bradley, Jr 0050adb4bb docs: add dependabot badge to the main readme 2019-09-13 16:37:48 -05:00
Michael Bradley, Jr 00fa5f2272 refactor(@embark/plugins/snark): add embark-snark package to the monorepo 2019-09-13 09:52:01 -05:00
dependabot-preview[bot] bcca315b4e build(deps): bump body-parser from 1.18.3 to 1.19.0
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.18.3 to 1.19.0.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.18.3...1.19.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-13 09:28:14 -05:00
Michael Bradley, Jr b262a18441 build(deps): bump pretty-ms from 4.0.0 to 5.0.0 2019-09-12 21:45:42 -05:00
dependabot-preview[bot] 0cabff3eb9 build(deps-dev): bump @types/pretty-ms from 3.2.0 to 5.0.1
Bumps [@types/pretty-ms](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/pretty-ms) from 3.2.0 to 5.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/pretty-ms)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-12 21:45:42 -05:00
dependabot-preview[bot] e67e47c31a build(deps-dev): bump html-webpack-plugin
Bumps [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) from 4.0.0-alpha.2 to 4.0.0-beta.8.
- [Release notes](https://github.com/jantimon/html-webpack-plugin/releases)
- [Changelog](https://github.com/jantimon/html-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jantimon/html-webpack-plugin/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-12 21:37:06 -05:00
Michael Bradley, Jr 4499f1580f style(@embark/plugins/whisper): fix linter errors 2019-09-12 19:40:53 -05:00
Michael Bradley, Jr fce8bca509 style(@embark/plugins/coverage): fix linter errors 2019-09-12 19:40:53 -05:00
Michael Bradley, Jr 433ff4a27f style(@embark): fix linter errors 2019-09-12 19:40:47 -05:00
Michael Bradley, Jr 9b75165b90 style(@embark/testing): fix linter errors 2019-09-12 19:38:20 -05:00
Jonathan Rainville 107e730fc3 refactor(@embark/ens): refactor and clean up embark-ens (#1900) 2019-09-12 17:36:16 -04:00
Pascal Precht e282ae4974 refactor(@embark/communication): move module into own package (#1899) 2019-09-12 17:30:46 -04:00
Jonathan Rainville f54fbf0b3d feat(@embark/test-runner): make vm default node (#1846)
* feat: make vm default node

* feat(@embark/tests): enable switching node between tests
2019-09-12 17:30:28 -04:00
André Medeiros 2f9d5e6085 chore: test framework (#1894)
* chore: test framework

* chore(@embark/testing): introduce Plugin apis and other changes

* refactor(@embark/deployment): use new testing APIs for tests
2019-09-12 17:26:57 -04:00
Pascal Precht 501066e2a2 test(@embark/deployment): introduce tests for deployment stack module (#1897) 2019-09-11 14:32:54 -04:00
Iuri Matias e330b338ea
Fix/whisper communication (#1895)
* fix(@cockpit/utils): make communications tab work again

* fix whisper node start; fix whisper console api registration; fix/refactor whisper web api
2019-09-11 14:21:53 -04:00
Iuri Matias e598e3f998
chore(@embark/embark-reset): move embark-reset package (#1898) 2019-09-11 14:16:23 -04:00
Michael Bradley 043ccc0a24 feat(@embark/compiler): support :before and :after hooks on event compiler:contracts:compile (#1878)
* feat(@embark/compiler): support :before and :after hooks on event compiler:contracts:compile

* style: keep root package.json sorted cleanly

* style: formatting with prettier where print-width is 200

Per the suggestion of @iurimatias

* WIP: PR review

* WIP: PR review

* WIP: refactor to check if file.path is within dappPath() or os.tmpdir()

* WIP: PR review

* WIP: use native async functions (and related JS lang constructs) instead of the async library

* WIP: async.eachObject is no longer a dependency
2019-09-11 13:08:52 -04:00
André Medeiros 5faa07cc9f chore: set contract objects to EmbarkJS' wrapper (#1893) 2019-09-11 13:06:39 -04:00
Iuri Matias 8849aca264
chore(@embark/blockchain-listeener): remove blockchain-listener package (#1887) 2019-09-11 12:32:16 -04:00
Jonathan Rainville ee634c8403 fix: fix test-app, contracts index file and reload on change (#1892)
* fix: fix test-app, contracts index file and reload on change

* fix(@embark/cmd_controller): fix missing nodes

Was removed by accident

* feat(@embark/demo): add favicon to embark demo

* chore(@embark/cockpit): change favicon to new Embark logo

* fix(@embark/embarkjs-ens): fix ENS config for embarkjs-ens

* remove comments
2019-09-11 12:31:57 -04:00
André Medeiros 3fe5b93a1f
chore: refactor requestManager use (#1891)
Use our own object instance by giving it the existing provider instead
of fishing out private properties inside the `web3` instance.
2019-09-09 15:29:49 -04:00
Michael Bradley, Jr c057695b09 test(@embark/plugins/solidity-tests): supply mock options object to SolidityTestRunner constructor
When an options object is not supplied the tests fail because the constructor
expects the options argument to be an object, i.e. referencing
`options.plugins` should not cause a TypeError
2019-09-09 11:40:21 -05:00
André Medeiros 2900e04cae
chore: use libraries to generate coverage report (#1876) 2019-09-09 08:47:22 -04:00
Michael Bradley, Jr 8779476ac0 style: make eslint aware of mocha globals in plugins/mocha-tests and stack/test-runner
Also remove some `/* globals ... */` comments and supply missing semicolons
2019-09-08 15:29:03 -05:00
André Medeiros 5e560768ad chore: test runner tests (#1884)
* chore: test runner tests

* chore: mocha test runner tests

* chore: add solidity test file to dapp
2019-09-07 15:55:24 -04:00
Iuri Matias 14155285b3
move rest of the packages to their logical folders (#1886)
* chore(@embark/): move more packages to their logical folders, remove embark- prefix

* chore(@embark/): move embark-process-logs-api-manager to stack folder, remove embark- prefix

* chore(@embark/): move embark-coverage to plugins folder, remove embark- prefix

* chore(@embark/): move api, async-wrapper, authenticator, library-managre to folders, remove embark- prefix
2019-09-07 15:45:25 -04:00
Iuri Matias f7e226fdd4
chore(@embark/): move cockpit packages to their own folder (#1883) 2019-09-07 12:02:49 -04:00
Iuri Matias 8cf458b129
chore(@embark/): move more packages to their logical folders, remove embark- prefix (#1882) 2019-09-07 11:27:08 -04:00
Michael Bradley, Jr 25a06447c8 fix(@embarkjs/swarm): web3@1.0.0-beta.37 -> web3@1.2.1 2019-09-06 19:31:18 -05:00
Michael Bradley, Jr 2dedfaa127 build: use only exact versions for deps because unexpected yarn.lock causes CI/release to fail
The exception is `embark/-*` packages that are in the monorepo, should always
use caret ranges for those packages.
2019-09-06 19:31:18 -05:00
Michael Bradley, Jr 4e590991a8 style: fix linter errors on master after recent PR merges 2019-09-06 19:31:18 -05:00
Iuri Matias c46c52ff5c
move embarkjs packages & remove embark- prefix from some folders (#1879)
* chore(@embark/): move embarkjs packages to their own folder

* chore(@embark/): rename embark-ui folder to cockpit

* chore(@embark/): rename packages already in logical folders to remove embark- prefix

chore(@embark/): rename packages already in logical folders to remove embark- prefix

update package.json files to use correct eslint config

remove core/* from package.json workspaces
2019-09-06 18:26:08 -04:00
Iuri Matias 48c328e39e
refactor(@embark/): move several packages into logical folders (#1877) 2019-09-06 17:39:51 -04:00
Iuri Matias 43386ff35d
chore(@embark/): remove old modules blockchain-process & code-generator; remove old methods from engine.js (#1875)
chore (@embark/) remove old modules blockchain-process and code-generator

chore (@embark/) remove old module blockchain-process

chore (@embark/) remove embark blockchain & embark simulator cmds

chore (@embark/) remove old methods from engine.js

Revert "chore (@embark/) remove embark blockchain & embark simulator cmds"

This reverts commit 703a424fb9e720b9342acb4cf9d00530f7393059.

re-add cockpit modules

re-add cockpit modules
2019-09-06 17:35:44 -04:00
Jonathan Rainville 0b9670fd33 Fix embark blockchain command + fix wss in Embark (#1874)
* fix(@embark/cmd_controller): fix embark blockchain command

* feat(@embark/blockchain): ping endpoint before starting the node

also use web3 instead of function to ping endpoint

* dont override console.error completely
2019-09-06 15:08:33 -04:00
Pascal Precht 86ee867689 feat(@embark/specialconfigs): introduce dynamic addresses (#1873)
* fix embarkjs generation

fix ens setProvider

fix embarkjs objects

fix generated embarkjs provider

generate contracts

fix embarkjs-ens

* address some of the issues in the code review

* feat(@embark/specialconfigs): introduce dynamic addresses

This commit introduces a new Smart Contract configuration addressHandler
that lets users define a function to "lazily" compute the address of the
Smart Contract in question.

This is useful when a third-party takes care of deploying a dependency
Smart Contract, but the address of that Smart Contract only being available
at run-time.

Example:
```
deploy: {
  SimpleStorage: {
    fromIndex: 0,
    args: [100],
  },
  OtherContract: {
    deps: ['SimpleStorage'],
    address: async (deps) => {
      // use `deps.contracts.SimpleStorage` to determine address
    },
    abiDefinition: ABI
  },
}
```

In the example above, OtherContract will be deployed after SimpleStorage
because it uses the deps property to define Smart Contracts that it depends
on. All dependencies are exposed on the addressHandler function parameter
similar to deployment hooks.

Closes #1690
2019-09-06 15:02:51 -04:00
Eric Mastro 022a3c11ec fix(@embark/embark-deploy-tracker): Fix reading of empty file (#1872)
There was an error that would display on the second+ run of embark, that was causing by trying to read JSON of an empty file.

The solution was a combination of ensuring the file existed with defaults when enabled, and also ensuring we await the saving of the file.

Included is a bit of a refactor of how the tracking functions handled the “current chain”. Hopefully, this should make things more clear.

Tests have been updated accordingly.
2019-09-06 14:30:12 -04:00
André Medeiros 7e839e758e refactor: wire up coverage (#1865)
* refactor: wire up coverage

* refactor: coverage now reacts instead of being told what to do
2019-09-05 16:35:17 -04:00
Iuri Matias 718d19f7d3
re-add embarkjs generation (#1858)
* fix embarkjs generation

fix ens setProvider

fix embarkjs objects

fix generated embarkjs provider

generate contracts

fix embarkjs-ens

* address some of the issues in the code review

* address some of the issues in the code review

* address some of the issues in the code review

* address some of the issues in the code review
2019-09-05 16:04:52 -04:00
Jonathan Rainville b260e81055 refactor(@embark/cmd-controller): re add cargo for file watcher (#1855)
* refactor(@embark/cmd-controller): re add cargo for file watcher

(cherry picked from commit 5c77b4000742a14f42a6dc5c145672b9cd0957a3)

* use generate:all instea dof the event
2019-09-05 15:49:44 -04:00
Michael Bradley, Jr 8716373be2 fix: type checker and linter errors on master after recent PR merges 2019-09-05 13:33:34 -05:00
Jonathan Rainville 58ad62f32b refactor(@embark/cmd-controller): re add cargo for file watcher (#1857) 2019-09-03 14:03:29 -04:00
André Medeiros 230fe592a6
feat(@embark/test-runner): add reports to tests (#1864) 2019-09-03 13:38:36 -04:00
Eric Mastro f9557d4c93 refactor(@cockpit): Re-add APIs (#1831)
* refactor(@cockpit/contract-apis): Re-add contract APIs

Re-add functionality for Contract functionality to work in Cockpit.

# Conflicts:
#	packages/embark/src/lib/modules/blockchain-client/index.js
#	packages/embark/src/lib/modules/blockchain/index.js

* fix(@embark/transaction-tracker): re-enable oracle apis
2019-09-03 12:02:52 -04:00
Pascal Precht dd82a01b65 fix(@embark/cmd_controller): ensure namesystem is set up in console command (#1822)
This caused the console command to hang
2019-09-03 11:59:00 -04:00
Pascal Precht c7eb5868b9 fix(@embark/cmd_controller): ensure blockchain module is started before storage (#1821)
This is crucial as the storage module tries to generate/eval artifacts that
depend on a `web3` object inside the VM scope. The registration of that object
can only be garuanteed when the `blockchain:started` event has been fired.

This commit ensures these modules are not spinned up in parallel as we're running
into race conditions.
2019-09-03 11:56:12 -04:00
Michael Bradley, Jr 58c55ed88b fix(@cockpit): PropTypes typos: boolean -> bool, function -> func 2019-09-03 09:55:00 -05:00
dependabot-preview[bot] 939596cd58 build(deps-dev): bump eslint-config-react-app from 3.0.5 to 3.0.8
Bumps [eslint-config-react-app](https://github.com/facebook/create-react-app/tree/HEAD/packages/eslint-config-react-app) from 3.0.5 to 3.0.8.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/eslint-config-react-app@3.0.8/packages/eslint-config-react-app)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-03 09:55:00 -05:00
Michael Bradley, Jr 37b5cc0941 build(deps): add ajv@6.10.2 to deps of embark-scaffolding
embark-scaffolding imports ajv but it was not properly listed as a dependency
2019-09-03 09:22:18 -05:00
dependabot-preview[bot] 43cc536d4e build(deps): bump ajv from 6.5.5 to 6.10.2
Bumps [ajv](https://github.com/epoberezkin/ajv) from 6.5.5 to 6.10.2.
- [Release notes](https://github.com/epoberezkin/ajv/releases)
- [Commits](https://github.com/epoberezkin/ajv/compare/v6.5.5...v6.10.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-03 09:22:18 -05:00
Michael Bradley b736ebefcd refactor: initial steps toward 5.0.0-alpha.0 (#1856)
BREAKING CHANGE:

There are more than several breaking changes, including DApp configuration for
accounts.
2019-08-30 16:50:20 -04:00
dependabot-preview[bot] 1e13398933 build(deps): bump @babel/plugin-proposal-class-properties
Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel) from 7.3.0 to 7.5.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.3.0...v7.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-30 06:57:48 -05:00
dependabot-preview[bot] 59c92e121d build(deps): bump babel-loader from 8.0.4 to 8.0.6
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.0.4 to 8.0.6.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.0.4...v8.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-30 06:56:40 -05:00
Michael Bradley, Jr 775881318f refactor(@embark/utils): bip39.mnemonicToSeed -> bip39.mnemonicToSeedSync 2019-08-29 12:39:15 -05:00
dependabot-preview[bot] faa36550f7 build(deps): bump bip39 from 2.5.0 to 3.0.2
Bumps [bip39](https://github.com/bitcoinjs/bip39) from 2.5.0 to 3.0.2.
- [Release notes](https://github.com/bitcoinjs/bip39/releases)
- [Changelog](https://github.com/bitcoinjs/bip39/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bitcoinjs/bip39/compare/v2.5.0...v3.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 12:39:15 -05:00
dependabot-preview[bot] 459079cfe5 build(deps-dev): bump eslint-loader from 2.2.1 to 3.0.0
Bumps [eslint-loader](https://github.com/webpack-contrib/eslint-loader) from 2.2.1 to 3.0.0.
- [Release notes](https://github.com/webpack-contrib/eslint-loader/releases)
- [Changelog](https://github.com/webpack-contrib/eslint-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/eslint-loader/compare/v2.2.1...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 12:27:07 -05:00