fix linting issues

This commit is contained in:
Iuri Matias 2018-10-29 15:33:12 +01:00
parent 99d618c2e3
commit 71380be0ca
15 changed files with 300 additions and 178 deletions

View File

@ -995,7 +995,7 @@ function isDappCmd(cmd) {
} }
function isObject(val) { function isObject(val) {
// eslint-disable-next-line no-eq-null // eslint-disable-next-line
return val != null && typeof val === 'object' && Array.isArray(val) === false; return val != null && typeof val === 'object' && Array.isArray(val) === false;
} }

View File

@ -297,9 +297,6 @@ class Engine {
this.registerModule('tests', Object.assign(options, {ipc: this.ipc})); this.registerModule('tests', Object.assign(options, {ipc: this.ipc}));
} }
codeCoverageService(_options) {
this.registerModule('coverage');
}
} }
module.exports = Engine; module.exports = Engine;

View File

@ -207,6 +207,5 @@ module.exports = {
copyPreserve, copyPreserve,
dappPath, dappPath,
pkgPath, pkgPath,
outputFileSync,
writeJson writeJson
}; };

View File

@ -15,7 +15,7 @@ const Logger = require('../../core/logger');
// time between IPC connection attmpts (in ms) // time between IPC connection attmpts (in ms)
const IPC_CONNECT_INTERVAL = 2000; const IPC_CONNECT_INTERVAL = 2000;
/*eslint complexity: ["error", 38]*/ /*eslint complexity: ["error", 42]*/
var Blockchain = function(userConfig, clientClass) { var Blockchain = function(userConfig, clientClass) {
this.userConfig = userConfig; this.userConfig = userConfig;
this.env = userConfig.env || 'development'; this.env = userConfig.env || 'development';
@ -48,10 +48,10 @@ var Blockchain = function(userConfig, clientClass) {
mine: this.userConfig.mine || false, mine: this.userConfig.mine || false,
account: this.userConfig.account || {}, account: this.userConfig.account || {},
devPassword: this.userConfig.devPassword || "", devPassword: this.userConfig.devPassword || "",
whisper: (this.userConfig.whisper != false), whisper: (this.userConfig.whisper !== false),
maxpeers: ((this.userConfig.maxpeers === 0) ? 0 : (this.userConfig.maxpeers || 25)), maxpeers: ((this.userConfig.maxpeers === 0) ? 0 : (this.userConfig.maxpeers || 25)),
bootnodes: this.userConfig.bootnodes || "", bootnodes: this.userConfig.bootnodes || "",
wsRPC: (this.userConfig.wsRPC != false), wsRPC: (this.userConfig.wsRPC !== false),
wsHost: dockerHostSwap(this.userConfig.wsHost) || defaultHost, wsHost: dockerHostSwap(this.userConfig.wsHost) || defaultHost,
wsPort: this.userConfig.wsPort || 8546, wsPort: this.userConfig.wsPort || 8546,
wsOrigins: this.userConfig.wsOrigins || false, wsOrigins: this.userConfig.wsOrigins || false,
@ -98,10 +98,10 @@ var Blockchain = function(userConfig, clientClass) {
/** /**
* Polls for a connection to an IPC server (generally this is set up * Polls for a connection to an IPC server (generally this is set up
* in the Embark process). Once connected, any logs logged to the * in the Embark process). Once connected, any logs logged to the
* Logger will be shipped off to the IPC server. In the case of `embark * Logger will be shipped off to the IPC server. In the case of `embark
* run`, the BlockchainListener module is listening for these logs. * run`, the BlockchainListener module is listening for these logs.
* *
* @returns {void} * @returns {void}
*/ */
Blockchain.prototype.initStandaloneProcess = function () { Blockchain.prototype.initStandaloneProcess = function () {
@ -117,7 +117,7 @@ Blockchain.prototype.initStandaloneProcess = function () {
this.ipc = new Ipc({ipcRole: 'client'}); this.ipc = new Ipc({ipcRole: 'client'});
// Wait for an IPC server to start (ie `embark run`) by polling `.connect()`. // Wait for an IPC server to start (ie `embark run`) by polling `.connect()`.
// Do not kill this interval as the IPC server may restart (ie restart // Do not kill this interval as the IPC server may restart (ie restart
// `embark run` without restarting `embark blockchain`) // `embark run` without restarting `embark blockchain`)
setInterval(() => { setInterval(() => {
if (!this.ipc.connected) { if (!this.ipc.connected) {
@ -435,7 +435,7 @@ Blockchain.prototype.initChainAndGetAddress = function (callback) {
}); });
}; };
var BlockchainClient = function(userConfig, clientName, env, onReadyCallback, onExitCallback, logger, events, isStandalone) { var BlockchainClient = function(userConfig, clientName, env, onReadyCallback, onExitCallback, logger, _events, _isStandalone) {
if ((userConfig === {} || JSON.stringify(userConfig) === '{"enabled":true}') && env !== 'development') { if ((userConfig === {} || JSON.stringify(userConfig) === '{"enabled":true}') && env !== 'development') {
logger.info("===> " + __("warning: running default config on a non-development environment")); logger.info("===> " + __("warning: running default config on a non-development environment"));
} }
@ -453,7 +453,6 @@ var BlockchainClient = function(userConfig, clientName, env, onReadyCallback, on
case 'parity': case 'parity':
clientClass = ParityClient; clientClass = ParityClient;
break; break;
return new Blockchain({blockchainConfig, client: GethCommands, env, isDev, onReadyCallback, onExitCallback, logger, events, isStandalone});
default: default:
console.error(__('Unknow client "%s". Please use one of the following: %s', userConfig.ethereumClientName, 'geth, parity')); console.error(__('Unknow client "%s". Please use one of the following: %s', userConfig.ethereumClientName, 'geth, parity'));
process.exit(); process.exit();

View File

@ -13,6 +13,7 @@ class Simulator {
this.logger = options.logger; this.logger = options.logger;
} }
/*eslint complexity: ["error", 21]*/
run(options) { run(options) {
let cmds = []; let cmds = [];

View File

@ -219,7 +219,7 @@ class ContractsManager {
); );
} }
build(done, useContractFiles = true, resetContracts = true) { build(done, _useContractFiles = true, resetContracts = true) {
let self = this; let self = this;
self.contracts = {}; self.contracts = {};
@ -397,8 +397,8 @@ class ContractsManager {
callback(); callback();
}, },
// TODO: needs refactoring, has gotten too complex // TODO: needs refactoring, has gotten too complex
/*eslint complexity: ["error", 16]*/ /*eslint complexity: ["error", 19]*/
/*eslint max-depth: ["error", 16]*/ /*eslint max-depth: ["error", 19]*/
function determineDependencies(callback) { function determineDependencies(callback) {
let className, contract; let className, contract;
for (className in self.contracts) { for (className in self.contracts) {

View File

@ -102,7 +102,7 @@ class ContractSource {
Object.values(this.contractBytecode).every((contractBytecode) => { return (Object.values(contractBytecode).length <= 1); }); Object.values(this.contractBytecode).every((contractBytecode) => { return (Object.values(contractBytecode).length <= 1); });
} }
/*eslint complexity: ["error", 40]*/ /*eslint complexity: ["error", 44]*/
generateCodeCoverage(trace) { generateCodeCoverage(trace) {
if(!this.ast || !this.contractBytecode) throw new Error('Error generating coverage: solc output was not assigned'); if(!this.ast || !this.contractBytecode) throw new Error('Error generating coverage: solc output was not assigned');
@ -313,9 +313,9 @@ class ContractSource {
nodes.forEach((node) => { nodes.forEach((node) => {
// Skip duplicate function reports by only reporting when there is a jump. // Skip duplicate function reports by only reporting when there is a jump.
if(node.type == 'f' && step.jump) return; if(node.type === 'f' && step.jump) return;
if(node.type != 'b' && node.body && node.body.loc) { if(node.type !== 'b' && node.body && node.body.loc) {
for(var line = node.body.loc.start.line; line <= node.body.loc.end.line; line++) { for(var line = node.body.loc.start.line; line <= node.body.loc.end.line; line++) {
coverage.l[line]++; coverage.l[line]++;
} }

View File

@ -58,20 +58,20 @@ class DebuggerManager {
}); });
}, },
function startDebug(next) { function startDebug(next) {
let debuggerData = {}; let debuggerData = {};
cmd_line.events.on("locals", (data) => { cmd_line.events.on("locals", (data) => {
debuggerData.locals = self.simplifyDebuggerVars(data); debuggerData.locals = self.simplifyDebuggerVars(data);
}); });
cmd_line.events.on("globals", (data) => { cmd_line.events.on("globals", (data) => {
debuggerData.contract = self.simplifyDebuggerVars(data); debuggerData.contract = self.simplifyDebuggerVars(data);
}); });
cmd_line.startDebug(txHash, filename, () => { cmd_line.startDebug(txHash, filename, () => {
cmd_line.events.on("source", () => { cmd_line.events.on("source", () => {
let lines = cmd_line.getSource(); let lines = cmd_line.getSource();
// TODO: this is a bit of a hack // TODO: this is a bit of a hack
let line = lines.filter((x) => x.indexOf("=>") === 0)[0]; let line = lines.filter((x) => x.indexOf("=>") === 0)[0];
outputCb(lines, line, debuggerData); outputCb(lines, line, debuggerData);
}); });
@ -86,17 +86,17 @@ class DebuggerManager {
}); });
} }
// TODO: this is duplicated in debugger/index.js // TODO: this is duplicated in debugger/index.js
simplifyDebuggerVars(data) { simplifyDebuggerVars(data) {
let new_data = {}; let new_data = {};
for (let key in data) { for (let key in data) {
let field = data[key]; let field = data[key];
new_data[`${key} (${field.type})`] = field.value; new_data[`${key} (${field.type})`] = field.value;
} }
return new_data; return new_data;
} }
} }

View File

@ -1,10 +1,7 @@
var RemixDebug = require('remix-debug-debugtest');
var CmdLine = RemixDebug.CmdLine;
var DebuggerManager = require('./debugger_manager.js'); var DebuggerManager = require('./debugger_manager.js');
class TransactionDebugger { class TransactionDebugger {
constructor(embark, _options) { constructor(embark, _options) {
const self = this;
this.embark = embark; this.embark = embark;
this.debugger_manager = new DebuggerManager("http://localhost:8545"); this.debugger_manager = new DebuggerManager("http://localhost:8545");
@ -35,44 +32,44 @@ class TransactionDebugger {
self.embark.logger.error(line); self.embark.logger.error(line);
}); });
self.find_vars_in_line(tx.transactionHash, line, known_vars, (found_vars) => { self.find_vars_in_line(tx.transactionHash, line, known_vars, (found_vars) => {
if (!found_vars) return; if (!found_vars) return;
self.embark.logger.info("vars:"); self.embark.logger.info("vars:");
found_vars.forEach((variable) => { found_vars.forEach((variable) => {
self.embark.logger.info(`${variable.name}: ${variable.value}`); self.embark.logger.info(`${variable.name}: ${variable.value}`);
}); });
}); });
}); });
}); });
}); });
} }
find_vars_in_line(txHash, line, known_vars, cb) { find_vars_in_line(txHash, line, known_vars, cb) {
let found_vars = []; let found_vars = [];
this.getGlobals(txHash, (err, globals) => { this.getGlobals(txHash, (err, globals) => {
if (err) return cb([]); if (err) return cb([]);
for (let variable in globals) { for (let variable in globals) {
let value = globals[variable]; let value = globals[variable];
if (line.indexOf(variable) >= 0) { if (line.indexOf(variable) >= 0) {
found_vars.push({name: variable, value: value}); found_vars.push({name: variable, value: value});
} }
} }
for (let variable in known_vars.locals) { for (let variable in known_vars.locals) {
let value = known_vars.locals[variable]; let value = known_vars.locals[variable];
let variable_name = variable.split(' ')[0]; let variable_name = variable.split(' ')[0];
if (line.indexOf(variable_name) >= 0) { if (line.indexOf(variable_name) >= 0) {
found_vars.push({name: variable, value: value}); found_vars.push({name: variable, value: value});
} }
} }
for (let variable in known_vars.contract) { for (let variable in known_vars.contract) {
let value = known_vars.contract[variable]; let value = known_vars.contract[variable];
let variable_name = variable.split(' ')[0]; let variable_name = variable.split(' ')[0];
if (line.indexOf(variable_name) >= 0) { if (line.indexOf(variable_name) >= 0) {
found_vars.push({name: variable, value: value}); found_vars.push({name: variable, value: value});
} }
} }
cb(found_vars); cb(found_vars);
}); });
@ -94,11 +91,11 @@ class TransactionDebugger {
let filename = contract.filename; let filename = contract.filename;
this.apiDebugger = this.debugger_manager.createDebuggerSession(txHash, filename, () => { this.apiDebugger = this.debugger_manager.createDebuggerSession(txHash, filename, () => {
this.getGlobals(txHash, (err, globals) => { this.getGlobals(txHash, (err, globals) => {
if (err) return res.send({ok: false}); if (err) return res.send({ok: false});
this.debuggerData.globals = globals; this.debuggerData.globals = globals;
res.send({ok :true}); res.send({ok :true});
}); });
}); });
}); });
}); });
@ -140,10 +137,10 @@ class TransactionDebugger {
ws.send(JSON.stringify(this.debuggerData), () => {}); ws.send(JSON.stringify(this.debuggerData), () => {});
}); });
this.apiDebugger.events.on("locals", (data) => { this.apiDebugger.events.on("locals", (data) => {
this.debuggerData.locals = this.simplifyDebuggerVars(data); this.debuggerData.locals = this.simplifyDebuggerVars(data);
ws.send(JSON.stringify(this.debuggerData), () => {}); ws.send(JSON.stringify(this.debuggerData), () => {});
}); });
this.apiDebugger.events.on("globals", (data) => { this.apiDebugger.events.on("globals", (data) => {
this.debuggerData.contract = this.simplifyDebuggerVars(data); this.debuggerData.contract = this.simplifyDebuggerVars(data);
@ -166,14 +163,14 @@ class TransactionDebugger {
listenToCommands() { listenToCommands() {
const self = this; const self = this;
this.cmdDebugger = false; this.cmdDebugger = false;
this.currentCmdTxHash = ""; this.currentCmdTxHash = "";
this.embark.registerConsoleCommand((cmd, _options) => { this.embark.registerConsoleCommand((cmd, _options) => {
let cmdName = cmd.split(" ")[0]; let cmdName = cmd.split(" ")[0];
let txHash = cmd.split(" ")[1]; let txHash = cmd.split(" ")[1];
return { return {
match: () => cmdName === 'debug', match: () => cmdName === 'debug',
process: (cb) => { process: (_cb) => {
if (txHash) { if (txHash) {
this.embark.events.request("contracts:contract:byTxHash", txHash, (err, contract) => { this.embark.events.request("contracts:contract:byTxHash", txHash, (err, contract) => {
if (err) { if (err) {
@ -181,7 +178,7 @@ class TransactionDebugger {
return; return;
} }
let filename = contract.filename; let filename = contract.filename;
self.currentCmdTxHash = txHash; self.currentCmdTxHash = txHash;
self.cmdDebugger = self.debugger_manager.createDebuggerSession(txHash, filename, () => { self.cmdDebugger = self.debugger_manager.createDebuggerSession(txHash, filename, () => {
self.cmdDebugger.getSource().forEach((line) => { self.cmdDebugger.getSource().forEach((line) => {
console.dir(line); console.dir(line);
@ -190,7 +187,7 @@ class TransactionDebugger {
}); });
return; return;
} }
self.currentCmdTxHash = self.last_tx; self.currentCmdTxHash = self.last_tx;
let filename = self.tx_tracker[self.last_tx].contract.filename; let filename = self.tx_tracker[self.last_tx].contract.filename;
self.cmdDebugger = self.debugger_manager.createDebuggerSession(self.last_tx, filename, () => { self.cmdDebugger = self.debugger_manager.createDebuggerSession(self.last_tx, filename, () => {
self.cmdDebugger.getSource().forEach((line) => { self.cmdDebugger.getSource().forEach((line) => {
@ -204,7 +201,7 @@ class TransactionDebugger {
this.embark.registerConsoleCommand((cmd, _options) => { this.embark.registerConsoleCommand((cmd, _options) => {
return { return {
match: () => (cmd === 'next' || cmd === 'n'), match: () => (cmd === 'next' || cmd === 'n'),
process: (cb) => { process: (_cb) => {
if (!self.cmdDebugger.currentStep()) { if (!self.cmdDebugger.currentStep()) {
console.dir("end of execution reached"); console.dir("end of execution reached");
return self.cmdDebugger.unload(); return self.cmdDebugger.unload();
@ -220,7 +217,7 @@ class TransactionDebugger {
this.embark.registerConsoleCommand((cmd, _options) => { this.embark.registerConsoleCommand((cmd, _options) => {
return { return {
match: () => (cmd === 'previous' || cmd === 'p'), match: () => (cmd === 'previous' || cmd === 'p'),
process: (cb) => { process: (_cb) => {
if (!self.cmdDebugger.currentStep()) { if (!self.cmdDebugger.currentStep()) {
console.dir("end of execution reached"); console.dir("end of execution reached");
return self.cmdDebugger.unload(); return self.cmdDebugger.unload();
@ -236,7 +233,7 @@ class TransactionDebugger {
this.embark.registerConsoleCommand((cmd, _options) => { this.embark.registerConsoleCommand((cmd, _options) => {
return { return {
match: () => (cmd === 'var local' || cmd === 'v l' || cmd === 'vl'), match: () => (cmd === 'var local' || cmd === 'v l' || cmd === 'vl'),
process: (cb) => { process: (_cb) => {
self.cmdDebugger.displayLocals(); self.cmdDebugger.displayLocals();
} }
}; };
@ -245,7 +242,7 @@ class TransactionDebugger {
this.embark.registerConsoleCommand((cmd, _options) => { this.embark.registerConsoleCommand((cmd, _options) => {
return { return {
match: () => (cmd === 'var global' || cmd === 'v g' || cmd === 'vg'), match: () => (cmd === 'var global' || cmd === 'v g' || cmd === 'vg'),
process: (cb) => { process: (_cb) => {
self.cmdDebugger.displayGlobals(); self.cmdDebugger.displayGlobals();
} }
}; };
@ -254,41 +251,41 @@ class TransactionDebugger {
this.embark.registerConsoleCommand((cmd, _options) => { this.embark.registerConsoleCommand((cmd, _options) => {
return { return {
match: () => (cmd === 'var all' || cmd === 'v a' || cmd === 'va'), match: () => (cmd === 'var all' || cmd === 'v a' || cmd === 'va'),
process: (cb) => { process: (_cb) => {
self.getGlobals((err, globals) => { self.getGlobals((err, globals) => {
if (err) return self.embark.logger.error(err); if (err) return self.embark.logger.error(err);
console.dir(globals); console.dir(globals);
}); });
} }
}; };
}); });
} }
getGlobals(txHash, cb) { getGlobals(txHash, cb) {
let globals = {}; let globals = {};
this.embark.events.request("blockchain:getTransaction", txHash, (err, tx) => { this.embark.events.request("blockchain:getTransaction", txHash, (err, tx) => {
if (err) return cb(err); if (err) return cb(err);
this.embark.events.request("blockchain:block:byHash", tx.blockHash, (err, block) => { this.embark.events.request("blockchain:block:byHash", tx.blockHash, (err, block) => {
if (err) return cb(err); if (err) return cb(err);
globals["block.blockHash"] = tx.blockHash; globals["block.blockHash"] = tx.blockHash;
globals["block.number"] = tx.blockNumber; globals["block.number"] = tx.blockNumber;
globals["block.coinbase"] = block.miner; globals["block.coinbase"] = block.miner;
globals["block.difficulty"] = block.difficulty; globals["block.difficulty"] = block.difficulty;
globals["block.gaslimit"] = block.gasLimit; globals["block.gaslimit"] = block.gasLimit;
globals["block.timestamp"] = block.timestamp; globals["block.timestamp"] = block.timestamp;
globals["msg.sender"] = tx.from; globals["msg.sender"] = tx.from;
globals["msg.gas"] = tx.gas; globals["msg.gas"] = tx.gas;
globals["msg.gasPrice"] = tx.gasPrice; globals["msg.gasPrice"] = tx.gasPrice;
globals["msg.value"] = tx.value; globals["msg.value"] = tx.value;
globals["now"] = block.timestamp; globals["now"] = block.timestamp;
cb(null, globals); cb(null, globals);
}); });
}); });
} }
} }

View File

@ -14,6 +14,7 @@ class GraphGenerator {
}); });
} }
/*eslint complexity: ["error", 21]*/
generate(options) { generate(options) {
const self = this; const self = this;
let id = 0; let id = 0;

View File

@ -38,7 +38,6 @@ class WebServer {
buildDir: this.buildDir, buildDir: this.buildDir,
events: this.events, events: this.events,
host: this.host, host: this.host,
logger: this.logger,
port: this.port, port: this.port,
plugins: this.plugins, plugins: this.plugins,
openBrowser: this.webServerConfig.openBrowser openBrowser: this.webServerConfig.openBrowser

View File

@ -81,7 +81,7 @@ class Whisper {
} }
// Assume it is a Geth compliant client // Assume it is a Geth compliant client
self.web3.shh.getVersion(function(err, version) { self.web3.shh.getVersion(function(err, version) {
if (err || version == "2") { if (err || version === "2") {
return cb({name: 'Whisper', status: 'off'}); return cb({name: 'Whisper', status: 'off'});
} }
return cb({name: 'Whisper (version ' + version + ')', status: 'on'}); return cb({name: 'Whisper (version ' + version + ')', status: 'on'});

255
npm-shrinkwrap.json generated
View File

@ -5400,61 +5400,62 @@
} }
}, },
"eslint": { "eslint": {
"version": "4.13.1", "version": "5.7.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-4.13.1.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.7.0.tgz",
"integrity": "sha512-UCJVV50RtLHYzBp1DZ8CMPtRSg4iVZvjgO9IJHIKyWU/AnJVjtdRikoUPLB29n5pzMB7TnsLQWf0V6VUJfoPfw==", "integrity": "sha512-zYCeFQahsxffGl87U2aJ7DPyH8CbWgxBC213Y8+TCanhUTf2gEvfq3EKpHmEcozTLyPmGe9LZdMAwC/CpJBM5A==",
"dev": true, "dev": true,
"requires": { "requires": {
"ajv": "^5.3.0", "@babel/code-frame": "^7.0.0",
"babel-code-frame": "^6.22.0", "ajv": "^6.5.3",
"chalk": "^2.1.0", "chalk": "^2.1.0",
"concat-stream": "^1.6.0", "cross-spawn": "^6.0.5",
"cross-spawn": "^5.1.0", "debug": "^4.0.1",
"debug": "^3.0.1", "doctrine": "^2.1.0",
"doctrine": "^2.0.2", "eslint-scope": "^4.0.0",
"eslint-scope": "^3.7.1", "eslint-utils": "^1.3.1",
"espree": "^3.5.2", "eslint-visitor-keys": "^1.0.0",
"esquery": "^1.0.0", "espree": "^4.0.0",
"estraverse": "^4.2.0", "esquery": "^1.0.1",
"esutils": "^2.0.2", "esutils": "^2.0.2",
"file-entry-cache": "^2.0.0", "file-entry-cache": "^2.0.0",
"functional-red-black-tree": "^1.0.1", "functional-red-black-tree": "^1.0.1",
"glob": "^7.1.2", "glob": "^7.1.2",
"globals": "^11.0.1", "globals": "^11.7.0",
"ignore": "^3.3.3", "ignore": "^4.0.6",
"imurmurhash": "^0.1.4", "imurmurhash": "^0.1.4",
"inquirer": "^3.0.6", "inquirer": "^6.1.0",
"is-resolvable": "^1.0.0", "is-resolvable": "^1.1.0",
"js-yaml": "^3.9.1", "js-yaml": "^3.12.0",
"json-stable-stringify-without-jsonify": "^1.0.1", "json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0", "levn": "^0.3.0",
"lodash": "^4.17.4", "lodash": "^4.17.5",
"minimatch": "^3.0.2", "minimatch": "^3.0.4",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
"optionator": "^0.8.2", "optionator": "^0.8.2",
"path-is-inside": "^1.0.2", "path-is-inside": "^1.0.2",
"pluralize": "^7.0.0", "pluralize": "^7.0.0",
"progress": "^2.0.0", "progress": "^2.0.0",
"regexpp": "^2.0.1",
"require-uncached": "^1.0.3", "require-uncached": "^1.0.3",
"semver": "^5.3.0", "semver": "^5.5.1",
"strip-ansi": "^4.0.0", "strip-ansi": "^4.0.0",
"strip-json-comments": "~2.0.1", "strip-json-comments": "^2.0.1",
"table": "^4.0.1", "table": "^5.0.2",
"text-table": "~0.2.0" "text-table": "^0.2.0"
}, },
"dependencies": { "dependencies": {
"ajv": { "acorn": {
"version": "5.5.2", "version": "6.0.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==",
"dev": true, "dev": true
"requires": { },
"co": "^4.6.0", "acorn-jsx": {
"fast-deep-equal": "^1.0.0", "version": "5.0.0",
"fast-json-stable-stringify": "^2.0.0", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.0.tgz",
"json-schema-traverse": "^0.3.0" "integrity": "sha512-XkB50fn0MURDyww9+UYL3c1yLbOBz0ZFvrdYlGB8l+Ije1oSC75qAqrzSPjYQbdnQUzhlUGNKuesryAv0gxZOg==",
} "dev": true
}, },
"ansi-regex": { "ansi-regex": {
"version": "3.0.0", "version": "3.0.0",
@ -5462,14 +5463,43 @@
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true "dev": true
}, },
"eslint-scope": { "chardet": {
"version": "3.7.3", "version": "0.7.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
"integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
"dev": true
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"esrecurse": "^4.1.0", "nice-try": "^1.0.4",
"estraverse": "^4.1.1" "path-key": "^2.0.1",
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"debug": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz",
"integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
},
"espree": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz",
"integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==",
"dev": true,
"requires": {
"acorn": "^6.0.2",
"acorn-jsx": "^5.0.0",
"eslint-visitor-keys": "^1.0.0"
} }
}, },
"esprima": { "esprima": {
@ -5478,10 +5508,57 @@
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true "dev": true
}, },
"fast-deep-equal": { "external-editor": {
"version": "1.1.0", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz",
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==",
"dev": true,
"requires": {
"chardet": "^0.7.0",
"iconv-lite": "^0.4.24",
"tmp": "^0.0.33"
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dev": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
"dev": true
},
"inquirer": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz",
"integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==",
"dev": true,
"requires": {
"ansi-escapes": "^3.0.0",
"chalk": "^2.0.0",
"cli-cursor": "^2.1.0",
"cli-width": "^2.0.0",
"external-editor": "^3.0.0",
"figures": "^2.0.0",
"lodash": "^4.17.10",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.1.0",
"string-width": "^2.1.0",
"strip-ansi": "^4.0.0",
"through": "^2.3.6"
}
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true "dev": true
}, },
"js-yaml": { "js-yaml": {
@ -5494,12 +5571,22 @@
"esprima": "^4.0.0" "esprima": "^4.0.0"
} }
}, },
"json-schema-traverse": { "ms": {
"version": "0.3.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true "dev": true
}, },
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
"requires": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
}
},
"strip-ansi": { "strip-ansi": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
@ -5508,6 +5595,18 @@
"requires": { "requires": {
"ansi-regex": "^3.0.0" "ansi-regex": "^3.0.0"
} }
},
"table": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz",
"integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==",
"dev": true,
"requires": {
"ajv": "^6.5.3",
"lodash": "^4.17.10",
"slice-ansi": "1.0.0",
"string-width": "^2.1.1"
}
} }
} }
}, },
@ -5774,6 +5873,18 @@
"estraverse": "^4.1.1" "estraverse": "^4.1.1"
} }
}, },
"eslint-utils": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",
"integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==",
"dev": true
},
"eslint-visitor-keys": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
"integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==",
"dev": true
},
"espree": { "espree": {
"version": "3.5.4", "version": "3.5.4",
"resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz",
@ -15167,6 +15278,12 @@
"safe-regex": "^1.1.0" "safe-regex": "^1.1.0"
} }
}, },
"regexpp": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
"integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
"dev": true
},
"regexpu-core": { "regexpu-core": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz",
@ -16624,14 +16741,6 @@
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
"integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
}, },
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"eth-lib": { "eth-lib": {
"version": "0.1.27", "version": "0.1.27",
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz",
@ -16886,6 +16995,28 @@
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.34", "web3-core-helpers": "1.0.0-beta.34",
"websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
},
"dependencies": {
"websocket": {
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
"requires": {
"debug": "^2.2.0",
"nan": "^2.3.3",
"typedarray-to-buffer": "^3.1.2",
"yaeti": "^0.0.6"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
}
}
}
} }
}, },
"web3-shh": { "web3-shh": {
@ -16917,7 +17048,6 @@
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
"requires": { "requires": {
"debug": "^2.2.0",
"nan": "^2.3.3", "nan": "^2.3.3",
"typedarray-to-buffer": "^3.1.2", "typedarray-to-buffer": "^3.1.2",
"yaeti": "^0.0.6" "yaeti": "^0.0.6"
@ -17205,6 +17335,15 @@
"rx-lite": "*" "rx-lite": "*"
} }
}, },
"rxjs": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz",
"integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
}
},
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",

View File

@ -142,7 +142,7 @@
"devDependencies": { "devDependencies": {
"chai": "4.1.2", "chai": "4.1.2",
"cross-env": "5.2.0", "cross-env": "5.2.0",
"eslint": "4.13.1", "eslint": "5.7.0",
"mocha-sinon": "1.2.0", "mocha-sinon": "1.2.0",
"npm-run-all": "4.1.3", "npm-run-all": "4.1.3",
"sinon": "4.5.0" "sinon": "4.5.0"

View File

@ -108,11 +108,6 @@
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz",
"integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg==" "integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg=="
}, },
"dotenv": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz",
"integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0="
},
"embark-service": { "embark-service": {
"version": "file:extensions/embark-service", "version": "file:extensions/embark-service",
"requires": { "requires": {
@ -350,11 +345,6 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
}, },
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"setimmediate": { "setimmediate": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",