Merge pull request #621 from embark-framework/security/update-deps

Update dependencies
This commit is contained in:
Iuri Matias 2018-07-11 21:16:21 +03:00 committed by GitHub
commit 0d5b3293af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2636 additions and 3011 deletions

View File

@ -88,12 +88,21 @@ Blockchain.prototype.setupProxy = function() {
let ipcObject = new Ipc({ipcRole: 'client'});
proxy.serve(ipcObject, this.config.rpcHost, this.config.rpcPort, false);
proxy.serve(ipcObject, this.config.wsHost, this.config.wsPort, true);
this.rpcProxy = proxy.serve(ipcObject, this.config.rpcHost, this.config.rpcPort, false);
this.wsProxy = proxy.serve(ipcObject, this.config.wsHost, this.config.wsPort, true);
this.config.rpcPort += constants.blockchain.servicePortOnProxy;
this.config.wsPort += constants.blockchain.servicePortOnProxy;
};
Blockchain.prototype.shutdownProxy = function() {
if (!this.config.proxy) {
return;
}
this.rpcProxy.close();
this.wsProxy.close();
};
Blockchain.prototype.runCommand = function(cmd, options, callback) {
console.log(__("running: %s", cmd.underline).green);
if (this.blockchainConfig.silent) {
@ -204,6 +213,8 @@ Blockchain.prototype.readyCallback = function() {
};
Blockchain.prototype.kill = function() {
this.shutdownProxy();
if (this.child) {
this.child.kill();
}

View File

@ -3,7 +3,7 @@ const http = require('http');
const constants = require('../constants.json');
let commList = {};
let transactions = {};
let transactions = {};
let receipts = {};
const parseRequest = function(reqBody){
@ -42,7 +42,7 @@ const parseResponse = function(ipc, resBody){
commList[receipts[jsonO.id]].blockNumber = jsonO.result.blockNumber;
commList[receipts[jsonO.id]].gasUsed = jsonO.result.gasUsed;
commList[receipts[jsonO.id]].status = jsonO.result.status;
if(ipc.connected && !ipc.connecting){
ipc.request('log', commList[receipts[jsonO.id]]);
} else {
@ -109,16 +109,17 @@ exports.serve = function(ipc, host, port, ws){
parseResponse(ipc, data.toString().substr(data.indexOf("{")));
});
});
proxy.on('proxyReqWs', (proxyReq, req, socket) => {
var parser = new WsParser(0, false);
socket.pipe(parser);
parser.on('frame', function (frame) {
parseRequest(frame.data);
});
});
}
server.listen(port);
return server;
};

5474
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
"description": "Embark is a framework that allows you to easily develop and deploy DApps",
"scripts": {
"lint": "./node_modules/.bin/eslint lib/",
"test": "mocha test/ --no-timeouts",
"test": "mocha test/ --no-timeouts --exit",
"testdapp_1": "cd test_apps/test_app/ && npm install && node ../../bin/embark test",
"testdapp_2": "cd test_apps/contracts_app/ && npm install && node ../../bin/embark test",
"fulltest": "npm run lint && npm run test && npm run testdapp_1 && npm run testdapp_2"
@ -55,10 +55,9 @@
"ipfs-api": "17.2.4",
"live-plugin-manager-git-fix": "^0.12.1",
"merge": "^1.2.0",
"mocha": "^3.2.0",
"mocha": "^5.2.0",
"neo-blessed": "^0.2.0",
"netcat": "^1.3.5",
"node-http-proxy": "^0.2.3",
"node-ipc": "^9.1.1",
"node-netcat": "^1.4.8",
"ora": "^2.1.0",
@ -102,7 +101,7 @@
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-coffee": "^1.0.0",
"grunt-contrib-coffee": "^2.0.0",
"grunt-mocha-test": "^0.13.2",
"matchdep": "^1.0.1",
"mocha-sinon": "^1.1.4",

View File

@ -50,6 +50,7 @@ describe('embark.Blockchain', function () {
config.rpcPort += constants.blockchain.servicePortOnProxy;
}
assert.deepEqual(blockchain.config, config);
blockchain.kill();
done();
});
});
@ -94,6 +95,7 @@ describe('embark.Blockchain', function () {
}
assert.deepEqual(blockchain.config, config);
blockchain.kill();
done();
});
});

View File

@ -1,7 +1,7 @@
/*global describe, it, before, beforeEach*/
const assert = require('assert');
const sinon = require('sinon');
const TestLogger = require('../lib/tests/test_logger.js');
const TestLogger = require('../lib/tests/test_logger');
const ProcessLauncher = require('../lib/process/processLauncher');
describe('ProcessWrapper', () => {

View File

@ -27,9 +27,9 @@
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"dev": true,
"requires": {
"chalk": "1.1.3",
"esutils": "2.0.2",
"js-tokens": "3.0.2"
"chalk": "^1.1.3",
"esutils": "^2.0.2",
"js-tokens": "^3.0.2"
}
},
"babel-runtime": {
@ -37,8 +37,8 @@
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": {
"core-js": "2.5.3",
"regenerator-runtime": "0.11.1"
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
},
"dependencies": {
"core-js": {
@ -69,11 +69,11 @@
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
"ansi-styles": "2.2.1",
"escape-string-regexp": "1.0.5",
"has-ansi": "2.0.0",
"strip-ansi": "3.0.1",
"supports-color": "2.0.0"
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"classnames": {
@ -99,7 +99,7 @@
"embark-service": {
"version": "file:extensions/embark-service",
"requires": {
"haml": "0.4.3"
"haml": "^0.4.3"
},
"dependencies": {
"haml": {
@ -113,7 +113,7 @@
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
"requires": {
"iconv-lite": "0.4.19"
"iconv-lite": "~0.4.13"
}
},
"escape-string-regexp": {
@ -143,13 +143,13 @@
"resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz",
"integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=",
"requires": {
"core-js": "1.2.7",
"isomorphic-fetch": "2.2.1",
"loose-envify": "1.3.1",
"object-assign": "4.1.1",
"promise": "7.3.1",
"setimmediate": "1.0.5",
"ua-parser-js": "0.7.17"
"core-js": "^1.0.0",
"isomorphic-fetch": "^2.1.1",
"loose-envify": "^1.0.0",
"object-assign": "^4.1.0",
"promise": "^7.1.1",
"setimmediate": "^1.0.5",
"ua-parser-js": "^0.7.9"
}
},
"haml": {
@ -163,7 +163,7 @@
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dev": true,
"requires": {
"ansi-regex": "2.1.1"
"ansi-regex": "^2.0.0"
}
},
"iconv-lite": {
@ -176,7 +176,7 @@
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz",
"integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==",
"requires": {
"loose-envify": "1.3.1"
"loose-envify": "^1.0.0"
}
},
"is-hex-prefixed": {
@ -194,8 +194,8 @@
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
"integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=",
"requires": {
"node-fetch": "1.7.3",
"whatwg-fetch": "2.0.3"
"node-fetch": "^1.0.1",
"whatwg-fetch": ">=0.10.0"
}
},
"jquery": {
@ -223,7 +223,7 @@
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
"integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
"requires": {
"js-tokens": "3.0.2"
"js-tokens": "^3.0.0"
}
},
"node-fetch": {
@ -231,8 +231,8 @@
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
"integrity": "sha1-mA9vcthSEaU0fGsrwYxbhMPrR+8=",
"requires": {
"encoding": "0.1.12",
"is-stream": "1.1.0"
"encoding": "^0.1.11",
"is-stream": "^1.0.1"
}
},
"number-to-bn": {
@ -254,7 +254,7 @@
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
"integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=",
"requires": {
"asap": "2.0.6"
"asap": "~2.0.3"
}
},
"prop-types": {
@ -262,9 +262,9 @@
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz",
"integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=",
"requires": {
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1"
"fbjs": "^0.8.16",
"loose-envify": "^1.3.1",
"object-assign": "^4.1.1"
}
},
"prop-types-extra": {
@ -272,7 +272,7 @@
"resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.0.1.tgz",
"integrity": "sha1-pXvUgQ6C0no/9DF+zBtK0AX3moI=",
"requires": {
"warning": "3.0.0"
"warning": "^3.0.0"
}
},
"react": {
@ -280,10 +280,10 @@
"resolved": "https://registry.npmjs.org/react/-/react-16.2.0.tgz",
"integrity": "sha512-ZmIomM7EE1DvPEnSFAHZn9Vs9zJl5A9H7el0EGTE6ZbW9FKe/14IYAlPbC8iH25YarEQxZL+E8VW7Mi7kfQrDQ==",
"requires": {
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1",
"prop-types": "15.6.0"
"fbjs": "^0.8.16",
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.0"
}
},
"react-bootstrap": {
@ -291,18 +291,18 @@
"resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-0.32.1.tgz",
"integrity": "sha1-YGJMG0ijnXc+9szmQhpPM+zBZrs=",
"requires": {
"babel-runtime": "6.26.0",
"classnames": "2.2.5",
"dom-helpers": "3.3.1",
"invariant": "2.2.3",
"keycode": "2.1.9",
"prop-types": "15.6.0",
"prop-types-extra": "1.0.1",
"react-overlays": "0.8.3",
"react-prop-types": "0.4.0",
"react-transition-group": "2.2.1",
"uncontrollable": "4.1.0",
"warning": "3.0.0"
"babel-runtime": "^6.11.6",
"classnames": "^2.2.5",
"dom-helpers": "^3.2.0",
"invariant": "^2.2.1",
"keycode": "^2.1.2",
"prop-types": "^15.5.10",
"prop-types-extra": "^1.0.1",
"react-overlays": "^0.8.0",
"react-prop-types": "^0.4.0",
"react-transition-group": "^2.0.0",
"uncontrollable": "^4.1.0",
"warning": "^3.0.0"
}
},
"react-dom": {
@ -310,10 +310,10 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz",
"integrity": "sha512-zpGAdwHVn9K0091d+hr+R0qrjoJ84cIBFL2uU60KvWBPfZ7LPSrfqviTxGHWN0sjPZb2hxWzMexwrvJdKePvjg==",
"requires": {
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1",
"prop-types": "15.6.0"
"fbjs": "^0.8.16",
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.0"
}
},
"react-overlays": {
@ -321,12 +321,12 @@
"resolved": "https://registry.npmjs.org/react-overlays/-/react-overlays-0.8.3.tgz",
"integrity": "sha1-+tZe6lskMBzKGSoWn13dsLINOsU=",
"requires": {
"classnames": "2.2.5",
"dom-helpers": "3.3.1",
"prop-types": "15.6.0",
"prop-types-extra": "1.0.1",
"react-transition-group": "2.2.1",
"warning": "3.0.0"
"classnames": "^2.2.5",
"dom-helpers": "^3.2.1",
"prop-types": "^15.5.10",
"prop-types-extra": "^1.0.1",
"react-transition-group": "^2.2.0",
"warning": "^3.0.0"
}
},
"react-prop-types": {
@ -334,7 +334,7 @@
"resolved": "https://registry.npmjs.org/react-prop-types/-/react-prop-types-0.4.0.tgz",
"integrity": "sha1-+ZsL+0AGkpya8gUefBQUpcdbk9A=",
"requires": {
"warning": "3.0.0"
"warning": "^3.0.0"
}
},
"react-transition-group": {
@ -342,12 +342,12 @@
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.2.1.tgz",
"integrity": "sha512-q54UBM22bs/CekG8r3+vi9TugSqh0t7qcEVycaRc9M0p0aCEu+h6rp/RFiW7fHfgd1IKpd9oILFTl5QK+FpiPA==",
"requires": {
"chain-function": "1.0.0",
"classnames": "2.2.5",
"dom-helpers": "3.3.1",
"loose-envify": "1.3.1",
"prop-types": "15.6.0",
"warning": "3.0.0"
"chain-function": "^1.0.0",
"classnames": "^2.2.5",
"dom-helpers": "^3.2.0",
"loose-envify": "^1.3.1",
"prop-types": "^15.5.8",
"warning": "^3.0.0"
}
},
"regenerator-runtime": {
@ -366,7 +366,7 @@
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "2.1.1"
"ansi-regex": "^2.0.0"
}
},
"strip-hex-prefix": {
@ -393,7 +393,7 @@
"resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-4.1.0.tgz",
"integrity": "sha1-4DWCkSUuGGUiLZCTmxny9J+Bwak=",
"requires": {
"invariant": "2.2.3"
"invariant": "^2.1.0"
}
},
"warning": {
@ -401,7 +401,7 @@
"resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz",
"integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=",
"requires": {
"loose-envify": "1.3.1"
"loose-envify": "^1.0.0"
}
},
"whatwg-fetch": {
@ -414,8 +414,8 @@
"resolved": "https://registry.npmjs.org/zeppelin-solidity/-/zeppelin-solidity-1.8.0.tgz",
"integrity": "sha1-BJ/N59rqn8hSEPjG25+M0auKhTo=",
"requires": {
"dotenv": "4.0.0",
"ethjs-abi": "0.2.1"
"dotenv": "^4.0.0",
"ethjs-abi": "^0.2.1"
}
}
}