301 Commits

Author SHA1 Message Date
Michael Bradley, Jr
d5c984c592 build: use babel cli's --extensions consistently in all packages
If a package uses only `.js` then supply `--extensions ".js"`. If a package
uses only `.ts` then supply `--extensions ".ts"`. If a package uses both, then
supply `--extensions ".js,.ts"`.

The reason for this is that adding/removing TS/JS support ought to occasion
revising a package's `package.json` file and adjusting other scripts as well,
e.g. for linting. With these changes, it won't work to simply start adding
`.ts` files in a package's `src/` directory, which should prompt the developer
to review `package.json` and make the appropriate changes, and/or other
developers may realize changes need to be made during code review.
2019-05-02 20:33:42 -05:00
Michael Bradley, Jr
142130e533 build: bump typescript in all relevant pkgs from v3.3.1 to v3.4.5
The more recent version of TypeScript works around a [problem][chalk-problem]
encountered with the chalk package's type definitions.

[chalk-problem]: https://github.com/chalk/chalk/pull/296#issuecomment-418789492
2019-05-02 20:24:02 -05:00
Michael Bradley, Jr
ae8ec69dc9 fix(@embark/api): specify colors package as a dependency 2019-05-02 11:10:24 -04:00
Michael Bradley, Jr
2d2281999d fix(@embark/library-manager): specify colors package as a dependency 2019-05-02 11:10:05 -04:00
Iuri Matias
a12769fd30 bugfix(@embark/embark): import colors do type string has missing properties 2019-05-02 10:02:47 -04:00
Pascal Precht
244e2e2fb1
fix(@embark/utils): expose longRunningProcessTimer properly
This seemed to have slipped through when reviewing 94c7ab3e12
2019-05-02 12:52:05 +02:00
Pascal Precht
dd898f0c7a refactor(@embark/utils): move web3 dependent functions into web3Utils 2019-05-02 12:07:19 +02:00
Pascal Precht
baf6f20066 refactor(@embark/test-runner): move test module into test-runner package 2019-05-02 12:07:19 +02:00
Pascal Precht
03d779ef5e refactor(@embark/utils): move transaction utils into utils package 2019-05-02 12:07:19 +02:00
Pascal Precht
7174f55c6c refactor(@embark/utils): move decodeParams and sha3 into web3Utils 2019-05-02 12:07:19 +02:00
Pascal Precht
6fbc1afbd1 refactor(@embark/utils): move accountParser into utils 2019-05-02 12:07:19 +02:00
Pascal Precht
e8408ece75 refactor(@embark/utils): move web3 helper functions into web3Utils file 2019-05-02 12:07:19 +02:00
Pascal Precht
5c3f39442b refactor(@embark/utils): move getHexBalanceFromString to utils package 2019-05-02 12:07:19 +02:00
Pascal Precht
e3aed6a423 refactor(@embark/utils): move getWeiBalanceFromString and contractsConfig.prepare into utils
This also renames `prepare` to `prepareContractsConfig` to make it less ambiguous.
2019-05-02 12:07:19 +02:00
Pascal Precht
93568ad911 refactor(@embark/utils): move unitRegex into utils package 2019-05-02 12:07:19 +02:00
Pascal Precht
b9fe741585 refactor(@embark/utils): move timer and deconstructUrl helper functions 2019-05-02 12:07:19 +02:00
Andre Medeiros
a75fa7941f fix: parity origins 2019-05-02 10:43:56 +02:00
Pascal Precht
94c7ab3e12 refactor(@embark/library_manager): move library manager into own package 2019-05-02 10:42:49 +02:00
Pascal Precht
6308c82993 refactor(@embark/embark-utils): move last fn into utils package 2019-05-02 10:42:49 +02:00
Michael Bradley, Jr
fbfe376101 fix(@embark/api): import colors pkg so type string has .stripColors 2019-05-01 12:06:16 -05:00
Iuri Matias
086b3a3877 refactor (@embark/embark-api): move embark-api to its own module 2019-05-01 07:24:19 -04:00
Michael Bradley, Jr
436cfcbca0 refactor(@embark/contracts-manager): move contracts_manager into embark-contracts-manager package 2019-04-30 13:03:48 -05:00
Michael Bradley, Jr
65f3a270c0 refactor(@embark/utils): move proposeAlternative, toposort into embark-utils package 2019-04-30 12:39:33 -05:00
Michael Bradley, Jr
60ff097406 refactor(@embark/core): create embark-core package, move constants into embark-core 2019-04-30 12:11:25 -05:00
Jonathan Rainville
d386bffda9 refactor(@embark/authenticator): move authenticator to a package 2019-04-30 12:06:54 -04:00
Jonathan Rainville
bcd006a1cf refactor(@embark/utils): move copyToCliboard to embark-utils 2019-04-30 12:06:54 -04:00
Michael Bradley, Jr
ad01d1402c test: collect code coverage in the root of the monorepo
Implement scripts to collect coverage reports (JSON format) from all packages
in the monorepo that generate such reports. Reports are copied to
`<root>/.nyc_output/coverage-[pkg-dir-name].json`.

Implement scripts to generate a combined html report in `<root>/coverage`.

Adjust root `reset` and `clean` scripts to delete `<root>/.nyc_output` and
`<root>/coverage`.

Implement a script in `<root>/package.json` to generate a `text-lcov` report
and upload it to coveralls from CI builds. Remove coveralls from
`packages/embark`.

Supply `packages/embark` with an nyc configuration in its `package.json` and
have its `"test":` script generate both `json` and `html` reports.

Use nyc with `embarkjs`'s test suite: supply an nyc configuration in its
`package.json` and have its `"test":` script generate both `json` and `html`
reports.

Adjust `embarkjs`'s tests for more accurate coverage reporting.
2019-04-30 12:04:01 -04:00
emizzle
0c394fea29 feat(@embark/webserver): Add support for service webserver on/off
Add support for `service webserver on/off` commands.

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

Handles passing through of arguments to the function executed after process launch.

`service webserver on` - Enables the webserver serving the DApp. Shows an error if the webserver is already starting or started.

`service webserver off` - Disables the webserver serving the DApp. Shows an error if the webserver is already stopping or stopped.

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

`webserver stop` - This command has been deprecated in favor of `service webserver off` and will be removed in future versions.
2019-04-30 12:02:02 -04:00
Jonathan Rainville
7495095d49 refactor(@embark/ens): move ens module to embark-ens package 2019-04-30 16:31:07 +02:00
Jonathan Rainville
8506778384 refactor(@embark/utils): move addressUtils to embark-utils 2019-04-30 16:31:07 +02:00
Jonathan Rainville
7eb85f0fbe fix(@embark/specialconfig): fix undefined contract name in onDeploy 2019-04-30 08:37:46 -04:00
Michael Bradley, Jr
33ee6d8d35 test: disable test script for packages without any tests
Several `embarkjs-*` packages specify a `"test":` script in their respective
`package.json` files but lack any tests, causing `yarn test` in the root of the
monorepo to fail. For now, disable those scripts.
2019-04-29 09:04:13 -05:00
Pascal Precht
a874c38d72 refactor(@embark/embark-logger): move logger into own package 2019-04-29 13:00:10 +02:00
Pascal Precht
69ced6d894 refactor(@embark/embark-scaffolding): introduce new embark-scaffolding package 2019-04-29 12:06:59 +02:00
Pascal Precht
c9e335ea21 refactor(@embark/embark-utils): move runCmd utility to utils package 2019-04-29 12:06:59 +02:00
Jonathan Rainville
70a528c296 refactor: move process-logs-api to its own packages 2019-04-26 12:37:19 -04:00
Pascal Precht
e1f80eb1be refactor: move watcher into embark-watcher package 2019-04-26 16:45:52 +02:00
Jonathan Rainville
83b0a68eef refactor(@embark-utils): move logHandler and normalizeInput in utils 2019-04-26 16:38:19 +02:00
Jonathan Rainville
483f692e0b refactor(@embark-utils): move escapHtml to embark-utils 2019-04-26 16:38:19 +02:00
Pascal Precht
2464fb69af
Revert "refactor: move env module into own embark-env package"
This reverts commit 4f8734f19b5fdf0ac7a0e93c47f38716f7295bde.
2019-04-25 17:35:40 +02:00
Jonathan Rainville
d5c3a9cf1d fix(@embark/console): fix cockpit console if using console command 2019-04-25 10:58:00 -04:00
Pascal Precht
4f8734f19b refactor: move env module into own embark-env package 2019-04-25 16:29:04 +02:00
Pascal Precht
0260154804 refactor(@embark/utils): move sha512 util into embark-utils package 2019-04-25 15:26:56 +02:00
Jonathan Rainville
fa0220c950 refactor(@embark/embark-trasaction-tracker): move tx tracker to pck 2019-04-24 18:39:26 -04:00
Andre Medeiros
c51ec5029b fix: dashboard auto complete 2019-04-24 18:38:51 -04:00
Andre Medeiros
ea7ae22501 fix: improve wording on contract constructor failing 2019-04-24 18:38:15 -04:00
emizzle
7a76516534 feat(@embark/blockchain): Restart Ethereum via command
Add support for `service blockchain on/off` in the console.

Add service on/off command for each process started by, ie `service blockchain on/off` and `service whisper on/off`.

`service blockchain off` - Kills the blockchain process, stops the web3 provider, and shuts down the proxy (if used). In the case of `embark blockchain`, the entire process is exited.

`service blockchain on` - Starts the blockchain process *as a child process of the main embark process* then starts the web3 provider. This happens regardless of whether or not it was initially started with `embark blockchain` (see known issues).

## Known issues
1. If the blockchain process was started with `embark blockchain`, and then the blockchain process is killed with the `service blockchain off` command, when the blockchain process is restarted with `service blockchain on`, it will be restarted as a child process of the main embark process. It may be possible to allow for the blockchain process to be restarted in the same process it was originally started in, however this will take more development effort and can be handled in a different PR.
2. Parity has not been tested as it is currently not working in the master branch.
3. This PR adds a generic registration of commands for each process, ie `service whisper on/off`, however the only supported command is the `service blockchain on/off` command. Further support for other commands can be handled in separate PRs.
2019-04-24 18:37:15 -04:00
Pascal Precht
bf0f4392a4 fix(@embark/deployment): only log error when error exists
This was a regression introduced in 72fc80df53
2019-04-23 12:18:34 +02:00
Andre Medeiros
740196684c fix: update solidity-parser-antlr to allow the use of the payable keyword in contracts 2019-04-22 11:44:32 -04:00
Andre Medeiros
0f4e554b22 fix: make coverage more forgiving 2019-04-22 11:44:32 -04:00