Commit Graph

5591 Commits

Author SHA1 Message Date
Pascal Precht 57c3502f1f refactor(@embark/coverage): move coverage module into own package
This commit also moves several utility methods into @embark/utils as needed.
2019-05-22 11:47:29 +02:00
Pascal Precht 8ca6419a4e fix(@embark/pipeline): ensure color methods for logs are available
As part of 880a3a6946, we've introduced a
regression where the `colors` package isn't imported in the scope anymore where it's
needed. In this case the pipeline package. This resulted in log output messages
such as:

```
undefinedwriting fileundefined
```

Adding the `colors` package as dependency and importing it accordingly
fixes the issue.
2019-05-21 14:46:03 +02:00
Michael Bradley, Jr a10bd69756 docs: move root readme into packages/embark and symlink into root 2019-05-21 12:12:15 +02:00
Ricardo Guilherme Schmidt 4d079de1f4 fix(@embark/ens): use namehash for resolver 2019-05-21 12:11:14 +02:00
Pascal Precht 3df7f81732
refactor: move `dappPath`, `ipcPath` and `embarkPath` into @embark/utils 2019-05-17 11:25:40 +02:00
Michael Bradley, Jr a519a5d527 build: adjust reset script to delete coverage dirs if pkg has test script
Make the adjustment even if the test script is currently disabled. Consistently
use nyc to generate coverage with mocha even if the test script is currently
disabled.
2019-05-16 12:30:03 -05:00
Michael Bradley, Jr 4ee1567264 chore(release): 4.1.0-beta.1 2019-05-15 18:44:46 -05:00
Michael Bradley, Jr c4d647c299 fix(@embark/api): setup the embark-ui build dir before the express instance 2019-05-15 18:16:41 -05:00
Michael Bradley, Jr 78f7c52080 build: supply missing deps so production builds can function correctly 2019-05-15 18:15:50 -05:00
Pascal Precht 880a3a6946 refactor(@embark/pipeline): move pipeline into own package 2019-05-15 19:59:59 +02:00
Michael Bradley, Jr 79873bd3e7 build(@embark/deploy-tracker): disable watch:typecheck script 2019-05-15 12:52:20 -05:00
Michael Bradley, Jr 5799e00708 refactor(@embark/template_generator): use yarn to install template deps if embark cli is in monorepo
If the `embark` cli is detected to be inside the monorepo, the template
generator yarn-links any template deps that are part of the monorepo into the
dapp. However, `embarkjs-connector-web3` now has a dependency on `embark-core`,
which in turn has a dependency on `embark-i18n`. That causes `npm install` to
fail inside the dapp because npm checks for deps of `embarkjs-connector-web3`
relative to the dapp instead of checking relative to the symlink. `yarn
install` does not suffer from that behavior so use it instead.
2019-05-15 11:54:30 -05:00
Michael Bradley, Jr e1434259d6 build: add nohoist entry for bootstrap package relative to dapps/templates/demo
The demo's `embark.json` relies on the bootstrap package being within the
demo's own `node_modules`, but in the monorepo yarn was hoisting it up to the
root `node_modules`.
2019-05-15 09:38:00 -05:00
emizzle f5722546b1 refactor(@embark/debugger): Move to embark-debugger
Move the debugger module to the `embark-debugger` package.

Handle case where `debug` is entered as a console command, and there is no transaction to be debugged.

add embark-i18n and mocha deps
2019-05-15 14:39:00 +02:00
Andre Medeiros 46c4a5c79c chore: move deploytracker to embark-deploy-tracker module 2019-05-15 14:38:34 +02:00
emizzle 634feb597a feat(@embark/api): Add command `service api on/off`
Add support for `service api on/off` commands.

Deprecate commands `api start/stop` in favor of `service api on/off`.

`service api on` - Enables the API server serving Cockpit. Shows an error if the API server is already starting or started.

`service api off` - Disables the API server serving Cockpit. Shows an error if the API server is already stopping or stopped.

`api start` - This command has been deprecated in favor of `service api on` and will be removed in future versions.

`api stop` - This command has been deprecated in favor of `service api off` and will be removed in future versions.

`api:start` - This event has been deprecated and will be removed in future versions.

`api:stop` - This event has been deprecated and will be removed in future versions.
2019-05-15 14:28:10 +02:00
Andre Medeiros 3a07d34cc2 chore: move embark_listener to module 2019-05-15 14:27:44 +02:00
emizzle fc01daf3e9 feat(@embark/whisper): Remove support for `service whisper on/off`
Remove support for `service whisper on/off` because Whisper cannot be started without first disabling it in the communications config, then restarting Embark.

Add documentation for the `service [process] on/off` command

This command was only added a few commits back so it is not considered a breaking change.

Refactor the `service [process] on/off` commands so that there is only one command. Previously we had a command registered for each process, ie:
```
service blockchain on/off
service ipfs on/off
…
```

Now, we only have one command with many options:
```
service [process] on/off - Starts/stops the process. Options: blockchain, embark, ipfs, api
```

Whisper is deliberately not included in the available options for the aforementioned reasons.
2019-05-15 13:34:13 +02:00
Pascal Precht e3ecf68fbc refactor: move embarkPath, ipcPath and dappPath into embark-core
This enables removing unnecessary `core/fs` dependencies which can be
replaced with `fs-extra`.

This commit also fixes a bug introduced in f868d1216d
where methods from `embark.fs` weren't available.

The reason for that is because we have several *Process instances
that are created through child process communication, specifically
process.send() APIs. Using those APIs, we can only send data structures
however, methods attached on any of those will get lost.

This is the case when sending embark.fs through process.send().

We still need fs in those places though, mostly because they are relying
on embarkPath and dappPath().

These places are now importing those functions from `embark-core`. Other
API such as writeFile or mkdirp() can be accessed through fs-extra
or fs modules.
2019-05-15 12:20:22 +02:00
Michael Bradley, Jr cae583137c refactor: bump ganache-cli to latest stable version for compat with newer solc
Fixes #1461
2019-05-14 10:12:24 -05:00
Andre Medeiros 85cf9ac44b chore: upgrade ethereumjs-wallet
This pull-request upgrades `ethereumjs-wallet`, which has upgraded the underlying dependency on scrypt.js to 0.3.0, making scrypt an optional dependency and offering a pure JS version as a fallback.

The reasoning behind this is that scrypt is problematic to install in some systems, particularly those that don't have node-gyp setup and we have seen some weird issues when installing with elevated privileges (i.e. `sudo npm install -g scrypt`)
2019-05-12 18:20:34 -04:00
Michael Bradley, Jr efb63af71e hotfix: bump yarn.lock
PR #1607 didn't include changes to `yarn.lock` after a dependency was added to
`dapps/templates/demo`.
2019-05-10 18:04:36 -05:00
Pascal Precht 192549add1 refactor(@embark/blockchain-connector): move blockchain connector into own module 2019-05-10 16:57:23 -04:00
Pascal Precht 8dd7300e3c chore: remove process-logs-api package from embark package
This module has been moved already and is therefore a left over here.
2019-05-10 16:56:59 -04:00
Pascal Precht 9239012bc6 chore(site): fix typos 2019-05-10 16:54:21 -04:00
Ricardo Guilherme Schmidt 438e9178ce fix(@embark/demo): link css from dependency 2019-05-10 16:51:45 -04:00
Pascal Precht cae8075682 refactor(@embark/solidity): move solidity module into own package 2019-05-10 16:44:54 -04:00
Pascal Precht f868d1216d refactor(@embark/blockchain-process): introduce package for blockchain-process module 2019-05-10 16:44:43 -04:00
Jonathan Rainville f9d7a3f41b feat(@embark/test-runner): show interface contract message in tests
But only show it if the contract was in the contract config
2019-05-10 09:49:34 -04:00
Jonathan Rainville 334d3bcdc5 feat(@embar/contracts-manager): add message for interface contracts 2019-05-10 09:49:34 -04:00
Jonathan Rainville 1f02e493c4 feat(@embark-site): add troubleshooting guide on interface contracts 2019-05-10 09:49:34 -04:00
Pascal Precht 84439cb6fe refactor(@embark/blockchain-listener): move blockchain listener APIs into package 2019-05-09 12:57:04 +02:00
Jonathan Rainville a22d8fc6c4 fix(test): fix accountParser test in regards to privateKey fix 2019-05-08 15:55:06 -05:00
Michael Bradley, Jr fd09488e4b fix(@embark/core): move process.on inside ProcessWrapper's constructor
This avoids mistakenly placing process event handlers on the parent process
whenever the `embark-core` package is loaded. Also, don't listen for an
`'exit'` event on `process` and then call `process.exit(0)` since the event "is
emitted after the child process ends" ([docs][docs]), i.e. it's unnecessary to
do so and in any case it's not correct to always exit with code `0`.

[docs]: https://nodejs.org/docs/latest-v10.x/api/child_process.html#child_process_event_exit
2019-05-08 15:55:06 -05:00
Michael Bradley, Jr 2eb5617443 refactor: use explicit codes with process.exit so intent is clear and errors don't exit cleanly 2019-05-08 15:55:06 -05:00
Jonathan Rainville 8781585341 fix(@embark/site): fix strategy not put in the right section 2019-05-08 16:25:17 -04:00
Michael Bradley, Jr 8b94419670 refactor(@embark/i18n): expose __ from embark-i18n, drop global __ 2019-05-08 11:01:16 +02:00
Jonathan Rainville fc02405db2 fix(@embark-utils/accountParser): fix privateKey accounts 2019-05-08 10:59:44 +02:00
emizzle 3dcc339e4d feat(@embark/storage): Add command `service swarm on/off`
Add support for ability to start and stop Swarm via command `service swarm on/off`.

Fix issue with swarm not starting due to missing web3 object.

`service swarm on` - starts a swarm node if not already started. Shows an error if the node is already starting or started.

`service swarm off` - kills the running swarm node as long as Embark has started the swarm process. If the swarm process was started externally, an error is shown.
2019-05-07 16:28:42 -04:00
Pascal Precht b5db6857a8
fix: add missing linkjuice built
We lost this when we moved the site into the monorepo because
all `dist` folders were ignored.

Co-Authored-By: PascalPrecht <pascal.precht@googlemail.com>
2019-05-07 17:42:32 +02:00
Michael Bradley, Jr 2f2c0eefbf refactor(@cockpit/explorer): revise transactions explorer per techniques of PRs #1492, #1494
In addition to introducing improvements per #1492 and #1494, adjust the
transactions request action to allow for a `blockLimit` argument, since that
API parameter is supported by embark.

Revise `changePage` to invoke `fetchTransactions` correctly, i.e. with
arguments pertaining to a starting block number and a block limit.

These changes together fix most of the pagination problems related to exploring
transactions, i.e. badly mis-ordered results are no longer displayed.

However, a *wart* still remains related to estimation of the total number of
transactions and pages. Sometimes the calculated number of pages for the
transactions explorer doesn't match up to the actual number of transactions on
the blockchain (owing to estimation). The pagination controls and display of
transactions will temporarily behave a little strangely if one jumps ahead in
the pages, e.g. a jump from cockpit explorer overview's transactions page 1 to
page 5 for embark's demo, if an additional transaction has been added and the
explorer overview is freshly loaded. This behavior is related to the fact that
actions such as `fetchBlocksFull` and `fetchTransactions` are async without any
means to determine when all actions have completed and React re-/rendering has
settled down.

There are probably some architectural changes that could improve the situation,
but they're outside the scope of this PR and in no way easy to solve by means
of React lifecycle methods. In fact, attempts to make an improvement with
`componentDidUpdate` (and watching what happens in the debugger) revealed the
nature of the problem, as described above.
2019-05-07 10:40:27 -05:00
Michael Bradley, Jr fa2807b335 refactor(@cockpit/explorer): revise blocks explorer per techniques of PRs #1492, #1494 2019-05-07 10:39:58 -05:00
Pascal Precht 8a0c33c91e refactor(@embark/utils): move compact utility into utils package 2019-05-07 13:26:42 +02:00
Pascal Precht 1330b9fb7a refactor(@embark/i18n): introduce embark-i18n package 2019-05-07 13:05:22 +02:00
Pascal Precht 21a0f62d86 refactor(@embark/core): move IPC into core package 2019-05-07 12:51:29 +02:00
Pascal Precht 9acf256dc7
fix(@embark/blockchain_process): use correct import for ProcessWrapper 2019-05-07 10:12:37 +02:00
Pascal Precht ed13aecc25 refactor(@embark/core): move process APIs to embark-core 2019-05-07 10:06:48 +02:00
Pascal Precht daaa0e649d refactor(@embark/utils): move buildUrl and buildUrlFromConfig to utils 2019-05-07 10:06:48 +02:00
yanqian 0f2a8231e0 docs(using_the_console): fix typo of methods call 2019-05-07 09:50:00 +02:00
Michael Bradley, Jr 437cc3feed refactor(@embark/console-listener): move console_listener into embark-console-listener package 2019-05-06 15:37:52 -05:00