Commit Graph

44 Commits

Author SHA1 Message Date
Michael Bradley, Jr 3b649fa455 build: phase 1 of introducing embark-collective 2019-10-01 13:28:13 -05: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
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
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
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
Michael Bradley, Jr 706e43c9c5 chore(release): 4.1.1 2019-08-28 14:52:21 -05:00
Jonathan Rainville dd07f6713a fix(@embark/demo): add back lights 2019-08-27 20:58:22 -05:00
Michael Bradley, Jr 6a64124e13 build(deps-dev): bump react-dom to 16.9.0 2019-08-26 09:41:27 -05:00
dependabot-preview[bot] 97cc709d7f build(deps-dev): bump react from 16.7.0 to 16.9.0
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.7.0 to 16.9.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.9.0/packages/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-26 09:41:27 -05:00
Jonathan Rainville 844e8ca55f Fix demo style and improve (#1818)
* fix(@mbark/embarkjs): enable using wss in embarkjs and the Dapp

* fix(@embark/demo): fix demo style by and improvise

* update yarn.lock. CI please be gentle
2019-08-23 11:51:03 -04:00
dependabot-preview[bot] dca6342330 build(deps): bump rimraf from 2.6.3 to 3.0.0
Bumps [rimraf](https://github.com/isaacs/rimraf) from 2.6.3 to 3.0.0.
- [Release notes](https://github.com/isaacs/rimraf/releases)
- [Changelog](https://github.com/isaacs/rimraf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v2.6.3...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-20 13:44:24 -05:00
dependabot-preview[bot] 113ff0a00f build(deps-dev): [security] bump bootstrap from 4.1.2 to 4.3.1
Bumps [bootstrap](https://github.com/twbs/bootstrap) from 4.1.2 to 4.3.1. **This update includes a security fix.**
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v4.1.2...v4.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-19 09:15:34 -05:00
dependabot-preview[bot] 80c7ff2264 build(deps-dev): [security] bump bootstrap from 3.3.7 to 4.1.2
Bumps [bootstrap](https://github.com/twbs/bootstrap) from 3.3.7 to 4.1.2. **This update includes security fixes.**
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v3.3.7...v4.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-18 19:33:25 -05:00
Michael Bradley, Jr 4b4a00bd4d chore(release): 4.1.0 2019-08-12 12:14:12 -05:00
Michael Bradley, Jr cda40b93c4 chore(release): 4.1.0-beta.6 2019-08-09 17:50:05 -05:00
Michael Bradley, Jr ad30a98169 refactor: upgrade to web3 v1.2.1
Upgrade all dependencies on web3/web3-* v1.0.0-beta.37 to v1.2.1.

Make various adjustments related to the previous convention of
`"web3": "1.0.0-beta"` in `embark.json` signifying that embark's own web3
dependency should be used in dapp builds.

Fix bugs in library manager, including a switch from using the
live-plugin-manager package to using npm in a child process to install
`"versions"` dependencies specified in `embark.json` when a specified version
doesn't match up with embark's own version for that package.

Avoid race conditions when installing `"versions"` by completing all installs
prior to starting other services. If an install fails, then after all the
installs have completed or failed the embark command will exit with error.

Change various comments and update docs to reflect the new default of web3
v1.2.1.
2019-08-07 11:01:23 -05:00
Jonathan Rainville b5c81bd41a feat(@embark/pipeline): enable choosing which fields to filter out 2019-08-01 13:53:47 -04:00
Jonathan Rainville b0cccaea05 feat(@embark/pipeline): add minimalContractSize to remove bytecode 2019-08-01 13:53:47 -04:00
Jonathan Rainville 1491028665 use callbacks instead of exiting 2019-07-23 10:55:14 -04:00
Michael Bradley, Jr 5930cce7dd chore(release): 4.1.0-beta.5 2019-07-10 16:21:47 -05:00
Pascal Precht 93ca3ad97c fix(@embark/embarkjs-whisper): Messages.isAvailable() should always return a promise
`EmbarkJS.Messages.isAvailable()` in some cases return synchronously (when whisper isn't
set up), in other cases asynchronously. This actually breaks our demo application for
the following reason:

We check for Whisper's availability via:

```
EmbarkJS.Messages.Providers.whisper.getWhisperVersion((err, _version) => {
  if (err) {
    return console.log(err);
  }
  this.setState({whisperEnabled: true});
});
```

There's a couple of problems here:

- This code will break right away when whisper isn't available, resulting in an error:
  ```
  Cannot read property _requestManager of undefined
  ```

- The reason this error happens is because there's no `web3` object available inside
  our EmbarkJS.Messages code. Even though there **is** a web3 object, EmbarkJS.Messages
  doesn't know about this because it only sets it when its `setProvider()` API is called,
  which effectively doesn't happen at all when Whisper isn't enabled on the connected
  node

- While this could be fixed with a simple check on whether EmbarkJS.Messages' internal
  `web3` references is a thing, really what should be used in the demo is the `isAvailable()`
  API.

`isAvailable()` should always return a promise (similar to `EmbarkJS.Storage.isAvailable()`.

This commit ensures that `isAvailable()` always returns a promise and changes the demo
template to use `isAvailable()` over `getWhisperVersion()`.
2019-07-01 11:11:03 +02:00
Michael Bradley, Jr eecb48f5b6 chore(release): 4.1.0-beta.4 2019-06-27 14:23:32 -05:00
Pascal Precht 1b6987ee8f fix(@dapps/templates/demo): ensure whisper channel state is set correctly 2019-06-27 14:11:24 -05:00
Michael Bradley, Jr d684b9af0f refactor(@embarkjs/web3): make web3 connector an internal plugin like the other embarkjs-* packages
Effectively deprecate the `embarkjs-connector-web3` package but don't introduce
a breaking change by simply not loading the plugin if it's specified in a
DApp's `embark.json`. If the deprecated plugin is specified, display a message
indicating the plugin was ignored and suggesting it be removed from the
project's `embark.json` and `package.json`.
2019-06-27 14:10:12 -05:00
Pascal Precht 322397f81c fix(@dapps/demo): don't allow subscription to whisper channels with less than 4 chars
This has been a problem in Cockpit as well and was fixed accordingly.
Whisper doesn't allow subscribing to channels with names that have less
than 4 characters.

This could be fixed in different ways, one being on the library level
(e.g. have embark check for the given length and not subscribing when it
doesn't pass the check), the other one being on the application/ui level.

The reason it makes sense to solve this in the application layers is because
we keep the it open for users of EmbarkJS.Messages APIs to handle errors
the way they want.

Fixes #1666
2019-06-27 08:36:05 -05:00
Jonathan Rainville 908aa3b148 fix(templates): fix templates because tests don't like empty files 2019-06-21 11:00:27 -04:00
Shailendra Shukla 09d7428e7e fix(@embark/dapps): old link updated to the latest documentation at website
The previous link was pointing to readthedocs.io, which wasn't active. So here I've replaced it with the link to the official documentation on the Embark website.
2019-06-11 09:50:44 -04:00
Michael Bradley, Jr ff3100b035 chore(release): 4.1.0-beta.3 2019-06-07 13:42:13 -05:00
Michael Bradley, Jr 91f87d2057 chore(release): 4.1.0-beta.2 2019-05-22 18:09:06 -05:00
Michael Bradley, Jr 4ee1567264 chore(release): 4.1.0-beta.1 2019-05-15 18:44:46 -05:00
Ricardo Guilherme Schmidt 438e9178ce fix(@embark/demo): link css from dependency 2019-05-10 16:51:45 -04:00
Michael Bradley, Jr 925ed06823 fix(@embark/demo): render whisper error messages not error objects 2019-04-29 09:17:43 -05:00
Michael Bradley, Jr 579328a9f4 chore(release): 4.1.0-beta.0 2019-04-17 11:11:28 -05:00
Iuri Matias 626aa5daf1 [CHERRY PICKED] chore(release): 4.0.2 2019-04-17 10:30:30 -05:00
Iuri Matias 4d2ffb9f28 [CHERRY PICKED] chore(release): 4.0.1
This commit has been originally cherry-picked from d0d89fc5ae and
slightly modified to update all packages, as meanwhile, new packages have been added to `master`.

The reason this commit is cherry-picked from `4.0.x` branch is because
it wasn't created from `master`.

Purpose is mainly to update `CHANGELOG` and get the package versions in sync again.
2019-04-10 12:18:35 +02:00
Michael Bradley, Jr 21e23313ba chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
Michael Bradley, Jr fa89390ee0 chore(release): 4.0.0-beta.2 2019-03-18 17:04:40 -05:00
Michael Bradley, Jr 7f6c1be390 chore(release): 4.0.0-beta.1 2019-03-17 19:56:29 -05:00
Michael Bradley, Jr 9afdbd9848 refactor(embark-ui): improve cockpit's contracts explorer
Rename contract "Transactions" tab to "Log". Display and allow filtering of all
contract methods. Disable debug button for pure/view functions and the
constructor.

Revise the filtering logic so that filters are combined together. Make the
status filter a drop down menu like the others.

Revise styling for consistent row height, alignment of text, and button sizes;
use a monospaced font in some cases to achieve the effect.

Handle enter/return correctly in forms within a contract's Interact tab.

Remove event rows from a contract's Interact tab.

Track pure/view calls in the blockchain proxy so they can be logged server-side
by console listener and reported in Cockpit within a contract's Log tab.

Eliminate double logging in the contracts manager. Ensure contracts deployed on
a fresh `embark run` have an `address` / `deployedAddress` property.
2019-03-15 12:03:52 -05:00
Michael Bradley, Jr 5418f16082 feat: normalize README and package.json bugs, homepage, description
Make changes by running these commands in the root of the monorepo:

**bugs**
```shell
npx lerna exec --concurrency 1 --stream -- \
    'DIRPATH=$(realpath $PWD --relative-to=$LERNA_ROOT_PATH); \
    npx json -I -f package.json -e "this.bugs=\
        \"https://github.com/embark-framework/embark/issues\""'
```

**homepage**
```shell
npx lerna exec --concurrency 1 --stream -- \
    'DIRPATH=$(realpath $PWD --relative-to=$LERNA_ROOT_PATH); \
    npx json -I -f package.json -e "this.homepage=\
        \"https://github.com/embark-framework/embark/tree/master/${DIRPATH}#readme\""'
```

Don't commit changes to private packages, with the exceptions of embark-typings
and embark-reset because those may switch from private to public, and also
because the latter will be included in `node_modules` of embark even if it is
private since embark-reset is presently a bundled dependency of embark.

Don't include the homepage and bugs fields in dapps generated from the template
packages, except for the demo. Set those dapps' description field to an empty
string.

Ensure every package (inc. private packages) has a description.

Ensure every package (inc. private packages) has a README that begins with:

```markdown
`[pkgJson.name]`
================

> [pkgJson.description]

Visit [embark.status.im](https://embark.status.im/) to get started with
[Embark](https://github.com/embark-framework/embark).
```

Don't include the README in dapps generated from the template packages, except
for the demo.
2019-03-12 09:17:33 -04:00
emizzle 5ea4807c90 feat(@embark/pipeline): Add `enabled` property to pipeline config
Add an `enabled` property to the pipeline config. This lets developers disable the pipeline using the config file.

Updates to the enabled property will be reflected while embark is running. For example if embark is running with the pipeline, setting `enabled: false` in the pipeline config will build/deploy the contracts but not run the pipeline. Conversely, if embark is running with the pipeline disabled, enabling the pipeline in the config will build/deploy the contracts then build the dapp.
2019-03-12 07:53:04 -04:00
Michael Bradley, Jr df0064f1a9 build: use package.json "files" instead of .npmignore
`package.json` allows for a [`"files"` whitelist][files] to be specified as an
alternative to a top-level `.npmignore` within a package root. Maintaining
whitelists is generally easier and less error-prone than maintaining
blacklists, so implement a `"files"` list for all non-private packages in the
monorepo and remove unneeded `.npmignore` files.

Switch `embark-reset` from being a private package to one that will be
published, adjust the workspace's `"nohoist"` setting accordingly, and no
longer specify `embark-reset` as a bundled dependency of `packages/embark`. I
originally thought there might be a good reason not to publish it, but I no
longer think so.

Remove unnecessary LICENSE files in `packages/{embark,embark-ui}` since Lerna
will automatically copy the root LICENSE into any packages lacking that file,
i.e. before tarballs are packed and published to the NPM registry.

Change the `"author"` field of `packages/embarkjs-connector-web3` to match the
other packages, i.e. such that it matches the copyright assignment in the root
LICENSE. If that's not a desirable thing to do, then instead that package can
have a separate LICENSE file that has a copyright assignment for `"Jonathan
Rainville"`.

Supply some missing `.npmrc` files in `packages/*`.

[files]: https://docs.npmjs.com/files/package.json#files
2019-03-12 07:50:25 -04:00
Michael Bradley, Jr a9c5e1ade5 feat: add repository.directory field to package.json
See: https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md

Make changes by running this command in the root of the monorepo:

```shell
npx lerna exec --concurrency 1 --stream -- \
    'DIRPATH=$(realpath $PWD --relative-to=$LERNA_ROOT_PATH); \
    npx json -I -f package.json -e \
    "this.repository=\
        {\"directory\": \"$DIRPATH\", \
         \"type\": \"git\", \
         \"url\": \"https://github.com/embark-framework/embark.git\"}"'
```

Don't commit changes to private packages, with the exceptions of embark-typings
and embark-reset because those may switch from private to public, and also
because the latter will be included in `node_modules` of embark even if it is
private since embark-reset is presently a bundled dependency of embark.

Don't include the repository field in dapps generated from the template
packages, except for the demo.
2019-03-11 18:21:24 -04:00
Michael Bradley, Jr de0f02d00a build: make DApp templates member packages of the monorepo
Previously, templates were in a subdirectory of `packages/embark`. Reorganize
them so that they are member packages of the monorepo. This allows them to
cleanly depend on other members of the monorepo,
e.g. `embarkjs-connector-web3`.

It is desirable for the templates, in the context of the monorepo, to specify
embark as a dependency, to take advantage of `npx embark test` (and it's a
"forward looking" setup re: how we plan to evolve embark). However, if embark
were to specify the template packages as dependencies a circular relationship
would be introduced, which is [unsupported by Lerna][circular]. Therefore,
revise the template generator so that all templates are resolved / fetched at
runtime, i.e. `boilerplate`, `demo`, and `simple` are no longer
"built-ins" *per se*. This change won't be apparent to embark's users, but it
does mean that the template generator won't work (in a production install of
embark) if it can't connect to the npm registry, i.e. when the user runs
`embark demo` or `embark new [--simple]`. When embark is inside the monorepo,
templates are resolved and copied from the yarn workspace rather than being
fetched from the registry, which is convenient for development. Also, any
template dependencies that are members of the monorepo are linked into the
copied template's `node_modules` rather than being installed from the registry,
again for convenience. During template generation, remove scripts and
dependencies that pertain only to membership in the monorepo; for now, that
involves removing embark as a dependency since we're not quite ready for that
arrangement to be the default, i.e. outside of the monorepo.

Refactor the root scripts so that more of them can consistently be used with
Lerna's filter options, e.g. `--scope` and `--ignore`. "Combo" scripts that
don't support filtering generally have a `:full` postfix.

Flip `clean` and `reset` scripts at the root and in the member packages for
consistency re: Lerna's notion of `clean` and embark's notion of `reset`. Have
each package run its `reset` script when its `clean` script is invoked (and
that's all for now), relying on `lerna clean` to delete packages'
`node_modules` in view of how Lerna's topological sorting works.

Lift the implementation of `embark reset` into a private package in
`packages/embark-reset` and make it a bundled dependency of embark. Packages in
`dapps/*` depend on `embark-reset` directly and make use of it with `npx
embark-reset` (but only in monorepo context). This removes a "wart" where
reboots could show errors when embark's sources aren't already built in
`packages/embark/dist`. Users will not notice any difference since `embark
reset` works as before, transparently making use of the `embark-reset`
package. The only downside to having it be a bundled dependency of embark is
that bundled deps have all of their `node_modules` included in the tarball
built with `npm pack` (that's why having the templates as bundled dependencies
of embark isn't a viable approach). However, `embark-reset` only has one
dependency, `rimraf`, which is a tiny module, so the cost seems acceptable.

As part of the reorganization, move `test_dapps` into `dapps/tests` and
`packages/embark/templates` into `dapps/templates`. Keep the directory names
short but revise the package names to facilitate simple filtering with
`embark-dapp-*`. Consolidate `.yarnrc` and `.gitignore` and clean up some
redundant ignore listings.

Scripts run with `--scope embark-dapp-*` use `--concurrency=1` to avoid
conflicts that could arise over network ports. The `ci:full` and `qa:full`
scripts use `--concurrency=1` in all scopes, for two reasons: resource
limitations on Travis and AppVeyor result in slower runs with concurrency >1,
and if something fails in those contexts it's easier to see what went wrong
when Lerna's output isn't interleaved from a bunch of scripts in `packages/*`.

Bump the Lerna version.

[circular]: https://github.com/lerna/lerna/issues/1198#issuecomment-442278902
2019-03-05 10:20:57 -06:00