refactor(@embark/blockchain): move module into own package (#1942)

This commit is contained in:
Eric Mastro 2019-10-16 22:30:14 +09:00 committed by Iuri Matias
parent 85be192879
commit ed0d3afb4f
9 changed files with 101 additions and 3 deletions

View File

@ -94,6 +94,7 @@
"embark-api": "^4.1.1", "embark-api": "^4.1.1",
"embark-authenticator": "^4.1.1", "embark-authenticator": "^4.1.1",
"embark-basic-pipeline": "^4.1.1", "embark-basic-pipeline": "^4.1.1",
"embark-blockchain": "^4.1.1",
"embark-code-runner": "^4.1.1", "embark-code-runner": "^4.1.1",
"embark-communication": "^4.1.1", "embark-communication": "^4.1.1",
"embark-compiler": "^4.1.1", "embark-compiler": "^4.1.1",

View File

@ -167,7 +167,7 @@ class Engine {
stackComponents(options) { stackComponents(options) {
this.registerModulePackage('embark-pipeline', { plugins: this.plugins }); this.registerModulePackage('embark-pipeline', { plugins: this.plugins });
this.registerModule('blockchain', { plugins: this.plugins }); this.registerModulePackage('embark-blockchain', { plugins: this.plugins });
this.registerModulePackage('embark-proxy', {plugins: this.plugins}); this.registerModulePackage('embark-proxy', {plugins: this.plugins});
// TODO: coverage param should be part of the request compilation command, not an option here // TODO: coverage param should be part of the request compilation command, not an option here
// some other params in the options might not longer be relevant, in fact we probably don't need options anymore // some other params in the options might not longer be relevant, in fact we probably don't need options anymore

View File

@ -0,0 +1,4 @@
engine-strict = true
package-lock = false
save-exact = true
scripts-prepend-node-path = true

View File

@ -0,0 +1,6 @@
# `embark-blockchain`
> Blockchain APIs for Embark
Visit [embark.status.im](https://embark.status.im/) to get started with
[Embark](https://github.com/embark-framework/embark).

View File

@ -0,0 +1,82 @@
{
"name": "embark-blockchain",
"version": "4.1.1",
"author": "Iuri Matias <iuri.matias@gmail.com>",
"contributors": [],
"description": "Blockchain APIs for Embark",
"homepage": "https://github.com/embark-framework/embark/tree/master/packages/stack/blockchain#readme",
"bugs": "https://github.com/embark-framework/embark/issues",
"keywords": [
"blockchain",
"dapps",
"ethereum",
"ipfs",
"serverless",
"solc",
"solidity"
],
"files": [
"dist"
],
"license": "MIT",
"repository": {
"directory": "packages/stack/blockchain",
"type": "git",
"url": "https://github.com/embark-framework/embark.git"
},
"main": "./dist/index.js",
"embark-collective": {
"build:node": true
},
"scripts": {
"_build": "npm run solo -- build",
"ci": "npm run qa",
"clean": "npm run reset",
"lint": "eslint src/",
"qa": "npm-run-all lint _build",
"reset": "npx rimraf dist embark-*.tgz package",
"solo": "embark-solo",
"test": "jest"
},
"eslintConfig": {
"extends": "../../../.eslintrc.json"
},
"dependencies": {
"@babel/runtime-corejs2": "7.6.2",
"async": "2.6.1",
"clone-deep": "4.0.0",
"embark-core": "^4.1.1",
"embark-i18n": "^4.1.1",
"embark-utils": "^4.1.1"
},
"devDependencies": {
"@babel/core": "7.6.2",
"babel-jest": "24.9.0",
"embark-solo": "^4.1.1",
"embark-testing": "^4.1.1",
"eslint": "5.7.0",
"jest": "24.9.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0"
},
"engines": {
"node": ">=8.12.0 <12.0.0",
"npm": ">=6.4.1",
"yarn": ">=1.12.3"
},
"jest": {
"collectCoverage": true,
"testEnvironment": "node",
"testMatch": [
"**/test/**/*.js"
],
"transform": {
"\\.js$": [
"babel-jest",
{
"rootMode": "upward"
}
]
}
}
}

View File

@ -1,6 +1,4 @@
import { Embark, Events, Logger } from "embark"; import { Embark, Events, Logger } from "embark";
import { Request, Response } from "express";
import Websocket from "ws";
export default class BlockchainAPI { export default class BlockchainAPI {
private embark: Embark; private embark: Embark;
private logger: Logger; private logger: Logger;

View File

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*"]
}

View File

@ -0,0 +1,3 @@
{
"extends": "../../tslint.json"
}