Commit Graph

4987 Commits

Author SHA1 Message Date
Jonathan Rainville 33f2b02ee7 chore(web3): update web3 beta to version 37 2018-12-12 14:44:31 -05:00
Andre Medeiros c98dbc24de feature: introduce code coverage 2018-12-12 10:42:00 -05:00
Jonathan Rainville 427d2c69a8 chore(test/coverage): warn when using RPC and coverage in tests 2018-12-11 15:08:43 -05:00
Jonathan Rainville d30b00e526 fix(cockpit/editor): remove arrows next to files in file explorer 2018-12-11 15:08:25 -05:00
Jonathan Rainville ebd827bc55 fix(compiler): fix compiler being fired twice 2018-12-11 15:07:49 -05:00
Jonathan Rainville 6e4a612fef fix(embarkjs/web3): make global web3 available again 2018-12-11 15:07:23 -05:00
Anthony Laibe d10d906ee7 feat(ui): auto updates contracts in cockpit 2018-12-11 15:49:19 +00:00
Anthony Laibe a92a98608c feat(ui): auto updates services in cockpit 2018-12-11 11:58:03 +01:00
Pascal Precht 8a5871e606 fix(@embark/cockpit/converter): allow decimal numbers
Prior to this commit, it wasn't possible to enter decimal numbers
with dots. The reason for that is that all units are recalculated
on form control change and values like `2.` are simply converted to
`2`.

As every change will cause a `setState()` in Cockpit, users never had
a chance to get "beyond" the first dot of their input value.

This is now fixed by preventing the recalculation all together when
the last character in the entered value is a `.`

In that case, we simply update the form control using `setState()` and
don't touch all the other values. The next key stroke will cause a full
recalculation again.
2018-12-11 11:56:31 +01:00
Iuri Matias 8cbbcfe89e chore(@embark): re-add linting dependencies to devDependencies 2018-12-07 21:47:18 -05:00
Iuri Matias 74985f4174 chore(@embark): update remix-debug dependency 2018-12-07 21:47:18 -05:00
Iuri Matias d733906c9b chore(@embark): remove no longer needed dependency compression-webpack-plugin 2018-12-07 21:47:18 -05:00
Iuri Matias 9c3e0b9ef6 chore(@embark): remove no longer needed dependency eth-lib 2018-12-07 21:47:18 -05:00
Iuri Matias 0a2b785cb1 chore(@embark): remove no longer needed dependency finalhandler 2018-12-07 21:47:18 -05:00
Iuri Matias 09febdd851 chore(@embark): remove no longer needed dependency http-shutdown 2018-12-07 21:47:18 -05:00
Iuri Matias 6f7dd99d57 chore(@embark): move is-valid-domain dependency into embark 2018-12-07 21:47:18 -05:00
Iuri Matias 332842d101 chore(@embark): remove unused dependency node-netcat 2018-12-07 21:47:18 -05:00
Iuri Matias 0c7d6699e6 chore(@embark): move subdir dependency into embark 2018-12-07 21:47:18 -05:00
Iuri Matias ee55550b8b chore(@embark): move toposort dependency into embark itself 2018-12-07 21:47:18 -05:00
Iuri Matias c645b9b8f8 chore(@embark): remove unused dependency underscore 2018-12-07 21:47:18 -05:00
Iuri Matias 958e93ef10 chore(@embark): move react-scripts to embark-ui 2018-12-07 21:47:18 -05:00
Iuri Matias 7d36cef3fa chore(@embark): remove unused dependency webpack-bundle-analyzer 2018-12-07 21:47:18 -05:00
Iuri Matias 219eaab13d chore(@embark): move getWindowSize to utils 2018-12-07 21:47:18 -05:00
Iuri Matias 94d7d60e6f chore(@embark): remove unused dependency websocket 2018-12-07 21:47:18 -05:00
Iuri Matias bd737569f2 feature(@embark): use embarkjs 0.5.0 2018-12-07 19:29:10 -05:00
Jonathan Rainville 20fccfb1c6 refactor(blockchain): add a web3 provider for embarkJS 2018-12-07 19:29:10 -05:00
emizzle 75111569a2 feat(@embark/core): Support directives in ENS config
Support directives in ENS configurations, such that subdomains can be registered to addresses of deployed tokens.

The following directives are supported:
```
"register": {
      "rootDomain": "embark.eth",
      "subdomains": {
        "status": "0x4a17f35f0a9927fb4141aa91cbbc72c1b31598de",
        "mytoken": "$MyToken",
        "MyToken2": "$MyToken2"
      }
    }
```

Add unit test for these directives.
2018-12-07 10:21:47 -05:00
emizzle c24536d8a6 fix(@embark/core): Disable swarm if URL can’t be determined
If the storage config is set up in such a way that a URL for swarm cannot be determined, the swarm module will exit early.

For example, if the storage config looks like:
```
available_providers: ["ipfs", "swarm"],
    upload: {
      provider: "ipfs",
      host: "localhost",
      port: 5001
    },
    dappConnection: [
      {
        provider:"ipfs",
        host: "localhost",
        port: 5001,
        getUrl: "http://localhost:8080/ipfs/"
      }
    ]
```
Then there is no way to determine the swarm URL as neither `upload` nor `dappConnection` specify a provider with `swarm`. If this is the case, the swarm module will exit in it’s constructor.

Add a warning message in the console for the users.
2018-12-07 10:21:28 -05:00
Anthony Laibe 9854368c24 feat(scaffold): use ipfs in scaffold and upload file 2018-12-07 10:20:14 -05:00
Andre Medeiros 168d774551 feature(@embark/tests): allow running tests via API 2018-12-07 10:19:52 -05:00
emizzle 1e2cb64141 feat(@embark/core): Allow search to find contract by name
In the cockpit, allow the search to find the contract by name. For example in the test_app, searching for “Token” (or “token”) in the cockpit, will take the user to the Token contract page.
2018-12-07 10:19:14 -05:00
Jonathan Rainville 13ed141e5d add txHash 2018-12-07 10:17:09 -05:00
Jonathan Rainville 37c28b9727 fix(debugger): fix and improve console commands 2018-12-07 10:17:09 -05:00
Jonathan Rainville 5b6b582459 chore(console): add new command descriptions to the help command 2018-12-07 10:17:09 -05:00
Jonathan Rainville 8b0d37ca9e chore(blockchain): rename `log geth` cmd to log blockchain 2018-12-07 10:17:09 -05:00
Jonathan Rainville e2257e8026 chore(authenticator): remove copyToken command and move logic token 2018-12-07 10:17:09 -05:00
Iuri Matias d0d3a35e9e feature(@embark/debugger): enable/disable debugger prev/next buttons in cockpit 2018-12-07 10:16:16 -05:00
emizzle b49839afdc feat(@embark/core): improve long running webpack UI
The webpack process took quite a while to run, and there were no updates in the console while running.

This PR adds a spinner (when there is no dashboard) and status updates every 5 seconds. When there is a dashboard, the updates are added to a new line.

After (with dashboard):
![with dashboard](https://i.imgur.com/zVJH5U4.png)

After (`—nodashboard`):
![no dashboard](http://g.recordit.co/2zRNLt51jU.gif)

Convert LongRunningProcessTimer to TypeScript

PR feedback and consistency changes

Changed the constructor signature to accept an options object instead of individual optional parameters, for readability.

Changed library_manager to use the spinner when not using the dashboard, for consistency’s sake. Additionally increased the update time for the library manager from 750ms to 1s.

Fix lint errors

Added `"variable-name": ["allow-leading-underscore”]` to `tslint.json` due to a lack of the ability to prefix backing variables with underscore. This is an [ongoing discussion](https://github.com/palantir/tslint/issues/1489), and something the community thinks should be implemented, as it the preferred way to use a property with backing variable in TypeScript.
2018-12-07 10:10:11 -05:00
Iuri Matias 6858de4ff5 refactor(@embark/console): refactor duplicated fuzzy search into a single private method 2018-12-07 10:07:34 -05:00
Iuri Matias 00be382be7 bugfix(@embark/console): catch exceptions from a badly regex caused by a suggestion contains ( or ) at the end of the string 2018-12-07 10:07:34 -05:00
emizzle 27babf0187 fix(@embark/core): Restart IPFS after CORS Update
When adding URLs to IPFS CORS that are not localhost, the IPFS daemon needed to be restarted after non-localhost CORS updates were added to the IPFS config. Without the restart, any non-localhost URLs added to the CORS were not being sent in the CORS header.

After this change, when the IPFS process is run, the following happens:
1. IPFS config is checked if the correct CORS settings are present in the config.
2. If not present, they are updated and IPFS is restarted.
3. If they are present, continue without restarting IPFS.
2018-12-07 10:05:21 -05:00
Jonathan Rainville 5928d134fc refactor(blockchain/accounts): refactor blockchain config accounts 2018-12-07 10:02:34 -05:00
Pascal Precht 0bb7d6352c feat(@embark/deployment): output transaction hash during deployment asap 2018-12-07 09:47:32 -05:00
Pascal Precht 3099894ed7 feat(@embark/deployment): output transaction hash of contract deployment 2018-12-07 09:47:32 -05:00
Anthony Laibe 5a375d9a5e feat: enable ethereum manually 2018-12-07 09:30:29 -05:00
Anthony Laibe 72f87012a9 fix: windows path separator being wrong 2018-12-06 13:33:00 +00:00
Michael Bradley, Jr cc79ebb922 chore(release): 4.0.0-alpha.2 2018-12-05 15:27:21 -06:00
Jordan Last 53780aaa96 feat(@embark/cli): repl support inside dashboard
Closes #768
2018-12-05 12:41:13 +01:00
Pascal Precht 90aac8343e feat(@embark/plugins): introduce API to register a contract factory
This commit introduces two new plugin APIs `registerTestContractFactory()` and
`registerCustomContractGenerator()`, which can be used to register a factory function
for the creation of web3 contract instances within tests, and custom code generation
  for `embark console` respectively.

Example:

```
// some.plugin.js

module.exports = function (embark) {
  embark.registerTestContractFactory(function (contractRecipe, web3) {
    // do something with web3 and contractRecipe and return contract instance here
  });
};
```

**Notice that**:

- This factory function is used for contract instance creation within tests.
  A `contractRecipe` and a `web3` instance is accessible within the factory.

Example:

```
// some.plugin.js

module.exports = function (embark) {
  embark.registerCustomContractGenerator(function (contractRecipe) {
    // returns code string that will be eval'ed
  });
};
```

**Notice that**:

- Once registered, this generator will be used for **all** contract instances
  that will be created for `embark console`, including built-in once like
  ENSRegistry.

- While this does affect contract creation in client-side code, it doesn't
  actually affect the instances created for deployment hooks **if** deployment
  hooks are written as functions.

Closes #1066

Always use custom generator and fallback to vanilla
2018-12-05 12:33:31 +01:00
Pascal Precht 639b8d8ebd chore(@embark/code-generator): remove unused code 2018-12-05 12:33:31 +01:00