For reasons unknown, `ECONNRESET` errors on websocket connections to embark's
blockchain proxy are not automatically handled on Windows as they are on macOS
and Linux (or those errors aren't happening on those platforms, it's difficult
to determine). Explicitly swallow such errors so the blockchain process doesn't
crash. Prior to this PR, the crash-behavior can be reproduced on Windows by
running `embark blockchain` and `embark run` in separate terminals and quitting
`embark run` while `embark blockchain` is still running.
Consistently use the `simples` package's `WsParser` to process websocket
traffic instead of using `WsParser` for requests and the `ws` package's
`Websocket.Receiver` for responses.
Consistently use `pump` to connect parser streams instead of using `pump` in
some places and `chain` in others. Drop use of `cloneable` (and the package
dependency) since it was used previously in hopes it would fix the errors, but
it's unnecessary and didn't fix them.
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.
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.
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.
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.
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.
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.