From a1f50eb141b9ab49e8928bc35a586e9017767950 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 3 Jul 2020 21:05:18 +0530 Subject: [PATCH] lint, build & test working for remix-simulator --- libs/remix-simulator/.eslintrc | 15 + libs/remix-simulator/package.json | 4 +- libs/remix-simulator/src/methods/blocks.js | 218 ++-- libs/remix-simulator/src/methods/filters.js | 94 +- .../src/methods/transactions.js | 413 +++---- libs/remix-simulator/src/methods/txProcess.js | 2 +- libs/remix-simulator/src/provider.js | 100 +- libs/remix-simulator/tsconfig.lib.json | 18 + package-lock.json | 1022 ++++++++++++----- package.json | 6 +- workspace.json | 25 +- 11 files changed, 1231 insertions(+), 686 deletions(-) create mode 100644 libs/remix-simulator/.eslintrc create mode 100644 libs/remix-simulator/tsconfig.lib.json diff --git a/libs/remix-simulator/.eslintrc b/libs/remix-simulator/.eslintrc new file mode 100644 index 0000000000..29c280058e --- /dev/null +++ b/libs/remix-simulator/.eslintrc @@ -0,0 +1,15 @@ +{ + "extends": "../../.eslintrc", + "rules": { + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-unused-vars": "off" + }, + "env": { + "browser": true, + "amd": true, + "node": true, + "es6": true + }, + "ignorePatterns": ["!**/*"] +} \ No newline at end of file diff --git a/libs/remix-simulator/package.json b/libs/remix-simulator/package.json index b7f4ba5858..17e5bb4088 100644 --- a/libs/remix-simulator/package.json +++ b/libs/remix-simulator/package.json @@ -25,7 +25,7 @@ "express": "^4.16.3", "express-ws": "^4.0.0", "merge": "^1.2.0", - "remix-lib": "0.4.29", + "@remix-project/remix-lib": "0.4.29", "standard": "^10.0.3", "time-stamp": "^2.0.0", "web3": "^1.2.4" @@ -44,7 +44,7 @@ }, "scripts": { "lint": "standard", - "test": "standard && mocha test/" + "test": "./../../node_modules/.bin/mocha --require tsconfig-paths/register test/" }, "bin": { "ethsim": "./bin/ethsim", diff --git a/libs/remix-simulator/src/methods/blocks.js b/libs/remix-simulator/src/methods/blocks.js index 182a5bf838..4ba7139aae 100644 --- a/libs/remix-simulator/src/methods/blocks.js +++ b/libs/remix-simulator/src/methods/blocks.js @@ -1,138 +1,140 @@ -const Blocks = function (executionContext, _options) { - this.executionContext = executionContext - const options = _options || {} - this.coinbase = options.coinbase || '0x0000000000000000000000000000000000000000' - this.blockNumber = 0 -} - -Blocks.prototype.methods = function () { - return { - eth_getBlockByNumber: this.eth_getBlockByNumber.bind(this), - eth_gasPrice: this.eth_gasPrice.bind(this), - eth_coinbase: this.eth_coinbase.bind(this), - eth_blockNumber: this.eth_blockNumber.bind(this), - eth_getBlockByHash: this.eth_getBlockByHash.bind(this), - eth_getBlockTransactionCountByHash: this.eth_getBlockTransactionCountByHash.bind(this), - eth_getBlockTransactionCountByNumber: this.eth_getBlockTransactionCountByNumber.bind(this), - eth_getUncleCountByBlockHash: this.eth_getUncleCountByBlockHash.bind(this), - eth_getUncleCountByBlockNumber: this.eth_getUncleCountByBlockNumber.bind(this), - eth_getStorageAt: this.eth_getStorageAt.bind(this) +class Blocks { + constructor (executionContext, _options) { + this.executionContext = executionContext + const options = _options || {} + this.coinbase = options.coinbase || '0x0000000000000000000000000000000000000000' + this.blockNumber = 0 } -} -Blocks.prototype.eth_getBlockByNumber = function (payload, cb) { - let blockIndex = payload.params[0] - if (blockIndex === 'latest') { - blockIndex = this.executionContext.latestBlockNumber + methods () { + return { + eth_getBlockByNumber: this.eth_getBlockByNumber.bind(this), + eth_gasPrice: this.eth_gasPrice.bind(this), + eth_coinbase: this.eth_coinbase.bind(this), + eth_blockNumber: this.eth_blockNumber.bind(this), + eth_getBlockByHash: this.eth_getBlockByHash.bind(this), + eth_getBlockTransactionCountByHash: this.eth_getBlockTransactionCountByHash.bind(this), + eth_getBlockTransactionCountByNumber: this.eth_getBlockTransactionCountByNumber.bind(this), + eth_getUncleCountByBlockHash: this.eth_getUncleCountByBlockHash.bind(this), + eth_getUncleCountByBlockNumber: this.eth_getUncleCountByBlockNumber.bind(this), + eth_getStorageAt: this.eth_getStorageAt.bind(this) + } } - const block = this.executionContext.blocks[blockIndex] + eth_getBlockByNumber (payload, cb) { + let blockIndex = payload.params[0] + if (blockIndex === 'latest') { + blockIndex = this.executionContext.latestBlockNumber + } - if (!block) { - return cb(new Error('block not found')) - } + const block = this.executionContext.blocks[blockIndex] - let b = { - 'number': toHex(block.header.number), - 'hash': toHex(block.hash()), - 'parentHash': toHex(block.header.parentHash), - 'nonce': toHex(block.header.nonce), - 'sha3Uncles': '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', - 'logsBloom': '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331', - 'transactionsRoot': '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', - 'stateRoot': toHex(block.header.stateRoot), - 'miner': this.coinbase, - 'difficulty': toHex(block.header.difficulty), - 'totalDifficulty': toHex(block.header.totalDifficulty), - 'extraData': toHex(block.header.extraData), - 'size': '0x027f07', // 163591 - 'gasLimit': toHex(block.header.gasLimit), - 'gasUsed': toHex(block.header.gasUsed), - 'timestamp': toHex(block.header.timestamp), - 'transactions': block.transactions.map((t) => '0x' + t.hash().toString('hex')), - 'uncles': [] - } + if (!block) { + return cb(new Error('block not found')) + } - cb(null, b) + let b = { + 'number': this.toHex(block.header.number), + 'hash': this.toHex(block.hash()), + 'parentHash': this.toHex(block.header.parentHash), + 'nonce': this.toHex(block.header.nonce), + 'sha3Uncles': '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + 'logsBloom': '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331', + 'transactionsRoot': '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', + 'stateRoot': this.toHex(block.header.stateRoot), + 'miner': this.coinbase, + 'difficulty': this.toHex(block.header.difficulty), + 'totalDifficulty': this.toHex(block.header.totalDifficulty), + 'extraData': this.toHex(block.header.extraData), + 'size': '0x027f07', // 163591 + 'gasLimit': this.toHex(block.header.gasLimit), + 'gasUsed': this.toHex(block.header.gasUsed), + 'timestamp': this.toHex(block.header.timestamp), + 'transactions': block.transactions.map((t) => '0x' + t.hash().toString('hex')), + 'uncles': [] + } + + cb(null, b) } -function toHex (value) { + toHex (value) { if (!value) return '0x0' let v = value.toString('hex') return ((v === '0x' || v === '') ? '0x0' : ('0x' + v)) -} - -Blocks.prototype.eth_getBlockByHash = function (payload, cb) { - var block = this.executionContext.blocks[payload.params[0]] - - let b = { - 'number': toHex(block.header.number), - 'hash': toHex(block.hash()), - 'parentHash': toHex(block.header.parentHash), - 'nonce': toHex(block.header.nonce), - 'sha3Uncles': '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', - 'logsBloom': '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331', - 'transactionsRoot': '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', - 'stateRoot': toHex(block.header.stateRoot), - 'miner': this.coinbase, - 'difficulty': toHex(block.header.difficulty), - 'totalDifficulty': toHex(block.header.totalDifficulty), - 'extraData': toHex(block.header.extraData), - 'size': '0x027f07', // 163591 - 'gasLimit': toHex(block.header.gasLimit), - 'gasUsed': toHex(block.header.gasUsed), - 'timestamp': toHex(block.header.timestamp), - 'transactions': block.transactions.map((t) => '0x' + t.hash().toString('hex')), - 'uncles': [] } - cb(null, b) -} + eth_getBlockByHash (payload, cb) { + var block = this.executionContext.blocks[payload.params[0]] + + let b = { + 'number': this.toHex(block.header.number), + 'hash': this.toHex(block.hash()), + 'parentHash': this.toHex(block.header.parentHash), + 'nonce': this.toHex(block.header.nonce), + 'sha3Uncles': '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + 'logsBloom': '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331', + 'transactionsRoot': '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', + 'stateRoot': this.toHex(block.header.stateRoot), + 'miner': this.coinbase, + 'difficulty': this.toHex(block.header.difficulty), + 'totalDifficulty': this.toHex(block.header.totalDifficulty), + 'extraData': this.toHex(block.header.extraData), + 'size': '0x027f07', // 163591 + 'gasLimit': this.toHex(block.header.gasLimit), + 'gasUsed': this.toHex(block.header.gasUsed), + 'timestamp': this.toHex(block.header.timestamp), + 'transactions': block.transactions.map((t) => '0x' + t.hash().toString('hex')), + 'uncles': [] + } -Blocks.prototype.eth_gasPrice = function (payload, cb) { - cb(null, 1) -} + cb(null, b) + } -Blocks.prototype.eth_coinbase = function (payload, cb) { - cb(null, this.coinbase) -} + eth_gasPrice (payload, cb) { + cb(null, 1) + } -Blocks.prototype.eth_blockNumber = function (payload, cb) { - cb(null, this.blockNumber) -} + eth_coinbase (payload, cb) { + cb(null, this.coinbase) + } -Blocks.prototype.eth_getBlockTransactionCountByHash = function (payload, cb) { - var block = this.executionContext.blocks[payload.params[0]] + eth_blockNumber (payload, cb) { + cb(null, this.blockNumber) + } - cb(null, block.transactions.length) -} + eth_getBlockTransactionCountByHash (payload, cb) { + var block = this.executionContext.blocks[payload.params[0]] -Blocks.prototype.eth_getBlockTransactionCountByNumber = function (payload, cb) { - var block = this.executionContext.blocks[payload.params[0]] + cb(null, block.transactions.length) + } - cb(null, block.transactions.length) -} + eth_getBlockTransactionCountByNumber (payload, cb) { + var block = this.executionContext.blocks[payload.params[0]] -Blocks.prototype.eth_getUncleCountByBlockHash = function (payload, cb) { - cb(null, 0) -} + cb(null, block.transactions.length) + } -Blocks.prototype.eth_getUncleCountByBlockNumber = function (payload, cb) { - cb(null, 0) -} + eth_getUncleCountByBlockHash (payload, cb) { + cb(null, 0) + } -Blocks.prototype.eth_getStorageAt = function (payload, cb) { - const [address, position, blockNumber] = payload.params + eth_getUncleCountByBlockNumber (payload, cb) { + cb(null, 0) + } - this.executionContext.web3().debug.storageRangeAt(blockNumber, 'latest', address.toLowerCase(), position, 1, (err, result) => { - if (err || (result.storage && Object.values(result.storage).length === 0)) { - return cb(err, '') - } + eth_getStorageAt (payload, cb) { + const [address, position, blockNumber] = payload.params - let value = Object.values(result.storage)[0].value - cb(err, value) - }) + this.executionContext.web3().debug.storageRangeAt(blockNumber, 'latest', address.toLowerCase(), position, 1, (err, result) => { + if (err || (result.storage && Object.values(result.storage).length === 0)) { + return cb(err, '') + } + + let value = Object.values(result.storage)[0].value + cb(err, value) + }) + } } module.exports = Blocks diff --git a/libs/remix-simulator/src/methods/filters.js b/libs/remix-simulator/src/methods/filters.js index 999bf24b12..d3e1ad7040 100644 --- a/libs/remix-simulator/src/methods/filters.js +++ b/libs/remix-simulator/src/methods/filters.js @@ -1,61 +1,63 @@ -const Filters = function (executionContext) { - this.executionContext = executionContext -} +class Filters { + constructor(executionContext) { + this.executionContext = executionContext + } -Filters.prototype.methods = function () { - return { - eth_getLogs: this.eth_getLogs.bind(this), - eth_subscribe: this.eth_subscribe.bind(this), - eth_unsubscribe: this.eth_unsubscribe.bind(this) + methods () { + return { + eth_getLogs: this.eth_getLogs.bind(this), + eth_subscribe: this.eth_subscribe.bind(this), + eth_unsubscribe: this.eth_unsubscribe.bind(this) + } } -} -Filters.prototype.eth_getLogs = function (payload, cb) { - let results = this.executionContext.logsManager.getLogsFor(payload.params[0]) - cb(null, results) -} + eth_getLogs (payload, cb) { + let results = this.executionContext.logsManager.getLogsFor(payload.params[0]) + cb(null, results) + } -Filters.prototype.eth_subscribe = function (payload, cb) { - let subscriptionId = this.executionContext.logsManager.subscribe(payload.params) - cb(null, subscriptionId) -} + eth_subscribe (payload, cb) { + let subscriptionId = this.executionContext.logsManager.subscribe(payload.params) + cb(null, subscriptionId) + } -Filters.prototype.eth_unsubscribe = function (payload, cb) { - this.executionContext.logsManager.unsubscribe(payload.params[0]) - cb(null, true) -} + eth_unsubscribe (payload, cb) { + this.executionContext.logsManager.unsubscribe(payload.params[0]) + cb(null, true) + } -Filters.prototype.eth_newFilter = function (payload, cb) { - const filterId = this.executionContext.logsManager.newFilter('filter', payload.params[0]) - cb(null, filterId) -} + eth_newFilter (payload, cb) { + const filterId = this.executionContext.logsManager.newFilter('filter', payload.params[0]) + cb(null, filterId) + } -Filters.prototype.eth_newBlockFilter = function (payload, cb) { - const filterId = this.executionContext.logsManager.newFilter('block') - cb(null, filterId) -} + eth_newBlockFilter (payload, cb) { + const filterId = this.executionContext.logsManager.newFilter('block') + cb(null, filterId) + } -Filters.prototype.eth_newPendingTransactionFilter = function (payload, cb) { - const filterId = this.executionContext.logsManager.newFilter('pendingTransactions') - cb(null, filterId) -} + eth_newPendingTransactionFilter (payload, cb) { + const filterId = this.executionContext.logsManager.newFilter('pendingTransactions') + cb(null, filterId) + } -Filters.prototype.eth_uninstallfilter = function (payload, cb) { - const result = this.executionContext.logsManager.uninstallFilter(payload.params[0]) - cb(null, result) -} + eth_uninstallfilter (payload, cb) { + const result = this.executionContext.logsManager.uninstallFilter(payload.params[0]) + cb(null, result) + } -Filters.prototype.eth_getFilterChanges = function (payload, cb) { - const filterId = payload.params[0] - let results = this.executionContext.logsManager.getLogsForFilter(filterId) - cb(null, results) -} + eth_getFilterChanges (payload, cb) { + const filterId = payload.params[0] + let results = this.executionContext.logsManager.getLogsForFilter(filterId) + cb(null, results) + } -Filters.prototype.eth_getFilterLogs = function (payload, cb) { - const filterId = payload.params[0] - let results = this.executionContext.logsManager.getLogsForFilter(filterId, true) - cb(null, results) + eth_getFilterLogs (payload, cb) { + const filterId = payload.params[0] + let results = this.executionContext.logsManager.getLogsForFilter(filterId, true) + cb(null, results) + } } module.exports = Filters diff --git a/libs/remix-simulator/src/methods/transactions.js b/libs/remix-simulator/src/methods/transactions.js index b642f5dc36..b10b0e8ecd 100644 --- a/libs/remix-simulator/src/methods/transactions.js +++ b/libs/remix-simulator/src/methods/transactions.js @@ -3,233 +3,236 @@ const ethJSUtil = require('ethereumjs-util') const processTx = require('./txProcess.js') const BN = ethJSUtil.BN -const Transactions = function (executionContext) { - this.executionContext = executionContext -} - -Transactions.prototype.init = function (accounts) { - this.accounts = accounts -} - -Transactions.prototype.methods = function () { - return { - eth_sendTransaction: this.eth_sendTransaction.bind(this), - eth_getTransactionReceipt: this.eth_getTransactionReceipt.bind(this), - eth_getCode: this.eth_getCode.bind(this), - eth_call: this.eth_call.bind(this), - eth_estimateGas: this.eth_estimateGas.bind(this), - eth_getTransactionCount: this.eth_getTransactionCount.bind(this), - eth_getTransactionByHash: this.eth_getTransactionByHash.bind(this), - eth_getTransactionByBlockHashAndIndex: this.eth_getTransactionByBlockHashAndIndex.bind(this), - eth_getTransactionByBlockNumberAndIndex: this.eth_getTransactionByBlockNumberAndIndex.bind(this) +class Transactions{ + + constructor(executionContext) { + this.executionContext = executionContext } -} -Transactions.prototype.eth_sendTransaction = function (payload, cb) { - // from might be lowercased address (web3) - if (payload.params && payload.params.length > 0 && payload.params[0].from) { - payload.params[0].from = ethJSUtil.toChecksumAddress(payload.params[0].from) + init (accounts) { + this.accounts = accounts } - processTx(this.executionContext, this.accounts, payload, false, cb) -} - -Transactions.prototype.eth_getTransactionReceipt = function (payload, cb) { - this.executionContext.web3().eth.getTransactionReceipt(payload.params[0], (error, receipt) => { - if (error) { - return cb(error) - } - - const txBlock = this.executionContext.txs[receipt.hash] - - const r = { - 'transactionHash': receipt.hash, - 'transactionIndex': '0x00', - 'blockHash': '0x' + txBlock.hash().toString('hex'), - 'blockNumber': '0x' + txBlock.header.number.toString('hex'), - 'gasUsed': Web3.utils.toHex(receipt.gas), - 'cumulativeGasUsed': Web3.utils.toHex(receipt.gas), - 'contractAddress': receipt.contractAddress, - 'logs': receipt.logs, - 'status': receipt.status - } - - if (r.blockNumber === '0x') { - r.blockNumber = '0x0' - } - - cb(null, r) - }) -} -Transactions.prototype.eth_estimateGas = function (payload, cb) { - cb(null, 3000000) -} - -Transactions.prototype.eth_getCode = function (payload, cb) { - let address = payload.params[0] - - this.executionContext.web3().eth.getCode(address, (error, result) => { - if (error) { - console.dir('error getting code') - console.dir(error) + methods () { + return { + eth_sendTransaction: this.eth_sendTransaction.bind(this), + eth_getTransactionReceipt: this.eth_getTransactionReceipt.bind(this), + eth_getCode: this.eth_getCode.bind(this), + eth_call: this.eth_call.bind(this), + eth_estimateGas: this.eth_estimateGas.bind(this), + eth_getTransactionCount: this.eth_getTransactionCount.bind(this), + eth_getTransactionByHash: this.eth_getTransactionByHash.bind(this), + eth_getTransactionByBlockHashAndIndex: this.eth_getTransactionByBlockHashAndIndex.bind(this), + eth_getTransactionByBlockNumberAndIndex: this.eth_getTransactionByBlockNumberAndIndex.bind(this) } - cb(error, result) - }) -} - -Transactions.prototype.eth_call = function (payload, cb) { - // from might be lowercased address (web3) - if (payload.params && payload.params.length > 0 && payload.params[0].from) { - payload.params[0].from = ethJSUtil.toChecksumAddress(payload.params[0].from) - } - if (payload.params && payload.params.length > 0 && payload.params[0].to) { - payload.params[0].to = ethJSUtil.toChecksumAddress(payload.params[0].to) } - payload.params[0].value = undefined - - processTx(this.executionContext, this.accounts, payload, true, cb) -} - -Transactions.prototype.eth_getTransactionCount = function (payload, cb) { - let address = payload.params[0] - - this.executionContext.vm().stateManager.getAccount(address, (err, account) => { - if (err) { - return cb(err) - } - let nonce = new BN(account.nonce).toString(10) - cb(null, nonce) - }) -} - -Transactions.prototype.eth_getTransactionByHash = function (payload, cb) { - const address = payload.params[0] - - this.executionContext.web3().eth.getTransactionReceipt(address, (error, receipt) => { - if (error) { - return cb(error) + eth_sendTransaction (payload, cb) { + // from might be lowercased address (web3) + if (payload.params && payload.params.length > 0 && payload.params[0].from) { + payload.params[0].from = ethJSUtil.toChecksumAddress(payload.params[0].from) } + processTx(this.executionContext, this.accounts, payload, false, cb) + } - const txBlock = this.executionContext.txs[receipt.transactionHash] - - // TODO: params to add later - const r = { - 'blockHash': '0x' + txBlock.hash().toString('hex'), - 'blockNumber': '0x' + txBlock.header.number.toString('hex'), - 'from': receipt.from, - 'gas': Web3.utils.toHex(receipt.gas), - // 'gasPrice': '2000000000000', // 0x123 - 'gasPrice': '0x4a817c800', // 20000000000 - 'hash': receipt.transactionHash, - 'input': receipt.input, - // "nonce": 2, // 0x15 - // "transactionIndex": 0, - 'value': receipt.value - // "value":"0xf3dbb76162000" // 4290000000000000 - // "v": "0x25", // 37 - // "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea", - // "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c" - } - - if (receipt.to) { - r.to = receipt.to - } - - if (r.value === '0x') { - r.value = '0x0' - } - - if (r.blockNumber === '0x') { - r.blockNumber = '0x0' - } - - cb(null, r) - }) -} - -Transactions.prototype.eth_getTransactionByBlockHashAndIndex = function (payload, cb) { - const txIndex = payload.params[1] + eth_getTransactionReceipt (payload, cb) { + this.executionContext.web3().eth.getTransactionReceipt(payload.params[0], (error, receipt) => { + if (error) { + return cb(error) + } + + const txBlock = this.executionContext.txs[receipt.hash] + + const r = { + 'transactionHash': receipt.hash, + 'transactionIndex': '0x00', + 'blockHash': '0x' + txBlock.hash().toString('hex'), + 'blockNumber': '0x' + txBlock.header.number.toString('hex'), + 'gasUsed': Web3.utils.toHex(receipt.gas), + 'cumulativeGasUsed': Web3.utils.toHex(receipt.gas), + 'contractAddress': receipt.contractAddress, + 'logs': receipt.logs, + 'status': receipt.status + } + + if (r.blockNumber === '0x') { + r.blockNumber = '0x0' + } + + cb(null, r) + }) + } - const txBlock = this.executionContext.blocks[payload.params[0]] - const txHash = '0x' + txBlock.transactions[Web3.utils.toDecimal(txIndex)].hash().toString('hex') + eth_estimateGas (payload, cb) { + cb(null, 3000000) + } - this.executionContext.web3().eth.getTransactionReceipt(txHash, (error, receipt) => { - if (error) { - return cb(error) - } + eth_getCode (payload, cb) { + let address = payload.params[0] - // TODO: params to add later - let r = { - 'blockHash': '0x' + txBlock.hash().toString('hex'), - 'blockNumber': '0x' + txBlock.header.number.toString('hex'), - 'from': receipt.from, - 'gas': Web3.utils.toHex(receipt.gas), - // 'gasPrice': '2000000000000', // 0x123 - 'gasPrice': '0x4a817c800', // 20000000000 - 'hash': receipt.transactionHash, - 'input': receipt.input, - // "nonce": 2, // 0x15 - // "transactionIndex": 0, - 'value': receipt.value - // "value":"0xf3dbb76162000" // 4290000000000000 - // "v": "0x25", // 37 - // "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea", - // "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c" - } + this.executionContext.web3().eth.getCode(address, (error, result) => { + if (error) { + console.dir('error getting code') + console.dir(error) + } + cb(error, result) + }) + } - if (receipt.to) { - r.to = receipt.to + eth_call (payload, cb) { + // from might be lowercased address (web3) + if (payload.params && payload.params.length > 0 && payload.params[0].from) { + payload.params[0].from = ethJSUtil.toChecksumAddress(payload.params[0].from) } - - if (r.value === '0x') { - r.value = '0x0' + if (payload.params && payload.params.length > 0 && payload.params[0].to) { + payload.params[0].to = ethJSUtil.toChecksumAddress(payload.params[0].to) } - cb(null, r) - }) -} + payload.params[0].value = undefined -Transactions.prototype.eth_getTransactionByBlockNumberAndIndex = function (payload, cb) { - const txIndex = payload.params[1] - - const txBlock = this.executionContext.blocks[payload.params[0]] - const txHash = '0x' + txBlock.transactions[Web3.utils.toDecimal(txIndex)].hash().toString('hex') + processTx(this.executionContext, this.accounts, payload, true, cb) + } - this.executionContext.web3().eth.getTransactionReceipt(txHash, (error, receipt) => { - if (error) { - return cb(error) - } + eth_getTransactionCount (payload, cb) { + let address = payload.params[0] - // TODO: params to add later - const r = { - 'blockHash': '0x' + txBlock.hash().toString('hex'), - 'blockNumber': '0x' + txBlock.header.number.toString('hex'), - 'from': receipt.from, - 'gas': Web3.utils.toHex(receipt.gas), - // 'gasPrice': '2000000000000', // 0x123 - 'gasPrice': '0x4a817c800', // 20000000000 - 'hash': receipt.transactionHash, - 'input': receipt.input, - // "nonce": 2, // 0x15 - // "transactionIndex": 0, - 'value': receipt.value - // "value":"0xf3dbb76162000" // 4290000000000000 - // "v": "0x25", // 37 - // "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea", - // "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c" - } + this.executionContext.vm().stateManager.getAccount(address, (err, account) => { + if (err) { + return cb(err) + } + let nonce = new BN(account.nonce).toString(10) + cb(null, nonce) + }) + } - if (receipt.to) { - r.to = receipt.to - } + eth_getTransactionByHash (payload, cb) { + const address = payload.params[0] + + this.executionContext.web3().eth.getTransactionReceipt(address, (error, receipt) => { + if (error) { + return cb(error) + } + + const txBlock = this.executionContext.txs[receipt.transactionHash] + + // TODO: params to add later + const r = { + 'blockHash': '0x' + txBlock.hash().toString('hex'), + 'blockNumber': '0x' + txBlock.header.number.toString('hex'), + 'from': receipt.from, + 'gas': Web3.utils.toHex(receipt.gas), + // 'gasPrice': '2000000000000', // 0x123 + 'gasPrice': '0x4a817c800', // 20000000000 + 'hash': receipt.transactionHash, + 'input': receipt.input, + // "nonce": 2, // 0x15 + // "transactionIndex": 0, + 'value': receipt.value + // "value":"0xf3dbb76162000" // 4290000000000000 + // "v": "0x25", // 37 + // "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea", + // "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c" + } + + if (receipt.to) { + r.to = receipt.to + } + + if (r.value === '0x') { + r.value = '0x0' + } + + if (r.blockNumber === '0x') { + r.blockNumber = '0x0' + } + + cb(null, r) + }) + } - if (r.value === '0x') { - r.value = '0x0' - } + eth_getTransactionByBlockHashAndIndex (payload, cb) { + const txIndex = payload.params[1] + + const txBlock = this.executionContext.blocks[payload.params[0]] + const txHash = '0x' + txBlock.transactions[Web3.utils.toDecimal(txIndex)].hash().toString('hex') + + this.executionContext.web3().eth.getTransactionReceipt(txHash, (error, receipt) => { + if (error) { + return cb(error) + } + + // TODO: params to add later + let r = { + 'blockHash': '0x' + txBlock.hash().toString('hex'), + 'blockNumber': '0x' + txBlock.header.number.toString('hex'), + 'from': receipt.from, + 'gas': Web3.utils.toHex(receipt.gas), + // 'gasPrice': '2000000000000', // 0x123 + 'gasPrice': '0x4a817c800', // 20000000000 + 'hash': receipt.transactionHash, + 'input': receipt.input, + // "nonce": 2, // 0x15 + // "transactionIndex": 0, + 'value': receipt.value + // "value":"0xf3dbb76162000" // 4290000000000000 + // "v": "0x25", // 37 + // "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea", + // "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c" + } + + if (receipt.to) { + r.to = receipt.to + } + + if (r.value === '0x') { + r.value = '0x0' + } + + cb(null, r) + }) + } - cb(null, r) - }) + eth_getTransactionByBlockNumberAndIndex (payload, cb) { + const txIndex = payload.params[1] + + const txBlock = this.executionContext.blocks[payload.params[0]] + const txHash = '0x' + txBlock.transactions[Web3.utils.toDecimal(txIndex)].hash().toString('hex') + + this.executionContext.web3().eth.getTransactionReceipt(txHash, (error, receipt) => { + if (error) { + return cb(error) + } + + // TODO: params to add later + const r = { + 'blockHash': '0x' + txBlock.hash().toString('hex'), + 'blockNumber': '0x' + txBlock.header.number.toString('hex'), + 'from': receipt.from, + 'gas': Web3.utils.toHex(receipt.gas), + // 'gasPrice': '2000000000000', // 0x123 + 'gasPrice': '0x4a817c800', // 20000000000 + 'hash': receipt.transactionHash, + 'input': receipt.input, + // "nonce": 2, // 0x15 + // "transactionIndex": 0, + 'value': receipt.value + // "value":"0xf3dbb76162000" // 4290000000000000 + // "v": "0x25", // 37 + // "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea", + // "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c" + } + + if (receipt.to) { + r.to = receipt.to + } + + if (r.value === '0x') { + r.value = '0x0' + } + + cb(null, r) + }) + } } module.exports = Transactions diff --git a/libs/remix-simulator/src/methods/txProcess.js b/libs/remix-simulator/src/methods/txProcess.js index c3c61c3031..d1b177eef0 100644 --- a/libs/remix-simulator/src/methods/txProcess.js +++ b/libs/remix-simulator/src/methods/txProcess.js @@ -1,4 +1,4 @@ -const RemixLib = require('remix-lib') +const RemixLib = require('@remix-project/remix-lib') const TxExecution = RemixLib.execution.txExecution const TxRunner = RemixLib.execution.txRunner diff --git a/libs/remix-simulator/src/provider.js b/libs/remix-simulator/src/provider.js index 7fe1017994..497b5c5275 100644 --- a/libs/remix-simulator/src/provider.js +++ b/libs/remix-simulator/src/provider.js @@ -1,4 +1,4 @@ -const RemixLib = require('remix-lib') +const RemixLib = require('@remix-project/remix-lib') const executionContext = RemixLib.execution.executionContext const log = require('./utils/logs.js') @@ -13,63 +13,65 @@ const Transactions = require('./methods/transactions.js') const generateBlock = require('./genesis.js') -var Provider = function (options) { - this.options = options || {} - // TODO: init executionContext here - this.executionContext = executionContext - this.Accounts = new Accounts(this.executionContext) - this.Transactions = new Transactions(this.executionContext) +class Provider { + constructor(options) { + this.options = options || {} + // TODO: init executionContext here + this.executionContext = executionContext + this.Accounts = new Accounts(this.executionContext) + this.Transactions = new Transactions(this.executionContext) - this.methods = {} - this.methods = merge(this.methods, this.Accounts.methods()) - this.methods = merge(this.methods, (new Blocks(this.executionContext, options)).methods()) - this.methods = merge(this.methods, (new Misc()).methods()) - this.methods = merge(this.methods, (new Filters(this.executionContext)).methods()) - this.methods = merge(this.methods, (new Net()).methods()) - this.methods = merge(this.methods, this.Transactions.methods()) + this.methods = {} + this.methods = merge(this.methods, this.Accounts.methods()) + this.methods = merge(this.methods, (new Blocks(this.executionContext, options)).methods()) + this.methods = merge(this.methods, (new Misc()).methods()) + this.methods = merge(this.methods, (new Filters(this.executionContext)).methods()) + this.methods = merge(this.methods, (new Net()).methods()) + this.methods = merge(this.methods, this.Transactions.methods()) - generateBlock(this.executionContext) - this.init() -} + generateBlock(this.executionContext) + this.init() + } -Provider.prototype.init = async function () { - await this.Accounts.init() - this.Transactions.init(this.Accounts.accounts) -} + async init () { + await this.Accounts.init() + this.Transactions.init(this.Accounts.accounts) + } -Provider.prototype.sendAsync = function (payload, callback) { - log.info('payload method is ', payload.method) + sendAsync (payload, callback) { + log.info('payload method is ', payload.method) - const method = this.methods[payload.method] - if (this.options.logDetails) { - log.info(payload) - } - if (method) { - return method.call(method, payload, (err, result) => { - if (this.options.logDetails) { - log.info(err) - log.info(result) - } - if (err) { - return callback(err) - } - const response = {'id': payload.id, 'jsonrpc': '2.0', 'result': result} - callback(null, response) - }) + const method = this.methods[payload.method] + if (this.options.logDetails) { + log.info(payload) + } + if (method) { + return method.call(method, payload, (err, result) => { + if (this.options.logDetails) { + log.info(err) + log.info(result) + } + if (err) { + return callback(err) + } + const response = {'id': payload.id, 'jsonrpc': '2.0', 'result': result} + callback(null, response) + }) + } + callback(new Error('unknown method ' + payload.method)) } - callback(new Error('unknown method ' + payload.method)) -} -Provider.prototype.send = function (payload, callback) { - this.sendAsync(payload, callback || function () {}) -} + send (payload, callback) { + this.sendAsync(payload, callback || function () {}) + } -Provider.prototype.isConnected = function () { - return true -} + isConnected () { + return true + } -Provider.prototype.on = function (type, cb) { - this.executionContext.logsManager.addListener(type, cb) + on (type, cb) { + this.executionContext.logsManager.addListener(type, cb) + } } module.exports = Provider diff --git a/libs/remix-simulator/tsconfig.lib.json b/libs/remix-simulator/tsconfig.lib.json new file mode 100644 index 0000000000..35b63e23e8 --- /dev/null +++ b/libs/remix-simulator/tsconfig.lib.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../dist/out-tsc", + "allowJs": true, + "declaration": true, + "rootDir": "./", + "types": ["node"] + }, + "exclude": ["**/*.spec.js"], + "include": [ + "src/**/*.js", + "./index.js", + "bin/" + ] + } + \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b7bd586878..b6254f0203 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2929,6 +2929,14 @@ "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", "dev": true }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", @@ -2950,6 +2958,11 @@ "color-convert": "^1.9.0" } }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=" + }, "ansicolors": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", @@ -3068,6 +3081,18 @@ "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", "dev": true }, + "array.prototype.map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", + "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.4" + } + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -3742,8 +3767,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "optional": true + "dev": true }, "browserify": { "version": "16.5.1", @@ -4516,6 +4540,11 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" + }, "colors": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", @@ -6440,6 +6469,35 @@ "string.prototype.trimright": "^2.1.1" } }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "es-get-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", + "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "dev": true, + "requires": { + "es-abstract": "^1.17.4", + "has-symbols": "^1.0.1", + "is-arguments": "^1.0.4", + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-string": "^1.0.5", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -7757,7 +7815,6 @@ "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", "dev": true, - "optional": true, "requires": { "is-buffer": "~2.0.3" } @@ -9679,8 +9736,7 @@ "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "optional": true + "dev": true }, "growly": { "version": "1.3.0", @@ -10893,6 +10949,12 @@ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", + "dev": true + }, "is-natural-number": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", @@ -11005,6 +11067,12 @@ "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", "dev": true }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -11136,6 +11204,22 @@ "is-object": "^1.0.1" } }, + "iterate-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", + "dev": true + }, + "iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "dev": true, + "requires": { + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + } + }, "javascript-serialize": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/javascript-serialize/-/javascript-serialize-1.6.1.tgz", @@ -12894,191 +12978,278 @@ "dev": true }, "mocha": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", - "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.0.1.tgz", + "integrity": "sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg==", "dev": true, - "optional": true, "requires": { - "ansi-colors": "3.2.3", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", + "chokidar": "3.3.1", "debug": "3.2.6", - "diff": "3.5.0", + "diff": "4.0.2", "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", + "find-up": "4.1.0", + "glob": "7.1.6", "growl": "1.10.5", "he": "1.2.0", "js-yaml": "3.13.1", - "log-symbols": "2.2.0", + "log-symbols": "3.0.0", "minimatch": "3.0.4", - "mkdirp": "0.5.4", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", + "ms": "2.1.2", "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", + "promise.allsettled": "1.0.2", + "serialize-javascript": "3.0.0", + "strip-json-comments": "3.0.1", + "supports-color": "7.1.0", + "which": "2.0.2", "wide-align": "1.1.3", + "workerpool": "6.0.0", "yargs": "13.3.2", "yargs-parser": "13.1.2", "yargs-unparser": "1.6.0" }, "dependencies": { + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, - "optional": true + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chokidar": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", + "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", "dev": true, - "optional": true + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.3.0" + } }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, - "optional": true, "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", "wrap-ansi": "^5.1.0" } }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "optional": true + "requires": { + "to-regex-range": "^5.0.1" + } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "optional": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "optional": true + "dev": true }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, - "optional": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "is-glob": "^4.0.1" } }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "optional": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "binary-extensions": "^2.0.0" } }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, - "optional": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "is-extglob": "^2.1.1" } }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, - "optional": true, "requires": { - "chalk": "^2.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, - "mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "optional": true, "requires": { - "minimist": "^1.2.5" + "p-locate": "^4.1.0" } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "optional": true + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "optional": true, "requires": { "p-try": "^2.0.0" } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "optional": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "readdirp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", + "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", "dev": true, - "optional": true + "requires": { + "picomatch": "^2.0.7" + } }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true, - "optional": true + "dev": true + }, + "serialize-javascript": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", + "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==", + "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, - "optional": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -13090,19 +13261,41 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, - "optional": true, "requires": { "ansi-regex": "^4.1.0" } }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + }, "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "optional": true, + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" } }, "wrap-ansi": { @@ -13110,7 +13303,6 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, - "optional": true, "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", @@ -13121,15 +13313,13 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true, - "optional": true + "dev": true }, "yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, - "optional": true, "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", @@ -13141,6 +13331,42 @@ "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^13.1.2" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } } }, "yargs-parser": { @@ -13148,7 +13374,6 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, - "optional": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -13315,161 +13540,422 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "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" + "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" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "nanohtml": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/nanohtml/-/nanohtml-1.9.1.tgz", + "integrity": "sha512-4snfp20yKdA6+dT1vv0F4l1oYmnFXPNHk3ZFTfOldD9LamFxQZ9gWk4gJz7wflq3XROLzrGQHfo0HT4V4kSkhQ==", + "dev": true, + "requires": { + "acorn-node": "^1.8.2", + "camel-case": "^3.0.0", + "convert-source-map": "^1.5.1", + "estree-is-member-expression": "^1.0.0", + "hyperx": "^2.5.0", + "is-boolean-attribute": "0.0.1", + "nanoassert": "^1.1.0", + "nanobench": "^2.1.0", + "normalize-html-whitespace": "^0.2.0", + "through2": "^2.0.3", + "transform-ast": "^2.4.0" + } + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nave": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/nave/-/nave-0.5.3.tgz", + "integrity": "sha1-Ws7HI3WFblx2yDvSGmjXE+tfG6Q=", + "dev": true + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "netmask": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", + "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "nightwatch": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/nightwatch/-/nightwatch-1.3.5.tgz", + "integrity": "sha512-Wb1oLwIhF/44B4NcpDzjNnXu4YIs51AgfMYHsjUssg+n5qZLqty4Wg3uF7G4jT9g4S5IAEYw1D7/Yt+XFxdQtg==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "chai-nightwatch": "^0.4.0", + "ci-info": "^2.0.0", + "dotenv": "7.0.0", + "ejs": "^2.7.4", + "envinfo": "^7.5.1", + "lodash.clone": "3.0.3", + "lodash.defaultsdeep": "^4.6.1", + "lodash.merge": "^4.6.2", + "minimatch": "3.0.4", + "minimist": "^1.2.5", + "mkpath": "1.0.0", + "mocha": "^6.2.2", + "ora": "^4.0.3", + "proxy-agent": "^3.1.1", + "request": "^2.88.2", + "request-promise": "^4.2.5", + "semver": "^6.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "optional": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "optional": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "optional": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "dotenv": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", + "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true, + "optional": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "optional": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "optional": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "optional": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "optional": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "mkdirp": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "dev": true, + "optional": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", + "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", + "dev": true, + "optional": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.4", + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "optional": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "optional": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "optional": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "optional": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "optional": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "optional": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, + "optional": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "^4.1.0" } }, "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "nanohtml": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/nanohtml/-/nanohtml-1.9.1.tgz", - "integrity": "sha512-4snfp20yKdA6+dT1vv0F4l1oYmnFXPNHk3ZFTfOldD9LamFxQZ9gWk4gJz7wflq3XROLzrGQHfo0HT4V4kSkhQ==", - "dev": true, - "requires": { - "acorn-node": "^1.8.2", - "camel-case": "^3.0.0", - "convert-source-map": "^1.5.1", - "estree-is-member-expression": "^1.0.0", - "hyperx": "^2.5.0", - "is-boolean-attribute": "0.0.1", - "nanoassert": "^1.1.0", - "nanobench": "^2.1.0", - "normalize-html-whitespace": "^0.2.0", - "through2": "^2.0.3", - "transform-ast": "^2.4.0" - } - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "arr-diff": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true, + "optional": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "optional": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - } - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "nave": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/nave/-/nave-0.5.3.tgz", - "integrity": "sha1-Ws7HI3WFblx2yDvSGmjXE+tfG6Q=", - "dev": true - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", - "dev": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "nightwatch": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/nightwatch/-/nightwatch-1.3.5.tgz", - "integrity": "sha512-Wb1oLwIhF/44B4NcpDzjNnXu4YIs51AgfMYHsjUssg+n5qZLqty4Wg3uF7G4jT9g4S5IAEYw1D7/Yt+XFxdQtg==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "chai-nightwatch": "^0.4.0", - "ci-info": "^2.0.0", - "dotenv": "7.0.0", - "ejs": "^2.7.4", - "envinfo": "^7.5.1", - "lodash.clone": "3.0.3", - "lodash.defaultsdeep": "^4.6.1", - "lodash.merge": "^4.6.2", - "minimatch": "3.0.4", - "minimist": "^1.2.5", - "mkpath": "1.0.0", - "mocha": "^6.2.2", - "ora": "^4.0.3", - "proxy-agent": "^3.1.1", - "request": "^2.88.2", - "request-promise": "^4.2.5", - "semver": "^6.3.0" - }, - "dependencies": { - "dotenv": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", - "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", - "dev": true + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "optional": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, @@ -18382,6 +18868,19 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, + "promise.allsettled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", + "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", + "dev": true, + "requires": { + "array.prototype.map": "^1.0.1", + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "iterate-value": "^1.0.0" + } + }, "prop-types": { "version": "15.7.2", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", @@ -22485,6 +22984,11 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, + "time-stamp": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.2.0.tgz", + "integrity": "sha512-zxke8goJQpBeEgD82CXABeMh0LSJcj7CXEd0OHOg45HgcofF7pxNwZm9+RknpxpDhwN4gFpySkApKfFYfRQnUA==" + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -26149,6 +26653,12 @@ "microevent.ts": "~0.1.1" } }, + "workerpool": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", + "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", + "dev": true + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -26414,7 +26924,6 @@ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, - "optional": true, "requires": { "flat": "^4.1.0", "lodash": "^4.17.15", @@ -26425,22 +26934,19 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "optional": true + "dev": true }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "optional": true + "dev": true }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, - "optional": true, "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", @@ -26451,15 +26957,13 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true, - "optional": true + "dev": true }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, - "optional": true, "requires": { "locate-path": "^3.0.0" } @@ -26468,15 +26972,13 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "optional": true + "dev": true }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, - "optional": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -26487,7 +26989,6 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "optional": true, "requires": { "p-try": "^2.0.0" } @@ -26497,7 +26998,6 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, - "optional": true, "requires": { "p-limit": "^2.0.0" } @@ -26506,22 +27006,19 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "optional": true + "dev": true }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true, - "optional": true + "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, - "optional": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -26533,7 +27030,6 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, - "optional": true, "requires": { "ansi-regex": "^4.1.0" } @@ -26543,7 +27039,6 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, - "optional": true, "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", @@ -26554,15 +27049,13 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true, - "optional": true + "dev": true }, "yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, - "optional": true, "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", @@ -26581,7 +27074,6 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, - "optional": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" diff --git a/package.json b/package.json index d7815c1065..62aa9369d7 100644 --- a/package.json +++ b/package.json @@ -132,11 +132,14 @@ "dependencies": { "@remixproject/engine": "^0.2.3", "@types/tape": "^4.2.33", + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", "ethereumjs-block": "^2.2.2", "ethereumjs-tx": "^2.1.2", "ethereumjs-vm": "4.1.3", "http-server": "^0.11.1", - "npm-install-version": "^6.0.2" + "npm-install-version": "^6.0.2", + "time-stamp": "^2.2.0" }, "devDependencies": { "@babel/core": "^7.4.5", @@ -200,6 +203,7 @@ "js-beautify": "1.6.14", "minixhr": "^3.2.2", "mkdirp": "^0.5.1", + "mocha": "^8.0.1", "nanohtml": "^1.6.3", "nightwatch": "^1.3.5", "notify-error": "^1.2.0", diff --git a/workspace.json b/workspace.json index 8b5e355f7c..0524b502a5 100644 --- a/workspace.json +++ b/workspace.json @@ -234,29 +234,36 @@ "schematics": {}, "architect": { "lint": { - "builder": "@nrwl/workspace:run-commands", + "builder": "@nrwl/linter:lint", "options": { - "commands": [ - { - "command": "./../../node_modules/.bin/npm-run-all lint" - } + "linter": "eslint", + "config": "libs/remix-simulator/.eslintrc", + "files": [ + "libs/remix-simulator/**/*.js" ], - "cwd": "libs/remix-simulator" + "exclude": ["**/node_modules/**", "libs/remix-simulator/test/**/*"] } }, "test": { "builder": "@nrwl/workspace:run-commands", "options": { "commands": [ - { - "command": "rm -rf ../../dist" - }, { "command": "./../../node_modules/.bin/npm-run-all test" } ], "cwd": "libs/remix-simulator" } + }, + "build": { + "builder": "@nrwl/node:package", + "options": { + "outputPath": "dist/libs/remix-simulator", + "tsConfig": "libs/remix-simulator/tsconfig.lib.json", + "packageJson": "libs/remix-simulator/package.json", + "main": "libs/remix-simulator/index.js", + "assets": ["libs/remix-simulator/*.md"] + } } } },