Commit Graph

456 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 6e4a612fef fix(embarkjs/web3): make global web3 available again 2018-12-11 15:07:23 -05: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 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 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
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
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
Michael Bradley, Jr f10e0258cb build: introduce a `prepare` script in embark's package.json
**TL;DR**

These changes affect workflow with yarn. To prevent embark's `prepare` script
from running undesirably:

- If node_modules is in place and you're reinstalling after switching branches:

```
yarn run install_all
```

- If node_modules is missing (fresh clone or deleted):

```
EMBARK_NO_PREPARE=t yarn install && yarn run install_all
```

It's not recommended to set `EMBARK_NO_PREPARE` in your environment (e.g. in
`.bashrc`) since that would interfere with embark's `release` script if/when
you run it.

-----------------

**1.** Specify embark's build-related steps in the `prepare` script of
  package.json.

When embark is installed directly from GitHub the `prepare` script results in a
"pre install" phase (handled automatically by npm/yarn) that fetches
devDependencies, builds embark (including embark-ui), packs a tarball with the
same steps (minus testing and tree-checking) as would happen during an embark
release, and finally does a production install from that tarball.

Important point: installs from GitHub must be performed with yarn; they're no
longer possible with npm since during the "pre install" phase npm will honor
embark's `.npmrc` and `"engines"` settings.

The following will work correctly after this commit is merged:

```
yarn [global] add git+https://github.com/embark-framework/embark.git
```

Use of "hosted git" shortcuts (e.g. `embark-framework/embark#bracnh`) won't
work correctly because yarn doesn't fully support them. See:
https://github.com/yarnpkg/yarn/issues/5235.

It's important to use `git+https` urls. Following a succesful install with
`git+https` it is possible to use a "hosted git" shortcut or `https` url, but
that's owing to a subtle and unreliable interaction between yarn's cache and
yarn's logic for installing from a url/shortcut.

**2.** Adjust the npm configs (`.npmrc`) for embark/-ui so that `yarn run [cmd]
  [--opt]` can be used in place of `npm run [cmd] -- [--opt]`.

Either way is okay for running scripts, they're equivalent, but note the
requirement to use `--` before specifying command options with `npm run`.

**3.** Introduce yarn configs (`.yarnrc`) for embark/-ui and include the
  `check-files` directive.

H/t to @alaibe for the recommendation.

**4.** Ignore embark's `dist/typings` and `scripts` directories when packing a
  tarball.

**5.** Refactor embark/-ui's npm-scripts in relation to the `prepare` script,
  and make other small improvements.

Notably, if the environment variable `EMBARK_NO_PREPARE` is truthy (from JS
perspective) then embark's `prepare` script will exit early. This prevents
`install_all` and `prepare` from getting stuck in a loop (`install:core` uses
cross-env to set `EMBARK_NO_PREPARE`) and provides a mechanism for users to
skip the `prepare` script when doing a fresh install:

```
EMBARK_NO_PREPARE=t yarn install
```

**6.** Give `.js` extensions to node scripts in embark's `scripts/`, remove the
  shebang lines, and have npm-scripts explicitly invoke them with node.

This arrangement works for all platforms: Linux, macOS, and Windows.

**7.** Adjust travis and appveyor configs.

Since at present there aren't any tests or other CI steps that make use of
embark-ui's production build, set `EMBARK_NO_PREPARE` in the CI environments
and invoke `build:node` directly.

Check the working tree after `yarn install` for embark/-ui. This detects
situations where changes should have been committed to `yarn.lock` but were
not. Check the working tree again at the end to detect situations where ignore
files should have been adjusted but were not. Both checks could also detect
other surprising behavior that needs to be investigated. Any time the working
tree is not clean (there are untracked files or changes) CI will fail.

Drop CI runs for node 8.11.3 because that version ships with an older npm that
results in unstaged changes to the test apps' `package-lock.json` files,
causing the working tree check to fail at the end of the CI run. A simple
workaround isn't apparent, but the matter can be revisited.

**8.** Refactor embark's `release` script in light of the `prepare` script.

Notably, do the push step only after `npm publish` completes successfully. This
allows embark's `prepare` and `prepublishOnly` scripts to detect problems
before a commit and tag are pushed to GitHub, avoiding a need to rebase/revert
the remote release branch; the local branch will still need to have a commit
dropped and tag deleted before rerunning the `release` script.

Prompt the user if the `release` script is not being run in `--dry-run` mode.

Provide additional visual indicators of `--dry-run` mode.

Force the user to supply `--repo-branch [branch]` if the intention is to
release from a branch other than `master`.
2018-12-03 16:24:10 -06:00
Anthony Laibe f68f1fc9b6 feat(scaffold): allow association/file
- Refactor everything to TS
- Add missing types
- Declare __ everywhere
2018-12-03 09:38:22 +00:00
Michael Bradley, Jr 801932b726 refactor(@embark/blockchain_process): improve the blockchain proxy
Use proper stream parsing to consistently track JSON-RPC messages.

For HTTP POST requests use the `stream-json` package to assemble request and
response message objects.

For WebSocket requests continue to use `simples/lib/parsers/ws` to process
stream frames into messages. For Websocket responses use the Receiver class of
the `ws` package to process stream data into messages. In both cases, make use
of the `cloneable-readable` and `stream-chain` packages to avoid leaks.

This mishmash of stream parsing approaches is the result of much
experimentation to find a working solution. For example,
`simples/lib/parsers/ws` does't work for processing WebSocket responses and
`ws.Receiver` doesn't work for processing requests. Additional revisions may be
necessary.

Revise `blockchain_process/dev_funds.js` to use web3's HTTP provider if a DApp
disables the WebSocket proxy.
2018-11-28 16:01:52 -06:00
Jonathan Rainville f9384733f8 fix(dependencies): lock remix-test and debug version
Caused an issue with ethereumjs-vm which introduced a breaking change
2018-11-27 15:44:51 -05:00
Michael Bradley, Jr 1d5e33e8a0 build: bump npm-run-all to the latest version 2018-11-26 19:51:50 +01:00
Iuri Matias e02d026499 refactor(@embark/debugger): add ts definition for async; use imports instead of requires 2018-11-22 09:00:55 -05:00
Iuri Matias 227decde0a refactor(@embark/debugger): move debugger_manager.js to typescript 2018-11-22 09:00:55 -05:00
Pascal Precht ab41860d9b chore: introduce release script
This commit automates our release process. It takes care of a couple of things:

- Bumps version number in package.json as needed, see below
- Generates changelog based on commit history
- Create release commit
- Tags release commit
- Pushes release commit including tags to upstream repository
- Publishes release on npm

There are a couple of options supported. The base command is run like this:

```
npm run release
```

This will do a minor bump and try to push to `origin` on `master`. However,
this can be altered with the following options.

```
npm run release -- --dry-run
```

Can be used to perform dry run and not actually committing, tagging, pushing,
publishing anything.

```
npm run release -- --release-as <something>
```

Something can be `minor`, `major`, `patch` or anything you want `foo`, `1.0.0` etc.

```
npm run release -- --prerelease alpha
```

Will create a prerelease version a la `4.0.0-alpha.x`.

```
npm run release -- --prerelease alpha --npm-dist-tag next
```

Publishes a dist tag on npm using dist tag `next`

```
npm run release -- --sign
```

Signs the release commit (you need to have PGP setup for that).

```
npm run release -- --repo-origin pascal --repo-branch foo/bar
```

Pushes the release commit into `pascal/foo/bar`.
2018-11-21 13:28:50 +01:00
Anthony Laibe 45afe83cb3 feat: update to solc 0.5.0 2018-11-21 08:50:43 +00:00
Michael Bradley, Jr 53191447f5 build: use yarn for reproducible builds and CI
yarn.lock files are generated for embark and embark-ui, and their package.json
files and other npm related files are updated to support and require using yarn
for development of embark itself and for embark's CI.
2018-11-20 09:25:42 -06:00
Anthony Laibe 58795ca7d2 refactor(core): convert i18n to TS 2018-11-18 12:30:36 -05:00
Anthony Laibe 3406ae833c feat: Allow parallel deploy 2018-11-16 09:35:12 +00:00
Anthony Laibe 7fb5c0d0da chore: add scripts to start embark only 2018-11-16 09:31:14 +00:00
Michael Bradley, Jr 69dd8c5b89 build(packaging): reorg sources for transpilation with Babel
Allow for embark sources to be authored in TypeScript and/or JavaScript, and to
make use of upcoming features of the JS language. Sources in the src/ directory
are transpiled into the dist/ directory, and npm-scripts are provided to
support and automate various aspect of the build process. Source map support is
enabled at runtime, i.e. when invoking the embark cli and running embark's test
suite.
2018-11-11 15:08:55 -06:00
Anthony Laibe c563bae3a3 chore: update embarkJS to 0.4.5 2018-11-07 14:23:08 +00:00
Michael Bradley, Jr abbf54620a 4.0.0-alpha.1 2018-10-31 22:23:55 +01:00
Michael Bradley, Jr a9bf409aa0 4.0.0-alpha.0 2018-10-31 11:28:55 +01:00
Michael Bradley, Jr 6d7ea34d03 bump embarkjs 2018-10-31 11:28:02 +01:00
Iuri Matias 71380be0ca fix linting issues 2018-10-29 15:33:12 +01:00
Anthony Laibe 5c19dcf672 Add linter to embark-ui 2018-10-28 10:13:09 +01:00
Michael Bradley, Jr 5afbd09d68 npm-scripts alpha order
as the list grows (will significantly w/ babel/ts/webpack tooling) it's easier
to read and find scripts if list is sorted
2018-10-24 14:08:23 -05:00
Michael Bradley, Jr 31abf90694 bin, directories, main -- grouped/ordered before scripts 2018-10-24 14:08:23 -05:00
Michael Bradley, Jr fde5229548 keywords alpha order 2018-10-24 14:08:23 -05:00
Michael Bradley, Jr 895e10ff4a reorg some pkg metadata at top of pkg json 2018-10-24 14:08:23 -05:00
Michael Bradley, Jr 3ddb6b36bb deps alpha order 2018-10-24 14:08:18 -05:00
Michael Bradley, Jr e2b0e74eb3 exact version per `npm ls --depth=0`
a caret range snuck back into pkg json during the rebase
2018-10-24 13:38:17 -05:00
Iuri Matias 1d6da99e8f display last error found
display last line on tx

fix debugger call

listen to source event only after jumping to the end

keep track of last tx; add minimal debug feature; fix ast issue

initial debugger apis & ui integration

prevent crash when step is out of bounds; send all all available data in websocket

add debugger commands

fix line number tracking in editor; toggle breakpoints

replace timeouts with callbacks

add debugger manager & refactor

refactor debugger api

refactor cmd line debugger

reduce debugger decoupling

reduce debugger decoupling

fix debug buttons

trigger source update so api triggers ws event to update source location

move locals and contracts vars to a json view

improve debugger icons

simplify debugger data

update debug package

add command handler to get a contract given a tx; update debugger so it can get a contract by its tx instead of tracking latest txs only

update debugger package
2018-10-23 18:27:40 -04:00
Pascal Precht 853ab2d855
fix: make code compile again after rebase 2018-10-23 11:26:15 +02:00
Michael Bradley, Jr 3ba49c8e6b
rm unused node-http-proxy dep 2018-10-23 11:11:57 +02:00
Michael Bradley, Jr 695f0b37f6
exact versions per `npm ls --depth=0` 2018-10-23 11:11:57 +02:00
Andre Medeiros 5db8185e5a
Update fs-extra; Unfuck package-lock.json 2018-10-23 11:11:12 +02:00
Iuri Matias 0379f6bc35
use fuzzy to do search; but still do sorting 2018-10-23 11:00:28 +02:00
Iuri Matias 085a282c96
add copytoken command 2018-10-23 10:59:17 +02:00
Jonathan Rainville b815ea4d44
add back npm run build and remove cd 2018-10-23 10:59:16 +02:00
Jonathan Rainville 43030980b1
use cross-env for cd and make sure values are specified 2018-10-23 10:59:15 +02:00
emizzle 487b18c8b2
added date-and-time-package 2018-10-23 10:53:00 +02:00
Anthony Laibe 572cd20482
Fix backend tab request cached:
- Add no cache via helmet
- Fix linting (no-return-else)
- Rebase Fix: Use option.name for process log to avoid endpoint being called
blockchainProcess.js
- Rebase Fix: use option when compiling solidity
2018-10-23 10:47:24 +02:00
emizzle 518111132b
Added monaco editor via react-monaco-editor
Needs to pull version from package.json
2018-10-23 10:31:34 +02:00
Anthony Laibe 8d8d3db316
Adding embark ui 2018-10-23 10:22:37 +02:00
Iuri Matias 9ed4922367
move console api call into console 2018-10-23 10:20:09 +02:00
Iuri Matias 7bd6b9da8f
add basic ws functionality 2018-10-23 10:20:08 +02:00
Iuri Matias 0917acb02f
add 2nd endpoint to webserver; use express 2018-10-23 10:17:29 +02:00
Michael Bradley, Jr 9af5d493bb
webpack bundle analyzer 2018-10-23 10:07:59 +02:00
Michael Bradley, Jr d62a80169e
no need for ganache-cli "bin" entry 2018-10-23 10:05:22 +02:00
Michael Bradley, Jr 2784303145
embark-ganache-cli -> ganache-cli-embark 2018-10-23 10:05:21 +02:00
Michael Bradley, Jr c9cf7dccb7
"embark-" prefixed bin entry in package.json for ganache-cli 2018-10-23 10:05:21 +02:00
Richard Ramos 94eca4751a
Addid basic templating to start building UI from here 2018-10-23 09:57:16 +02:00
Iuri Matias 95df68e67c
fixes due to bad rebase 2018-10-23 09:46:40 +02:00
Jonathan Rainville 236667d5a4
up embarkJS version 2018-10-23 09:37:24 +02:00
Jonathan Rainville 966252be97
conflict in package json 2018-10-23 09:01:13 +02:00
Michael Bradley, Jr 87b2d034cf
lint bin/embark 2018-10-22 19:39:27 +02:00
Michael Bradley, Jr 960cd0f792
deps -- json-parse-better-errors 2018-10-22 19:39:25 +02:00
Michael Bradley, Jr fb6fa98c9c
deps -- subdir 2018-10-22 19:39:25 +02:00
Michael Bradley, Jr 057961f197
deps -- find-up 2018-10-22 19:39:25 +02:00
Michael Bradley, Jr 952496b8d5
deps -- npmlog 2018-10-22 19:39:24 +02:00
Michael Bradley, Jr de93795f66
deps -- semver 2018-10-22 19:39:24 +02:00
Subramanian Venkatesan ee77ac7f7f
Adds solc option to tests. Runs smart contract tests using remix-tests
Ref: #817
2018-10-22 19:39:24 +02:00
Michael Bradley, Jr ac70cfc424
deps -- sass (scss) 2018-10-22 19:35:53 +02:00
Michael Bradley, Jr 6e238b2950
deps -- babel 7 preset for TypeScript 2018-10-22 19:35:52 +02:00
Michael Bradley, Jr da4ccc133a
deps -- from babel-preset-react-app 2018-10-22 19:35:51 +02:00
Michael Bradley, Jr e4bba25cd7
deps -- bump versions of existing deps 2018-10-22 19:35:51 +02:00
Michael Bradley, Jr 665856f838
change back/to exact versions after master/develop rebase 2018-10-22 19:25:14 +02:00
Iuri Matias 4b81968482
restore ws functionality to webserver 2018-10-22 19:24:41 +02:00
Iuri Matias 091c535f80
update ws package 2018-10-22 19:23:16 +02:00
Jonathan Rainville fef793c5ef 3.2.3 2018-10-11 15:50:07 -04:00
Jonathan Rainville b773c83eea downgrade to web3 beta 34 2018-10-11 15:31:50 -04:00
Iuri Matias cbf70710e5 update to 3.2.2 2018-10-01 08:58:58 -04:00
Iuri Matias 4462745539 update to 3.2.1 2018-09-26 19:33:00 -04:00
Iuri Matias d734c0b2d3 update to 3.2.0 2018-09-26 19:08:25 -04:00
Iuri Matias a0d3dc2850 update to embarkjs 0.4.3 2018-09-26 18:51:05 -04:00
Michael Bradley, Jr 9a78301ac1 deps -- hosted-git-info 2018-09-24 17:44:53 -05:00
Michael Bradley, Jr 373a67b4a3 rev testdapp scripts -- INIT_CWD compat 2018-09-21 17:00:08 -05:00
Michael Bradley, Jr 6b48726ec3 deps -- cross-env 2018-09-21 16:57:56 -05:00
Michael Bradley, Jr bf61fe2757 deps -- npm-run-all 2018-09-21 16:43:04 -05:00
Michael Bradley, Jr f33962954a alpha sort devDeps 2018-09-21 16:41:53 -05:00
Michael Bradley, Jr c23868f95b spec exact versions per `npm ls --depth=0` 2018-09-20 14:51:32 -05:00
Iuri Matias c4de5fb512
Merge pull request #870 from embark-framework/features/engine-strict
engine-strict
2018-09-19 12:09:05 -04:00
Michael Bradley, Jr d8b9e1f6d8 spec node, npm in "engines" of package.json 2018-09-18 16:28:50 -05:00
Andre Medeiros 71f14778c2 Update web.js to 1.0.0-beta.36 2018-09-18 15:02:35 -04:00
Anthony Laibe bdcefbe269 Add coverage to webserver 2018-09-18 14:28:17 +01:00