80 Commits

Author SHA1 Message Date
EmbarkBot
0450e8291f chore(prerelease): 5.3.0-nightly.17 2020-04-11 00:16:02 +00:00
EmbarkBot
1278365768 chore(prerelease): 5.3.0-nightly.16 2020-04-03 00:14:04 +00:00
EmbarkBot
1a61bc6b8d chore(prerelease): 5.3.0-nightly.15 2020-03-26 00:15:45 +00:00
EmbarkBot
d578e548cf chore(prerelease): 5.3.0-nightly.14 2020-03-25 00:18:59 +00:00
EmbarkBot
7ae17612dd chore(prerelease): 5.3.0-nightly.13 2020-03-24 00:15:01 +00:00
EmbarkBot
7f52634331 chore(prerelease): 5.3.0-nightly.12 2020-03-21 00:15:48 +00:00
emizzle
471a33a331 chore(@embark/blockchain): Add unit tests to blockchain stack component
fix(@embark/blockchain): Add callback to `blockchain:node:register` and `blockchain:client:register`

Add unit tests for the stack/blockchain and update supporting API documentation in the Wiki.

Add injectables `Web3` and `warnIfPackageNotDefinedLocally` to stack/blockchain so that those functions can be tested properly.

Update stack/blockchain dependencies in `package.json`.
2020-03-20 14:40:14 +01:00
EmbarkBot
d5e0897231 chore(prerelease): 5.3.0-nightly.11 2020-03-20 00:17:02 +00:00
EmbarkBot
444b9eae87 chore(prerelease): 5.3.0-nightly.10 2020-03-14 00:16:39 +00:00
EmbarkBot
db8282c52c chore(prerelease): 5.3.0-nightly.9 2020-03-13 00:16:27 +00:00
EmbarkBot
34f4b0cf1a chore(prerelease): 5.3.0-nightly.7 2020-03-10 00:18:09 +00:00
EmbarkBot
7287eda651 chore(prerelease): 5.3.0-nightly.6 2020-03-07 00:14:47 +00:00
Michael Bradley, Jr
e0f7913a02 feat: add support for embark.config.js
This commit introduces support for using `embark.config.js` to calculate the
embark configuration object that is otherwise provided via `embark.json`.

If an `embark.config.js` file is present, it will be used over the
`embark.json` file.  The `embark.config.js` module needs to export either an
object or a function that can be asynchronous and has to return or resolve with
an embark configuration object:

```js
// embark.config.js

module.exports = async function () {
  let config = ...; // do lazy calculation of `embarkConfig`;
  return config;
}
```
2020-03-06 09:45:43 -06:00
EmbarkBot
b19a58b007 chore(prerelease): 5.3.0-nightly.5 2020-03-06 00:15:50 +00:00
dependabot-preview[bot]
dcaa2626d9 build(deps-dev): bump eslint-plugin-jest from 22.5.1 to 23.8.1
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 22.5.1 to 23.8.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v22.5.1...v23.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-05 11:25:18 -06:00
EmbarkBot
838d421eac chore(prerelease): 5.3.0-nightly.4 2020-03-05 00:15:25 +00:00
dependabot-preview[bot]
cb8ece8db5 build(deps): bump @babel/runtime-corejs3 from 7.7.4 to 7.8.4
Bumps [@babel/runtime-corejs3](https://github.com/babel/babel) from 7.7.4 to 7.8.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.7.4...v7.8.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-04 12:05:18 -06:00
EmbarkBot
a7b8f0d141 chore(prerelease): 5.3.0-nightly.3 2020-03-04 00:15:48 +00:00
EmbarkBot
8de6cf9fe0 chore(prerelease): 5.3.0-nightly.2 2020-03-03 00:14:47 +00:00
dependabot-preview[bot]
ead92bd90f build(deps): bump @babel/core from 7.7.4 to 7.8.6
Bumps [@babel/core](https://github.com/babel/babel) from 7.7.4 to 7.8.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.7.4...v7.8.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 14:42:32 -06:00
EmbarkBot
719faeebdd chore(prerelease): 5.3.0-nightly.1 2020-02-29 00:14:15 +00:00
Iuri Matias
db10064dd6 feat: remove optional plugins from coming as default
feat(@embark/utils): add method to verify if a plugin is installed & configured

feature(@embark/utils): add method to verify if a plugin is installed & configured

feature: warn about packages that will be independent plugins and are not configured

chore: update templates to specify plugins

refactor: add to plugin api params so that blockchain plugins no longer need to be passed options

address changes in code review

remove unneded space

Update packages/core/utils/src/index.ts

Co-Authored-By: Jonathan Rainville <rainville.jonathan@gmail.com>

Update packages/core/utils/src/index.ts

Co-Authored-By: Michael Bradley <michaelsbradleyjr@gmail.com>

fix linting issue

add missing import

remove optional plugins from coming as default

Revert "chore: update hooks examples to destructure dependencies object"

This reverts commit 448eab724b169ff50196969de157fe4f94a116f1.

remove trailing comma

fix linting issue

include tsconfig
2020-02-27 20:31:29 -05:00
EmbarkBot
1675019f44 chore(prerelease): 5.3.0-nightly.0 2020-02-27 00:13:54 +00:00
emizzle
74e2935846 fix(@embark/profiler): Fix profile output and update messaging
The profiler was not formatted correctly in the console as `util.inspect` was being applied to the ASCII table before being output to the console REPL.

In addition, functions containing solidity assertions (require, revert, assert) that cause the function to fail when estimating gas would print an error to embark’s console log, and would show nothing as their gas estimate in the table.

Do not `util.inspect` command output if the result is a string. For API commands being run, allow the command to specify whether or not the output of the command should be HTML escaped. This could pose security risks!

For functions that have errors during gas estimation, add a message in the embark console explaining that the error may be due to solidity assertions in the function that prevent the gas from being estimated correctly. For functions that error, show `-ERROR-` in the gas estimation column. Additionally, show a description in the table footer explaining that the error may be due to solidity assertions in the function.

For events with no gas estimate, show `-EVENT-` in the gas estimate column of the profile table, and a description in the table footer explaining that there is no gas estimate for events.

### Warnings
This PR allows the console command to specify whether or not it should allow for a string result of the command to be HTML-escaped before being sent in the API response. Combining this with Cockpit’s `dangerouslySetInnerHTML`, this could allow a plugin to register a console command that injects XSS in to Cockpit.

![Imgur](https://i.imgur.com/1Rqkjyx.png)
![Imgur](https://i.imgur.com/s6Y1Ecy.png)
![Imgur](https://i.imgur.com/BhsjkBs.png)
2020-02-26 17:11:01 -05:00
EmbarkBot
c54cc77e01 chore(prerelease): 5.2.4-nightly.0 2020-02-26 00:14:00 +00:00
dependabot-preview[bot]
6cba7af03a build(deps-dev): bump jest from 24.9.0 to 25.1.0
Bumps [jest](https://github.com/facebook/jest) from 24.9.0 to 25.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v24.9.0...v25.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-25 16:12:54 -06:00
Michael Bradley, Jr
8e945a2caa chore(release): 5.2.3 2020-02-25 15:09:29 -06:00
Michael Bradley, Jr
3693ebd90d fix: ensure that packages properly specify their dependencies
Many packages in the monorepo did not specify all of their dependencies; they
were effectively relying on resolution in the monorepo's root
`node_modules`. In a production release of `embark` and `embark[js]-*` packages
this can lead to broken packages.

To fix the problem currently and to help prevent it from happening again, make
use of the `eslint-plugin-import` package's `import/no-extraneous-dependencies`
and `import/no-unresolved` rules. In the root `tslint.json` set
`"no-implicit-dependencies": true`, wich is the tslint equivalent of
`import/no-extraneous-dependencies`; there is no tslint equivalent for
`import/no-unresolved`, but we will eventually replace tslint with an eslint
configuration that checks both `.js` and `.ts` files.

For `import/no-unresolved` to work in our monorepo setup, in most packages add
an `index.js` that has:

```js
module.exports = require('./dist'); // or './dist/lib' in some cases
```

And point `"main"` in `package.json` to `"./index.js"`. Despite what's
indicated in npm's documentation for `package.json`, it's also necessary to add
`"index.js"` to the `"files"` array.

Make sure that all `.js` files that can and should be linted are in fact
linted. For example, files in `packages/embark/src/cmd/` weren't being linted
and many test suites weren't being linted.

Bump all relevant packages to `eslint@6.8.0`.

Fix all linter errors that arose after these changes.

Implement a `check-yarn-lock` script that's run as part of `"ci:full"` and
`"qa:full"`, and can manually be invoked via `yarn cylock` in the root of the
monorepo. The script exits with error if any specifiers are found in
`yarn.lock` for `embark[js][-*]` and/or `@embarklabs/*` (with a few exceptions,
cf. `scripts/check-yarn-lock.js`).
2020-02-25 14:52:10 -06:00
Michael Bradley, Jr
e271cebbe3 chore(release): 5.2.2 2020-02-18 19:06:59 -06:00
Michael Bradley, Jr
f5db3f61b6 chore(release): 5.2.0 2020-02-18 11:45:33 -06:00
EmbarkBot
b4286bf59a chore(prerelease): 5.2.0-nightly.4 2020-02-15 00:15:19 +00:00
EmbarkBot
414de52203 chore(prerelease): 5.2.0-nightly.3 2020-02-14 00:14:39 +00:00
EmbarkBot
1a4f63df7e chore(prerelease): 5.2.0-nightly.2 2020-02-13 00:14:05 +00:00
EmbarkBot
e29a93bde5 chore(prerelease): 5.2.0-nightly.1 2020-02-08 00:12:06 +00:00
EmbarkBot
a016fa8fb9 chore(prerelease): 5.2.0-nightly.0 2020-02-07 00:12:17 +00:00
EmbarkBot
d4136ffa8a chore(prerelease): 5.1.2-nightly.0 2020-02-05 00:12:23 +00:00
Michael Bradley, Jr
110957f273 chore(release): 5.1.1 2020-02-03 13:59:08 -06:00
EmbarkBot
a9807b77f5 chore(prerelease): 5.1.1-nightly.2 2020-01-31 00:12:28 +00:00
EmbarkBot
03ca790ffd chore(prerelease): 5.1.1-nightly.0 2020-01-29 00:12:23 +00:00
Iuri Matias
d328b9953a chore: update site urls 2020-01-28 12:07:17 -05:00
Michael Bradley, Jr
0d1da2971c chore(release): 5.1.0 2020-01-27 12:33:50 -06:00
EmbarkBot
c891c2de95 chore(prerelease): 5.1.0-nightly.6 2020-01-25 00:12:13 +00:00
Iuri Matias
292331f229 bugfix(@embark/console): fix included package files 2020-01-24 15:21:58 -05:00
EmbarkBot
84448f8732 chore(prerelease): 5.1.0-nightly.5 2020-01-24 00:10:58 +00:00
Pascal Precht
d0d584a934 refactor(@embark/core): move console source out of lib folder 2020-01-23 10:11:58 -05:00
Pascal Precht
63e83dcfce refactor(@embark/core): migrate console module tests to jets and embark-testing 2020-01-23 10:11:58 -05:00
EmbarkBot
e8b5c7ab89 chore(prerelease): 5.1.0-nightly.4 2020-01-23 00:13:38 +00:00
EmbarkBot
bfda1b3124 chore(prerelease): 5.1.0-nightly.2 2020-01-21 00:12:55 +00:00
Michael Bradley, Jr
3ceffa8454 chore(@embark/suggestions): include suggestions.json in the files to be packed by npm
And remove `suggestions.json` in the `"files"` list of
`packages/core/console/package.json` since it was moved to
`packages/plugins/suggestions/suggestions.json`.
2020-01-20 12:13:56 -06:00
EmbarkBot
c98e769d0d chore(prerelease): 5.1.0-nightly.1 2020-01-20 09:57:35 -06:00