diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 2e4a58e4..00000000 --- a/.babelrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "presets": [ - ["env", { - "targets": { - "node": "8.3" - } - }] - ], - "plugins": [ - ["transform-object-rest-spread", { "useBuiltIns": true }] - ], - "env": { - "test": { - "plugins": ["istanbul"] - } - } -} diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 22dd6a56..00000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -coverage/* -dist/* diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index f0c8c431..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["lisk-base"], - "plugins": ["mocha"] -} diff --git a/.nvmrc b/.nvmrc index e51b3430..2a5dd0d6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8.12.0 +8.14.0 diff --git a/.nycrc b/.nycrc index 85974ea3..c47f12ce 100644 --- a/.nycrc +++ b/.nycrc @@ -1,5 +1,4 @@ { - "require": ["babel-register"], - "sourceMap": false, - "instrument": false + "exclude": ["test/**", "**/*.d.ts"], + "extension": [".ts"] } diff --git a/Jenkinsfile b/Jenkinsfile index 0c0b78b4..2accb5f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,14 +5,8 @@ pipeline { stages { stage('Install dependencies') { steps { - script { - cache_file = restoreCache("package.json") - } nvm(getNodejsVersion()) { - sh 'npm install --verbose' - } - script { - saveCache(cache_file, './node_modules', 10) + sh 'npm ci' } } } diff --git a/Jenkinsfile.nightly b/Jenkinsfile.nightly deleted file mode 100644 index 11910813..00000000 --- a/Jenkinsfile.nightly +++ /dev/null @@ -1,29 +0,0 @@ -@Library('lisk-jenkins') _ - -pipeline { - agent { node { label 'lisk-commander' } } - stages { - stage('Prepare workspace') { - steps { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'scan-1', url: 'https://github.com/LiskHQ/lisk-commander']]]) - } - } - stage('Install dependencies') { - steps { - nvm(getNodejsVersion()) { - sh 'npm install --verbose' - } - } - } - stage('Run vulnerabilities check') { - steps { - nvm(getNodejsVersion()) { - withCredentials([string(credentialsId: 'liskhq-snyk-token', variable: 'SNYK_TOKEN')]) { - sh 'snyk test' - } - } - sh 'sha1sum package.json >~/.lisk-commander.package.json.sha1sum' - } - } - } -} diff --git a/Jenkinsfile.private b/Jenkinsfile.private deleted file mode 100644 index 81fc1cc0..00000000 --- a/Jenkinsfile.private +++ /dev/null @@ -1,36 +0,0 @@ -@Library('lisk-jenkins') _ - -pipeline { - agent { node { label 'lisk-commander' } } - stages { - stage('Prepare workspace') { - steps { - checkout scm - } - } - stage('Install dependencies') { - steps { - nvm(getNodejsVersion()) { - sh 'npm install --verbose' - } - } - } - stage('Run vulnerabilities check') { - steps { - withCredentials([string(credentialsId: 'liskhq-snyk-token', variable: 'SNYK_TOKEN')]) { - nvm(getNodejsVersion()) { - sh ''' - if [ -r ~/.lisk-commander.package.json.sha1sum ]; then - if sha1sum --status --check ~/.lisk-commander.package.json.sha1sum; then - echo "Skipping vulnerabilities check since package.json has not changed." - exit 0 - fi - fi - snyk test - ''' - } - } - } - } - } -} diff --git a/docs/delegate.md b/docs/delegate.md index 0ef995f7..a4c867c9 100644 --- a/docs/delegate.md +++ b/docs/delegate.md @@ -3,6 +3,8 @@ Commands relating to Lisk delegates. * [`lisk delegate:get USERNAMES`](#lisk-delegate-get-usernames) +* [`lisk delegate:voters USERNAMES`](#lisk-delegate-voters-usernames) +* [`lisk delegate:votes USERNAMES`](#lisk-delegate-votes-usernames) ## `lisk delegate:get USERNAMES` @@ -28,3 +30,65 @@ EXAMPLES delegate:get lightcurve delegate:get lightcurve,4miners.net ``` + +## `delegate:voters USERNAMES` + +Gets voters information for given delegate(s) from the blockchain. + +``` +USAGE + $ lisk delegate:voters USERNAMES + +ARGUMENTS + USERNAMES Comma-separated username(s) to get information about. + +OPTIONS + --limit Limits the returned voters array by specified integer amount. Maximum is 100. + + --offset Offsets the returned voters array by specified integer amount. + + --sort Sorts the returned voters array. Sort type must be one of `publicKey:asc`, `publicKey:desc`, `balance:asc`, `balance:desc`, `username:asc` or `username:desc`. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + + +DESCRIPTION + Gets voters information for given delegate(s) from the blockchain. + +EXAMPLES + delegate:voters lightcurve + delegate:voters lightcurve,4miners.net + delegate:voters lightcurve,4miners.net --limit 20 --offset 5 --sort publicKey:asc --pretty +``` + +## `delegate:votes ADDRESSES` + +Gets votes information for given delegate(s) from the blockchain. + +``` +USAGE + $ lisk delegate:votes ADDRESSES + +ARGUMENTS + ADDRESSES Comma-separated address(es) to get information about. + +OPTIONS + --limit Limits the returned voters array by specified integer amount. Maximum is 100. + + --offset Offsets the returned voters array by specified integer amount. + + --sort Sorts the returned voters array. Sort type must be one of `balance:asc`, `balance:desc`, `username:asc` or `username:desc`. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + + +DESCRIPTION + Gets voters information for given delegate(s) from the blockchain. + +EXAMPLES + delegate:votes 13133549779353512613L + delegate:votes 13133549779353512613L,16010222169256538112L + delegate:votes 13133549779353512613L,16010222169256538112L --limit 20 --offset 5 --sort balance:asc --pretty +``` diff --git a/docs/transaction.md b/docs/transaction.md index 041477b0..e9f70218 100644 --- a/docs/transaction.md +++ b/docs/transaction.md @@ -121,6 +121,11 @@ ARGUMENTS ADDRESS Address of the recipient. OPTIONS + -d, --data=data + Optional UTF8 encoded data (maximum of 64 bytes) to include in the transaction asset. + Examples: + - --data=customInformation + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. @@ -407,10 +412,32 @@ ARGUMENTS IDS Comma-separated transaction ID(s) to get information about. OPTIONS - -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. - --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You - can change the default behaviour in your config.json file. + -s, --state=unsigned|unprocessed + Get transactions based on a given state. Possible values for the state are 'unsigned' and 'unprocessed'. + Examples: + - --state=unsigned + - --state=unprocessed + + --limit=limit + [default: 10] Limits the returned transactions array by specified integer amount. Maximum is 100. + + --offset=offset + [default: 0] Offsets the returned transactions array by specified integer amount. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + + --sender-id=sender-id + Get transactions based by senderId which is sender's lisk address'. + Examples: + - --sender-id=12668885769632475474L + + --sort=amount:asc|amount:desc|fee:asc|fee:desc|type:asc|type:desc|timestamp:asc|timestamp:desc + [default: timestamp:asc] Fields to sort results by. DESCRIPTION Gets transaction information from the blockchain. @@ -418,6 +445,12 @@ DESCRIPTION EXAMPLES transaction:get 10041151099734832021 transaction:get 10041151099734832021,1260076503909567890 + transaction:get 10041151099734832021,1260076503909567890 --state=unprocessed + transaction:get 10041151099734832021 --state=unsigned --sender-id=1813095620424213569L + transaction:get --state=unsigned --sender-id=1813095620424213569L + transaction:get --sender-id=1813095620424213569L + transaction:get --limit=10 --sort=amount:desc + transaction:get --limit=10 --offset=5 ``` ## `lisk transaction:sign [TRANSACTION]` diff --git a/package-lock.json b/package-lock.json index 1be6cc58..a7993d43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,90 +1,76 @@ { "name": "lisk-commander", - "version": "2.0.0", + "version": "2.1.0-rc.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@liskhq/lisk-api-client": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-api-client/-/lisk-api-client-1.1.0.tgz", - "integrity": "sha512-vbcik0XSoqeb56P5i95UdauvYcbs765LUBimTpF5JfFCI55r9zAO1UrBRRNsCYt0YitrU70JkgxWSPbwbKP2Ew==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-api-client/-/lisk-api-client-2.0.0.tgz", + "integrity": "sha512-HmIaV6tsEsedHGrgrn9vU6rTZ6pwpE5XylxkUPPRkeNVV3/vTfPWEzoKcyp9TrWBnsnpebmn56GsGzxQ8EA0EQ==", "requires": { - "@liskhq/lisk-constants": "1.1.0", - "axios": "0.18.0" + "@types/node": "10.10.1", + "@types/verror": "1.10.3", + "axios": "0.18.0", + "verror": "1.10.0" } }, "@liskhq/lisk-constants": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-constants/-/lisk-constants-1.1.0.tgz", - "integrity": "sha512-T1mAm+hX1IsubG4hmNRnap6V1P4RJNeef4QSVL6BL26SsftLJI/kYdWVu5vUAqmlP1teVn48ZW+ExxEG3B2Bqw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-constants/-/lisk-constants-1.2.0.tgz", + "integrity": "sha512-B/1Si1eT4wOe7AaInklfT2SLenLm7U9CyfNnjaZs423Hi5Vw5xjP7KkM2nJTkqd6EUF/SJARKU/eK1R/qq0uDw==", + "requires": { + "@types/node": "10.10.1" + } }, "@liskhq/lisk-cryptography": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-cryptography/-/lisk-cryptography-1.1.0.tgz", - "integrity": "sha512-W6XdcNP66Z/yim16LgiBFVRuuiW055RzFqPlG9hBcRXn7qSDffQvM7SOpZd0kPXJV61J+wZL86/n7W33HvTmVQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-cryptography/-/lisk-cryptography-2.0.0.tgz", + "integrity": "sha512-ytW7dLebHjnOr3jsCe8asoTGencsRVPncwh+JTn+rrEl3k0UVEx3WrPdKnAfU0mHnWc3CWBf9kh2huyYnHlcdw==", "requires": { - "@liskhq/lisk-constants": "1.1.0", + "@types/ed2curve": "0.2.2", + "@types/node": "10.12.0", "browserify-bignum": "1.3.0-2", "buffer-reverse": "1.0.1", "ed2curve": "0.2.1", + "sodium-native": "2.2.1", "tweetnacl": "1.0.0", "varuint-bitcoin": "1.1.0" }, "dependencies": { - "tweetnacl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz", - "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins=" + "@types/node": { + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz", + "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==" } } }, "@liskhq/lisk-passphrase": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-passphrase/-/lisk-passphrase-1.1.0.tgz", - "integrity": "sha512-wI2g0n3BPd5S5p2VGTWR/eMEA0+P6W87tifemTp9z3ZBO3vGw68gGG6Aa2lp2/2PCbXYVnmkiXYATBr1xjZ7JA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-passphrase/-/lisk-passphrase-2.0.0.tgz", + "integrity": "sha512-2PKboQPq75fuP/9jlAU4GJFfbz4hD9vkwqmZfScMCu7mUdaTcLF77J+nvFkf5T/CApQZU125oCGY+9loo5FqLw==", "requires": { + "@types/bip39": "2.4.0", + "@types/node": "10.10.1", "bip39": "2.5.0" } }, "@liskhq/lisk-transactions": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-transactions/-/lisk-transactions-1.1.0.tgz", - "integrity": "sha512-f5Av2Rrz9dKHNVf+toAkEVVUnfgZyxc37CVSx6aDfJ4rmr8b8nrJ/RnOVtJ/HW0RB60XZApBlhQwqF/G0setKw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-transactions/-/lisk-transactions-2.0.0.tgz", + "integrity": "sha512-usUn3PbDN9R8FjhAmhl8ZKX72vGYzurmXYn5Qa4ekH2QKlgIhysPDs4yFuvcPR8BwqRNeYR1zOwPFzaWeXH8Bg==", "requires": { - "@liskhq/lisk-constants": "1.1.0", - "@liskhq/lisk-cryptography": "1.1.0", + "@liskhq/lisk-cryptography": "2.0.0", + "@types/node": "10.10.1", "ajv": "6.5.3", "ajv-merge-patch": "4.1.0", "browserify-bignum": "1.3.0-2" - }, - "dependencies": { - "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - } } }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha1-UkryQNGjYFJ7cwR17PoTRKpUDd4=", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", "dev": true, "requires": { "call-me-maybe": "^1.0.1", @@ -92,109 +78,169 @@ } }, "@nodelib/fs.stat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.2.tgz", - "integrity": "sha1-VMWpZEYr49TXivYxNjwY1vqRrCY=", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", "dev": true }, "@oclif/command": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.5.0.tgz", - "integrity": "sha1-1SdqGVBjSf/wJUsN2Y47iivZcao=", - "requires": { - "@oclif/errors": "^1.1.2", - "@oclif/parser": "^3.6.0", - "debug": "^3.1.0", - "semver": "^5.5.0" + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.5.6.tgz", + "integrity": "sha512-XBj13dw13qrRzUfAc4d6b8PlZXALFglJ8xydX34aazLJCzeP8mtTcAJTi6ylTwWVhIW2HDO9npTd4FviDY279g==", + "requires": { + "@oclif/errors": "^1.2.2", + "@oclif/parser": "^3.7.0", + "debug": "^4.1.0", + "semver": "^5.6.0" }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "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==" + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" } } }, "@oclif/config": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.7.4.tgz", - "integrity": "sha1-W393lTSjOd6MYqhjsS9XQLFcQfU=", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.9.0.tgz", + "integrity": "sha512-R9HJvS7x4Ff/VFGlg8b7hxFnuC77y7znr1iXwRay4Jhd/EFJyZRT9d9SHzA6TS8lz9vDTW93xOFakT9AXld4Kg==", "requires": { - "debug": "^3.1.0", + "debug": "^4.1.0", "tslib": "^1.9.3" }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "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==" } } }, "@oclif/dev-cli": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@oclif/dev-cli/-/dev-cli-1.18.0.tgz", - "integrity": "sha1-cp+FMN0YOyy7n5LWyu5exbSQtbU=", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@oclif/dev-cli/-/dev-cli-1.19.5.tgz", + "integrity": "sha512-9G2DM/AXahoaZ1u7HZVYpDPjEurpilS3sTJRB5M4g8hiidNBIHQjZeZ51IZsUJ3Fl45idVvkiuHyI43bbU2uKw==", "dev": true, "requires": { - "@oclif/command": "^1.5.0", - "@oclif/config": "^1.7.4", - "@oclif/errors": "^1.2.0", - "@oclif/plugin-help": "^2.1.1", - "cli-ux": "^4.8.1", - "debug": "^3.1.0", + "@oclif/command": "^1.5.4", + "@oclif/config": "^1.8.7", + "@oclif/errors": "^1.2.2", + "@oclif/plugin-help": "^2.1.2", + "cli-ux": "^4.9.0", + "debug": "^4.1.0", "fs-extra": "^7.0.0", - "lodash": "^4.17.10", + "lodash": "^4.17.11", "normalize-package-data": "^2.4.0", "qqjs": "^0.3.10", "tslib": "^1.9.3" }, "dependencies": { + "@oclif/plugin-help": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-2.1.4.tgz", + "integrity": "sha512-wG4eR/UxYangQlyn4XvslVV4wpBNQrEC/PvRibQq+0jNop/7zfK3jdWuK5PVB0mxZfhPwBSMZzV/3ur6DN+Bbg==", + "dev": true, + "requires": { + "@oclif/command": "^1.5.4", + "chalk": "^2.4.1", + "indent-string": "^3.2.0", + "lodash.template": "^4.4.0", + "string-width": "^2.1.1", + "strip-ansi": "^5.0.0", + "widest-line": "^2.0.1", + "wrap-ansi": "^4.0.0" + } + }, + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "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.0.0" + "ms": "^2.1.1" + } + }, + "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 + }, + "strip-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0" } } } }, "@oclif/errors": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@oclif/errors/-/errors-1.2.0.tgz", - "integrity": "sha1-QWaVJplyTCWvKrRSj+Ij6TBlXnI=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@oclif/errors/-/errors-1.2.2.tgz", + "integrity": "sha512-Eq8BFuJUQcbAPVofDxwdE0bL14inIiwt5EaKRVY9ZDIG11jwdXZqiQEECJx0VfnLyUZdYfRd/znDI/MytdJoKg==", "requires": { "clean-stack": "^1.3.0", "fs-extra": "^7.0.0", "indent-string": "^3.2.0", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^3.0.1" + "strip-ansi": "^5.0.0", + "wrap-ansi": "^4.0.0" }, "dependencies": { - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==" + }, + "strip-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "requires": { + "ansi-regex": "^4.0.0" + } } } }, "@oclif/linewrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@oclif/linewrap/-/linewrap-1.0.0.tgz", - "integrity": "sha1-rty2S0edTbe+JBljhIl7UACQHZE=" + "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==" }, "@oclif/parser": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.6.1.tgz", - "integrity": "sha512-H5gyGM3GaDFr1SHt7gsHfMEmt0/Q5SQYOqmtBlpofYaqiof8wdHZQAj4KY2oJpcy4tnsRJrFM3fN3GNEARBgtg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.7.0.tgz", + "integrity": "sha512-CtRbCBJQ8prt9o3nCTSRi/UEw68t7mUf19vu3QKbh6sGc6BkD7OAX6Hfjxif636LSlR+N8eh3PELw9SxHdJcbQ==", "requires": { "@oclif/linewrap": "^1.0.0", "chalk": "^2.4.1", @@ -204,7 +250,7 @@ "@oclif/plugin-help": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-2.1.1.tgz", - "integrity": "sha1-W84yqKl5WCfk8MbxjD/zABATDhg=", + "integrity": "sha512-eP1Z1yQNgQX3dpvCVQkr3iYVVVGKnWmI1pWxxqPIoUHZ6rmMZtYiawmPPpO/VSouV0ml0eoJ4HBPQfZfhiF8nw==", "requires": { "@oclif/command": "^1.5.0", "chalk": "^2.4.1", @@ -215,29 +261,10 @@ "wrap-ansi": "^4.0.0" }, "dependencies": { - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, - "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=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, "wrap-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-4.0.0.tgz", - "integrity": "sha1-s1cNfHAVYVmi1CvlzJQulX97ETE=", + "integrity": "sha512-uMTsj9rDb0/7kk1PbcbCcwvHUxp60fGDB/NNXpVa0Q+ic/e7y5+BwTxKfQ33VYgDppSwi/FBzpetYzo8s6tfbg==", "requires": { "ansi-styles": "^3.2.0", "string-width": "^2.1.1", @@ -247,109 +274,315 @@ } }, "@oclif/screen": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@oclif/screen/-/screen-1.0.2.tgz", - "integrity": "sha512-9k2C/Oyk6OwcvyBrKbSGDfH0baI986Dn8ZDxl8viIg8shl40TSPVx+TqXExUeA0Pj02xSdXEt5YXgDFP5Opc5g==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@oclif/screen/-/screen-1.0.4.tgz", + "integrity": "sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw==", "dev": true }, "@oclif/test": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@oclif/test/-/test-1.2.0.tgz", - "integrity": "sha1-dkymYhX1vTbAtcvL/Flj8CcYJbg=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@oclif/test/-/test-1.2.2.tgz", + "integrity": "sha512-ig8bwNRQVOqTJL03iSKzkEG0OHp4ai5uDragU1+8RHh1DDs5unF46lyd/zLkIicDZXrmEhlIuAjkBdK1apH6Bw==", "dev": true, "requires": { - "fancy-test": "^1.3.0" + "fancy-test": "^1.4.1" } }, "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.0.0.tgz", + "integrity": "sha512-vdjoYLDptCgvtJs57ULshak3iJe4NW3sJ3g36xVDGff5AE8P30S6A093EIEPjdi2noGhfuNOEkbxt3J3awFW1w==", + "dev": true, + "requires": { + "@sinonjs/samsam": "2.1.0" + } + }, + "@sinonjs/samsam": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.1.0.tgz", + "integrity": "sha512-5x2kFgJYupaF1ns/RmharQ90lQkd2ELS8A9X0ymkAAdemYHGtI2KiUHG8nX2WU0T1qgnOU5YMqnBM2V7NUanNw==", "dev": true, "requires": { - "samsam": "1.3.0" + "array-from": "^2.1.1" + } + }, + "@types/bip39": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/bip39/-/bip39-2.4.0.tgz", + "integrity": "sha512-qxJBGh55SPbSGv+91D6H3WOR8vKdA/p8Oc58oK/DTbORgjO6Ebuo8MRzdy2OWi+dw/lxtX4VWJkkCUTSQvhAnw==", + "requires": { + "@types/node": "*" } }, "@types/chai": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.4.tgz", - "integrity": "sha512-h6+VEw2Vr3ORiFCyyJmcho2zALnUq9cvdB/IO8Xs9itrJVCenC7o26A6+m7D0ihTTr65eS259H5/Ghl/VjYs6g==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.5.tgz", + "integrity": "sha512-nyzJ08qQMY4umgXD6SzbLflQucEnoAf2H5iUxPX5t0euDgXDV+bFTJlEmEepM35/2l07jYHdAfP6YEndeTWM0w==", + "dev": true + }, + "@types/chai-as-promised": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.0.tgz", + "integrity": "sha512-MFiW54UOSt+f2bRw8J7LgQeIvE/9b4oGvwU7XW30S9QGAiHGnU/fmiOprsyMkdmH2rl8xSPc0/yrQw8juXU6bQ==", + "dev": true, + "requires": { + "@types/chai": "*" + } + }, + "@types/ed2curve": { + "version": "0.2.2", + "resolved": "http://registry.npmjs.org/@types/ed2curve/-/ed2curve-0.2.2.tgz", + "integrity": "sha512-G1sTX5xo91ydevQPINbL2nfgVAj/s1ZiqZxC8OCWduwu+edoNGUm5JXtTkg9F3LsBZbRI46/0HES4CPUE2wc9g==", + "requires": { + "tweetnacl": "^1.0.0" + } + }, + "@types/expect": { + "version": "1.20.3", + "resolved": "http://registry.npmjs.org/@types/expect/-/expect-1.20.3.tgz", + "integrity": "sha512-g0+CQosizg1hjNn06fKB2tEvS5kExrvVOkIfsGuIRfsQ/A9u/Xjp/6/czJVyLuCYdkmMbplDUXvQW+YjBQK7dA==", + "dev": true + }, + "@types/inquirer": { + "version": "0.0.43", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-0.0.43.tgz", + "integrity": "sha512-xgyfKZVMFqE8aIKy1xfFVsX2MxyXUNgjgmbF6dRbR3sL+ZM5K4ka/9L4mmTwX8eTeVYtduyXu0gUVwVJa1HbNw==", + "dev": true, + "requires": { + "@types/rx": "*", + "@types/through": "*" + } + }, + "@types/jquery": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.9.tgz", + "integrity": "sha512-jd5gnS4K5C3MfcYPXdIPpMnFnbYpRdzZQQGkOBbyMiTsAaNTqMGyAJAZlEbMc0EwPaZFzFD+U3zxL/dhBsWsIQ==", + "dev": true + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "http://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, + "@types/lockfile": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/lockfile/-/lockfile-1.0.0.tgz", + "integrity": "sha512-pD6JuijPmrfi84qF3/TzGQ7zi0QIX+d7ZdetD6jUA6cp+IsCzAquXZfi5viesew+pfpOTIdAVKuh1SHA7KeKzg==", "dev": true }, "@types/lodash": { - "version": "4.14.116", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz", - "integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg==", + "version": "4.14.118", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.118.tgz", + "integrity": "sha512-iiJbKLZbhSa6FYRip/9ZDX6HXhayXLDGY2Fqws9cOkEQ6XeKfaxB0sC541mowZJueYyMnVUmmG+al5/4fCDrgw==", "dev": true }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", - "integrity": "sha1-ikrM/EA8EkoLr+ip/GGgXsEDIHM=", + "integrity": "sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==", "dev": true }, "@types/nock": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@types/nock/-/nock-9.3.0.tgz", - "integrity": "sha1-nTQ1j9zAiv0HFE4HhKyelR1BLdQ=", + "integrity": "sha512-ZHf/X8rTQ5Tb1rHjxIJYqm55uO265agE3G7NoSXVa2ep+EcJXgB2fsme+zBvK7MhrxTwkC/xkB6THyv50u0MGw==", "dev": true, "requires": { "@types/node": "*" } }, "@types/node": { - "version": "10.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.4.tgz", - "integrity": "sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw==", + "version": "10.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.10.1.tgz", + "integrity": "sha512-nzsx28VwfaIykfzMAG9TB3jxF5Nn+1/WMKnmVZc8TsB+LMIVvwUscVn7PAq+LFaY5ng5u4jp5mRROSswo76PPA==" + }, + "@types/rx": { + "version": "4.1.1", + "resolved": "http://registry.npmjs.org/@types/rx/-/rx-4.1.1.tgz", + "integrity": "sha1-WY/JSla67ZdfGUV04PVy/Y5iekg=", + "dev": true, + "requires": { + "@types/rx-core": "*", + "@types/rx-core-binding": "*", + "@types/rx-lite": "*", + "@types/rx-lite-aggregates": "*", + "@types/rx-lite-async": "*", + "@types/rx-lite-backpressure": "*", + "@types/rx-lite-coincidence": "*", + "@types/rx-lite-experimental": "*", + "@types/rx-lite-joinpatterns": "*", + "@types/rx-lite-testing": "*", + "@types/rx-lite-time": "*", + "@types/rx-lite-virtualtime": "*" + } + }, + "@types/rx-core": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/rx-core/-/rx-core-4.0.3.tgz", + "integrity": "sha1-CzNUsSOM7b4rdPYybxOdvHpZHWA=", + "dev": true + }, + "@types/rx-core-binding": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/rx-core-binding/-/rx-core-binding-4.0.4.tgz", + "integrity": "sha512-5pkfxnC4w810LqBPUwP5bg7SFR/USwhMSaAeZQQbEHeBp57pjKXRlXmqpMrLJB4y1oglR/c2502853uN0I+DAQ==", + "dev": true, + "requires": { + "@types/rx-core": "*" + } + }, + "@types/rx-lite": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/rx-lite/-/rx-lite-4.0.6.tgz", + "integrity": "sha512-oYiDrFIcor9zDm0VDUca1UbROiMYBxMLMaM6qzz4ADAfOmA9r1dYEcAFH+2fsPI5BCCjPvV9pWC3X3flbrvs7w==", + "dev": true, + "requires": { + "@types/rx-core": "*", + "@types/rx-core-binding": "*" + } + }, + "@types/rx-lite-aggregates": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/rx-lite-aggregates/-/rx-lite-aggregates-4.0.3.tgz", + "integrity": "sha512-MAGDAHy8cRatm94FDduhJF+iNS5//jrZ/PIfm+QYw9OCeDgbymFHChM8YVIvN2zArwsRftKgE33QfRWvQk4DPg==", + "dev": true, + "requires": { + "@types/rx-lite": "*" + } + }, + "@types/rx-lite-async": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/rx-lite-async/-/rx-lite-async-4.0.2.tgz", + "integrity": "sha512-vTEv5o8l6702ZwfAM5aOeVDfUwBSDOs+ARoGmWAKQ6LOInQ8J4/zjM7ov12fuTpktUKdMQjkeCp07Vd73mPkxw==", + "dev": true, + "requires": { + "@types/rx-lite": "*" + } + }, + "@types/rx-lite-backpressure": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/rx-lite-backpressure/-/rx-lite-backpressure-4.0.3.tgz", + "integrity": "sha512-Y6aIeQCtNban5XSAF4B8dffhIKu6aAy/TXFlScHzSxh6ivfQBQw6UjxyEJxIOt3IT49YkS+siuayM2H/Q0cmgA==", + "dev": true, + "requires": { + "@types/rx-lite": "*" + } + }, + "@types/rx-lite-coincidence": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/rx-lite-coincidence/-/rx-lite-coincidence-4.0.3.tgz", + "integrity": "sha512-1VNJqzE9gALUyMGypDXZZXzR0Tt7LC9DdAZQ3Ou/Q0MubNU35agVUNXKGHKpNTba+fr8GdIdkC26bRDqtCQBeQ==", + "dev": true, + "requires": { + "@types/rx-lite": "*" + } + }, + "@types/rx-lite-experimental": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/rx-lite-experimental/-/rx-lite-experimental-4.0.1.tgz", + "integrity": "sha1-xTL1y98/LBXaFt7Ykw0bKYQCPL0=", + "dev": true, + "requires": { + "@types/rx-lite": "*" + } + }, + "@types/rx-lite-joinpatterns": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/rx-lite-joinpatterns/-/rx-lite-joinpatterns-4.0.1.tgz", + "integrity": "sha1-9w/jcFGKhDLykVjMkv+1a05K/D4=", + "dev": true, + "requires": { + "@types/rx-lite": "*" + } + }, + "@types/rx-lite-testing": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/rx-lite-testing/-/rx-lite-testing-4.0.1.tgz", + "integrity": "sha1-IbGdEfTf1v/vWp0WSOnIh5v+Iek=", + "dev": true, + "requires": { + "@types/rx-lite-virtualtime": "*" + } + }, + "@types/rx-lite-time": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/rx-lite-time/-/rx-lite-time-4.0.3.tgz", + "integrity": "sha512-ukO5sPKDRwCGWRZRqPlaAU0SKVxmWwSjiOrLhoQDoWxZWg6vyB9XLEZViKOzIO6LnTIQBlk4UylYV0rnhJLxQw==", + "dev": true, + "requires": { + "@types/rx-lite": "*" + } + }, + "@types/rx-lite-virtualtime": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/rx-lite-virtualtime/-/rx-lite-virtualtime-4.0.3.tgz", + "integrity": "sha512-3uC6sGmjpOKatZSVHI2xB1+dedgml669ZRvqxy+WqmGJDVusOdyxcKfyzjW0P3/GrCiN4nmRkLVMhPwHCc5QLg==", + "dev": true, + "requires": { + "@types/rx-lite": "*" + } + }, + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==", "dev": true }, "@types/sinon": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-5.0.2.tgz", - "integrity": "sha512-ifYuFq3GWyvRbqebGB4ZKLqezMGLXzhHv1Uefhg+uARYs/iO+v6Gu/BkpxTxsyM9NI++N/RCf5sWl3X9wBVLaw==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-5.0.5.tgz", + "integrity": "sha512-Wnuv66VhvAD2LEJfZkq8jowXGxe+gjVibeLCYcVBp7QLdw0BFx2sRkKzoiiDkYEPGg5VyqO805Rcj0stVjQwCQ==", "dev": true }, - "acorn": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", - "integrity": "sha1-/cWNnRf0pOmNEC3tgmqbl1kSUQI=", + "@types/sinon-chai": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.0.tgz", + "integrity": "sha512-VpsC3L8/ynicaLJB/aVvLCFn+c2tjo5jJ5MGiy7keoN431LSAKv9xhLO9dhx9vSVJHG8cjfshdqU4+W8Occf7w==", + "dev": true, + "requires": { + "@types/chai": "*", + "@types/sinon": "*" + } + }, + "@types/strip-ansi": { + "version": "3.0.0", + "resolved": "http://registry.npmjs.org/@types/strip-ansi/-/strip-ansi-3.0.0.tgz", + "integrity": "sha1-m2PUU6a1SqhJGCIHcRoIvo7qSK4=", "dev": true }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "@types/through": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.29.tgz", + "integrity": "sha512-9a7C5VHh+1BKblaYiq+7Tfc+EOmjMdZaD1MYtkQjSoxgB69tBjW98ry6SKsi4zEIWztLOMRuL87A3bdT/Fc/4w==", "dev": true, "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } + "@types/node": "*" } }, + "@types/verror": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.3.tgz", + "integrity": "sha512-7Jz0MPsW2pWg5dJfEp9nJYI0RDCYfgjg2wIo5HfQ8vOJvUq0/BxT7Mv2wNQvkKBmV9uT++6KF3reMnLmh/0HrA==" + }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", + "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", + "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "dependencies": { + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + } } }, - "ajv-keywords": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", - "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=", - "dev": true - }, "ajv-merge-patch": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ajv-merge-patch/-/ajv-merge-patch-4.1.0.tgz", @@ -360,21 +593,19 @@ } }, "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true + "version": "3.1.0", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" }, "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { "color-convert": "^1.9.0" } @@ -391,41 +622,26 @@ "integrity": "sha1-xnhwBYADV5AJCD9UrAq6+1wz0kI=", "dev": true }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "optional": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, "app-root-path": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.0.1.tgz", - "integrity": "sha1-zWLc+OT9WkF+/GZNLlsQZTxlG0Y=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz", + "integrity": "sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo=", "dev": true }, "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" } }, "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "optional": true, - "requires": { - "arr-flatten": "^1.0.1" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true }, "arr-flatten": { "version": "1.1.0", @@ -439,6 +655,12 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -455,11 +677,10 @@ "dev": true }, "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true, - "optional": true + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true }, "arrify": { "version": "1.0.1", @@ -468,18 +689,18 @@ "dev": true }, "asn1": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", - "integrity": "sha1-VZvhg3bQik7E2+gId9J4GGObLfc=", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, - "optional": true + "requires": { + "safer-buffer": "~2.1.0" + } }, "assert-plus": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", - "integrity": "sha1-7nQAlBMALYTOxyGcasgRgS5yMWA=", - "dev": true, - "optional": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "assertion-error": { "version": "1.1.0", @@ -493,20 +714,6 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", - "dev": true, - "optional": true - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true, - "optional": true - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -514,22 +721,21 @@ "dev": true }, "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, "aws-sign2": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", - "integrity": "sha1-xXED96F/wDfwLXwuZLYC6iI/fWM=", - "dev": true, - "optional": true + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true }, "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, "axios": { @@ -541,29 +747,6 @@ "is-buffer": "^1.1.5" } }, - "babel-cli": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", - "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-polyfill": "^6.26.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "chokidar": "^1.6.1", - "commander": "^2.11.0", - "convert-source-map": "^1.5.0", - "fs-readdir-recursive": "^1.0.0", - "glob": "^7.1.2", - "lodash": "^4.17.4", - "output-file-sync": "^1.1.2", - "path-is-absolute": "^1.0.1", - "slash": "^1.0.0", - "source-map": "^0.5.6", - "v8flags": "^2.1.1" - } - }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -575,6 +758,12 @@ "js-tokens": "^3.0.2" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", @@ -596,7 +785,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -611,729 +800,688 @@ } } }, - "babel-core": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", - "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.0", - "debug": "^2.6.8", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.7", - "slash": "^1.0.0", - "source-map": "^0.5.6" + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", - "dev": true + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } } } }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "tweetnacl": "^0.14.3" }, "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true } } }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, + "bip39": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.5.0.tgz", + "integrity": "sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA==", "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9", + "randombytes": "^2.0.1", + "safe-buffer": "^5.0.1", + "unorm": "^1.3.3" } }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "bl": { + "version": "1.2.2", + "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" } }, - "babel-helper-define-map": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "dev": true, - "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "browserify-bignum": { + "version": "1.3.0-2", + "resolved": "https://registry.npmjs.org/browserify-bignum/-/browserify-bignum-1.3.0-2.tgz", + "integrity": "sha1-3cO27WB/1slglmlQ4rNaKwxvub8=" }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" } }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-reverse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", + "integrity": "sha1-SSg8jvpvkBvAH6MwTQYCeXGuL2A=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chai": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", + "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "assertion-error": "^1.0.1", + "check-error": "^1.0.1", + "deep-eql": "^3.0.0", + "get-func-name": "^2.0.0", + "pathval": "^1.0.0", + "type-detect": "^4.0.0" } }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "check-error": "^1.0.2" } }, - "babel-plugin-istanbul": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz", - "integrity": "sha1-Z2DN2Xf0EdPhdbsGTyvDJ9mbK24=", - "dev": true, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "find-up": "^2.1.0", - "istanbul-lib-instrument": "^1.7.5", - "test-exclude": "^4.1.1" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", "dev": true }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "dev": true, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } } }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } + "clean-stack": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", + "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=" }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", - "dev": true, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "restore-cursor": "^2.0.0" } }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", - "dev": true, - "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } + "cli-spinners": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", + "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", + "dev": true }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", - "dev": true, + "cli-table3": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.0.tgz", + "integrity": "sha512-c7YHpUyO1SaKaO7kYtxd5NZ8FjAmSK3LpKkuzdwn+2CwpFxBpdoQLm+OAnnCfoEl7onKhN9PKQi1lsHuAIUqGQ==", "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" } }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "cli-truncate": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "slice-ansi": "0.0.4", + "string-width": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } } }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "cli-ux": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/cli-ux/-/cli-ux-4.9.3.tgz", + "integrity": "sha512-/1owvF0SZ5Gn54cgrikJ0QskgTzeg30HGjkmjFoaHDJzAqFpuX1DBpFR8aLvsE1J5s9MgeYRENQK4BFwOag5VA==", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "@oclif/errors": "^1.2.2", + "@oclif/linewrap": "^1.0.0", + "@oclif/screen": "^1.0.3", + "ansi-escapes": "^3.1.0", + "ansi-styles": "^3.2.1", + "cardinal": "^2.1.1", + "chalk": "^2.4.1", + "clean-stack": "^2.0.0", + "extract-stack": "^1.0.0", + "fs-extra": "^7.0.0", + "hyperlinker": "^1.0.0", + "indent-string": "^3.2.0", + "is-wsl": "^1.1.0", + "lodash": "^4.17.11", + "password-prompt": "^1.0.7", + "semver": "^5.6.0", + "strip-ansi": "^5.0.0", + "supports-color": "^5.5.0", + "supports-hyperlinks": "^1.0.1", + "treeify": "^1.1.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "clean-stack": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.0.0.tgz", + "integrity": "sha512-VEoL9Qh7I8s8iHnV53DaeWSt8NJ0g3khMfK6NiCPB7H657juhro+cSw2O88uo3bo0c0X5usamtXk0/Of0wXa5A==", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "strip-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0" + } + } } }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", - "dev": true, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "color-name": "1.1.3" } }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", - "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", - "dev": true, - "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" - } + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } + "colors": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", + "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", + "optional": true }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "dev": true, "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "delayed-stream": "~1.0.0" } }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", - "dev": true, - "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" - } + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", - "dev": true, - "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "cosmiconfig": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-3.1.0.tgz", + "integrity": "sha512-zedsBhLSbPBms+kE7AH4vHg6JsKDz6epSv2/+5XHs8ILHlgDciSJfSWf8sX9aQ52Jb7KI7VswUTsLpR/G0cr2Q==", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "is-directory": "^0.3.1", + "js-yaml": "^3.9.0", + "parse-json": "^3.0.0", + "require-from-string": "^2.0.1" + }, + "dependencies": { + "parse-json": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-3.0.0.tgz", + "integrity": "sha1-+m9HsY4jgm6tMvJj50TQ4ehH+xM=", + "dev": true, + "requires": { + "error-ex": "^1.3.1" + } + } } }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "coveralls": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.2.tgz", + "integrity": "sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw==", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" + "growl": "~> 1.10.0", + "js-yaml": "^3.11.0", + "lcov-parse": "^0.0.10", + "log-driver": "^1.2.7", + "minimist": "^1.2.0", + "request": "^2.85.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } } }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", - "dev": true, + "create-hash": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", - "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", - "dev": true, + "create-hmac": { + "version": "1.1.7", + "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.8.0", - "babel-runtime": "^6.26.0" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, - "babel-plugin-transform-regenerator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "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, "requires": { - "regenerator-transform": "^0.10.0" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "assert-plus": "^1.0.0" } }, - "babel-polyfill": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", - "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", - "requires": { - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "regenerator-runtime": "^0.10.5" - } - }, - "babel-preset-env": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz", - "integrity": "sha512-W6VIyA6Ch9ePMI7VptNn2wBM6dbG0eSz25HEiL40nQXCsXGTGZSTZu1Iap+cj3Q0S5a7T9+529l/5Bkvd+afNA==", - "dev": true, - "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-to-generator": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.23.0", - "babel-plugin-transform-es2015-classes": "^6.23.0", - "babel-plugin-transform-es2015-computed-properties": "^6.22.0", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", - "babel-plugin-transform-es2015-for-of": "^6.23.0", - "babel-plugin-transform-es2015-function-name": "^6.22.0", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.22.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-umd": "^6.23.0", - "babel-plugin-transform-es2015-object-super": "^6.22.0", - "babel-plugin-transform-es2015-parameters": "^6.23.0", - "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", - "babel-plugin-transform-exponentiation-operator": "^6.22.0", - "babel-plugin-transform-regenerator": "^6.22.0", - "browserslist": "^2.1.2", - "invariant": "^2.2.2", - "semver": "^5.3.0" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", - "dev": true - } - } + "date-fns": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", + "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==", + "dev": true }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - } + "ms": "2.0.0" } }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", - "dev": true - } - } + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", - "dev": true - } - } + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", - "dev": true - } + "type-detect": "^4.0.0" } }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==", "dev": true }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", @@ -1362,2291 +1510,1771 @@ "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "dev": true + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "dev": true, - "optional": true, "requires": { - "tweetnacl": "^0.14.3" + "arrify": "^1.0.1", + "path-type": "^3.0.0" } }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, - "optional": true - }, - "bip39": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.5.0.tgz", - "integrity": "sha1-UcvVF5RgUEpj6jwADbP3h8oFEjU=", "requires": { - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1", - "safe-buffer": "^5.0.1", - "unorm": "^1.3.3" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, - "bl": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", - "integrity": "sha1-wGt5evCF6gC8Unr8jvzxHeIjIFQ=", - "dev": true, + "ed2curve": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ed2curve/-/ed2curve-0.2.1.tgz", + "integrity": "sha1-Iuaqo1aePE2/Tu+ilhLsMp5YGQw=", "requires": { - "readable-stream": "~1.0.26" + "tweetnacl": "0.x.x" }, "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" } } }, - "boom": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz", - "integrity": "sha1-emNune1O/O+xnO9JR6PGffrukRs=", - "dev": true, - "requires": { - "hoek": "0.9.x" - } + "elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", + "dev": true }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "once": "^1.4.0" } }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "optional": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "is-arrayish": "^0.2.1" } }, - "browser-stdout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", - "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", - "dev": true + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, - "browserify-bignum": { - "version": "1.3.0-2", - "resolved": "https://registry.npmjs.org/browserify-bignum/-/browserify-bignum-1.3.0-2.tgz", - "integrity": "sha1-3cO27WB/1slglmlQ4rNaKwxvub8=" + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true }, - "browserslist": { - "version": "2.11.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", - "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000792", - "electron-to-chromium": "^1.3.30" - } + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha1-iQ3ZDZI6hz4I4Q5f1RpX5bfM4Ow=", + "execa": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", "dev": true, "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" + "cross-spawn": "^6.0.0", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha1-vX3CauKXLQ7aJTvgYdupkjScGfA=", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "buffer-reverse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", - "integrity": "sha1-SSg8jvpvkBvAH6MwTQYCeXGuL2A=" - }, - "builtin-modules": { + "exit-hook": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", "dev": true }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } } } }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30000846", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000846.tgz", - "integrity": "sha512-qxUOHr5mTaadWH1ap0ueivHd8x42Bnemcn+JutVr7GWmm2bU4zoBhjuv5QdXgALQnnT626lOQros7cCDf8PwCg==", + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, - "cardinal": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", - "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "ansicolors": "~0.3.2", - "redeyed": "~2.1.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } } }, - "caseless": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.6.0.tgz", - "integrity": "sha1-gWfBq4OX+1u5X5bSjlqBxQ8kesQ=", - "dev": true - }, - "chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", - "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", - "dev": true, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", "requires": { - "assertion-error": "^1.0.1", - "check-error": "^1.0.1", - "deep-eql": "^3.0.0", - "get-func-name": "^2.0.0", - "pathval": "^1.0.0", - "type-detect": "^4.0.0" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" } }, - "chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { - "check-error": "^1.0.2" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { - "color-convert": "^1.9.0" + "is-descriptor": "^1.0.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { - "has-flag": "^3.0.0" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "extract-stack": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/extract-stack/-/extract-stack-1.0.0.tgz", + "integrity": "sha1-uXrK+UQe6iMyUpYktzL8WhyBZfo=", "dev": true }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "fancy-test": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/fancy-test/-/fancy-test-1.4.1.tgz", + "integrity": "sha512-PdE3epBdheFF4T2C1o/w1M0k0VBdw4qOF2juYKbNMg8LCjMBZwBSjdRe0+0d+97MPzjQaCT+87PNdTpT9Fkiiw==", "dev": true, - "optional": true, "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" + "@types/chai": "^4.1.4", + "@types/lodash": "^4.14.116", + "@types/mocha": "^5.2.5", + "@types/nock": "^9.3.0", + "@types/node": "^10.9.4", + "@types/sinon": "^5.0.2", + "lodash": "^4.17.11", + "mock-stdin": "^0.3.1", + "stdout-stderr": "^0.1.9" } }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, - "ci-info": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz", - "integrity": "sha1-A1YSWdtI0EdMi9yQ9bR7Botrv7Q=", - "dev": true + "fast-glob": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.4.tgz", + "integrity": "sha512-FjK2nCGI/McyzgNtTESqaWP3trPvHyRyoyY70hxjc3oKPNmDe8taohLZpoVKoUjW85tbU5txaYUZCNtVzygl1g==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + } }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "fast-json-patch": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.0.7.tgz", + "integrity": "sha512-DQeoEyPYxdTtfmB3yDlxkLyKTdbJ6ABfFGcMynDqjvGhPYLto/pZyb/dG2Nyd/n9CArjEWN9ZST++AFmgzgbGw==", "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "deep-equal": "^1.0.1" } }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-extendable": "^0.1.0" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true } } }, - "clean-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", - "integrity": "sha1-jffHquUf02h06PjQW5GAvBGj/tc=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "clean-stack": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", - "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=" - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "cli-spinners": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", - "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", "dev": true }, - "cli-table3": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.0.tgz", - "integrity": "sha512-c7YHpUyO1SaKaO7kYtxd5NZ8FjAmSK3LpKkuzdwn+2CwpFxBpdoQLm+OAnnCfoEl7onKhN9PKQi1lsHuAIUqGQ==", - "requires": { - "colors": "^1.1.2", - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "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=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - } - } - }, - "cli-truncate": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", - "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "slice-ansi": "0.0.4", - "string-width": "^1.0.1" - }, - "dependencies": { - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", - "dev": true - } + "locate-path": "^2.0.0" } }, - "cli-ux": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/cli-ux/-/cli-ux-4.8.1.tgz", - "integrity": "sha512-ehGXI54J7A4WJOa+fe0GDxcl6xmYLQmXDHptTtsWQDqWNXFOJQJzTHaJaFVOSo7e1f/kXtfvS1sPttQqTw44BA==", - "dev": true, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", "requires": { - "@oclif/errors": "^1.2.0", - "@oclif/linewrap": "^1.0.0", - "@oclif/screen": "^1.0.2", - "ansi-styles": "^3.2.1", - "cardinal": "^2.1.1", - "chalk": "^2.4.1", - "clean-stack": "^1.3.0", - "extract-stack": "^1.0.0", - "fs-extra": "^7.0.0", - "hyperlinker": "^1.0.0", - "indent-string": "^3.2.0", - "is-wsl": "^1.1.0", - "lodash": "^4.17.10", - "password-prompt": "^1.0.7", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "supports-color": "^5.5.0", - "supports-hyperlinks": "^1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "debug": "=3.1.0" } }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "dev": true }, - "codecov.io": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/codecov.io/-/codecov.io-0.0.1.tgz", - "integrity": "sha1-JeorCV4enqEYcr36WEIRgTDfeLE=", + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { - "request": "2.42.0", - "urlgrey": "0.4.0" - }, - "dependencies": { - "combined-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", - "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=", - "dev": true, - "optional": true, - "requires": { - "delayed-stream": "0.0.5" - } - }, - "delayed-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", - "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz", - "integrity": "sha1-kavXiKupcCsaq/qLwBAxoqyeOxI=", - "dev": true, - "optional": true, - "requires": { - "async": "~0.9.0", - "combined-stream": "~0.0.4", - "mime": "~1.2.11" - } - }, - "mime-types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz", - "integrity": "sha1-mVrhOSq4r/y/yyZB3QVOlDwNXc4=", - "dev": true - }, - "request": { - "version": "2.42.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.42.0.tgz", - "integrity": "sha1-VyvQFIk4VkBArHqxSLlkI6BjMEo=", - "dev": true, - "requires": { - "aws-sign2": "~0.5.0", - "bl": "~0.9.0", - "caseless": "~0.6.0", - "forever-agent": "~0.5.0", - "form-data": "~0.1.0", - "hawk": "1.1.1", - "http-signature": "~0.10.0", - "json-stringify-safe": "~5.0.0", - "mime-types": "~1.0.1", - "node-uuid": "~1.4.0", - "oauth-sign": "~0.4.0", - "qs": "~1.2.0", - "stringstream": "~0.0.4", - "tough-cookie": ">=0.12.0", - "tunnel-agent": "~0.4.0" - } - } + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" } }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "formatio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", "dev": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha1-wSYRB66y8pTr/+ye2eytUppgl+0=", - "requires": { - "color-name": "^1.1.1" + "samsam": "1.x" } }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "colors": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", - "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", - "optional": true - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { - "delayed-stream": "~1.0.0" + "map-cache": "^0.2.2" } }, - "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, - "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", - "dev": true, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "get-own-enumerable-property-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz", + "integrity": "sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==", "dev": true }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "get-stream": { + "version": "3.0.0", + "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true }, - "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, - "cosmiconfig": { + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": 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" + } + }, + "glob-parent": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-3.1.0.tgz", - "integrity": "sha512-zedsBhLSbPBms+kE7AH4vHg6JsKDz6epSv2/+5XHs8ILHlgDciSJfSWf8sX9aQ52Jb7KI7VswUTsLpR/G0cr2Q==", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^3.0.0", - "require-from-string": "^2.0.1" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { - "parse-json": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-3.0.0.tgz", - "integrity": "sha1-+m9HsY4jgm6tMvJj50TQ4ehH+xM=", + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "error-ex": "^1.3.1" + "is-extglob": "^2.1.0" } } } }, - "coveralls": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.0.tgz", - "integrity": "sha512-ZppXR9y5PraUOrf/DzHJY6gzNUhXYE3b9D43xEXs4QYZ7/Oe0Gy0CS+IPKWFfvQFXB3RG9QduaQUFehzSpGAFw==", - "dev": true, - "requires": { - "js-yaml": "^3.6.1", - "lcov-parse": "^0.0.10", - "log-driver": "^1.2.5", - "minimist": "^1.2.0", - "request": "^2.79.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "cryptiles": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz", - "integrity": "sha1-7ZH/HxetE9N0gohZT4pIoNJvMlw=", - "dev": true, - "optional": true, - "requires": { - "boom": "0.4.x" - } - }, - "ctype": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", - "integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8=", - "dev": true, - "optional": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "date-fns": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", - "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==", + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", "dev": true }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "globby": { + "version": "8.0.1", + "resolved": "http://registry.npmjs.org/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "dev": true, "requires": { - "ms": "2.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", - "dev": true - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" }, - "deep-equal": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.1.2.tgz", - "integrity": "sha1-skbCuApXCkfBG+HZvRBw7IeLh84=", + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", "dev": true }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", "dev": true }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "ajv": "^6.5.5", + "har-schema": "^2.0.0" }, "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "ajv": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", + "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, - "defined": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz", - "integrity": "sha1-817qfXBekzuvE7LwOz+D2SFAOz4=", - "dev": true - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" + "ansi-regex": "^2.0.0" }, "dependencies": { - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true } } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { - "repeating": "^2.0.0" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, - "diff": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", - "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", - "dev": true - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha1-CyBdK2rvmCOMooZZioIE0p0KADQ=", + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "pify": "^3.0.0" + "is-buffer": "^1.1.5" } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true } } }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "requires": { - "esutils": "^2.0.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "http-call": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/http-call/-/http-call-5.2.3.tgz", + "integrity": "sha512-IkwGruHVHATmnonLKMGX5tkpM0KSn/C240o8/OfBsESRaJacykSia+akhD0d3fljQ5rQPXtBvSrVShAsj+EOUQ==", "dev": true, - "optional": true, "requires": { - "jsbn": "~0.1.0" + "content-type": "^1.0.4", + "debug": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "is-stream": "^1.1.0", + "tunnel-agent": "^0.6.0" } }, - "ed2curve": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ed2curve/-/ed2curve-0.2.1.tgz", - "integrity": "sha1-Iuaqo1aePE2/Tu+ilhLsMp5YGQw=", + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, "requires": { - "tweetnacl": "0.x.x" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, - "electron-to-chromium": { - "version": "1.3.48", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz", - "integrity": "sha1-07DYWTgUBE4JLs4hCPw6ya6kuQA=", - "dev": true - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha1-7SljTRm6ukY7bOa4CjchPqtx7EM=", + "husky": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", + "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", "dev": true, "requires": { - "once": "^1.4.0" + "is-ci": "^1.0.10", + "normalize-path": "^1.0.0", + "strip-indent": "^2.0.0" } }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "dev": true, + "hyperlinker": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz", + "integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "requires": { - "is-arrayish": "^0.2.1" + "safer-buffer": ">= 2.1.2 < 3" } }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" }, - "eslint": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.16.0.tgz", - "integrity": "sha512-YVXV4bDhNoHHcv0qzU4Meof7/P26B4EuaktMi5L1Tnt52Aov85KmYA8c5D+xyZr/BkhvwUqr011jDSD/QTULxg==", + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", - "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.2", - "esquery": "^1.0.0", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "optional": true + }, + "inquirer": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", + "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", - "strip-json-comments": "~2.0.1", - "table": "^4.0.1", - "text-table": "~0.2.0" + "through": "^2.3.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" }, "dependencies": { - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha1-7D6LTp+AZPwCw6ybZfHCdb2o75I=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "globals": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", - "integrity": "sha1-4E/be5eW2K2snI9kwUg3sjEzeLA=", - "dev": true - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "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 - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-buffer": "^1.1.5" } } } }, - "eslint-ast-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz", - "integrity": "sha1-PVi6VXgBz7HJQdaBMe6fjDS9FYY=", + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "lodash.get": "^4.4.2", - "lodash.zip": "^4.2.0" + "builtin-modules": "^1.0.0" } }, - "eslint-config-airbnb-base": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.1.0.tgz", - "integrity": "sha512-/vjm0Px5ZCpmJqnjIzcFb9TKZrKWz0gnuG/7Gfkt0Db1ELJR51xkZth+t14rYdqWgX836XbuxtArbIHlVhbLBA==", + "is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", "dev": true, "requires": { - "eslint-restricted-globals": "^0.1.1" + "ci-info": "^1.5.0" } }, - "eslint-config-lisk-base": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-lisk-base/-/eslint-config-lisk-base-1.0.0.tgz", - "integrity": "sha1-r6OGX8L5V040m7/S8OHTbw+yuwk=", - "dev": true - }, - "eslint-config-oclif": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/eslint-config-oclif/-/eslint-config-oclif-1.5.1.tgz", - "integrity": "sha1-6MXzG4u3ODpmalBsP26R28hh7MU=", + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { - "eslint-config-xo-space": "^0.18.0", - "eslint-plugin-mocha": "^5.0.0", - "eslint-plugin-node": "^6.0.1", - "eslint-plugin-unicorn": "^4.0.3" + "kind-of": "^3.0.2" }, "dependencies": { - "eslint-plugin-mocha": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-5.0.0.tgz", - "integrity": "sha512-mpRWWsjxRco2bY4qE5DL8SmGoVF0Onb6DZrbgOjFoNo1YNN299K2voIozd8Kce3qC/neWNr2XF27E1ZDMl1yZg==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "ramda": "^0.25.0" + "is-buffer": "^1.1.5" } - }, - "ramda": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz", - "integrity": "sha1-j99oIxz/qQvC+UYDkKDLdKKbKak=", - "dev": true } } }, - "eslint-config-xo": { - "version": "0.20.1", - "resolved": "http://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.20.1.tgz", - "integrity": "sha512-bhDRezvlbYNZn8SHv0WE8aPsdPtH3sq1IU2SznyOtmRwi6e/XQkzs+Kaw1hA9Pz4xmkG796egIsFY2RD6fwUeQ==", - "dev": true - }, - "eslint-config-xo-space": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo-space/-/eslint-config-xo-space-0.18.0.tgz", - "integrity": "sha1-ksgTCx66rZFiu4Iv3IvI6fT6W4o=", + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "eslint-config-xo": "^0.20.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } } }, - "eslint-import-resolver-node": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", - "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "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-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.5.0" + "number-is-nan": "^1.0.0" } }, - "eslint-module-utils": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", - "integrity": "sha1-q67IJBd2E7ipWymWOeG2+s9HNEk=", + "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=" + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "debug": "^2.6.8", - "pkg-dir": "^1.0.0" + "is-extglob": "^2.1.1" } }, - "eslint-plugin-import": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz", - "integrity": "sha512-Rf7dfKJxZ16QuTgVv1OYNxkZcsu/hULFnC+e+w0Gzi6jMC3guQoWQgxYxc54IDRinlb6/0v5z/PxxIKmVctN+g==", + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "builtin-modules": "^1.1.1", - "contains-path": "^0.1.0", - "debug": "^2.6.8", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.1.1", - "has": "^1.0.1", - "lodash.cond": "^4.3.0", - "minimatch": "^3.0.3", - "read-pkg-up": "^2.0.0" + "kind-of": "^3.0.2" }, "dependencies": { - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "pify": "^2.0.0" + "is-buffer": "^1.1.5" } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true } } }, - "eslint-plugin-mocha": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-4.11.0.tgz", - "integrity": "sha1-kRk6L1XiCl41l0BUoAidMBmO5Xg=", - "dev": true, - "requires": { - "ramda": "^0.24.1" - } + "is-obj": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true }, - "eslint-plugin-node": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", - "integrity": "sha1-vxlkIpgGQ3kxXXpLKnWTc3b6BeQ=", + "is-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", + "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", "dev": true, "requires": { - "ignore": "^3.3.6", - "minimatch": "^3.0.4", - "resolve": "^1.3.3", - "semver": "^5.4.1" + "symbol-observable": "^0.2.2" } }, - "eslint-plugin-unicorn": { - "version": "4.0.3", - "resolved": "http://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-4.0.3.tgz", - "integrity": "sha512-F1JMyd42hx4qGhIaVdOSbDyhcxPgTy4BOzctTCkV+hqebPBUOAQn1f5AhMK2LTyiqCmKiTs8huAErbLBSWKoCQ==", + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { - "clean-regexp": "^1.0.0", - "eslint-ast-utils": "^1.0.0", - "import-modules": "^1.1.0", - "lodash.camelcase": "^4.1.1", - "lodash.kebabcase": "^4.0.1", - "lodash.snakecase": "^4.0.1", - "lodash.upperfirst": "^4.2.0", - "safe-regex": "^1.1.0" + "isobject": "^3.0.1" } }, - "eslint-restricted-globals": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz", - "integrity": "sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=", + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", "dev": true }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, - "eslint-visitor-keys": { + "is-typedarray": { "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==", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, - "espree": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.3.tgz", - "integrity": "sha1-kx4K9k5/u+0msFCinarR/GR5n6Y=", - "dev": true, - "requires": { - "acorn": "^5.4.0", - "acorn-jsx": "^3.0.0" - } + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=", + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", "dev": true }, - "esquery": { + "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", + "jest-get-type": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz", + "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==", + "dev": true + }, + "jest-validate": { + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.2.1.tgz", + "integrity": "sha512-k4HLI1rZQjlU+EC682RlQ6oZvLrE5SCh3brseQc24vbZTxzT/k/3urar5QMCVgjadmSO7lECeGdc6YxnM3yEGg==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "chalk": "^2.0.1", + "jest-get-type": "^21.2.0", + "leven": "^2.1.0", + "pretty-format": "^21.2.1" } }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, - "optional": true, "requires": { - "is-posix-bracket": "^0.1.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "optional": true, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "json-merge-patch": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-merge-patch/-/json-merge-patch-0.2.3.tgz", + "integrity": "sha1-+ixrWvh9p3uuKWalidUuI+2B/kA=", "requires": { - "fill-range": "^2.1.0" + "deep-equal": "^1.0.0" } }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "minimist": "^1.2.0" }, "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true } } }, - "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha1-PQJqIbf5W1cmOH1CAKwWDTcsO0g=", - "dev": true, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" + "graceful-fs": "^4.1.6" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", "dev": true, - "optional": true, "requires": { - "is-extglob": "^1.0.0" + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" } }, - "extract-stack": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/extract-stack/-/extract-stack-1.0.0.tgz", - "integrity": "sha1-uXrK+UQe6iMyUpYktzL8WhyBZfo=", + "just-extend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-3.0.0.tgz", + "integrity": "sha512-Fu3T6pKBuxjWT/p4DkqGHFRsysc8OauWr4ZRTY9dIx07Y9O0RkoR5jcv28aeD1vuAwhm3nLkDurwLXoALp4DpQ==", "dev": true }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, - "fancy-test": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/fancy-test/-/fancy-test-1.4.0.tgz", - "integrity": "sha512-35CJcYGL/Y2K68EDf9TAMORgOUX2+EvzopPtHnFFQt4qXqzqV2fUXr5ZH4/ZPBPDrUfinLiWPxGjrHUiALlbqQ==", - "dev": true, - "requires": { - "@types/chai": "^4.1.4", - "@types/lodash": "^4.14.116", - "@types/mocha": "^5.2.5", - "@types/nock": "^9.3.0", - "@types/node": "^10.9.4", - "@types/sinon": "^5.0.2", - "lodash": "^4.17.10", - "mock-stdin": "^0.3.1", - "stdout-stderr": "^0.1.9" - } + "lcov-parse": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", + "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", + "dev": true }, - "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", "dev": true }, - "fast-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", - "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", + "lint-staged": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-5.0.0.tgz", + "integrity": "sha512-nKwjLlYOd6Eqog3cg3aDulrRfLkR3GPasqTI7+3ZKucLATqay86wOaEM0gtYVmTS0/ihHSARnOWduAqNJZAbeQ==", "dev": true, "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", - "glob-parent": "^3.1.0", + "app-root-path": "^2.0.0", + "chalk": "^2.1.0", + "commander": "^2.11.0", + "cosmiconfig": "^3.1.0", + "dedent": "^0.7.0", + "execa": "^0.8.0", + "find-parent-dir": "^0.3.0", "is-glob": "^4.0.0", - "merge2": "^1.2.1", - "micromatch": "^3.1.10" + "jest-validate": "^21.1.0", + "listr": "^0.13.0", + "lodash": "^4.17.4", + "log-symbols": "^2.0.0", + "minimatch": "^3.0.0", + "npm-which": "^3.0.1", + "p-map": "^1.1.1", + "path-is-inside": "^1.0.2", + "pify": "^3.0.0", + "staged-git-files": "0.0.4", + "stringify-object": "^3.2.0" }, "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 - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "execa": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } + } + } + }, + "listr": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/listr/-/listr-0.13.0.tgz", + "integrity": "sha1-ILsLowuuZg7oTMBQPfS+PVYjiH0=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "cli-truncate": "^0.2.1", + "figures": "^1.7.0", + "indent-string": "^2.1.0", + "is-observable": "^0.2.0", + "is-promise": "^2.1.0", + "is-stream": "^1.1.0", + "listr-silent-renderer": "^1.1.1", + "listr-update-renderer": "^0.4.0", + "listr-verbose-renderer": "^0.4.0", + "log-symbols": "^1.0.2", + "log-update": "^1.0.2", + "ora": "^0.2.3", + "p-map": "^1.1.1", + "rxjs": "^5.4.2", + "stream-to-observable": "^0.2.0", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.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" } }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { - "kind-of": "^6.0.0" + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "kind-of": "^6.0.0" + "repeating": "^2.0.0" } }, - "is-descriptor": { + "log-symbols": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "chalk": "^1.0.0" } }, - "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.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "symbol-observable": "1.0.1" } }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "ansi-regex": "^2.0.0" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "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 }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } - } - }, - "fast-json-patch": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.0.7.tgz", - "integrity": "sha512-DQeoEyPYxdTtfmB3yDlxkLyKTdbJ6ABfFGcMynDqjvGhPYLto/pZyb/dG2Nyd/n9CArjEWN9ZST++AFmgzgbGw==", - "requires": { - "deep-equal": "^1.0.1" - }, - "dependencies": { - "deep-equal": { + "symbol-observable": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true } } }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", "dev": true }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "listr-update-renderer": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", + "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "chalk": "^1.1.3", + "cli-truncate": "^0.2.1", + "elegant-spinner": "^1.0.1", + "figures": "^1.7.0", + "indent-string": "^3.0.0", + "log-symbols": "^1.0.2", + "log-update": "^1.0.2", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "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" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://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 + } } }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "listr-verbose-renderer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", + "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "chalk": "^1.1.3", + "cli-cursor": "^1.0.2", + "date-fns": "^1.27.2", + "figures": "^1.7.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "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" + } + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://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 + } } }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "load-json-file": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.1.0.tgz", + "integrity": "sha512-+ggO8OpTviHQ/zoyFxLJglsu1CylXUt1vpGa+mIUeesCkTC0G+JO6rdTS1/WcGBZDC7Nejo1aZ9MxbqflpmO6Q==", "dev": true, - "optional": true + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } }, - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=", + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, - "optional": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, - "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", + "lockfile": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.4.tgz", + "integrity": "sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA==", + "requires": { + "signal-exit": "^3.0.2" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, + "lodash.template": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", "requires": { - "locate-path": "^2.0.0" + "lodash._reinterpolate": "~3.0.0", + "lodash.templatesettings": "^4.0.0" } }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "requires": { + "lodash._reinterpolate": "~3.0.0" + } + }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, + "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, "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "chalk": "^2.0.1" } }, - "follow-redirects": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.7.tgz", - "integrity": "sha512-NONJVIFiX7Z8k2WxfqBjtwqMifx7X42ORLFrOZ2LTKGj71G3C0kfdyTqGqr8fx5zSX6Foo/D95dgGWbPUiwnew==", + "log-update": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "dev": true, "requires": { - "debug": "^3.1.0" + "ansi-escapes": "^1.0.0", + "cli-cursor": "^1.0.2" }, "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "ansi-escapes": { + "version": "1.4.0", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, "requires": { - "ms": "2.0.0" + "restore-cursor": "^1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" } } } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "lolex": { + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz", + "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", "dev": true }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, - "optional": true, "requires": { - "for-in": "^1.0.1" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, - "forever-agent": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", - "integrity": "sha1-bQ4JxJIflKJ/Y9O0nF/v8epMUTA=", + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", "dev": true }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" + "object-visit": "^1.0.0" } }, - "formatio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", - "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", - "dev": true, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "requires": { - "samsam": "1.x" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "merge2": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { - "map-cache": "^0.2.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha1-a+Dem+mYzhavivwkSXue6bfM2a0=", + "mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", "dev": true }, - "fs-extra": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz", - "integrity": "sha1-jMP0fOB+97NZOhG5+yRffjTAQdY=", + "mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "mime-db": "~1.37.0" } }, - "fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "dev": true, - "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { + "is-extendable": { "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, - "optional": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "is-plain-object": "^2.0.4" } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", + "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + }, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, - "optional": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3656,5022 +3284,1756 @@ "path-is-absolute": "^1.0.0" } }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", "dev": true, - "optional": true, "requires": { - "minimatch": "^3.0.4" + "has-flag": "^2.0.0" } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" + } + } + }, + "mock-stdin": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/mock-stdin/-/mock-stdin-0.3.1.tgz", + "integrity": "sha1-xlfZZC2QeGQ1xkyl6Zu9TQm9fdM=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + }, + "nan": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", + "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "optional": true + }, + "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" + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "nise": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.6.tgz", + "integrity": "sha512-1GedetLKzmqmgwabuMSqPsT7oumdR77SBpDfNNJhADRIeA3LN/2RVqR4fFqwvzhAqcTef6PPCzQwITE/YQ8S8A==", + "dev": true, + "requires": { + "@sinonjs/formatio": "3.0.0", + "just-extend": "^3.0.0", + "lolex": "^2.3.2", + "path-to-regexp": "^1.7.0", + "text-encoding": "^0.6.4" + } + }, + "node-gyp-build": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.5.1.tgz", + "integrity": "sha512-AKJ4SyHiYvqwy5P9GaAnxi5IG3HSEPHV/1YDMlBA0vEEmi7qxeeSfKlCAau3XFvAPFR9EV6gvD9p2b0s8ghyww==", + "optional": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", + "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=", + "dev": true + }, + "npm-path": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz", + "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==", + "dev": true, + "requires": { + "which": "^1.2.10" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npm-which": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz", + "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", + "dev": true, + "requires": { + "commander": "^2.9.0", + "npm-path": "^2.0.2", + "which": "^1.2.10" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nyc": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.3.0.tgz", + "integrity": "sha512-oUu0WHt1k/JMIODvAYXX6C50Mupw2GO34P/Jdg2ty9xrLufBthHiKR2gf08aF+9S0abW1fl24R7iKRBXzibZmg==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.3.0", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^1.9.1", + "istanbul-lib-report": "^1.1.2", + "istanbul-lib-source-maps": "^1.2.2", + "istanbul-reports": "^1.1.3", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.0.2", + "micromatch": "^2.3.11", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.5.4", + "signal-exit": "^3.0.1", + "spawn-wrap": "=1.3.8", + "test-exclude": "^4.1.1", + "yargs": "^10.0.3", + "yargs-parser": "^8.0.0" + }, + "dependencies": { + "align-text": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, - "inherits": { - "version": "2.0.3", + "amdefine": { + "version": "1.0.1", "bundled": true, "dev": true }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", + "ansi-regex": { + "version": "2.1.1", "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "dev": true }, - "isarray": { - "version": "1.0.0", + "ansi-styles": { + "version": "2.2.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "minimatch": { - "version": "3.0.4", + "append-transform": { + "version": "0.4.0", "bundled": true, "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "default-require-extensions": "^1.0.0" } }, - "minimist": { - "version": "0.0.8", + "archy": { + "version": "1.0.0", "bundled": true, "dev": true }, - "minipass": { - "version": "2.2.4", + "arr-diff": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" + "arr-flatten": "^1.0.1" } }, - "minizlib": { + "arr-flatten": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } + "dev": true }, - "mkdirp": { - "version": "0.5.1", + "array-unique": { + "version": "0.2.1", "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } + "dev": true }, - "ms": { - "version": "2.0.0", + "arrify": { + "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "needle": { - "version": "2.2.0", + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", "bundled": true, "dev": true, - "optional": true, "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" } }, - "node-pre-gyp": { - "version": "0.10.0", + "babel-generator": { + "version": "6.26.0", "bundled": true, "dev": true, - "optional": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.6", + "trim-right": "^1.0.1" } }, - "nopt": { - "version": "4.0.1", + "babel-messages": { + "version": "6.23.0", "bundled": true, "dev": true, - "optional": true, "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "babel-runtime": "^6.22.0" } }, - "npm-bundled": { - "version": "1.0.3", + "babel-runtime": { + "version": "6.26.0", "bundled": true, "dev": true, - "optional": true + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } }, - "npm-packlist": { - "version": "1.1.10", + "babel-template": { + "version": "6.26.0", "bundled": true, "dev": true, - "optional": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, - "npmlog": { - "version": "4.1.2", + "babel-traverse": { + "version": "6.26.0", "bundled": true, "dev": true, - "optional": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } }, - "number-is-nan": { - "version": "1.0.1", + "babel-types": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", "bundled": true, "dev": true }, - "object-assign": { - "version": "4.1.1", + "balanced-match": { + "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "once": { - "version": "1.4.0", + "brace-expansion": { + "version": "1.1.8", "bundled": true, "dev": true, "requires": { - "wrappy": "1" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "os-homedir": { - "version": "1.0.2", + "braces": { + "version": "1.8.5", "bundled": true, "dev": true, - "optional": true + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } }, - "os-tmpdir": { - "version": "1.0.2", + "builtin-modules": { + "version": "1.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "osenv": { - "version": "0.1.5", + "caching-transform": { + "version": "1.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, - "path-is-absolute": { - "version": "1.0.1", + "camelcase": { + "version": "1.2.1", "bundled": true, "dev": true, "optional": true }, - "process-nextick-args": { - "version": "2.0.0", + "center-align": { + "version": "0.1.3", "bundled": true, "dev": true, - "optional": true + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "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" + } }, - "rc": { - "version": "1.2.7", + "cliui": { + "version": "2.1.0", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" }, "dependencies": { - "minimist": { - "version": "1.2.0", + "wordwrap": { + "version": "0.0.2", "bundled": true, "dev": true, "optional": true } } }, - "readable-stream": { - "version": "2.3.6", + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "bundled": true, + "dev": true + }, + "core-js": { + "version": "2.5.1", + "bundled": true, + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, - "rimraf": { - "version": "2.6.2", + "debug": { + "version": "2.6.9", "bundled": true, "dev": true, - "optional": true, "requires": { - "glob": "^7.0.5" + "ms": "2.0.0" } }, - "safe-buffer": { - "version": "5.1.1", + "debug-log": { + "version": "1.0.1", "bundled": true, "dev": true }, - "safer-buffer": { - "version": "2.1.2", + "decamelize": { + "version": "1.2.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "sax": { - "version": "1.2.4", + "default-require-extensions": { + "version": "1.0.0", "bundled": true, "dev": true, - "optional": true + "requires": { + "strip-bom": "^2.0.0" + } }, - "semver": { - "version": "5.5.0", + "detect-indent": { + "version": "4.0.0", "bundled": true, "dev": true, - "optional": true + "requires": { + "repeating": "^2.0.0" + } }, - "set-blocking": { - "version": "2.0.0", + "error-ex": { + "version": "1.3.1", "bundled": true, "dev": true, - "optional": true + "requires": { + "is-arrayish": "^0.2.1" + } }, - "signal-exit": { - "version": "3.0.2", + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "esutils": { + "version": "2.0.2", + "bundled": true, + "dev": true + }, + "execa": { + "version": "0.7.0", "bundled": true, "dev": true, - "optional": true + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } }, - "string-width": { - "version": "1.0.2", + "expand-brackets": { + "version": "0.1.5", "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "is-posix-bracket": "^0.1.0" } }, - "string_decoder": { - "version": "1.1.1", + "expand-range": { + "version": "1.8.2", "bundled": true, "dev": true, - "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "fill-range": "^2.1.0" } }, - "strip-ansi": { - "version": "3.0.1", + "extglob": { + "version": "0.3.2", "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "is-extglob": "^1.0.0" } }, - "strip-json-comments": { + "filename-regex": { "version": "2.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "tar": { - "version": "4.4.1", + "fill-range": { + "version": "2.2.3", "bundled": true, "dev": true, - "optional": true, "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, - "util-deprecate": { - "version": "1.0.2", + "find-cache-dir": { + "version": "0.1.1", "bundled": true, "dev": true, - "optional": true + "requires": { + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" + } }, - "wide-align": { - "version": "1.1.2", + "find-up": { + "version": "2.1.0", "bundled": true, "dev": true, - "optional": true, "requires": { - "string-width": "^1.0.2" + "locate-path": "^2.0.0" } }, - "wrappy": { + "for-in": { "version": "1.0.2", "bundled": true, "dev": true }, - "yallist": { - "version": "3.0.2", + "for-own": { + "version": "0.1.5", "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-own-enumerable-property-symbols": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz", - "integrity": "sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug==", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "dev": true - } - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", - "dev": 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" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "optional": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha1-ta1IuKqAs1uBT8EoHsyFHx0rW1A=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - }, - "dependencies": { - "pify": { + }, + "get-caller-file": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "get-stream": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "bundled": true, "dev": true - } - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", - "dev": true, - "requires": { - "function-bind": "^1.0.2" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": 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" + } + }, + "glob-base": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "bundled": true, "dev": true - } - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "source-map": { + "version": "0.4.4", + "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "amdefine": ">=0.0.4" } } } }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "has-ansi": { + "version": "2.0.0", + "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "ansi-regex": "^2.0.0" } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hawk": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz", - "integrity": "sha1-h81JH5tG5OKurKM1QWdmiF0tHtk=", - "dev": true, - "optional": true, - "requires": { - "boom": "0.4.x", - "cryptiles": "0.2.x", - "hoek": "0.9.x", - "sntp": "0.2.x" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "hoek": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz", - "integrity": "sha1-PTIkYrrfB3Fup+uFuviAec3c5QU=", - "dev": true - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha1-bWDjSzq7yDEwYsO3mO+NkBoHrzw=", - "dev": true - }, - "http-call": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/http-call/-/http-call-5.2.2.tgz", - "integrity": "sha1-2Os37vcB5WbUQ3PvGbIkROu3wC4=", - "dev": true, - "requires": { - "content-type": "^1.0.4", - "debug": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "is-stream": "^1.1.0", - "tunnel-agent": "^0.6.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + }, + "has-flag": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, "dev": true, "requires": { - "ms": "2.0.0" + "once": "^1.3.0", + "wrappy": "1" } }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invariant": { + "version": "2.2.2", + "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.0.1" + "loose-envify": "^1.0.0" } - } - } - }, - "http-signature": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", - "integrity": "sha1-T72sEyVZqoMjEh5UB3nAoBKyfmY=", - "dev": true, - "optional": true, - "requires": { - "asn1": "0.1.11", - "assert-plus": "^0.1.5", - "ctype": "0.5.3" - } - }, - "husky": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", - "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", - "dev": true, - "requires": { - "is-ci": "^1.0.10", - "normalize-path": "^1.0.0", - "strip-indent": "^2.0.0" - }, - "dependencies": { - "normalize-path": { + }, + "invert-kv": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", - "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=", + "bundled": true, "dev": true - } - } - }, - "hyperlinker": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz", - "integrity": "sha1-I9yeOKIGsgjuSbwtbI70cCffDA4=", - "dev": true - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs=", - "dev": true - }, - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha1-YSKJv7PCIOGGpYEYYY1b6MG6sCE=", - "dev": true - }, - "import-modules": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-1.1.0.tgz", - "integrity": "sha1-dI23nFzEK7lwHvq0JPiU5yYA6dw=", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", - "integrity": "sha1-Ua3Nd29mE2ncHolIWcJWCiJKvdg=", - "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" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha1-9zIHu4EgfXX9bIPxJa8m7qN4yjA=" }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha1-kAlISfCTfy7twkJdDSip5fDLrZ4=" + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "^2.0.0" - } + "is-buffer": { + "version": "1.1.5", + "bundled": true, + "dev": true }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha1-WGbbKal4Jtvkvzr9JAcOrZ6kOic=", + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" + "builtin-modules": "^1.0.0" } }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "is-dotfile": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "bundled": true, + "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "is-primitive": "^2.0.0" } }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", + "is-extendable": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "bundled": true, + "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "number-is-nan": "^1.0.0" } }, "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=" - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "version": "1.0.0", + "bundled": true, + "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "number-is-nan": "^1.0.0" } }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "is-glob": { + "version": "2.0.1", + "bundled": true, + "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "is-extglob": "^1.0.0" } }, - "rxjs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.2.tgz", - "integrity": "sha512-hV7criqbR0pe7EeL3O66UYVg92IR0XsA97+9y+BWTePK9SKmEI5Qd3Zj6uPnGkNzXsBywBQWTvujPl+1Kn9Zjw==", + "is-number": { + "version": "2.1.0", + "bundled": true, + "dev": true, "requires": { - "tslib": "^1.9.0" + "kind-of": "^3.0.2" } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "is-posix-bracket": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "isarray": "1.0.0" } - } - } - }, - "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "optional": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-ci": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", - "integrity": "sha1-JH5BYueGDOu9rzC3dNawrH3P56U=", - "dev": true, - "requires": { - "ci-info": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true, - "optional": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "optional": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", - "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", - "dev": true, - "requires": { - "symbol-observable": "^0.2.2" - } - }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", - "dev": true - } - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true, - "optional": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true, - "optional": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", - "dev": true - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "optional": true, - "requires": { - "isarray": "1.0.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", - "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", - "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", - "semver": "^5.3.0" - } - }, - "jest-get-type": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz", - "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==", - "dev": true - }, - "jest-validate": { - "version": "21.2.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.2.1.tgz", - "integrity": "sha512-k4HLI1rZQjlU+EC682RlQ6oZvLrE5SCh3brseQc24vbZTxzT/k/3urar5QMCVgjadmSO7lECeGdc6YxnM3yEGg==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-get-type": "^21.2.0", - "leven": "^2.1.0", - "pretty-format": "^21.2.1" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha1-LnhEFka9RoLpY/IrbpKCPDCcYtw=", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-merge-patch": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-merge-patch/-/json-merge-patch-0.2.3.tgz", - "integrity": "sha1-+ixrWvh9p3uuKWalidUuI+2B/kA=", - "requires": { - "deep-equal": "^1.0.0" - }, - "dependencies": { - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - } - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "just-extend": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", - "integrity": "sha1-7G55QQ/5FORyZSq/oOYDwD1g6QU=", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", - "dev": true - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "lint-staged": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-5.0.0.tgz", - "integrity": "sha512-nKwjLlYOd6Eqog3cg3aDulrRfLkR3GPasqTI7+3ZKucLATqay86wOaEM0gtYVmTS0/ihHSARnOWduAqNJZAbeQ==", - "dev": true, - "requires": { - "app-root-path": "^2.0.0", - "chalk": "^2.1.0", - "commander": "^2.11.0", - "cosmiconfig": "^3.1.0", - "dedent": "^0.7.0", - "execa": "^0.8.0", - "find-parent-dir": "^0.3.0", - "is-glob": "^4.0.0", - "jest-validate": "^21.1.0", - "listr": "^0.13.0", - "lodash": "^4.17.4", - "log-symbols": "^2.0.0", - "minimatch": "^3.0.0", - "npm-which": "^3.0.1", - "p-map": "^1.1.1", - "path-is-inside": "^1.0.2", - "pify": "^3.0.0", - "staged-git-files": "0.0.4", - "stringify-object": "^3.2.0" - }, - "dependencies": { - "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.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "listr": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/listr/-/listr-0.13.0.tgz", - "integrity": "sha1-ILsLowuuZg7oTMBQPfS+PVYjiH0=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "figures": "^1.7.0", - "indent-string": "^2.1.0", - "is-observable": "^0.2.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.4.0", - "listr-verbose-renderer": "^0.4.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "ora": "^0.2.3", - "p-map": "^1.1.1", - "rxjs": "^5.4.2", - "stream-to-observable": "^0.2.0", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "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" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.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 - } - } - }, - "listr-silent-renderer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", - "dev": true - }, - "listr-update-renderer": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", - "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "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" - } - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.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 - } - } - }, - "listr-verbose-renderer": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", - "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "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" - } - }, - "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 - } - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lockfile": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.4.tgz", - "integrity": "sha1-B/gZ0lrkj4flOOZXi2lkpJgaVgk=", - "requires": { - "signal-exit": "^3.0.2" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, - "lodash.cond": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", - "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", - "dev": true - }, - "lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", - "dev": true - }, - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "requires": { - "lodash._reinterpolate": "~3.0.0", - "lodash.templatesettings": "^4.0.0" - } - }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", - "requires": { - "lodash._reinterpolate": "~3.0.0" - } - }, - "lodash.upperfirst": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", - "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", - "dev": true - }, - "lodash.zip": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", - "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", - "dev": true - }, - "log-driver": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.6.tgz", - "integrity": "sha1-rQ5mD1a7xZrrJ4TZKFTN/axVgHs=", - "dev": true, - "requires": { - "codecov.io": "0.0.1" - } - }, - "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, - "requires": { - "chalk": "^2.0.1" - } - }, - "log-update": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", - "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "dev": true, - "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" - } - }, - "lolex": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", - "integrity": "sha1-hflFBCUQO/nnpgZo6iXcQydMqAc=", - "dev": true - }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "dev": true, - "requires": { - "js-tokens": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha1-Yi4y6CSItJJ5EUpPns9F581rulU=", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true, - "optional": true - }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "merge2": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", - "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==", - "dev": true - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "mime": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", - "integrity": "sha1-WCA+7Ybjpe8XrtK32evUfwpg3RA=", - "dev": true, - "optional": true - }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", - "dev": true - }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", - "dev": true, - "requires": { - "mime-db": "~1.30.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "git://github.com/liskhq/minimist.git#2f27878dc10167bea5d0e56705b03158f7e5d876", - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "mocha": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", - "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", - "dev": true, - "requires": { - "browser-stdout": "1.3.0", - "commander": "2.11.0", - "debug": "3.1.0", - "diff": "3.3.1", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.3", - "he": "1.1.1", - "mkdirp": "0.5.1", - "supports-color": "4.4.0" - }, - "dependencies": { - "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } - } - }, - "mock-stdin": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/mock-stdin/-/mock-stdin-0.3.1.tgz", - "integrity": "sha1-xlfZZC2QeGQ1xkyl6Zu9TQm9fdM=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", - "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-odd": "^2.0.0", - "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.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", - "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 - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", - "dev": true - }, - "nise": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.2.5.tgz", - "integrity": "sha1-oUM3G2UBS2gH06bmtFVgY/OlM2M=", - "dev": true, - "requires": { - "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", - "lolex": "^2.3.2", - "path-to-regexp": "^1.7.0", - "text-encoding": "^0.6.4" - } - }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", - "dev": true - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-path": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz", - "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==", - "dev": true, - "requires": { - "which": "^1.2.10" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npm-which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz", - "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", - "dev": true, - "requires": { - "commander": "^2.9.0", - "npm-path": "^2.0.2", - "which": "^1.2.10" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "nyc": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.3.0.tgz", - "integrity": "sha512-oUu0WHt1k/JMIODvAYXX6C50Mupw2GO34P/Jdg2ty9xrLufBthHiKR2gf08aF+9S0abW1fl24R7iKRBXzibZmg==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.3.0", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.1.1", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.9.1", - "istanbul-lib-report": "^1.1.2", - "istanbul-lib-source-maps": "^1.2.2", - "istanbul-reports": "^1.1.3", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.0.2", - "micromatch": "^2.3.11", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.5.4", - "signal-exit": "^3.0.1", - "spawn-wrap": "=1.3.8", - "test-exclude": "^4.1.1", - "yargs": "^10.0.3", - "yargs-parser": "^8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arr-diff": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-generator": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.6", - "trim-right": "^1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "bundled": true, - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "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" - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.5.0", - "bundled": true, - "dev": true - }, - "core-js": { - "version": "2.5.1", - "bundled": true, - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^2.0.0" - } - }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "expand-range": { - "version": "1.8.2", - "bundled": true, - "dev": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "bundled": true, - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "fill-range": { - "version": "2.2.3", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "for-own": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": 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" - } - }, - "glob-base": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "hosted-git-info": { - "version": "2.5.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invariant": { - "version": "2.2.2", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.5", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-dotfile": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "istanbul-lib-coverage": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.9.1", - "bundled": true, - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.1.1", - "semver": "^5.3.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.1.1", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.2", - "bundled": true, - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.1", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "istanbul-reports": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "js-tokens": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } - } - }, - "lodash": { - "version": "4.17.4", - "bundled": true, - "dev": true - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "loose-envify": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "js-tokens": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "merge-source-map": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "micromatch": { - "version": "2.3.11", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "mimic-fn": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object.omit": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "parse-glob": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true }, - "path-parse": { - "version": "1.0.5", + "istanbul-lib-coverage": { + "version": "1.1.1", "bundled": true, "dev": true }, - "path-type": { + "istanbul-lib-hook": { "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "^2.0.0" + "append-transform": "^0.4.0" } }, - "pkg-dir": { - "version": "1.0.0", + "istanbul-lib-instrument": { + "version": "1.9.1", "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.1.1", + "semver": "^5.3.0" } }, - "preserve": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "randomatic": { - "version": "1.1.7", + "istanbul-lib-report": { + "version": "1.1.2", "bundled": true, "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", + "supports-color": { + "version": "3.2.3", "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "has-flag": "^1.0.0" } } } }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", + "istanbul-lib-source-maps": { + "version": "1.2.2", "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" }, "dependencies": { - "find-up": { - "version": "1.1.2", + "debug": { + "version": "3.1.0", "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "ms": "2.0.0" } } } }, - "regenerator-runtime": { - "version": "0.11.0", - "bundled": true, - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "semver": { - "version": "5.4.1", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "shebang-command": { - "version": "1.2.0", + "istanbul-reports": { + "version": "1.1.3", "bundled": true, "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "handlebars": "^4.0.3" } }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { + "js-tokens": { "version": "3.0.2", "bundled": true, "dev": true }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "source-map": { - "version": "0.5.7", + "jsesc": { + "version": "1.3.0", "bundled": true, "dev": true }, - "spawn-wrap": { - "version": "1.3.8", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.3.3", - "signal-exit": "^3.0.2", - "which": "^1.2.4" - } - }, - "spdx-correct": { - "version": "1.0.2", + "kind-of": { + "version": "3.2.2", "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "^1.0.2" + "is-buffer": "^1.1.5" } }, - "spdx-expression-parse": { + "lazy-cache": { "version": "1.0.4", "bundled": true, - "dev": true - }, - "spdx-license-ids": { - "version": "1.2.2", - "bundled": true, - "dev": true + "dev": true, + "optional": true }, - "string-width": { - "version": "2.1.1", + "lcid": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "invert-kv": "^1.0.0" } }, - "strip-ansi": { - "version": "3.0.1", + "load-json-file": { + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, - "strip-bom": { + "locate-path": { "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "is-utf8": "^0.2.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + } } }, - "strip-eof": { - "version": "1.0.0", + "lodash": { + "version": "4.17.4", "bundled": true, "dev": true }, - "supports-color": { - "version": "2.0.0", + "longest": { + "version": "1.0.1", "bundled": true, "dev": true }, - "test-exclude": { + "loose-envify": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "js-tokens": "^3.0.0" + } + }, + "lru-cache": { "version": "4.1.1", "bundled": true, "dev": true, "requires": { - "arrify": "^1.0.1", - "micromatch": "^2.3.11", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, - "to-fast-properties": { - "version": "1.0.3", + "md5-hex": { + "version": "1.3.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "md5-o-matic": "^0.1.1" + } }, - "trim-right": { - "version": "1.0.1", + "md5-o-matic": { + "version": "0.1.1", "bundled": true, "dev": true }, - "uglify-js": { - "version": "2.8.29", + "mem": { + "version": "1.1.0", "bundled": true, "dev": true, - "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } + "mimic-fn": "^1.0.0" } }, - "uglify-to-browserify": { - "version": "1.0.2", + "merge-source-map": { + "version": "1.0.4", "bundled": true, "dev": true, - "optional": true + "requires": { + "source-map": "^0.5.6" + } }, - "validate-npm-package-license": { - "version": "3.0.1", + "micromatch": { + "version": "2.3.11", "bundled": true, "dev": true, "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, - "which": { - "version": "1.3.0", + "mimic-fn": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", "bundled": true, "dev": true, "requires": { - "isexe": "^2.0.0" + "brace-expansion": "^1.1.7" } }, - "which-module": { - "version": "2.0.0", + "minimist": { + "version": "0.0.8", "bundled": true, "dev": true }, - "window-size": { - "version": "0.1.0", + "mkdirp": { + "version": "0.5.1", "bundled": true, "dev": true, - "optional": true + "requires": { + "minimist": "0.0.8" + } }, - "wordwrap": { - "version": "0.0.3", + "ms": { + "version": "2.0.0", "bundled": true, "dev": true }, - "wrap-ansi": { - "version": "2.1.0", + "normalize-package-data": { + "version": "2.4.0", "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "wrappy": { - "version": "1.0.2", + "normalize-path": { + "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } }, - "write-file-atomic": { - "version": "1.3.4", + "npm-run-path": { + "version": "2.0.2", "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "path-key": "^2.0.0" } }, - "y18n": { - "version": "3.2.1", + "number-is-nan": { + "version": "1.0.1", "bundled": true, "dev": true }, - "yallist": { - "version": "2.1.2", + "object-assign": { + "version": "4.1.1", "bundled": true, "dev": true }, - "yargs": { - "version": "10.0.3", + "object.omit": { + "version": "2.0.1", "bundled": true, "dev": true, "requires": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^8.0.0" - }, - "dependencies": { - "cliui": { - "version": "3.2.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - } + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" } }, - "yargs-parser": { - "version": "8.0.0", + "optimist": { + "version": "0.6.1", "bundled": true, "dev": true, "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } - } - } - }, - "oauth-sign": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.4.0.tgz", - "integrity": "sha1-8ilW8x6nFRqCHl8vsywRPK2Ln2k=", - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } - } - } - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "optional": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, "dev": true - } - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "ora": { - "version": "0.2.3", - "resolved": "http://registry.npmjs.org/ora/-/ora-0.2.3.tgz", - "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "cli-cursor": "^1.0.2", - "cli-spinners": "^0.1.2", - "object-assign": "^4.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + }, + "p-limit": { + "version": "1.1.0", + "bundled": true, "dev": true }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "p-locate": { + "version": "2.0.0", + "bundled": true, "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" + "p-limit": "^1.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=", + "parse-glob": { + "version": "3.0.4", + "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^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 - } - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "output-file-sync": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", - "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.4", - "mkdirp": "^0.5.1", - "object-assign": "^4.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha1-DpK2vty1nwIsE9DxlJ3ILRWQnxw=", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "optional": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "password-prompt": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/password-prompt/-/password-prompt-1.0.7.tgz", - "integrity": "sha1-jid0jTQAvJyRQNWt5wXft6632Ro=", - "dev": true, - "requires": { - "ansi-escapes": "^3.1.0", - "cross-spawn": "^6.0.5" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha1-9zIHu4EgfXX9bIPxJa8m7qN4yjA=", + "parse-json": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, "dev": true }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "path-type": { + "version": "1.1.0", + "bundled": true, "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } - } - } - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "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 - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", - "dev": true - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + }, + "pify": { + "version": "2.3.0", + "bundled": true, "dev": true - } - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", - "dev": true, - "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + }, + "pinkie": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "pinkie": "^2.0.0" } }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "pkg-dir": { + "version": "1.0.0", + "bundled": true, "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "find-up": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + } } - } - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true, - "optional": true - }, - "prettier": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.9.2.tgz", - "integrity": "sha512-piXx9N2WT8hWb7PBbX1glAuJVIkEyUV9F5fMXFINpZ0x3otVOFKKeGmeuiclFJlP/UrgTckyV606VjH2rNK4bw==", - "dev": true - }, - "pretty-format": { - "version": "21.2.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz", - "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0", - "ansi-styles": "^3.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + }, + "preserve": { + "version": "0.2.0", + "bundled": true, "dev": true - } - } - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "pump": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", - "integrity": "sha1-Xf6DEcM7v2/BgmH580cCxHwIqVQ=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qqjs": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/qqjs/-/qqjs-0.3.10.tgz", - "integrity": "sha1-rjr3y0xCQkLbSqm5LELSn6kQFWI=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "debug": "^3.1.0", - "execa": "^0.10.0", - "fs-extra": "^6.0.1", - "get-stream": "^3.0.0", - "glob": "^7.1.2", - "globby": "^8.0.1", - "http-call": "^5.1.2", - "load-json-file": "^5.0.0", - "pkg-dir": "^2.0.0", - "tar-fs": "^1.16.2", - "tmp": "^0.0.33", - "write-json-file": "^2.3.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "bundled": true, "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "read-pkg": { + "version": "1.1.0", + "bundled": true, "dev": true, "requires": { - "ms": "2.0.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha1-/0Vqj1P5D47MxxqW0Rvfx/CCy1A=", + "read-pkg-up": { + "version": "1.0.1", + "bundled": true, "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + } } }, - "fs-extra": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", - "integrity": "sha1-irwSj3lG4xATXdyTuYvdtBDno0s=", + "regenerator-runtime": { + "version": "0.11.0", + "bundled": true, + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "is-equal-shallow": "^0.1.3" } }, - "load-json-file": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.0.0.tgz", - "integrity": "sha512-wWRJeA/YQ2s53fBSrPrr6gnSKmNcnk4TV4c40ITRGQ4uxpgPddBL9xNh3WxPjJHewwzo2rFkEJWt87OR/35MEw==", + "remove-trailing-separator": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "bundled": true, + "dev": true + }, + "repeating": { + "version": "2.0.1", + "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "is-finite": "^1.0.0" } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve-from": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "right-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "glob": "^7.0.5" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "semver": { + "version": "5.4.1", + "bundled": true, "dev": true }, - "pkg-dir": { + "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, "dev": true, "requires": { - "find-up": "^2.1.0" + "shebang-regex": "^1.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "shebang-regex": { + "version": "1.0.0", + "bundled": true, "dev": true - } - } - }, - "qs": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-1.2.2.tgz", - "integrity": "sha1-GbV/8k3CqZzh+L32r82ln472H4g=", - "dev": true - }, - "ramda": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz", - "integrity": "sha1-w7d1UZfzW43DUCIoJixMkd22uFc=", - "dev": true - }, - "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha1-01SQAw6091eN4pLObfsEqRoSiSM=", - "dev": true, - "optional": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true + }, + "spawn-wrap": { + "version": "1.3.8", + "bundled": true, "dev": true, - "optional": true + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.3.3", + "signal-exit": "^3.0.2", + "which": "^1.2.4" + } }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "spdx-correct": { + "version": "1.0.2", + "bundled": true, "dev": true, - "optional": true - } - } - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "spdx-license-ids": "^1.0.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "ansi-regex": "^2.0.0" } }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "strip-bom": { + "version": "2.0.0", + "bundled": true, "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "is-utf8": "^0.2.0" } - } - } - }, - "readable-stream": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", - "integrity": "sha1-yUbD9H+n2Oq8C2FQ9KEvaaRXQHE=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.0.3", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "redeyed": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", - "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", - "dev": true, - "requires": { - "esprima": "~4.0.0" - } - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" - }, - "regenerator-transform": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", - "dev": true, - "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" - } - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "optional": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha1-ygtl2gLtYpNYh4COb1EDgQNOM1Y=", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "hawk": "~6.0.2", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "stringstream": "~0.0.5", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - }, - "dependencies": { - "assert-plus": { + }, + "strip-eof": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "dev": true }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "supports-color": { + "version": "2.0.0", + "bundled": true, "dev": true }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "test-exclude": { + "version": "4.1.1", + "bundled": true, "dev": true, "requires": { - "hoek": "4.x.x" + "arrify": "^1.0.1", + "micromatch": "^2.3.11", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "to-fast-properties": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "bundled": true, "dev": true }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "uglify-js": { + "version": "2.8.29", + "bundled": true, "dev": true, + "optional": true, "requires": { - "boom": "5.x.x" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha1-XdnabuOl8wIHdDYpDLcX0/SlTgI=", + "yargs": { + "version": "3.10.0", + "bundled": true, "dev": true, + "optional": true, "requires": { - "hoek": "4.x.x" + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" } } } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true + "uglify-to-browserify": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha1-r02RTrBl+bXOTZ0RwcshJu7MMDg=", + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, "dev": true, "requires": { - "boom": "4.x.x", - "cryptiles": "3.x.x", - "hoek": "4.x.x", - "sntp": "2.x.x" + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" } }, - "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha1-ctnQdU9/4lyi0BrY+PmpRJqJUm0=", - "dev": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "which": { + "version": "1.3.0", + "bundled": true, "dev": true, "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "isexe": "^2.0.0" } }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "which-module": { + "version": "2.0.0", + "bundled": true, "dev": true }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha1-NJzfbu+J7EXBLX1es/wMhwNDptg=", + "window-size": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true, "dev": true }, - "sntp": { + "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha1-LGzsFP7cIiJznK+bXD2F0cxaLMg=", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "bundled": true, "dev": true, "requires": { - "hoek": "4.x.x" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "10.0.3", + "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.0.1" + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.0.0" + }, + "dependencies": { + "cliui": { + "version": "3.2.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + } } }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha1-EsUou51Y0LkmXZovbw/ovhf/HxQ=", - "dev": true - } - } - }, - "require-from-string": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.1.tgz", - "integrity": "sha1-xUUjPp19pmFunVmt+zn8n1iGdv8=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha1-HwmsznlsmnYlefMbLBzEw83fnzY=", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "dev": true, - "requires": { - "through": "~2.3.4" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "^2.1.0" - } - }, - "rx-lite": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "requires": { - "rx-lite": "*" - } - }, - "rxjs": { - "version": "5.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", - "integrity": "sha1-4x+5bW/S/x/YS86orpwC0AcXnAI=", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - }, - "dependencies": { - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" - }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, - "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha1-ff3YgUvbfKvHvg+x1zTPtmyUBHc=" - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true, - "optional": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "yargs-parser": { + "version": "8.0.0", + "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + } } } } }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "sinon": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.1.2.tgz", - "integrity": "sha512-5uLBZPdCWl59Lpbf45ygKj7Z0LVol+ftBe7RDIXOQV/sF58pcFmbK8raA7bt6eljNuGnvBP+/ZxlicVn0emDjA==", - "dev": true, - "requires": { - "diff": "^3.1.0", - "formatio": "1.2.0", - "lodash.get": "^4.4.2", - "lolex": "^2.2.0", - "nise": "^1.2.0", - "supports-color": "^4.4.0", - "type-detect": "^4.0.0" - } - }, - "sinon-chai": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-2.14.0.tgz", - "integrity": "sha512-9stIF1utB0ywNHNT7RgiXbdmen8QDCRsrTjw+G9TgKt1Yexjiv8TOWZ6WHsTPz57Yky3DIswZvEqX8fpuHNDtQ==", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "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 - } - } + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", + "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -8683,756 +5045,753 @@ "is-descriptor": "^0.1.0" } }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-buffer": "^1.1.5" } } } }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "ora": { + "version": "0.2.3", + "resolved": "http://registry.npmjs.org/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "cli-cursor": "^1.0.2", + "cli-spinners": "^0.1.2", + "object-assign": "^4.0.1" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "is-descriptor": "^1.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" } }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "kind-of": "^6.0.0" + "restore-cursor": "^1.0.1" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "onetime": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "kind-of": "^6.0.0" + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "ansi-regex": "^2.0.0" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "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 } } }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "kind-of": "^3.2.0" + "p-try": "^1.0.0" } }, - "sntp": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz", - "integrity": "sha1-+4hfGLDzqtGJ+CSGJTa87ux1CQA=", + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, - "optional": true, "requires": { - "hoek": "0.9.x" + "p-limit": "^1.1.0" } }, - "sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "is-plain-obj": "^1.0.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "password-prompt": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/password-prompt/-/password-prompt-1.0.7.tgz", + "integrity": "sha1-jid0jTQAvJyRQNWt5wXft6632Ro=", "dev": true, "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "ansi-escapes": "^3.1.0", + "cross-spawn": "^6.0.5" + } + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "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 + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "spdx-license-ids": "^1.0.2" + "find-up": "^2.1.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "prettier": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.9.2.tgz", + "integrity": "sha512-piXx9N2WT8hWb7PBbX1glAuJVIkEyUV9F5fMXFINpZ0x3otVOFKKeGmeuiclFJlP/UrgTckyV606VjH2rNK4bw==", "dev": true }, - "split": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/split/-/split-0.2.10.tgz", - "integrity": "sha1-Zwl8YB1pfOE2j0GPBs0gHPBSGlc=", + "pretty-format": { + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz", + "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", "dev": true, "requires": { - "through": "2" + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" } }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", "dev": true, "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "tweetnacl": "~0.14.0" - }, - "dependencies": { - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "staged-git-files": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-0.0.4.tgz", - "integrity": "sha1-15fhtVHKemOd7AI33G60u5vhfTU=", - "dev": true + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "qqjs": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/qqjs/-/qqjs-0.3.10.tgz", + "integrity": "sha1-rjr3y0xCQkLbSqm5LELSn6kQFWI=", "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "chalk": "^2.4.1", + "debug": "^3.1.0", + "execa": "^0.10.0", + "fs-extra": "^6.0.1", + "get-stream": "^3.0.0", + "glob": "^7.1.2", + "globby": "^8.0.1", + "http-call": "^5.1.2", + "load-json-file": "^5.0.0", + "pkg-dir": "^2.0.0", + "tar-fs": "^1.16.2", + "tmp": "^0.0.33", + "write-json-file": "^2.3.0" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } } } }, - "stdout-stderr": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/stdout-stderr/-/stdout-stderr-0.1.9.tgz", - "integrity": "sha1-m0juBO/5Ve4Hd24nEl1VJNnQL1c=", - "dev": true, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "requires": { - "debug": "^3.1.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "safe-buffer": "^5.1.0" } }, - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "duplexer": "~0.1.1" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "stream-to-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.2.0.tgz", - "integrity": "sha1-WdbqOT2HwsDdrBCqDVYbxrpvDhA=", + "redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", "dev": true, "requires": { - "any-observable": "^0.2.0" + "esprima": "~4.0.0" } }, - "string-width": { + "regex-not": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "dependencies": { - "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" - } - } + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "is-finite": "^1.0.0" } }, - "stringify-object": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.2.tgz", - "integrity": "sha512-O696NF21oLiDy8PhpWu8AEqoZHw++QW6mUv0UvKZe8gWSdSvMXkiLufK7OmnP27Dro4GU5kb9U7JIO0mBuCRQg==", + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, "requires": { - "get-own-enumerable-property-symbols": "^2.0.1", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, "requires": { - "ansi-regex": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - } + "path-parse": "^1.0.5" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "requires": { + "is-promise": "^2.1.0" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, + "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==", "requires": { - "is-utf8": "^0.2.0" + "tslib": "^1.9.0" } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "rxjs-compat": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.3.3.tgz", + "integrity": "sha512-caGN7ixiabHpOofginKEquuHk7GgaCrC7UpUQ9ZqGp80tMc68msadOeP/2AKy2R4YJsT1+TX5GZCtxO82qWkyA==", "dev": true }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "safe-regex": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { - "has-flag": "^2.0.0" + "ret": "~0.1.10" } }, - "supports-hyperlinks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", - "integrity": "sha1-cdrt82zBBgrFEAw1G7PaSMKcDvc=", - "dev": true, - "requires": { - "has-flag": "^2.0.0", - "supports-color": "^5.0.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - } - } - } - } + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "symbol-observable": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", - "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", "dev": true }, - "table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha1-ALXitgLxeUuayvnKkIp2OGp4E7w=", + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==" + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { - "ajv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", - "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", - "dev": true, - "requires": { - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "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 - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-extendable": "^0.1.0" } } } }, - "tape": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tape/-/tape-2.3.0.tgz", - "integrity": "sha1-Df7scJIn+8yRcKvn8EaWKycUMds=", - "dev": true, + "sha.js": { + "version": "2.4.11", + "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { - "deep-equal": "~0.1.0", - "defined": "~0.0.0", - "inherits": "~2.0.1", - "jsonify": "~0.0.0", - "resumer": "~0.0.0", - "split": "~0.2.10", - "stream-combiner": "~0.0.2", - "through": "~2.3.4" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "tar-fs": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", - "integrity": "sha1-lmpiiEHaLEAQQGqCFny9Xgxy1Qk=", + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "chownr": "^1.0.1", - "mkdirp": "^0.5.1", - "pump": "^1.0.0", - "tar-stream": "^1.1.2" + "shebang-regex": "^1.0.0" } }, - "tar-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", - "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "sinon": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.1.2.tgz", + "integrity": "sha512-5uLBZPdCWl59Lpbf45ygKj7Z0LVol+ftBe7RDIXOQV/sF58pcFmbK8raA7bt6eljNuGnvBP+/ZxlicVn0emDjA==", "dev": true, "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.1.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.0", - "xtend": "^4.0.0" + "diff": "^3.1.0", + "formatio": "1.2.0", + "lodash.get": "^4.4.2", + "lolex": "^2.2.0", + "nise": "^1.2.0", + "supports-color": "^4.4.0", + "type-detect": "^4.0.0" }, "dependencies": { - "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "has-flag": "^2.0.0" } } } }, - "test-exclude": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", - "integrity": "sha1-36Ii8DSAvKaSB8pyizfXS0X3JPo=", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.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 - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true - } + "sinon-chai": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-2.14.0.tgz", + "integrity": "sha512-9stIF1utB0ywNHNT7RgiXbdmen8QDCRsrTjw+G9TgKt1Yexjiv8TOWZ6WHsTPz57Yky3DIswZvEqX8fpuHNDtQ==", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "http://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "is-descriptor": "^0.1.0" } }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9441,7 +5800,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9450,84 +5809,340 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "is-buffer": "^1.1.5" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + } + } + }, + "sodium-native": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-2.2.1.tgz", + "integrity": "sha512-3CfftYV2ATXQFMIkLOvcNUk/Ma+lran0855j5Z/HEjUkSTzjLZi16CK362udOoNVrwn/TwGV8bKEt5OylsFrQA==", + "optional": true, + "requires": { + "ini": "^1.3.5", + "nan": "^2.4.0", + "node-gyp-build": "^3.0.0" + } + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", + "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", + "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", + "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "dependencies": { + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + } + } + }, + "staged-git-files": { + "version": "0.0.4", + "resolved": "http://registry.npmjs.org/staged-git-files/-/staged-git-files-0.0.4.tgz", + "integrity": "sha1-15fhtVHKemOd7AI33G60u5vhfTU=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stdout-stderr": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/stdout-stderr/-/stdout-stderr-0.1.9.tgz", + "integrity": "sha1-m0juBO/5Ve4Hd24nEl1VJNnQL1c=", + "dev": true, + "requires": { + "debug": "^3.1.0", + "strip-ansi": "^4.0.0" + } + }, + "stream-to-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.2.0.tgz", + "integrity": "sha1-WdbqOT2HwsDdrBCqDVYbxrpvDhA=", + "dev": true, + "requires": { + "any-observable": "^0.2.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dev": true, + "requires": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-hyperlinks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", + "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", + "dev": true, + "requires": { + "has-flag": "^2.0.0", + "supports-color": "^5.0.0" + }, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } } } }, + "symbol-observable": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", + "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "dev": true + }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "dev": true, + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, "text-encoding": { "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "resolved": "http://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", "dev": true }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "tmp": { @@ -9541,13 +6156,7 @@ "to-buffer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha1-STvUj2LXxD/N7TE6A9ytsuEhOoA=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", "dev": true }, "to-object-path": { @@ -9557,6 +6166,17 @@ "dev": true, "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "to-regex": { @@ -9579,69 +6199,147 @@ "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - } } }, "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { + "psl": "^1.1.24", "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } } }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "treeify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", + "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", "dev": true }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "tsconfig-paths": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.6.0.tgz", + "integrity": "sha512-mrqQIP2F4e03aMTCiPdedCIT300//+q0ET53o5WqqtQjmEICxP9yfz/sHTpPqXpssuJEzODsEzJaLRaf5J2X1g==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY=" + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "tslint": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", + "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.27.2" + } + }, + "tslint-config-prettier": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.15.0.tgz", + "integrity": "sha512-06CgrHJxJmNYVgsmeMoa1KXzQRoOdvfkqnJth6XUkNeOz707qxN0WfxfhYwhL5kXHHbYJRby2bqAPKwThlZPhw==", "dev": true }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "tslint-immutable": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/tslint-immutable/-/tslint-immutable-4.7.0.tgz", + "integrity": "sha512-i4xw0hfoY4jvMrWXciVcFGr0ukTkbc0bE5iNVEN+sEQ51jUUsqYazhHFnh7JHG74Bu8cr+lwf8ee1RL+OC/0iw==", + "dev": true }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "safe-buffer": "^5.0.1" } }, + "tweetnacl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz", + "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins=" + }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "typescript": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.3.tgz", + "integrity": "sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==", "dev": true }, "union-value": { @@ -9682,7 +6380,7 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=" + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "unorm": { "version": "1.4.1", @@ -9726,12 +6424,6 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true } } }, @@ -9741,13 +6433,6 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "requires": { "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - } } }, "urix": { @@ -9756,36 +6441,10 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "urlgrey": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.0.tgz", - "integrity": "sha1-8GU1cED7NcOzEdTl3DZITZbb6gY=", - "dev": true, - "requires": { - "tape": "2.3.0" - } - }, "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", - "dev": true - } - } - }, - "user-home": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, "util-deprecate": { @@ -9794,23 +6453,20 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "v8flags": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", - "dev": true, - "requires": { - "user-home": "^1.1.1" - } + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true }, "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "varuint-bitcoin": { @@ -9825,83 +6481,37 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } } }, "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" } }, "widest-line": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", - "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", + "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", "requires": { "string-width": "^2.1.1" - }, - "dependencies": { - "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=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - } } }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, "wrap-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", - "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-4.0.0.tgz", + "integrity": "sha512-uMTsj9rDb0/7kk1PbcbCcwvHUxp60fGDB/NNXpVa0Q+ic/e7y5+BwTxKfQ33VYgDppSwi/FBzpetYzo8s6tfbg==", "requires": { + "ansi-styles": "^3.2.0", "string-width": "^2.1.1", "strip-ansi": "^4.0.0" - }, - "dependencies": { - "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=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - } } }, "wrappy": { @@ -9910,19 +6520,10 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "write-file-atomic": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha1-H/YVdcLipOjlENb6TiQ8zhg5mas=", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -9942,20 +6543,6 @@ "pify": "^3.0.0", "sort-keys": "^2.0.0", "write-file-atomic": "^2.0.0" - }, - "dependencies": { - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, "xtend": { @@ -9969,6 +6556,12 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "dev": true + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true } } } diff --git a/package.json b/package.json index 6b7fdc27..5d77dc03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lisk-commander", - "version": "2.0.0", + "version": "2.1.0-rc.0", "description": "A command line interface for Lisk", "author": "Lisk Foundation , lightcurve GmbH ", "license": "GPL-3.0", @@ -28,13 +28,13 @@ "lisk": "./bin/run" }, "scripts": { - "start": "babel-node src/index.js", - "format": "prettier --write \"./*.{js,json,md}\" \"{docs,src,test}{,/**}/*.{js,json,md}\"", - "lint": "eslint .", + "start": "ts-node src/index.js", + "format": "prettier --write \"*.{ts,js,json,md}\" \"{docs,src,test}/**/*.{ts,js,json,md}\"", + "lint": "tslint --format codeFrame --project .", "lint:fix": "npm run lint -- --fix", "test": "if [ -z $JENKINS_HOME ]; then npm run test:local; else npm run test:ci; fi", - "test:local": "NODE_ENV=test nyc mocha test", - "test:ci": "NODE_ENV=test nyc --exclude \"**/node_modules/** coverage/**\" mocha test", + "test:local": "TS_NODE_PROJECT=./test/tsconfig.json nyc mocha test/{,/**/,/**/**/,/**/**/**/}/*.ts", + "test:ci": "npm run test:local", "test:watch": "npm run test:local -- --watch", "test:watch:min": "npm run test:watch -- --reporter=min", "cover": "if [ -z $JENKINS_HOME ]; then npm run cover:local; else npm run cover:ci; fi", @@ -43,7 +43,7 @@ "cover:ci": "npm run cover:base -- --reporter=text-lcov mocha | coveralls -v", "cover:test": "NODE_ENV=test nyc --include \"test/**\" --exclude \"**/node_modules/** coverage/**\" mocha test", "prebuild": "if test -d dist; then rm -r dist; fi", - "build": "babel src -d dist", + "build": "tsc", "postpack": "rm -f oclif.manifest.json", "prepack": "oclif-dev manifest && npm shrinkwrap", "precommit": "lint-staged && npm run lint", @@ -100,51 +100,60 @@ "/npm-shrinkwrap.json", "/oclif.manifest.json", "/dist", - "/docs", - "/default_config.json" + "/docs" ], "dependencies": { - "@liskhq/lisk-api-client": "1.1.0", - "@liskhq/lisk-constants": "1.1.0", - "@liskhq/lisk-cryptography": "1.1.0", - "@liskhq/lisk-passphrase": "1.1.0", - "@liskhq/lisk-transactions": "1.1.0", - "@oclif/command": "1.5.0", - "@oclif/config": "1.7.4", - "@oclif/errors": "1.2.0", + "@liskhq/lisk-api-client": "2.0.0", + "@liskhq/lisk-constants": "1.2.0", + "@liskhq/lisk-cryptography": "2.0.0", + "@liskhq/lisk-passphrase": "2.0.0", + "@liskhq/lisk-transactions": "2.0.0", + "@oclif/command": "1.5.6", + "@oclif/config": "1.9.0", + "@oclif/errors": "1.2.2", "@oclif/plugin-help": "2.1.1", - "babel-polyfill": "6.26.0", "bip39": "2.5.0", "chalk": "2.4.1", "cli-table3": "0.5.0", "inquirer": "6.2.0", "lockfile": "1.0.4", "semver": "5.5.1", - "strip-ansi": "4.0.0" + "strip-ansi": "4.0.0", + "tslib": "1.9.3" }, "devDependencies": { - "@oclif/dev-cli": "1.18.0", - "@oclif/test": "1.2.0", - "babel-cli": "6.26.0", - "babel-plugin-istanbul": "4.1.5", - "babel-plugin-transform-object-rest-spread": "6.26.0", - "babel-preset-env": "1.6.1", - "babel-register": "6.26.0", + "@oclif/dev-cli": "1.19.5", + "@oclif/test": "1.2.2", + "@types/bip39": "2.4.0", + "@types/chai": "4.1.5", + "@types/chai-as-promised": "7.1.0", + "@types/expect": "1.20.3", + "@types/inquirer": "0.0.43", + "@types/jquery": "3.3.9", + "@types/lockfile": "1.0.0", + "@types/mocha": "5.2.5", + "@types/node": "10.10.1", + "@types/semver": "5.5.0", + "@types/sinon": "5.0.5", + "@types/sinon-chai": "3.2.0", + "@types/strip-ansi": "3.0.0", "chai": "4.1.2", "chai-as-promised": "7.1.1", - "coveralls": "3.0.0", - "eslint": "4.16.0", - "eslint-config-airbnb-base": "12.1.0", - "eslint-config-lisk-base": "1.0.0", - "eslint-config-oclif": "1.5.1", - "eslint-plugin-import": "2.8.0", - "eslint-plugin-mocha": "4.11.0", + "coveralls": "3.0.2", "husky": "0.14.3", "lint-staged": "5.0.0", "mocha": "4.0.1", "nyc": "11.3.0", "prettier": "1.9.2", + "rxjs-compat": "6.3.3", "sinon": "4.1.2", - "sinon-chai": "2.14.0" + "sinon-chai": "2.14.0", + "source-map-support": "0.5.9", + "ts-node": "7.0.1", + "tsconfig-paths": "3.6.0", + "tslint": "5.11.0", + "tslint-config-prettier": "1.15.0", + "tslint-immutable": "4.7.0", + "typescript": "3.0.3" } } diff --git a/src/base.js b/src/base.ts similarity index 52% rename from src/base.js rename to src/base.ts index 756ee832..d6ae15b9 100644 --- a/src/base.js +++ b/src/base.ts @@ -13,20 +13,63 @@ * Removal or modification of this copyright notice is prohibited. * */ -import os from 'os'; import { Command, flags as flagParser } from '@oclif/command'; -import { getConfig } from './utils/config'; +import os from 'os'; +import { ConfigOptions, getConfig } from './utils/config'; import { handleEPIPE } from './utils/helpers'; -import print from './utils/print'; +import { print } from './utils/print'; export const defaultConfigFolder = '.lisk'; -export default class BaseCommand extends Command { - async init() { - const { flags } = this.parse(this.constructor); - this.flags = flags; +const jsonDescription = + 'Prints output in JSON format. You can change the default behaviour in your config.json file.'; + +const prettyDescription = + 'Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the default behaviour in your config.json file.'; + +interface PrintFlags { + readonly json?: boolean; + readonly pretty?: boolean; +} + +export default abstract class BaseCommand extends Command { + static flags = { + json: flagParser.boolean({ + char: 'j', + description: jsonDescription, + allowNo: true, + }), + pretty: flagParser.boolean({ + description: prettyDescription, + allowNo: true, + }), + }; + + public printFlags: PrintFlags = {}; + public userConfig: ConfigOptions = { + api: { + network: 'main', + nodes: [], + }, + json: true, + pretty: true, + }; - process.on('error', handleEPIPE); + async finally(error?: Error | string): Promise { + if (error) { + this.error(error instanceof Error ? error.message : error); + } + } + + async init(): Promise { + // Typing problem where constructor is not allow as Input but it requires to be the type + const { flags } = this.parse( + // tslint:disable-next-line no-any + (this.constructor as unknown) as flagParser.Input, + ); + this.printFlags = flags; + + process.stdout.on('error', handleEPIPE); process.env.XDG_CONFIG_HOME = process.env.LISK_COMMANDER_CONFIG_DIR || @@ -34,38 +77,14 @@ export default class BaseCommand extends Command { this.userConfig = getConfig(process.env.XDG_CONFIG_HOME); } - async finally(error) { - if (error) { - this.error(error.message ? error.message : error); - } - } - - print(result, readAgain = false) { + print(result: unknown, readAgain = false): void { if (readAgain) { - this.userConfig = getConfig(process.env.XDG_CONFIG_HOME); + this.userConfig = getConfig(process.env.XDG_CONFIG_HOME as string); } print({ json: this.userConfig.json, pretty: this.userConfig.pretty, - ...this.flags, + ...this.printFlags, }).call(this, result); } } - -const jsonDescription = - 'Prints output in JSON format. You can change the default behaviour in your config.json file.'; - -const prettyDescription = - 'Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the default behaviour in your config.json file.'; - -BaseCommand.flags = { - json: flagParser.boolean({ - char: 'j', - description: jsonDescription, - allowNo: true, - }), - pretty: flagParser.boolean({ - description: prettyDescription, - allowNo: true, - }), -}; diff --git a/src/commands/account/create.js b/src/commands/account/create.ts similarity index 50% rename from src/commands/account/create.js rename to src/commands/account/create.ts index 3d30c46c..a314ee67 100644 --- a/src/commands/account/create.js +++ b/src/commands/account/create.ts @@ -13,15 +13,23 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { getAddressFromPublicKey, getKeys } from '@liskhq/lisk-cryptography'; import { flags as flagParser } from '@oclif/command'; -import cryptography from '@liskhq/lisk-cryptography'; import BaseCommand from '../../base'; import { createMnemonicPassphrase } from '../../utils/mnemonic'; -const createAccount = () => { +interface AccountInfo { + readonly address: string; + readonly passphrase: string; + readonly privateKey: string; + readonly publicKey: string; +} + +const createAccount = (): AccountInfo => { const passphrase = createMnemonicPassphrase(); - const { privateKey, publicKey } = cryptography.getKeys(passphrase); - const address = cryptography.getAddressFromPublicKey(publicKey); + const { privateKey, publicKey } = getKeys(passphrase); + const address = getAddressFromPublicKey(publicKey); + return { passphrase, privateKey, @@ -31,31 +39,32 @@ const createAccount = () => { }; export default class CreateCommand extends BaseCommand { - async run() { + static description = ` + Returns a randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address. + `; + + static examples = ['account:create', 'account:create --number=3']; + + static flags = { + ...BaseCommand.flags, + number: flagParser.string({ + char: 'n', + description: 'Number of accounts to create.', + default: '1', + }), + }; + + async run(): Promise { const { flags: { number: numberStr } } = this.parse(CreateCommand); - const number = parseInt(numberStr, 10); + const numberOfAccounts = parseInt(numberStr as string, 10); if ( - numberStr !== number.toString() || - !Number.isInteger(number) || - number <= 0 + numberStr !== numberOfAccounts.toString() || + !Number.isInteger(numberOfAccounts) || + numberOfAccounts <= 0 ) { throw new Error('Number flag must be an integer and greater than 0'); } - const accounts = new Array(number).fill().map(createAccount); + const accounts = new Array(numberOfAccounts).fill(0).map(createAccount); this.print(accounts); } } - -CreateCommand.flags = { - ...BaseCommand.flags, - number: flagParser.string({ - char: 'n', - description: 'Number of accounts to create.', - default: '1', - }), -}; - -CreateCommand.description = ` -Returns a randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address. -`; -CreateCommand.examples = ['account:create', 'account:create --number=3']; diff --git a/src/commands/account/get.js b/src/commands/account/get.ts similarity index 53% rename from src/commands/account/get.js rename to src/commands/account/get.ts index d9604361..08e61109 100644 --- a/src/commands/account/get.js +++ b/src/commands/account/get.ts @@ -14,13 +14,40 @@ * */ import BaseCommand from '../../base'; -import getAPIClient from '../../utils/api'; -import query from '../../utils/query'; +import { getAPIClient } from '../../utils/api'; +import { query } from '../../utils/query'; + +interface Args { + readonly addresses: string; +} export default class GetCommand extends BaseCommand { - async run() { - const { args: { addresses } } = this.parse(GetCommand); - const req = addresses.map(address => ({ + static args = [ + { + name: 'addresses', + required: true, + description: 'Comma-separated address(es) to get information about.', + }, + ]; + + static description = ` + Gets account information from the blockchain. + `; + + static examples = [ + 'account:get 3520445367460290306L', + 'account:get 3520445367460290306L,2802325248134221536L', + ]; + + static flags = { + ...BaseCommand.flags, + }; + + async run(): Promise { + const { args } = this.parse(GetCommand); + const { addresses: addressesStr }: Args = args; + const addresses = addressesStr.split(',').filter(Boolean); + const req = addresses.map((address: string) => ({ query: { limit: 1, address, @@ -35,25 +62,3 @@ export default class GetCommand extends BaseCommand { this.print(results); } } - -GetCommand.args = [ - { - name: 'addresses', - required: true, - description: 'Comma-separated address(es) to get information about.', - parse: input => input.split(',').filter(Boolean), - }, -]; - -GetCommand.flags = { - ...BaseCommand.flags, -}; - -GetCommand.description = ` -Gets account information from the blockchain. -`; - -GetCommand.examples = [ - 'account:get 3520445367460290306L', - 'account:get 3520445367460290306L,2802325248134221536L', -]; diff --git a/src/commands/account/show.js b/src/commands/account/show.ts similarity index 55% rename from src/commands/account/show.js rename to src/commands/account/show.ts index af5abf14..7e6b5c04 100644 --- a/src/commands/account/show.js +++ b/src/commands/account/show.ts @@ -13,15 +13,21 @@ * Removal or modification of this copyright notice is prohibited. * */ -import cryptography from '@liskhq/lisk-cryptography'; +import { getAddressFromPublicKey, getKeys } from '@liskhq/lisk-cryptography'; import { flags as flagParser } from '@oclif/command'; import BaseCommand from '../../base'; -import getInputsFromSources from '../../utils/input'; -import commonFlags from '../../utils/flags'; +import { ValidationError } from '../../utils/error'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources } from '../../utils/input'; + +const processInput = ({ passphrase }: { readonly passphrase?: string }) => { + if (!passphrase) { + throw new ValidationError('Passphrase cannot be empty'); + } + + const { privateKey, publicKey } = getKeys(passphrase); + const address = getAddressFromPublicKey(publicKey); -const processInput = ({ passphrase }) => { - const { privateKey, publicKey } = cryptography.getKeys(passphrase); - const address = cryptography.getAddressFromPublicKey(publicKey); return { privateKey, publicKey, @@ -30,7 +36,18 @@ const processInput = ({ passphrase }) => { }; export default class ShowCommand extends BaseCommand { - async run() { + static description = ` + Shows account information for a given passphrase. + `; + + static examples = ['account:show']; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + }; + + async run(): Promise { const { flags: { passphrase: passphraseSource } } = this.parse(ShowCommand); const input = await getInputsFromSources({ passphrase: { @@ -41,13 +58,3 @@ export default class ShowCommand extends BaseCommand { this.print(processInput(input)); } } - -ShowCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), -}; - -ShowCommand.description = ` -Shows account information for a given passphrase. -`; -ShowCommand.examples = ['account:show']; diff --git a/src/commands/block/get.js b/src/commands/block/get.ts similarity index 53% rename from src/commands/block/get.js rename to src/commands/block/get.ts index 0e01206a..e00768b1 100644 --- a/src/commands/block/get.js +++ b/src/commands/block/get.ts @@ -14,13 +14,40 @@ * */ import BaseCommand from '../../base'; -import getAPIClient from '../../utils/api'; -import query from '../../utils/query'; +import { getAPIClient } from '../../utils/api'; +import { query } from '../../utils/query'; + +interface Args { + readonly blockIds: string; +} export default class GetCommand extends BaseCommand { - async run() { - const { args: { blockIds } } = this.parse(GetCommand); - const req = blockIds.map(blockId => ({ + static args = [ + { + name: 'blockIds', + required: true, + description: 'Comma-separated block ID(s) to get information about.', + }, + ]; + + static description = ` + Gets block information from the blockchain. + `; + + static examples = [ + 'block:get 17108498772892203620', + 'block:get 17108498772892203620,8541428004955961162', + ]; + + static flags = { + ...BaseCommand.flags, + }; + + async run(): Promise { + const { args } = this.parse(GetCommand); + const { blockIds: blockIdsStr }: Args = args; + const blockIds = blockIdsStr.split(',').filter(Boolean); + const req = blockIds.map((blockId: string) => ({ query: { limit: 1, blockId, @@ -35,25 +62,3 @@ export default class GetCommand extends BaseCommand { this.print(results); } } - -GetCommand.args = [ - { - name: 'blockIds', - required: true, - description: 'Comma-separated block ID(s) to get information about.', - parse: input => input.split(',').filter(Boolean), - }, -]; - -GetCommand.flags = { - ...BaseCommand.flags, -}; - -GetCommand.description = ` -Gets block information from the blockchain. -`; - -GetCommand.examples = [ - 'block:get 17108498772892203620', - 'block:get 17108498772892203620,8541428004955961162', -]; diff --git a/src/commands/config/set.js b/src/commands/config/set.ts similarity index 58% rename from src/commands/config/set.js rename to src/commands/config/set.ts index 7147df8f..65be4bd7 100644 --- a/src/commands/config/set.js +++ b/src/commands/config/set.ts @@ -13,16 +13,25 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { hexToBuffer } from '@liskhq/lisk-cryptography'; import url from 'url'; -import cryptography from '@liskhq/lisk-cryptography'; import BaseCommand from '../../base'; +import { ConfigOptions, setConfig, WritableValue } from '../../utils/config'; import { + API_PROTOCOLS, CONFIG_VARIABLES, NETHASHES, - API_PROTOCOLS, } from '../../utils/constants'; import { FileSystemError, ValidationError } from '../../utils/error'; -import { setConfig } from '../../utils/config'; + +interface Args { + readonly values?: string; + readonly variable: string; +} + +interface WriteResult { + readonly message: string; +} const availableVariables = CONFIG_VARIABLES.join(', '); @@ -38,11 +47,15 @@ const URL_ERROR_MESSAGE = `Node URLs must include a supported protocol (${API_PR ', ', )}) and a hostname. E.g. https://127.0.0.1:4000 or http://localhost.`; -const checkBoolean = value => ['true', 'false'].includes(value); +const checkBoolean = (value: string) => ['true', 'false'].includes(value); -const setNestedConfigProperty = (config, path, value) => { +const setNestedConfigProperty = ( + config: ConfigOptions, + path: string, + value: WritableValue, +): void => { const dotNotationArray = path.split('.'); - dotNotationArray.reduce((obj, pathComponent, i) => { + dotNotationArray.reduce((obj, pathComponent, i) => { if (i === dotNotationArray.length - 1) { if (obj === undefined) { throw new ValidationError( @@ -53,16 +66,24 @@ const setNestedConfigProperty = (config, path, value) => { } or remove it (a fresh default configuration file will be created when you run Lisk Commander again).`, ); } - // eslint-disable-next-line no-param-reassign obj[pathComponent] = value; + return config; } - return obj[pathComponent]; + + return obj[pathComponent] as ConfigOptions; }, config); }; -const attemptWriteToFile = (newConfig, value, dotNotation) => { - const writeSuccess = setConfig(process.env.XDG_CONFIG_HOME, newConfig); +const attemptWriteToFile = ( + newConfig: ConfigOptions, + value: WritableValue, + dotNotation: string, +): WriteResult => { + const writeSuccess = setConfig( + process.env.XDG_CONFIG_HOME as string, + newConfig, + ); if (!writeSuccess) { throw new FileSystemError(WRITE_FAIL_WARNING); @@ -80,47 +101,82 @@ const attemptWriteToFile = (newConfig, value, dotNotation) => { return result; }; -const setValue = (config, dotNotation, value) => { +const setValue = ( + config: ConfigOptions, + dotNotation: string, + value: WritableValue, +) => { setNestedConfigProperty(config, dotNotation, value); + return attemptWriteToFile(config, value, dotNotation); }; -const setBoolean = (config, dotNotation, value) => { +const setBoolean = ( + config: ConfigOptions, + dotNotation: string, + value: string, +) => { if (!checkBoolean(value)) { throw new ValidationError('Value must be a boolean.'); } const newValue = value === 'true'; + return setValue(config, dotNotation, newValue); }; -const setArrayURL = (config, dotNotation, value, inputs) => { +const setArrayURL = ( + config: ConfigOptions, + dotNotation: string, + _: string, + inputs: ReadonlyArray, +) => { inputs.forEach(input => { const { protocol, hostname } = url.parse(input); - if (!API_PROTOCOLS.includes(protocol) || !hostname) { + if ( + protocol === undefined || + !API_PROTOCOLS.includes(protocol) || + !hostname + ) { throw new ValidationError(URL_ERROR_MESSAGE); } }); + return setValue(config, dotNotation, inputs); }; -const setNethash = (config, dotNotation, value) => { +const setNethash = ( + config: ConfigOptions, + dotNotation: string, + value: string, +) => { if ( dotNotation === 'api.network' && !Object.keys(NETHASHES).includes(value) ) { - if (value.length !== 64) { + const NETHASH_LENGTH = 64; + if (value.length !== NETHASH_LENGTH) { throw new ValidationError(NETHASH_ERROR_MESSAGE); } try { - cryptography.hexToBuffer(value, 'utf8'); + hexToBuffer(value, 'utf8'); } catch (error) { throw new ValidationError(NETHASH_ERROR_MESSAGE); } } + return setValue(config, dotNotation, value); }; -const handlers = { +interface KeywordHandler { + readonly [key: string]: ( + config: ConfigOptions, + dotNotation: string, + value: string, + inputs: ReadonlyArray, + ) => WriteResult; +} + +const handlers: KeywordHandler = { 'api.nodes': setArrayURL, 'api.network': setNethash, json: setBoolean, @@ -129,8 +185,37 @@ const handlers = { }; export default class SetCommand extends BaseCommand { - async run() { - const { args: { variable, values } } = this.parse(SetCommand); + static args = [ + { + name: 'variable', + required: true, + // tslint:disable-next-line array-type + options: CONFIG_VARIABLES as Array, + description: '', + }, + { + name: 'values', + required: false, + description: '', + }, + ]; + + static description = ` + Sets configuration. + ... + Variables available: ${availableVariables}. + `; + + static examples = [ + 'config:set json true', + 'config:set api.network main', + 'config:set api.nodes https://127.0.0.1:4000,http://mynode.com:7000', + ]; + + async run(): Promise { + const { args } = this.parse(SetCommand); + const { variable, values: valuesStr = '' }: Args = args; + const values = valuesStr.split(',').filter(Boolean); const safeValues = values || []; const safeValue = safeValues[0] || ''; const result = handlers[variable]( @@ -142,34 +227,3 @@ export default class SetCommand extends BaseCommand { this.print(result, true); } } - -SetCommand.args = [ - { - name: 'variable', - required: true, - options: CONFIG_VARIABLES, - description: '', - }, - { - name: 'values', - required: false, - parse: input => input.split(','), - description: '', - }, -]; - -SetCommand.flags = { - ...BaseCommand.flags, -}; - -SetCommand.description = ` -Sets configuration. -... -Variables available: ${availableVariables}. -`; - -SetCommand.examples = [ - 'config:set json true', - 'config:set api.network main', - 'config:set api.nodes https://127.0.0.1:4000,http://mynode.com:7000', -]; diff --git a/src/commands/config/show.js b/src/commands/config/show.ts similarity index 78% rename from src/commands/config/show.js rename to src/commands/config/show.ts index 83c6b2e3..8e94b032 100644 --- a/src/commands/config/show.js +++ b/src/commands/config/show.ts @@ -16,16 +16,17 @@ import BaseCommand from '../../base'; export default class ShowCommand extends BaseCommand { - async run() { + static description = ` + Prints the current configuration. + `; + + static examples = ['config:show']; + + static flags = { + ...BaseCommand.flags, + }; + + async run(): Promise { this.print(this.userConfig); } } - -ShowCommand.flags = { - ...BaseCommand.flags, -}; - -ShowCommand.description = ` -Prints the current configuration. -`; -ShowCommand.examples = ['config:show']; diff --git a/src/commands/copyright.js b/src/commands/copyright.ts similarity index 88% rename from src/commands/copyright.js rename to src/commands/copyright.ts index 281fa764..10aeb83a 100644 --- a/src/commands/copyright.js +++ b/src/commands/copyright.ts @@ -33,17 +33,17 @@ along with this program. If not, see . `.trim(); export default class CopyrightCommand extends BaseCommand { - async run() { - this.print({ copyright }); - } -} + static description = ` + Displays copyright notice. + `; -CopyrightCommand.flags = { - ...BaseCommand.flags, -}; + static examples = ['copyright']; -CopyrightCommand.description = ` -Displays copyright notice. -`; + static flags = { + ...BaseCommand.flags, + }; -CopyrightCommand.examples = ['copyright']; + async run(): Promise { + this.print({ copyright }); + } +} diff --git a/src/commands/delegate/get.js b/src/commands/delegate/get.ts similarity index 56% rename from src/commands/delegate/get.js rename to src/commands/delegate/get.ts index ece4b3ef..2504c39b 100644 --- a/src/commands/delegate/get.js +++ b/src/commands/delegate/get.ts @@ -14,12 +14,41 @@ * */ import BaseCommand from '../../base'; -import getAPIClient from '../../utils/api'; -import query from '../../utils/query'; +import { getAPIClient } from '../../utils/api'; +import { query } from '../../utils/query'; + +interface Args { + readonly usernames: string; +} export default class GetCommand extends BaseCommand { - async run() { - const { args: { usernames } } = this.parse(GetCommand); + static args = [ + { + name: 'usernames', + required: true, + description: 'Comma-separated username(s) to get information about.', + }, + ]; + + static description = ` + Gets delegate information from the blockchain. + `; + + static examples = [ + 'delegate:get lightcurve', + 'delegate:get lightcurve,4miners.net', + ]; + + static flags = { + ...BaseCommand.flags, + }; + + async run(): Promise { + const { args } = this.parse(GetCommand); + const { usernames: usernamesStr }: Args = args; + const usernames: ReadonlyArray = usernamesStr + .split(',') + .filter(Boolean); const req = usernames.map(username => ({ query: { limit: 1, @@ -35,25 +64,3 @@ export default class GetCommand extends BaseCommand { this.print(results); } } - -GetCommand.args = [ - { - name: 'usernames', - required: true, - description: 'Comma-separated username(s) to get information about.', - parse: input => input.split(',').filter(Boolean), - }, -]; - -GetCommand.flags = { - ...BaseCommand.flags, -}; - -GetCommand.description = ` -Gets delegate information from the blockchain. -`; - -GetCommand.examples = [ - 'delegate:get lightcurve', - 'delegate:get lightcurve,4miners.net', -]; diff --git a/src/commands/delegate/voters.ts b/src/commands/delegate/voters.ts new file mode 100644 index 00000000..d7dcc124 --- /dev/null +++ b/src/commands/delegate/voters.ts @@ -0,0 +1,135 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../base'; +import { getAPIClient } from '../../utils/api'; +import { SORT_FIELDS } from '../../utils/constants'; +import { query } from '../../utils/query'; + +interface Args { + readonly usernames: string; +} + +interface QueryParameters { + readonly limit: number; + readonly offset: number; + readonly sort?: string; +} + +const MAXIMUM_LIMIT = 100; +const DEFAULT_LIMIT = 10; +const DEFAULT_OFFSET = 0; +const DEFAULT_SORT = 'balance:desc'; + +const processFlagInputs = ( + limitStr: string, + offsetStr: string, + sortStr: string, +): QueryParameters => { + const limit = parseInt(limitStr, 10); + const offset = parseInt(offsetStr, 10); + const sort = sortStr ? sortStr.trim() : undefined; + if (limitStr !== limit.toString() || !Number.isInteger(limit) || limit <= 0) { + throw new Error('Limit must be an integer and greater than 0'); + } + if (limit && limit > MAXIMUM_LIMIT) { + throw new Error(`Maximum limit amount is ${MAXIMUM_LIMIT}`); + } + if ( + offsetStr !== offset.toString() || + !Number.isInteger(offset) || + offset < 0 + ) { + throw new Error('Offset must be an integer and greater than or equal to 0'); + } + if (sort !== undefined && !SORT_FIELDS.includes(sort)) { + throw new Error(`Sort must be one of: ${SORT_FIELDS.join(', ')}`); + } + + return { + limit, + offset, + sort, + }; +}; + +export default class VotersCommand extends BaseCommand { + static args = [ + { + name: 'usernames', + required: true, + description: 'Comma-separated username(s) to get information about.', + }, + ]; + + static description = ` + Gets voters information for given delegate(s) from the blockchain. + `; + + static examples = [ + 'delegate:voters lightcurve', + 'delegate:voters lightcurve,4miners.net', + 'delegate:voters lightcurve,4miners.net --limit 20 --offset 5 --sort publicKey:asc --pretty', + ]; + + static flags = { + ...BaseCommand.flags, + limit: flagParser.string({ + description: 'Limit applied to results.', + default: '10', + }), + offset: flagParser.string({ + description: 'Offset applied to results.', + default: '0', + }), + sort: flagParser.string({ + description: 'Fields to sort results by.', + default: DEFAULT_SORT, + }), + }; + + async run(): Promise { + const { + args, + flags: { limit: limitStr, offset: offsetStr, sort: sortStr }, + } = this.parse(VotersCommand); + const { usernames: usernamesStr }: Args = args; + + const usernames = usernamesStr.split(',').filter(Boolean); + + const { limit, offset, sort } = processFlagInputs( + limitStr as string, + offsetStr as string, + sortStr as string, + ); + + const req = usernames.map(username => ({ + query: { + username, + limit: limit || DEFAULT_LIMIT, + offset: offset || DEFAULT_OFFSET, + sort: sort || DEFAULT_SORT, + }, + placeholder: { + username, + message: 'Delegate not found.', + }, + })); + const client = getAPIClient(this.userConfig.api); + const results = await query(client, 'voters', req); + this.print(results); + } +} diff --git a/src/commands/delegate/votes.ts b/src/commands/delegate/votes.ts new file mode 100644 index 00000000..d3fe5a9e --- /dev/null +++ b/src/commands/delegate/votes.ts @@ -0,0 +1,132 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../base'; +import { getAPIClient } from '../../utils/api'; +import { SORT_FIELDS } from '../../utils/constants'; +import { query } from '../../utils/query'; + +interface Args { + readonly addresses: string; +} + +const MAXIMUM_LIMIT = 100; +const DEFAULT_LIMIT = 10; +const DEFAULT_OFFSET = 0; +const DEFAULT_SORT = 'balance:desc'; + +const VOTES_SORT_FIELDS = SORT_FIELDS.filter( + field => !field.includes('publicKey'), +); + +const processFlagInputs = ( + limitStr: string, + offsetStr: string, + sortStr: string, +) => { + const limit = parseInt(limitStr, 10); + const offset = parseInt(offsetStr, 10); + const sort = sortStr ? sortStr.trim() : undefined; + if (limitStr !== limit.toString() || !Number.isInteger(limit) || limit <= 0) { + throw new Error('Limit must be an integer and greater than 0'); + } + if (limit && limit > MAXIMUM_LIMIT) { + throw new Error(`Maximum limit amount is ${MAXIMUM_LIMIT}`); + } + if ( + offsetStr !== offset.toString() || + !Number.isInteger(offset) || + offset < 0 + ) { + throw new Error('Offset must be an integer and greater than or equal to 0'); + } + if (sort && !VOTES_SORT_FIELDS.includes(sort)) { + throw new Error(`Sort must be one of: ${VOTES_SORT_FIELDS.join(', ')}`); + } + + return { + limit, + offset, + sort, + }; +}; + +export default class VotesCommand extends BaseCommand { + static args = [ + { + name: 'addresses', + required: true, + description: 'Comma-separated address(es) to get information about.', + }, + ]; + + static description = ` + Gets votes information for given account(s) from the blockchain. + `; + + static examples = [ + 'delegate:votes 13133549779353512613L', + 'delegate:votes 13133549779353512613L,16010222169256538112L', + 'delegate:votes 13133549779353512613L,16010222169256538112L --limit 20 --offset 5 --sort balance:asc --pretty', + ]; + + static flags = { + ...BaseCommand.flags, + limit: flagParser.string({ + description: 'Limit applied to results.', + default: '10', + }), + offset: flagParser.string({ + description: 'Offset applied to results.', + default: '0', + }), + sort: flagParser.string({ + description: 'Fields to sort results by.', + default: DEFAULT_SORT, + }), + }; + + async run(): Promise { + const { + args, + flags: { limit: limitStr, offset: offsetStr, sort: sortStr }, + } = this.parse(VotesCommand); + + const { addresses: addressesStr }: Args = args; + const addresses = addressesStr.split(',').filter(Boolean); + const { limit, offset, sort } = processFlagInputs( + limitStr as string, + offsetStr as string, + sortStr as string, + ); + + const req = addresses.map(address => ({ + query: { + address, + limit: limit || DEFAULT_LIMIT, + offset: offset || DEFAULT_OFFSET, + sort: sort || DEFAULT_SORT, + }, + placeholder: { + address, + message: 'Account not found.', + }, + })); + const client = getAPIClient(this.userConfig.api); + const results = await query(client, 'votes', req); + this.print(results); + } +} diff --git a/src/commands/message/decrypt.js b/src/commands/message/decrypt.js deleted file mode 100644 index 2a5b1715..00000000 --- a/src/commands/message/decrypt.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import { flags as flagParser } from '@oclif/command'; -import cryptography from '@liskhq/lisk-cryptography'; -import BaseCommand from '../../base'; -import { ValidationError } from '../../utils/error'; -import getInputsFromSources from '../../utils/input'; -import commonFlags from '../../utils/flags'; - -const processInputs = (nonce, senderPublicKey, message) => ({ - passphrase, - data, -}) => - cryptography.decryptMessageWithPassphrase( - message || data, - nonce, - passphrase, - senderPublicKey, - ); - -export default class DecryptCommand extends BaseCommand { - async run() { - const { - args: { senderPublicKey, nonce, message }, - flags: { passphrase: passphraseSource, message: messageSource }, - } = this.parse(DecryptCommand); - - if (!message && !messageSource) { - throw new ValidationError('No message was provided.'); - } - - const inputs = await getInputsFromSources({ - passphrase: { - source: passphraseSource, - }, - data: message - ? null - : { - source: messageSource, - }, - }); - const result = processInputs(nonce, senderPublicKey, message)(inputs); - this.print({ message: result }); - } -} - -DecryptCommand.args = [ - { - name: 'senderPublicKey', - description: 'Public key of the sender of the message.', - required: true, - }, - { - name: 'nonce', - description: 'Nonce used during encryption.', - required: true, - }, - { - name: 'message', - description: 'Encrypted message.', - }, -]; - -DecryptCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - message: flagParser.string(commonFlags.message), -}; - -DecryptCommand.description = ` -Decrypts a previously encrypted message from a given sender public key for a known nonce using your secret passphrase. -`; - -DecryptCommand.examples = [ - 'message:decrypt bba7e2e6a4639c431b68e31115a71ffefcb4e025a4d1656405dfdcd8384719e0 4b800d90d54eda4d093b5e4e6bf9ed203bc90e1560bd628d dcaa605af45a4107a699755237b4c08e1ef75036743d7e4814dea7', -]; diff --git a/src/commands/message/decrypt.ts b/src/commands/message/decrypt.ts new file mode 100644 index 00000000..8ec68232 --- /dev/null +++ b/src/commands/message/decrypt.ts @@ -0,0 +1,106 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { decryptMessageWithPassphrase } from '@liskhq/lisk-cryptography'; +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../base'; +import { ValidationError } from '../../utils/error'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources, InputFromSourceOutput } from '../../utils/input'; + +interface Args { + readonly message?: string; + readonly nonce: string; + readonly senderPublicKey: string; +} + +const processInputs = ( + nonce: string, + senderPublicKey: string, + message?: string, +) => ({ passphrase, data }: InputFromSourceOutput) => { + const targetMessage = message || data; + if (!targetMessage) { + throw new ValidationError('No message was provided.'); + } + if (!passphrase) { + throw new ValidationError('No passphrase was provided.'); + } + + return decryptMessageWithPassphrase( + targetMessage, + nonce, + passphrase, + senderPublicKey, + ); +}; + +export default class DecryptCommand extends BaseCommand { + static args = [ + { + name: 'senderPublicKey', + description: 'Public key of the sender of the message.', + required: true, + }, + { + name: 'nonce', + description: 'Nonce used during encryption.', + required: true, + }, + { + name: 'message', + description: 'Encrypted message.', + }, + ]; + + static description = ` + Decrypts a previously encrypted message from a given sender public key for a known nonce using your secret passphrase. + `; + + static examples = [ + 'message:decrypt bba7e2e6a4639c431b68e31115a71ffefcb4e025a4d1656405dfdcd8384719e0 4b800d90d54eda4d093b5e4e6bf9ed203bc90e1560bd628d dcaa605af45a4107a699755237b4c08e1ef75036743d7e4814dea7', + ]; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + message: flagParser.string(commonFlags.message), + }; + async run(): Promise { + const { + args, + flags: { passphrase: passphraseSource, message: messageSource }, + } = this.parse(DecryptCommand); + + const { senderPublicKey, nonce, message }: Args = args; + + if (!message && !messageSource) { + throw new ValidationError('No message was provided.'); + } + + const inputs = await getInputsFromSources({ + passphrase: { + source: passphraseSource, + }, + data: message + ? undefined + : { + source: messageSource, + }, + }); + const result = processInputs(nonce, senderPublicKey, message)(inputs); + this.print({ message: result }); + } +} diff --git a/src/commands/message/encrypt.js b/src/commands/message/encrypt.js deleted file mode 100644 index b35d4671..00000000 --- a/src/commands/message/encrypt.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import { flags as flagParser } from '@oclif/command'; -import cryptography from '@liskhq/lisk-cryptography'; -import BaseCommand from '../../base'; -import { ValidationError } from '../../utils/error'; -import getInputsFromSources from '../../utils/input'; -import commonFlags from '../../utils/flags'; - -const processInputs = (recipientPublicKey, message) => ({ - passphrase, - data, -}) => ({ - ...cryptography.encryptMessageWithPassphrase( - message || data, - passphrase, - recipientPublicKey, - ), - recipientPublicKey, -}); - -export default class EncryptCommand extends BaseCommand { - async run() { - const { - args: { recipientPublicKey, message }, - flags: { passphrase: passphraseSource, message: messageSource }, - } = this.parse(EncryptCommand); - - if (!message && !messageSource) { - throw new ValidationError('No message was provided.'); - } - - const inputs = await getInputsFromSources({ - passphrase: { - source: passphraseSource, - repeatPrompt: true, - }, - data: message - ? null - : { - source: messageSource, - }, - }); - const result = processInputs(recipientPublicKey, message)(inputs); - this.print(result); - } -} - -EncryptCommand.args = [ - { - name: 'recipientPublicKey', - description: 'Public key of the recipient of the message.', - required: true, - }, - { - name: 'message', - description: 'Message to encrypt.', - }, -]; - -EncryptCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - message: flagParser.string(commonFlags.message), -}; - -EncryptCommand.description = ` -Encrypts a message for a given recipient public key using your secret passphrase. -`; - -EncryptCommand.examples = [ - 'message:encrypt bba7e2e6a4639c431b68e31115a71ffefcb4e025a4d1656405dfdcd8384719e0 "Hello world"', -]; diff --git a/src/commands/message/encrypt.ts b/src/commands/message/encrypt.ts new file mode 100644 index 00000000..2f51688f --- /dev/null +++ b/src/commands/message/encrypt.ts @@ -0,0 +1,103 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { encryptMessageWithPassphrase } from '@liskhq/lisk-cryptography'; +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../base'; +import { ValidationError } from '../../utils/error'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources, InputFromSourceOutput } from '../../utils/input'; + +interface Args { + readonly message?: string; + readonly recipientPublicKey: string; +} + +const processInputs = (recipientPublicKey: string, message?: string) => ({ + passphrase, + data, +}: InputFromSourceOutput) => { + const targetMessage = message || data; + if (!targetMessage) { + throw new ValidationError('No message was provided.'); + } + if (!passphrase) { + throw new ValidationError('No passphrase was provided.'); + } + + return { + ...encryptMessageWithPassphrase( + targetMessage, + passphrase, + recipientPublicKey, + ), + recipientPublicKey, + }; +}; + +export default class EncryptCommand extends BaseCommand { + static args = [ + { + name: 'recipientPublicKey', + description: 'Public key of the recipient of the message.', + required: true, + }, + { + name: 'message', + description: 'Message to encrypt.', + }, + ]; + + static description = ` + Encrypts a message for a given recipient public key using your secret passphrase. + `; + + static examples = [ + 'message:encrypt bba7e2e6a4639c431b68e31115a71ffefcb4e025a4d1656405dfdcd8384719e0 "Hello world"', + ]; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + message: flagParser.string(commonFlags.message), + }; + + async run(): Promise { + const { + args, + flags: { passphrase: passphraseSource, message: messageSource }, + } = this.parse(EncryptCommand); + + const { recipientPublicKey, message }: Args = args; + + if (!message && !messageSource) { + throw new ValidationError('No message was provided.'); + } + + const inputs = await getInputsFromSources({ + passphrase: { + source: passphraseSource, + repeatPrompt: true, + }, + data: message + ? undefined + : { + source: messageSource, + }, + }); + const result = processInputs(recipientPublicKey, message)(inputs); + this.print(result); + } +} diff --git a/src/commands/message/sign.js b/src/commands/message/sign.ts similarity index 52% rename from src/commands/message/sign.js rename to src/commands/message/sign.ts index 959738ed..2583bc2b 100644 --- a/src/commands/message/sign.js +++ b/src/commands/message/sign.ts @@ -13,23 +13,60 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { signMessageWithPassphrase } from '@liskhq/lisk-cryptography'; import { flags as flagParser } from '@oclif/command'; -import cryptography from '@liskhq/lisk-cryptography'; import BaseCommand from '../../base'; import { ValidationError } from '../../utils/error'; -import getInputsFromSources from '../../utils/input'; -import commonFlags from '../../utils/flags'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources, InputFromSourceOutput } from '../../utils/input'; -const processInputs = message => ({ passphrase, data }) => - cryptography.signMessageWithPassphrase(message || data, passphrase); +interface Args { + readonly message?: string; +} + +const processInputs = (message?: string) => ({ + passphrase, + data, +}: InputFromSourceOutput) => { + const targetMessage = message || data; + if (!targetMessage) { + throw new ValidationError('No message was provided.'); + } + if (!passphrase) { + throw new ValidationError('No passphrase was provided.'); + } + + return signMessageWithPassphrase(targetMessage, passphrase); +}; export default class SignCommand extends BaseCommand { - async run() { + static args = [ + { + name: 'message', + description: 'Message to sign.', + }, + ]; + + static description = ` + Signs a message using your secret passphrase. + `; + + static examples = ['message:sign "Hello world"']; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + message: flagParser.string(commonFlags.message), + }; + + async run(): Promise { const { - args: { message }, + args, flags: { passphrase: passphraseSource, message: messageSource }, } = this.parse(SignCommand); + const { message }: Args = args; + if (!message && !messageSource) { throw new ValidationError('No message was provided.'); } @@ -40,7 +77,7 @@ export default class SignCommand extends BaseCommand { repeatPrompt: true, }, data: message - ? null + ? undefined : { source: messageSource, }, @@ -49,22 +86,3 @@ export default class SignCommand extends BaseCommand { this.print(result); } } - -SignCommand.args = [ - { - name: 'message', - description: 'Message to sign.', - }, -]; - -SignCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - message: flagParser.string(commonFlags.message), -}; - -SignCommand.description = ` -Signs a message using your secret passphrase. -`; - -SignCommand.examples = ['message:sign "Hello world"']; diff --git a/src/commands/message/verify.js b/src/commands/message/verify.js deleted file mode 100644 index 339bed09..00000000 --- a/src/commands/message/verify.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import { flags as flagParser } from '@oclif/command'; -import cryptography from '@liskhq/lisk-cryptography'; -import BaseCommand from '../../base'; -import { ValidationError } from '../../utils/error'; -import getInputsFromSources from '../../utils/input'; -import commonFlags from '../../utils/flags'; - -const processInputs = (publicKey, signature, message) => ({ data }) => ({ - verified: cryptography.verifyMessageWithPublicKey({ - publicKey, - signature, - message: message || data, - }), -}); - -export default class VerifyCommand extends BaseCommand { - async run() { - const { - args: { publicKey, signature, message }, - flags: { message: messageSource }, - } = this.parse(VerifyCommand); - - if (!message && !messageSource) { - throw new ValidationError('No message was provided.'); - } - - const inputs = await getInputsFromSources({ - data: message ? null : { source: messageSource }, - }); - const result = processInputs(publicKey, signature, message)(inputs); - this.print(result); - } -} - -VerifyCommand.args = [ - { - name: 'publicKey', - description: 'Public key of the signer of the message.', - required: true, - }, - { - name: 'signature', - description: 'Signature to verify.', - required: true, - }, - { - name: 'message', - description: 'Message to verify.', - }, -]; - -VerifyCommand.flags = { - ...BaseCommand.flags, - message: flagParser.string(commonFlags.message), -}; - -VerifyCommand.description = ` -Verifies a signature for a message using the signer’s public key. -`; - -VerifyCommand.examples = [ - 'message:verify 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6 2a3ca127efcf7b2bf62ac8c3b1f5acf6997cab62ba9fde3567d188edcbacbc5dc8177fb88d03a8691ce03348f569b121bca9e7a3c43bf5c056382f35ff843c09 "Hello world"', -]; diff --git a/src/commands/message/verify.ts b/src/commands/message/verify.ts new file mode 100644 index 00000000..94b2f3bd --- /dev/null +++ b/src/commands/message/verify.ts @@ -0,0 +1,97 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { verifyMessageWithPublicKey } from '@liskhq/lisk-cryptography'; +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../base'; +import { ValidationError } from '../../utils/error'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources, InputFromSourceOutput } from '../../utils/input'; + +interface Args { + readonly message?: string; + readonly publicKey: string; + readonly signature: string; +} + +const processInputs = ( + publicKey: string, + signature: string, + message?: string, +) => ({ data }: InputFromSourceOutput) => { + const targetMessage = message || data; + if (!targetMessage) { + throw new ValidationError('No message was provided.'); + } + + return { + verified: verifyMessageWithPublicKey({ + publicKey, + signature, + message: targetMessage, + }), + }; +}; + +export default class VerifyCommand extends BaseCommand { + static args = [ + { + name: 'publicKey', + description: 'Public key of the signer of the message.', + required: true, + }, + { + name: 'signature', + description: 'Signature to verify.', + required: true, + }, + { + name: 'message', + description: 'Message to verify.', + }, + ]; + + static description = ` + Verifies a signature for a message using the signer’s public key. + `; + + static examples = [ + 'message:verify 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6 2a3ca127efcf7b2bf62ac8c3b1f5acf6997cab62ba9fde3567d188edcbacbc5dc8177fb88d03a8691ce03348f569b121bca9e7a3c43bf5c056382f35ff843c09 "Hello world"', + ]; + + static flags = { + ...BaseCommand.flags, + message: flagParser.string(commonFlags.message), + }; + + async run(): Promise { + const { args, flags: { message: messageSource } } = this.parse( + VerifyCommand, + ); + + const { publicKey, signature, message }: Args = args; + + if (!message && !messageSource) { + throw new ValidationError('No message was provided.'); + } + + const inputs = await getInputsFromSources({ + data: message ? undefined : { source: messageSource }, + }); + + const result = processInputs(publicKey, signature, message)(inputs); + this.print(result); + } +} diff --git a/src/commands/node/forging.js b/src/commands/node/forging.js deleted file mode 100644 index 1e65860b..00000000 --- a/src/commands/node/forging.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import { flags as flagParser } from '@oclif/command'; -import transactions from '@liskhq/lisk-transactions'; -import BaseCommand from '../../base'; -import commonFlags from '../../utils/flags'; -import getAPIClient from '../../utils/api'; -import getInputsFromSources from '../../utils/input'; - -const STATUS_ENABLE = 'enable'; -const STATUS_DISABLE = 'disable'; - -const processInput = (client, status, publicKey, password) => - client.node - .updateForgingStatus({ - password, - publicKey, - forging: status === STATUS_ENABLE, - }) - .then(response => response.data); - -export default class ForgingCommand extends BaseCommand { - async run() { - const { - args: { status, publicKey }, - flags: { password: passwordSource }, - } = this.parse(ForgingCommand); - - transactions.utils.validatePublicKey(publicKey); - - const client = getAPIClient(this.userConfig.api); - const { password } = await getInputsFromSources({ - password: { - source: passwordSource, - }, - }); - const result = await processInput(client, status, publicKey, password); - - this.print(result); - } -} - -ForgingCommand.args = [ - { - name: 'status', - options: [STATUS_ENABLE, STATUS_DISABLE], - description: 'Desired forging status.', - required: true, - }, - { - name: 'publicKey', - description: 'Public key of the delegate whose status should be updated.', - required: true, - }, -]; - -ForgingCommand.flags = { - ...BaseCommand.flags, - password: flagParser.string(commonFlags.password), -}; - -ForgingCommand.description = ` -Updates the forging status of a node. -`; - -ForgingCommand.examples = [ - 'node:forging enable 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6', - 'node:forging disable 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6', -]; diff --git a/src/commands/node/forging.ts b/src/commands/node/forging.ts new file mode 100644 index 00000000..d8cacd3c --- /dev/null +++ b/src/commands/node/forging.ts @@ -0,0 +1,99 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { APIClient } from '@liskhq/lisk-api-client'; +import * as transactions from '@liskhq/lisk-transactions'; +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../base'; +import { getAPIClient } from '../../utils/api'; +import { ValidationError } from '../../utils/error'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources } from '../../utils/input'; + +interface Args { + readonly publicKey: string; + readonly status: string; +} + +const STATUS_ENABLE = 'enable'; +const STATUS_DISABLE = 'disable'; + +const processInput = async ( + client: APIClient, + status: string, + publicKey: string, + password?: string, +): Promise => { + if (!password) { + throw new ValidationError('No password was provided.'); + } + + return client.node + .updateForgingStatus({ + password, + publicKey, + forging: status === STATUS_ENABLE, + }) + .then(response => response.data); +}; + +export default class ForgingCommand extends BaseCommand { + static args = [ + { + name: 'status', + options: [STATUS_ENABLE, STATUS_DISABLE], + description: 'Desired forging status.', + required: true, + }, + { + name: 'publicKey', + description: 'Public key of the delegate whose status should be updated.', + required: true, + }, + ]; + + static description = ` + Updates the forging status of a node. + `; + + static examples = [ + 'node:forging enable 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6', + 'node:forging disable 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6', + ]; + + static flags = { + ...BaseCommand.flags, + password: flagParser.string(commonFlags.password), + }; + + async run(): Promise { + const { args, flags: { password: passwordSource } } = this.parse( + ForgingCommand, + ); + + const { status, publicKey }: Args = args; + transactions.utils.validatePublicKey(publicKey); + + const client = getAPIClient(this.userConfig.api); + const { password } = await getInputsFromSources({ + password: { + source: passwordSource, + }, + }); + const result = await processInput(client, status, publicKey, password); + + this.print(result); + } +} diff --git a/src/commands/node/get.js b/src/commands/node/get.ts similarity index 75% rename from src/commands/node/get.js rename to src/commands/node/get.ts index 79d7680a..95cbca63 100644 --- a/src/commands/node/get.js +++ b/src/commands/node/get.ts @@ -15,10 +15,23 @@ */ import { flags as flagParser } from '@oclif/command'; import BaseCommand from '../../base'; -import getAPIClient from '../../utils/api'; +import { getAPIClient } from '../../utils/api'; export default class GetCommand extends BaseCommand { - async run() { + static description = ` + Gets information about a node. + `; + + static examples = ['node:get', 'node:get --forging-status']; + + static flags = { + ...BaseCommand.flags, + 'forging-status': flagParser.boolean({ + description: 'Additionally provides information about forging status.', + }), + }; + + async run(): Promise { const { flags: { 'forging-status': showForgingStatus } } = this.parse( GetCommand, ); @@ -31,7 +44,9 @@ export default class GetCommand extends BaseCommand { ...statusResponse.data, })); if (!showForgingStatus) { - return this.print(baseInfo); + this.print(baseInfo); + + return; } const fullInfo = await client.node .getForgingStatus() @@ -43,19 +58,7 @@ export default class GetCommand extends BaseCommand { ...baseInfo, forgingStatus: error.message, })); - return this.print(fullInfo); + + this.print(fullInfo); } } - -GetCommand.flags = { - ...BaseCommand.flags, - 'forging-status': flagParser.boolean({ - description: 'Additionally provides information about forging status.', - }), -}; - -GetCommand.description = ` -Gets information about a node. -`; - -GetCommand.examples = ['node:get', 'node:get --forging-status']; diff --git a/src/commands/passphrase/decrypt.js b/src/commands/passphrase/decrypt.ts similarity index 56% rename from src/commands/passphrase/decrypt.js rename to src/commands/passphrase/decrypt.ts index 7ff086a5..41a05ed0 100644 --- a/src/commands/passphrase/decrypt.js +++ b/src/commands/passphrase/decrypt.ts @@ -13,15 +13,24 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { + decryptPassphraseWithPassword, + parseEncryptedPassphrase, +} from '@liskhq/lisk-cryptography'; import { flags as flagParser } from '@oclif/command'; -import cryptography from '@liskhq/lisk-cryptography'; import BaseCommand from '../../base'; import { ValidationError } from '../../utils/error'; -import commonFlags from '../../utils/flags'; -import getInputsFromSources, { +import { flags as commonFlags } from '../../utils/flags'; +import { getFirstLineFromString, + getInputsFromSources, + InputFromSourceOutput, } from '../../utils/input'; +interface Args { + readonly encryptedPassphrase?: string; +} + const passphraseOptionDescription = `Specifies a source for providing an encrypted passphrase to the command. If a string is provided directly as an argument, this option will be ignored. The encrypted passphrase must be provided via an argument or via this option. Sources must be one of \`file\` or \`stdin\`. In the case of \`file\`, a corresponding identifier must also be provided. Note: if both an encrypted passphrase and the password are passed via stdin, the password must be the first line. @@ -31,24 +40,62 @@ const passphraseOptionDescription = `Specifies a source for providing an encrypt - --passphrase stdin (takes the first line only) `; -const processInputs = encryptedPassphrase => ({ password, data }) => { - const encryptedPassphraseObject = cryptography.parseEncryptedPassphrase( - encryptedPassphrase || getFirstLineFromString(data), +const processInputs = (encryptedPassphrase?: string) => ({ + password, + data, +}: InputFromSourceOutput) => { + const encryptedPassphraseTarget = + encryptedPassphrase || getFirstLineFromString(data); + if (!encryptedPassphraseTarget) { + throw new ValidationError('No encrypted passphrase was provided'); + } + if (!password) { + throw new ValidationError('No password was provided'); + } + + const encryptedPassphraseObject = parseEncryptedPassphrase( + encryptedPassphraseTarget, ); - const passphrase = cryptography.decryptPassphraseWithPassword( + const passphrase = decryptPassphraseWithPassword( encryptedPassphraseObject, password, ); + return { passphrase }; }; export default class DecryptCommand extends BaseCommand { - async run() { + static args = [ + { + name: 'encryptedPassphrase', + description: 'Encrypted passphrase to decrypt.', + }, + ]; + + static description = ` + Decrypts your secret passphrase using the password which was provided at the time of encryption. + `; + + static examples = [ + 'passphrase:decrypt "iterations=1000000&cipherText=9b1c60&iv=5c8843f52ed3c0f2aa0086b0&salt=2240b7f1aa9c899894e528cf5b600e9c&tag=23c01112134317a63bcf3d41ea74e83b&version=1"', + ]; + + static flags = { + ...BaseCommand.flags, + password: flagParser.string(commonFlags.password), + passphrase: flagParser.string({ + description: passphraseOptionDescription, + }), + }; + + async run(): Promise { const { - args: { encryptedPassphrase }, + args, flags: { passphrase: passphraseSource, password: passwordSource }, } = this.parse(DecryptCommand); + const { encryptedPassphrase }: Args = args; + if (!encryptedPassphrase && !passphraseSource) { throw new ValidationError('No encrypted passphrase was provided.'); } @@ -57,7 +104,7 @@ export default class DecryptCommand extends BaseCommand { source: passwordSource, }, data: encryptedPassphrase - ? null + ? undefined : { source: passphraseSource, }, @@ -66,26 +113,3 @@ export default class DecryptCommand extends BaseCommand { this.print(result); } } - -DecryptCommand.args = [ - { - name: 'encryptedPassphrase', - description: 'Encrypted passphrase to decrypt.', - }, -]; - -DecryptCommand.flags = { - ...BaseCommand.flags, - password: flagParser.string(commonFlags.password), - passphrase: flagParser.string({ - description: passphraseOptionDescription, - }), -}; - -DecryptCommand.description = ` -Decrypts your secret passphrase using the password which was provided at the time of encryption. -`; - -DecryptCommand.examples = [ - 'passphrase:decrypt "iterations=1000000&cipherText=9b1c60&iv=5c8843f52ed3c0f2aa0086b0&salt=2240b7f1aa9c899894e528cf5b600e9c&tag=23c01112134317a63bcf3d41ea74e83b&version=1"', -]; diff --git a/src/commands/passphrase/encrypt.js b/src/commands/passphrase/encrypt.ts similarity index 54% rename from src/commands/passphrase/encrypt.js rename to src/commands/passphrase/encrypt.ts index 2372bc80..067c5561 100644 --- a/src/commands/passphrase/encrypt.js +++ b/src/commands/passphrase/encrypt.ts @@ -13,33 +13,64 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { + encryptPassphraseWithPassword, + getKeys, + stringifyEncryptedPassphrase, +} from '@liskhq/lisk-cryptography'; import { flags as flagParser } from '@oclif/command'; -import cryptography from '@liskhq/lisk-cryptography'; import BaseCommand from '../../base'; -import commonFlags from '../../utils/flags'; -import getInputsFromSources from '../../utils/input'; +import { ValidationError } from '../../utils/error'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources, InputFromSourceOutput } from '../../utils/input'; const outputPublicKeyOptionDescription = 'Includes the public key in the output. This option is provided for the convenience of node operators.'; -const processInputs = outputPublicKey => ({ passphrase, password }) => { - const encryptedPassphraseObject = cryptography.encryptPassphraseWithPassword( +const processInputs = (outputPublicKey: boolean) => ({ + passphrase, + password, +}: InputFromSourceOutput) => { + if (!passphrase) { + throw new ValidationError('No passphrase was provided'); + } + if (!password) { + throw new ValidationError('No password was provided'); + } + + const encryptedPassphraseObject = encryptPassphraseWithPassword( passphrase, password, ); - const encryptedPassphrase = cryptography.stringifyEncryptedPassphrase( + const encryptedPassphrase = stringifyEncryptedPassphrase( encryptedPassphraseObject, ); + return outputPublicKey ? { encryptedPassphrase, - publicKey: cryptography.getKeys(passphrase).publicKey, + publicKey: getKeys(passphrase).publicKey, } : { encryptedPassphrase }; }; export default class EncryptCommand extends BaseCommand { - async run() { + static description = ` + Encrypts your secret passphrase under a password. + `; + + static examples = ['passphrase:encrypt']; + + static flags = { + ...BaseCommand.flags, + password: flagParser.string(commonFlags.password), + passphrase: flagParser.string(commonFlags.passphrase), + outputPublicKey: flagParser.boolean({ + description: outputPublicKeyOptionDescription, + }), + }; + + async run(): Promise { const { flags: { passphrase: passphraseSource, @@ -61,18 +92,3 @@ export default class EncryptCommand extends BaseCommand { this.print(result); } } - -EncryptCommand.flags = { - ...BaseCommand.flags, - password: flagParser.string(commonFlags.password), - passphrase: flagParser.string(commonFlags.passphrase), - outputPublicKey: flagParser.boolean({ - description: outputPublicKeyOptionDescription, - }), -}; - -EncryptCommand.description = ` -Encrypts your secret passphrase under a password. -`; - -EncryptCommand.examples = ['passphrase:encrypt']; diff --git a/src/commands/signature/broadcast.js b/src/commands/signature/broadcast.ts similarity index 59% rename from src/commands/signature/broadcast.js rename to src/commands/signature/broadcast.ts index ad57d2a3..f51b06c9 100644 --- a/src/commands/signature/broadcast.js +++ b/src/commands/signature/broadcast.ts @@ -14,9 +14,13 @@ * */ import BaseCommand from '../../base'; +import { getAPIClient } from '../../utils/api'; import { ValidationError } from '../../utils/error'; import { getStdIn } from '../../utils/input/utils'; -import getAPIClient from '../../utils/api'; + +interface Args { + readonly signature?: string; +} const getSignatureInput = async () => { try { @@ -24,6 +28,7 @@ const getSignatureInput = async () => { if (!data) { throw new ValidationError('No signature was provided.'); } + return data; } catch (e) { throw new ValidationError('No signature was provided.'); @@ -31,10 +36,34 @@ const getSignatureInput = async () => { }; export default class BroadcastCommand extends BaseCommand { - async run() { - const { args: { signature } } = this.parse(BroadcastCommand); + static args = [ + { + name: 'signature', + description: 'Signature to broadcast.', + }, + ]; + + static description = ` + Broadcasts a signature for a transaction from a multisignature account. + Accepts a stringified JSON signature as an argument, or a signature can be piped from a previous command. + If piping make sure to quote out the entire command chain to avoid piping-related conflicts in your shell. + `; + + static examples = [ + 'signature:broadcast \'{"transactionId":"abcd1234","publicKey":"abcd1234","signature":"abcd1234"}\'', + 'echo \'{"transactionId":"abcd1234","publicKey":"abcd1234","signature":"abcd1234"}\' | lisk signature:broadcast', + ]; + + static lags = { + ...BaseCommand.flags, + }; + + async run(): Promise { + const { args } = this.parse(BroadcastCommand); + const { signature }: Args = args; const signatureInput = signature || (await getSignatureInput()); - let signatureObject; + // tslint:disable-next-line no-let + let signatureObject: object; try { signatureObject = JSON.parse(signatureInput); } catch (error) { @@ -47,25 +76,3 @@ export default class BroadcastCommand extends BaseCommand { this.print(response.data); } } - -BroadcastCommand.args = [ - { - name: 'signature', - description: 'Signature to broadcast.', - }, -]; - -BroadcastCommand.flags = { - ...BaseCommand.flags, -}; - -BroadcastCommand.description = ` -Broadcasts a signature for a transaction from a multisignature account. -Accepts a stringified JSON signature as an argument, or a signature can be piped from a previous command. -If piping make sure to quote out the entire command chain to avoid piping-related conflicts in your shell. -`; - -BroadcastCommand.examples = [ - 'signature:broadcast \'{"transactionId":"abcd1234","publicKey":"abcd1234","signature":"abcd1234"}\'', - 'echo \'{"transactionId":"abcd1234","publicKey":"abcd1234","signature":"abcd1234"}\' | lisk signature:broadcast', -]; diff --git a/src/commands/signature/create.js b/src/commands/signature/create.ts similarity index 54% rename from src/commands/signature/create.js rename to src/commands/signature/create.ts index b02997c0..09d06289 100644 --- a/src/commands/signature/create.js +++ b/src/commands/signature/create.ts @@ -13,21 +13,26 @@ * Removal or modification of this copyright notice is prohibited. * */ -import transactions from '@liskhq/lisk-transactions'; +import * as transactions from '@liskhq/lisk-transactions'; import { flags as flagParser } from '@oclif/command'; import BaseCommand from '../../base'; -import { getStdIn } from '../../utils/input/utils'; import { ValidationError } from '../../utils/error'; -import parseTransactionString from '../../utils/transactions'; -import getInputsFromSources from '../../utils/input'; -import commonFlags from '../../utils/flags'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources } from '../../utils/input'; +import { getStdIn } from '../../utils/input/utils'; +import { parseTransactionString } from '../../utils/transactions'; -const getTransactionInput = async () => { +interface Args { + readonly transaction?: string; +} + +const getTransactionInput = async (): Promise => { try { const { data } = await getStdIn({ dataIsRequired: true }); if (!data) { throw new ValidationError('No transaction was provided.'); } + return data; } catch (e) { throw new ValidationError('No transaction was provided.'); @@ -35,12 +40,33 @@ const getTransactionInput = async () => { }; export default class CreateCommand extends BaseCommand { - async run() { - const { - args: { transaction }, - flags: { passphrase: passphraseSource }, - } = this.parse(CreateCommand); + static args = [ + { + name: 'transaction', + description: 'Transaction in JSON format.', + }, + ]; + static description = ` + Create a signature object for a transaction from a multisignature account. + Accepts a stringified JSON transaction as an argument. + `; + + static examples = [ + 'signature:create \'{"amount":"10","recipientId":"8050281191221330746L","senderPublicKey":"3358a1562f9babd523a768e700bb12ad58f230f84031055802dc0ea58cef1e1b","timestamp":59353522,"type":0,"asset":{},"signature":"b84b95087c381ad25b5701096e2d9366ffd04037dcc941cd0747bfb0cf93111834a6c662f149018be4587e6fc4c9f5ba47aa5bbbd3dd836988f153aa8258e604"}\'', + ]; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + }; + + async run(): Promise { + const { args, flags: { passphrase: passphraseSource } } = this.parse( + CreateCommand, + ); + + const { transaction }: Args = args; const transactionInput = transaction || (await getTransactionInput()); const transactionObject = parseTransactionString(transactionInput); @@ -57,6 +83,10 @@ export default class CreateCommand extends BaseCommand { }, }); + if (!passphrase) { + throw new ValidationError('No passphrase was provided.'); + } + const result = transactions.createSignatureObject( transactionObject, passphrase, @@ -65,24 +95,3 @@ export default class CreateCommand extends BaseCommand { this.print(result); } } - -CreateCommand.args = [ - { - name: 'transaction', - description: 'Transaction in JSON format.', - }, -]; - -CreateCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), -}; - -CreateCommand.description = ` -Create a signature object for a transaction from a multisignature account. -Accepts a stringified JSON transaction as an argument. -`; - -CreateCommand.examples = [ - 'signature:create \'{"amount":"10","recipientId":"8050281191221330746L","senderPublicKey":"3358a1562f9babd523a768e700bb12ad58f230f84031055802dc0ea58cef1e1b","timestamp":59353522,"type":0,"asset":{},"signature":"b84b95087c381ad25b5701096e2d9366ffd04037dcc941cd0747bfb0cf93111834a6c662f149018be4587e6fc4c9f5ba47aa5bbbd3dd836988f153aa8258e604"}\'', -]; diff --git a/src/commands/transaction/broadcast.js b/src/commands/transaction/broadcast.ts similarity index 60% rename from src/commands/transaction/broadcast.js rename to src/commands/transaction/broadcast.ts index 5e18b2ec..107fc8a9 100644 --- a/src/commands/transaction/broadcast.js +++ b/src/commands/transaction/broadcast.ts @@ -14,17 +14,18 @@ * */ import BaseCommand from '../../base'; -import parseTransactionString from '../../utils/transactions'; +import { getAPIClient } from '../../utils/api'; import { ValidationError } from '../../utils/error'; import { getStdIn } from '../../utils/input/utils'; -import getAPIClient from '../../utils/api'; +import { parseTransactionString } from '../../utils/transactions'; -const getTransactionInput = async () => { +const getTransactionInput = async (): Promise => { try { const { data } = await getStdIn({ dataIsRequired: true }); if (!data) { throw new ValidationError('No transaction was provided.'); } + return data; } catch (e) { throw new ValidationError('No transaction was provided.'); @@ -32,7 +33,29 @@ const getTransactionInput = async () => { }; export default class BroadcastCommand extends BaseCommand { - async run() { + static args = [ + { + name: 'transaction', + description: 'Transaction to broadcast in JSON format.', + }, + ]; + + static description = ` + Broadcasts a transaction to the network via the node specified in the current config. + Accepts a stringified JSON transaction as an argument, or a transaction can be piped from a previous command. + If piping make sure to quote out the entire command chain to avoid piping-related conflicts in your shell. + `; + + static examples = [ + 'broadcast transaction \'{"type":0,"amount":"100",...}\'', + 'echo \'{"type":0,"amount":"100",...}\' | lisk transaction:broadcast', + ]; + + static flags = { + ...BaseCommand.flags, + }; + + async run(): Promise { const { args: { transaction } } = this.parse(BroadcastCommand); const transactionInput = transaction || (await getTransactionInput()); const transactionObject = parseTransactionString(transactionInput); @@ -41,25 +64,3 @@ export default class BroadcastCommand extends BaseCommand { this.print(response.data); } } - -BroadcastCommand.args = [ - { - name: 'transaction', - description: 'Transaction to broadcast in JSON format.', - }, -]; - -BroadcastCommand.flags = { - ...BaseCommand.flags, -}; - -BroadcastCommand.description = ` -Broadcasts a transaction to the network via the node specified in the current config. -Accepts a stringified JSON transaction as an argument, or a transaction can be piped from a previous command. -If piping make sure to quote out the entire command chain to avoid piping-related conflicts in your shell. -`; - -BroadcastCommand.examples = [ - 'broadcast transaction \'{"type":0,"amount":"100",...}\'', - 'echo \'{"type":0,"amount":"100",...}\' | lisk transaction:broadcast', -]; diff --git a/src/commands/transaction/create.js b/src/commands/transaction/create.ts similarity index 55% rename from src/commands/transaction/create.js rename to src/commands/transaction/create.ts index 14366878..d0c7ce78 100644 --- a/src/commands/transaction/create.js +++ b/src/commands/transaction/create.ts @@ -15,29 +15,41 @@ */ import { flags as flagParser } from '@oclif/command'; import BaseCommand from '../../base'; -import commonFlags from '../../utils/flags'; -import TransferCommand from './create/transfer'; -import SecondPassphraseCommand from './create/second-passphrase'; -import VoteCommand from './create/vote'; +import { flags as commonFlags } from '../../utils/flags'; import DelegateCommand from './create/delegate'; import MultisignatureCommand from './create/multisignature'; +import SecondPassphraseCommand from './create/second-passphrase'; +import TransferCommand from './create/transfer'; +import VoteCommand from './create/vote'; const MAX_ARG_NUM = 3; -const typeNumberMap = { - 0: 'transfer', - 1: 'second-passphrase', - 2: 'delegate', - 3: 'vote', - 4: 'multisignature', +interface TypeNumberMap { + readonly [key: string]: string; +} + +const typeNumberMap: TypeNumberMap = { + '0': 'transfer', + '1': 'second-passphrase', + '2': 'delegate', + '3': 'vote', + '4': 'multisignature', }; const options = Object.entries(typeNumberMap).reduce( - (accumulated, [key, value]) => [...accumulated, key, value], + (accumulated: string[], [key, value]: [string, string]) => [ + ...accumulated, + key, + value, + ], [], ); -const typeClassMap = { +interface TypeClassMap { + readonly [key: string]: typeof BaseCommand; +} + +const typeClassMap: TypeClassMap = { transfer: TransferCommand, 'second-passphrase': SecondPassphraseCommand, vote: VoteCommand, @@ -45,7 +57,10 @@ const typeClassMap = { multisignature: MultisignatureCommand, }; -const resolveFlags = (accumulated, [key, value]) => { +const resolveFlags = ( + accumulated: ReadonlyArray, + [key, value]: [string, string | boolean | undefined], +): ReadonlyArray => { if (key === 'type') { return accumulated; } @@ -53,11 +68,40 @@ const resolveFlags = (accumulated, [key, value]) => { return [...accumulated, `--${key}`, value]; } const boolKey = value === false ? `--no-${key}` : `--${key}`; + return [...accumulated, boolKey]; }; export default class CreateCommand extends BaseCommand { - async run() { + static args = new Array(MAX_ARG_NUM).fill(0).map(i => ({ + name: `${i}_arg`, + })); + + static description = ` + Creates a transaction object. + `; + + static examples = [ + 'transaction:create --type=0 100 13356260975429434553L', + 'transaction:create --type=delegate lightcurve', + ]; + + static flags = { + ...BaseCommand.flags, + type: flagParser.string({ + char: 't', + description: 'type of transaction to create', + required: true, + options, + }), + passphrase: flagParser.string(commonFlags.passphrase), + 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), + 'no-signature': flagParser.boolean(commonFlags.noSignature), + votes: flagParser.string(commonFlags.votes), + unvotes: flagParser.string(commonFlags.unvotes), + }; + + async run(): Promise { const { argv, flags } = this.parse(CreateCommand); const { type } = flags; const commandType = Object.keys(typeNumberMap).includes(type) @@ -67,31 +111,3 @@ export default class CreateCommand extends BaseCommand { await typeClassMap[commandType].run([...argv, ...resolvedFlags]); } } - -CreateCommand.flags = { - ...BaseCommand.flags, - type: flagParser.string({ - char: 't', - description: 'type of transaction to create', - required: true, - options, - }), - passphrase: flagParser.string(commonFlags.passphrase), - 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), - 'no-signature': flagParser.boolean(commonFlags.noSignature), - votes: flagParser.string(commonFlags.votes), - unvotes: flagParser.string(commonFlags.unvotes), -}; - -CreateCommand.args = new Array(MAX_ARG_NUM).fill().map(i => ({ - name: `${i}_arg`, -})); - -CreateCommand.description = ` -Creates a transaction object. -`; - -CreateCommand.examples = [ - 'transaction:create --type=0 100 13356260975429434553L', - 'transaction:create --type=delegate lightcurve', -]; diff --git a/src/commands/transaction/create/delegate.js b/src/commands/transaction/create/delegate.ts similarity index 51% rename from src/commands/transaction/create/delegate.js rename to src/commands/transaction/create/delegate.ts index 728bef61..e32601c1 100644 --- a/src/commands/transaction/create/delegate.js +++ b/src/commands/transaction/create/delegate.ts @@ -13,23 +13,54 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { registerDelegate } from '@liskhq/lisk-transactions'; import { flags as flagParser } from '@oclif/command'; -import transactions from '@liskhq/lisk-transactions'; import BaseCommand from '../../../base'; -import commonFlags from '../../../utils/flags'; -import getInputsFromSources from '../../../utils/input'; +import { flags as commonFlags } from '../../../utils/flags'; +import { + getInputsFromSources, + InputFromSourceOutput, +} from '../../../utils/input'; -const processInputs = username => ({ passphrase, secondPassphrase }) => - transactions.registerDelegate({ +interface Args { + readonly username: string; +} + +const processInputs = (username: string) => ({ + passphrase, + secondPassphrase, +}: InputFromSourceOutput) => + registerDelegate({ passphrase, secondPassphrase, username, }); export default class DelegateCommand extends BaseCommand { - async run() { + static args = [ + { + name: 'username', + required: true, + description: 'Username to register as a delegate.', + }, + ]; + + static description = ` + Creates a transaction which will register the account as a delegate candidate if broadcast to the network. + `; + + static examples = ['transaction:create:delegate lightcurve']; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), + 'no-signature': flagParser.boolean(commonFlags.noSignature), + }; + + async run(): Promise { const { - args: { username }, + args, flags: { passphrase: passphraseSource, 'second-passphrase': secondPassphraseSource, @@ -37,14 +68,17 @@ export default class DelegateCommand extends BaseCommand { }, } = this.parse(DelegateCommand); + const { username }: Args = args; const processFunction = processInputs(username); if (noSignature) { - const result = processFunction({ - passphrase: null, - secondPassphrase: null, + const noSignatureResult = processFunction({ + passphrase: undefined, + secondPassphrase: undefined, }); - return this.print(result); + this.print(noSignatureResult); + + return; } const inputs = await getInputsFromSources({ @@ -53,34 +87,13 @@ export default class DelegateCommand extends BaseCommand { repeatPrompt: true, }, secondPassphrase: !secondPassphraseSource - ? null + ? undefined : { source: secondPassphraseSource, repeatPrompt: true, }, }); const result = processFunction(inputs); - return this.print(result); + this.print(result); } } - -DelegateCommand.args = [ - { - name: 'username', - required: true, - description: 'Username to register as a delegate.', - }, -]; - -DelegateCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), - 'no-signature': flagParser.boolean(commonFlags.noSignature), -}; - -DelegateCommand.description = ` -Creates a transaction which will register the account as a delegate candidate if broadcast to the network. -`; - -DelegateCommand.examples = ['transaction:create:delegate lightcurve']; diff --git a/src/commands/transaction/create/multisignature.js b/src/commands/transaction/create/multisignature.js deleted file mode 100644 index cff1b6c9..00000000 --- a/src/commands/transaction/create/multisignature.js +++ /dev/null @@ -1,122 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import { flags as flagParser } from '@oclif/command'; -import transactions from '@liskhq/lisk-transactions'; -import BaseCommand from '../../../base'; -import commonFlags from '../../../utils/flags'; -import getInputsFromSources from '../../../utils/input'; -import { validateLifetime, validateMinimum } from '../../../utils/helpers'; - -const processInputs = (lifetime, minimum, keysgroup) => ({ - passphrase, - secondPassphrase, -}) => - transactions.registerMultisignature({ - passphrase, - secondPassphrase, - keysgroup, - lifetime, - minimum, - }); - -export default class MultisignatureCommand extends BaseCommand { - async run() { - const { - args: { lifetime, minimum, keysgroup }, - flags: { - passphrase: passphraseSource, - 'second-passphrase': secondPassphraseSource, - 'no-signature': noSignature, - }, - } = this.parse(MultisignatureCommand); - - transactions.utils.validatePublicKeys(keysgroup); - - validateLifetime(lifetime); - validateMinimum(minimum); - - const transactionLifetime = parseInt(lifetime, 10); - const transactionMinimumConfirmations = parseInt(minimum, 10); - const processFunction = processInputs( - transactionLifetime, - transactionMinimumConfirmations, - keysgroup, - ); - - if (noSignature) { - const result = processFunction({ - passphrase: null, - secondPassphrase: null, - }); - return this.print(result); - } - - const inputs = await getInputsFromSources({ - passphrase: { - source: passphraseSource, - repeatPrompt: true, - }, - secondPassphrase: !secondPassphraseSource - ? null - : { - source: secondPassphraseSource, - repeatPrompt: true, - }, - }); - const result = processFunction(inputs); - return this.print(result); - } -} - -MultisignatureCommand.args = [ - { - name: 'lifetime', - required: true, - description: - 'Number of hours the transaction should remain in the transaction pool before becoming invalid.', - }, - { - name: 'minimum', - required: true, - description: - 'Minimum number of signatures required for a transaction from the account to be valid.', - }, - { - name: 'keysgroup', - required: true, - description: - 'Public keys to verify signatures against for the multisignature group.', - parse: input => input.split(','), - }, -]; - -MultisignatureCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), - 'no-signature': flagParser.boolean(commonFlags.noSignature), -}; - -MultisignatureCommand.description = ` -Creates a transaction which will register the account as a multisignature account if broadcast to the network, using the following arguments: - 1. Number of hours the transaction should remain in the transaction pool before becoming invalid. - 2. Minimum number of signatures required for a transaction from the account to be valid. - 3. Public keys to verify signatures against for the multisignature group. -`; - -MultisignatureCommand.examples = [ - 'transaction:create:multisignature 24 2 215b667a32a5cd51a94c9c2046c11fffb08c65748febec099451e3b164452bca,922fbfdd596fa78269bbcadc67ec2a1cc15fc929a19c462169568d7a3df1a1aa', -]; diff --git a/src/commands/transaction/create/multisignature.ts b/src/commands/transaction/create/multisignature.ts new file mode 100644 index 00000000..90081dbb --- /dev/null +++ b/src/commands/transaction/create/multisignature.ts @@ -0,0 +1,139 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { + registerMultisignature, + utils as transactionUtils, +} from '@liskhq/lisk-transactions'; +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../../base'; +import { flags as commonFlags } from '../../../utils/flags'; +import { validateLifetime, validateMinimum } from '../../../utils/helpers'; +import { + getInputsFromSources, + InputFromSourceOutput, +} from '../../../utils/input'; + +interface Args { + readonly keysgroup: string; + readonly lifetime: string; + readonly minimum: string; +} + +const processInputs = ( + lifetime: number, + minimum: number, + keysgroup: ReadonlyArray, +) => ({ passphrase, secondPassphrase }: InputFromSourceOutput) => + registerMultisignature({ + passphrase, + secondPassphrase, + keysgroup, + lifetime, + minimum, + }); + +export default class MultisignatureCommand extends BaseCommand { + static args = [ + { + name: 'lifetime', + required: true, + description: + 'Number of hours the transaction should remain in the transaction pool before becoming invalid.', + }, + { + name: 'minimum', + required: true, + description: + 'Minimum number of signatures required for a transaction from the account to be valid.', + }, + { + name: 'keysgroup', + required: true, + description: + 'Public keys to verify signatures against for the multisignature group.', + }, + ]; + + static description = ` + Creates a transaction which will register the account as a multisignature account if broadcast to the network, using the following arguments: + 1. Number of hours the transaction should remain in the transaction pool before becoming invalid. + 2. Minimum number of signatures required for a transaction from the account to be valid. + 3. Public keys to verify signatures against for the multisignature group. + `; + + static examples = [ + 'transaction:create:multisignature 24 2 215b667a32a5cd51a94c9c2046c11fffb08c65748febec099451e3b164452bca,922fbfdd596fa78269bbcadc67ec2a1cc15fc929a19c462169568d7a3df1a1aa', + ]; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), + 'no-signature': flagParser.boolean(commonFlags.noSignature), + }; + + async run(): Promise { + const { + args, + flags: { + passphrase: passphraseSource, + 'second-passphrase': secondPassphraseSource, + 'no-signature': noSignature, + }, + } = this.parse(MultisignatureCommand); + + const { lifetime, minimum, keysgroup: keysgroupStr }: Args = args; + const keysgroup = keysgroupStr.split(','); + + transactionUtils.validatePublicKeys(keysgroup); + + validateLifetime(lifetime); + validateMinimum(minimum); + + const transactionLifetime = parseInt(lifetime, 10); + const transactionMinimumConfirmations = parseInt(minimum, 10); + const processFunction = processInputs( + transactionLifetime, + transactionMinimumConfirmations, + keysgroup, + ); + + if (noSignature) { + const noSignatureResult = processFunction({ + passphrase: undefined, + secondPassphrase: undefined, + }); + this.print(noSignatureResult); + + return; + } + + const inputs = await getInputsFromSources({ + passphrase: { + source: passphraseSource, + repeatPrompt: true, + }, + secondPassphrase: !secondPassphraseSource + ? undefined + : { + source: secondPassphraseSource, + repeatPrompt: true, + }, + }); + const result = processFunction(inputs); + this.print(result); + } +} diff --git a/src/commands/transaction/create/second-passphrase.js b/src/commands/transaction/create/second-passphrase.ts similarity index 58% rename from src/commands/transaction/create/second-passphrase.js rename to src/commands/transaction/create/second-passphrase.ts index e29a2133..bf0d0c91 100644 --- a/src/commands/transaction/create/second-passphrase.js +++ b/src/commands/transaction/create/second-passphrase.ts @@ -13,20 +13,45 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { registerSecondPassphrase } from '@liskhq/lisk-transactions'; import { flags as flagParser } from '@oclif/command'; -import transactions from '@liskhq/lisk-transactions'; import BaseCommand from '../../../base'; -import commonFlags from '../../../utils/flags'; -import getInputsFromSources from '../../../utils/input'; +import { ValidationError } from '../../../utils/error'; +import { flags as commonFlags } from '../../../utils/flags'; +import { + getInputsFromSources, + InputFromSourceOutput, +} from '../../../utils/input'; -export const processInputs = () => ({ passphrase, secondPassphrase }) => - transactions.registerSecondPassphrase({ +export const processInputs = () => ({ + passphrase, + secondPassphrase, +}: InputFromSourceOutput) => { + if (!secondPassphrase) { + throw new ValidationError('No second passphrase was provided.'); + } + + return registerSecondPassphrase({ passphrase, secondPassphrase, }); +}; export default class SecondPassphraseCommand extends BaseCommand { - async run() { + static description = ` + Creates a transaction which will register a second passphrase for the account if broadcast to the network. + `; + + static examples = ['transaction:create:second-passphrase']; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), + 'no-signature': flagParser.boolean(commonFlags.noSignature), + }; + + async run(): Promise { const { flags: { passphrase: passphraseSource, @@ -39,7 +64,7 @@ export default class SecondPassphraseCommand extends BaseCommand { const inputs = noSignature ? await getInputsFromSources({ - passphrase: null, + passphrase: undefined, secondPassphrase: { source: secondPassphraseSource, repeatPrompt: true, @@ -59,16 +84,3 @@ export default class SecondPassphraseCommand extends BaseCommand { this.print(result); } } - -SecondPassphraseCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), - 'no-signature': flagParser.boolean(commonFlags.noSignature), -}; - -SecondPassphraseCommand.description = ` -Creates a transaction which will register a second passphrase for the account if broadcast to the network. -`; - -SecondPassphraseCommand.examples = ['transaction:create:second-passphrase']; diff --git a/src/commands/transaction/create/transfer.js b/src/commands/transaction/create/transfer.js deleted file mode 100644 index c69b7d4c..00000000 --- a/src/commands/transaction/create/transfer.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import { flags as flagParser } from '@oclif/command'; -import transactions from '@liskhq/lisk-transactions'; -import BaseCommand from '../../../base'; -import commonFlags from '../../../utils/flags'; -import getInputsFromSources from '../../../utils/input'; - -const processInputs = (amount, address) => ({ passphrase, secondPassphrase }) => - transactions.transfer({ - recipientId: address, - amount, - passphrase, - secondPassphrase, - }); - -export default class TransferCommand extends BaseCommand { - async run() { - const { - args: { amount, address }, - flags: { - passphrase: passphraseSource, - 'second-passphrase': secondPassphraseSource, - 'no-signature': noSignature, - }, - } = this.parse(TransferCommand); - - transactions.utils.validateAddress(address); - const normalizedAmount = transactions.utils.convertLSKToBeddows(amount); - const processFunction = processInputs(normalizedAmount, address); - - if (noSignature) { - const result = processFunction({ - passphrase: null, - secondPassphrase: null, - }); - return this.print(result); - } - - const inputs = await getInputsFromSources({ - passphrase: { - source: passphraseSource, - repeatPrompt: true, - }, - secondPassphrase: !secondPassphraseSource - ? null - : { - source: secondPassphraseSource, - repeatPrompt: true, - }, - }); - const result = processFunction(inputs); - return this.print(result); - } -} - -TransferCommand.args = [ - { - name: 'amount', - required: true, - description: 'Amount of LSK to send.', - }, - { - name: 'address', - required: true, - description: 'Address of the recipient.', - }, -]; - -TransferCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), - 'no-signature': flagParser.boolean(commonFlags.noSignature), -}; - -TransferCommand.description = ` -Creates a transaction which will transfer the specified amount to an address if broadcast to the network. - `; - -TransferCommand.examples = [ - 'transaction:create:transfer 100 13356260975429434553L', -]; diff --git a/src/commands/transaction/create/transfer.ts b/src/commands/transaction/create/transfer.ts new file mode 100644 index 00000000..81bd4c88 --- /dev/null +++ b/src/commands/transaction/create/transfer.ts @@ -0,0 +1,125 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { transfer, utils as transactionUtils } from '@liskhq/lisk-transactions'; +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../../base'; +import { AlphabetLowercase, flags as commonFlags } from '../../../utils/flags'; +import { + getInputsFromSources, + InputFromSourceOutput, +} from '../../../utils/input'; + +interface Args { + readonly address: string; + readonly amount: string; +} + +const dataFlag = { + char: 'd' as AlphabetLowercase, + description: `Optional UTF8 encoded data (maximum of 64 bytes) to include in the transaction asset. + Examples: + - --data=customInformation +`, +}; + +const processInputs = (amount: string, address: string, data?: string) => ({ + passphrase, + secondPassphrase, +}: InputFromSourceOutput) => + transfer({ + recipientId: address, + amount, + data, + passphrase, + secondPassphrase, + }); + +export default class TransferCommand extends BaseCommand { + static args = [ + { + name: 'amount', + required: true, + description: 'Amount of LSK to send.', + }, + { + name: 'address', + required: true, + description: 'Address of the recipient.', + }, + ]; + + static description = ` + Creates a transaction which will transfer the specified amount to an address if broadcast to the network. + `; + + static examples = ['transaction:create:transfer 100 13356260975429434553L']; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), + 'no-signature': flagParser.boolean(commonFlags.noSignature), + data: flagParser.string(dataFlag), + }; + + async run(): Promise { + const { + args, + flags: { + passphrase: passphraseSource, + 'second-passphrase': secondPassphraseSource, + 'no-signature': noSignature, + data: dataString, + }, + } = this.parse(TransferCommand); + + const { amount, address }: Args = args; + + transactionUtils.validateAddress(address); + const normalizedAmount = transactionUtils.convertLSKToBeddows(amount); + + const processFunction = processInputs( + normalizedAmount, + address, + dataString, + ); + + if (noSignature) { + const noSignatureResult = processFunction({ + passphrase: undefined, + secondPassphrase: undefined, + }); + this.print(noSignatureResult); + + return; + } + + const inputs = await getInputsFromSources({ + passphrase: { + source: passphraseSource, + repeatPrompt: true, + }, + secondPassphrase: !secondPassphraseSource + ? undefined + : { + source: secondPassphraseSource, + repeatPrompt: true, + }, + }); + const result = processFunction(inputs); + this.print(result); + } +} diff --git a/src/commands/transaction/create/vote.js b/src/commands/transaction/create/vote.ts similarity index 57% rename from src/commands/transaction/create/vote.js rename to src/commands/transaction/create/vote.ts index 39d4afcc..0397fdef 100644 --- a/src/commands/transaction/create/vote.js +++ b/src/commands/transaction/create/vote.ts @@ -13,39 +13,66 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { + castVotes, + utils as transactionUtils, +} from '@liskhq/lisk-transactions'; import { flags as flagParser } from '@oclif/command'; -import transactions from '@liskhq/lisk-transactions'; import BaseCommand from '../../../base'; -import commonFlags from '../../../utils/flags'; -import getInputsFromSources from '../../../utils/input'; -import { getData } from '../../../utils/input/utils'; import { ValidationError } from '../../../utils/error'; +import { flags as commonFlags } from '../../../utils/flags'; +import { + getInputsFromSources, + InputFromSourceOutput, +} from '../../../utils/input'; +import { getData } from '../../../utils/input/utils'; -const processInputs = (votes, unvotes) => ({ passphrase, secondPassphrase }) => - transactions.castVotes({ +const processInputs = ( + votes: ReadonlyArray, + unvotes: ReadonlyArray, +) => ({ passphrase, secondPassphrase }: InputFromSourceOutput) => + castVotes({ passphrase, votes, unvotes, secondPassphrase, }); -const processVotesInput = async votes => +const processVotesInput = async (votes: string) => votes.includes(':') ? getData(votes) : votes; -const processVotes = votes => +const processVotes = (votes: string) => votes .replace(/\n/g, ',') .split(',') .filter(Boolean) .map(vote => vote.trim()); -const validatePublicKeys = inputs => { - transactions.utils.validatePublicKeys(inputs); +const validatePublicKeys = (inputs: ReadonlyArray) => { + transactionUtils.validatePublicKeys(inputs); + return inputs; }; export default class VoteCommand extends BaseCommand { - async run() { + static description = ` + Creates a transaction which will cast votes (or unvotes) for delegate candidates using their public keys if broadcast to the network. + `; + + static examples = [ + 'transaction:create:vote --votes 215b667a32a5cd51a94c9c2046c11fffb08c65748febec099451e3b164452bca,922fbfdd596fa78269bbcadc67ec2a1cc15fc929a19c462169568d7a3df1a1aa --unvotes e01b6b8a9b808ec3f67a638a2d3fa0fe1a9439b91dbdde92e2839c3327bd4589,ac09bc40c889f688f9158cca1fcfcdf6320f501242e0f7088d52a5077084ccba', + ]; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), + 'no-signature': flagParser.boolean(commonFlags.noSignature), + votes: flagParser.string(commonFlags.votes), + unvotes: flagParser.string(commonFlags.unvotes), + }; + + async run(): Promise { const { flags: { passphrase: passphraseSource, @@ -70,10 +97,10 @@ export default class VoteCommand extends BaseCommand { const processedVotesInput = votes ? await processVotesInput(votes.toString()) - : null; + : undefined; const processedUnvotesInput = unvotes ? await processVotesInput(unvotes.toString()) - : null; + : undefined; const validatedVotes = processedVotesInput ? validatePublicKeys(processVotes(processedVotesInput)) @@ -85,11 +112,13 @@ export default class VoteCommand extends BaseCommand { const processFunction = processInputs(validatedVotes, validatedUnvotes); if (noSignature) { - const result = processFunction({ - passphrase: null, - secondPassphrase: null, + const noSignatureResult = processFunction({ + passphrase: undefined, + secondPassphrase: undefined, }); - return this.print(result); + this.print(noSignatureResult); + + return; } const inputs = await getInputsFromSources({ @@ -98,7 +127,7 @@ export default class VoteCommand extends BaseCommand { repeatPrompt: true, }, secondPassphrase: !secondPassphraseSource - ? null + ? undefined : { source: secondPassphraseSource, repeatPrompt: true, @@ -106,23 +135,6 @@ export default class VoteCommand extends BaseCommand { }); const result = processFunction(inputs); - return this.print(result); + this.print(result); } } - -VoteCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), - 'no-signature': flagParser.boolean(commonFlags.noSignature), - votes: flagParser.string(commonFlags.votes), - unvotes: flagParser.string(commonFlags.unvotes), -}; - -VoteCommand.description = ` -Creates a transaction which will cast votes (or unvotes) for delegate candidates using their public keys if broadcast to the network. -`; - -VoteCommand.examples = [ - 'transaction:create:vote --votes 215b667a32a5cd51a94c9c2046c11fffb08c65748febec099451e3b164452bca,922fbfdd596fa78269bbcadc67ec2a1cc15fc929a19c462169568d7a3df1a1aa --unvotes e01b6b8a9b808ec3f67a638a2d3fa0fe1a9439b91dbdde92e2839c3327bd4589,ac09bc40c889f688f9158cca1fcfcdf6320f501242e0f7088d52a5077084ccba', -]; diff --git a/src/commands/transaction/get.js b/src/commands/transaction/get.js deleted file mode 100644 index 98c3af87..00000000 --- a/src/commands/transaction/get.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import BaseCommand from '../../base'; -import getAPIClient from '../../utils/api'; -import query from '../../utils/query'; - -export default class GetCommand extends BaseCommand { - async run() { - const { args: { ids } } = this.parse(GetCommand); - const req = ids.map(id => ({ - query: { - limit: 1, - id, - }, - placeholder: { - id, - message: 'Transaction not found.', - }, - })); - const client = getAPIClient(this.userConfig.api); - const results = await query(client, 'transactions', req); - this.print(results); - } -} - -GetCommand.args = [ - { - name: 'ids', - required: true, - description: 'Comma-separated transaction ID(s) to get information about.', - parse: input => input.split(',').filter(Boolean), - }, -]; - -GetCommand.flags = { - ...BaseCommand.flags, -}; - -GetCommand.description = ` -Gets transaction information from the blockchain. -`; - -GetCommand.examples = [ - 'transaction:get 10041151099734832021', - 'transaction:get 10041151099734832021,1260076503909567890', -]; diff --git a/src/commands/transaction/get.ts b/src/commands/transaction/get.ts new file mode 100644 index 00000000..78a3d1ff --- /dev/null +++ b/src/commands/transaction/get.ts @@ -0,0 +1,264 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { flags as flagParser } from '@oclif/command'; +import BaseCommand from '../../base'; +import { getAPIClient } from '../../utils/api'; +import { AlphabetLowercase } from '../../utils/flags'; +import { query, queryNodeTransaction } from '../../utils/query'; + +interface Args { + readonly ids?: string; +} + +const TRANSACTION_STATES = ['unsigned', 'unprocessed']; +const SORT_OPTIONS = [ + 'amount:asc', + 'amount:desc', + 'fee:asc', + 'fee:desc', + 'type:asc', + 'type:desc', + 'timestamp:asc', + 'timestamp:desc', +]; + +const senderIdFlag = { + description: `Get transactions based by sender-id which is sender's lisk address'. + Examples: + - --sender-id=12668885769632475474L +`, +}; +const stateFlag = { + char: 's' as AlphabetLowercase, + options: TRANSACTION_STATES, + description: `Get transactions based on a given state. Possible values for the state are 'unsigned' and 'unprocessed'. + Examples: + - --state=unsigned + - --state=unprocessed +`, +}; + +export default class GetCommand extends BaseCommand { + static args = [ + { + name: 'ids', + required: false, + description: + 'Comma-separated transaction ID(s) to get information about.', + }, + ]; + + static description = ` + Gets transaction information from the blockchain. + `; + + static examples = [ + 'transaction:get 10041151099734832021', + 'transaction:get 10041151099734832021,1260076503909567890', + 'transaction:get 10041151099734832021,1260076503909567890 --state=unprocessed', + 'transaction:get --state=unsigned --sender-id=1813095620424213569L', + 'transaction:get 10041151099734832021 --state=unsigned --sender-id=1813095620424213569L', + 'transaction:get --sender-id=1813095620424213569L', + 'transaction:get --limit=10 --sort=amount:desc', + 'transaction:get --limit=10 --offset=5', + ]; + + static flags = { + ...BaseCommand.flags, + state: flagParser.string(stateFlag), + 'sender-id': flagParser.string(senderIdFlag), + limit: flagParser.string({ + description: + 'Limits the returned transactions array by specified integer amount. Maximum is 100.', + default: '10', + }), + offset: flagParser.string({ + description: + 'Offsets the returned transactions array by specified integer amount.', + default: '0', + }), + sort: flagParser.string({ + description: 'Fields to sort results by.', + default: 'timestamp:desc', + options: SORT_OPTIONS, + }), + }; + + async run(): Promise { + const { + args, + flags: { + limit, + offset, + sort, + 'sender-id': senderAddress, + state: txnState, + }, + } = this.parse(GetCommand); + const { ids: idsStr }: Args = args; + const ids = idsStr ? idsStr.split(',').filter(Boolean) : undefined; + + const client = getAPIClient(this.userConfig.api); + + if (txnState && senderAddress && ids) { + const reqTxnSenderId = ids.map(id => ({ + query: { + limit: 1, + id, + senderId: senderAddress, + }, + placeholder: { + id, + senderId: senderAddress, + message: 'Transaction not found.', + }, + })); + + const stateSenderIdsResult = await queryNodeTransaction( + client.node, + txnState, + reqTxnSenderId, + ); + this.print(stateSenderIdsResult); + + return; + } + + if (txnState && ids) { + const reqTransactionIds = ids.map(id => ({ + query: { + limit: 1, + id, + }, + placeholder: { + id, + message: 'Transaction not found.', + }, + })); + + const txnStateIdsResult = await queryNodeTransaction( + client.node, + txnState, + reqTransactionIds, + ); + this.print(txnStateIdsResult); + + return; + } + if (txnState && senderAddress) { + const reqWithSenderId = [ + { + query: { + limit, + offset, + sort, + senderId: senderAddress, + }, + placeholder: { + senderId: senderAddress, + message: 'Transaction not found.', + }, + }, + ]; + + const txnStateSenderResult = await queryNodeTransaction( + client.node, + txnState, + reqWithSenderId, + ); + this.print(txnStateSenderResult); + + return; + } + + if (txnState) { + const reqByLimitOffset = [ + { + query: { + limit, + offset, + sort, + }, + placeholder: { + message: 'No transactions found.', + }, + }, + ]; + + const txnStateResult = await queryNodeTransaction( + client.node, + txnState, + reqByLimitOffset, + ); + this.print(txnStateResult); + + return; + } + + if (ids) { + const reqTransactionIDs = ids.map(id => ({ + query: { + limit: 1, + id, + }, + placeholder: { + id, + message: 'Transaction not found.', + }, + })); + const idsResult = await query(client, 'transactions', reqTransactionIDs); + this.print(idsResult); + + return; + } + + if (senderAddress) { + const reqSenderId = { + query: { + limit, + offset, + sort, + senderId: senderAddress, + }, + placeholder: { + message: 'No transactions found.', + }, + }; + const senderAddressResult = await query( + client, + 'transactions', + reqSenderId, + ); + this.print(senderAddressResult); + + return; + } + + const req = { + query: { + limit, + offset, + sort, + }, + placeholder: { + message: 'No transactions found.', + }, + }; + const defaultResults = await query(client, 'transactions', req); + + this.print(defaultResults); + } +} diff --git a/src/commands/transaction/sign.js b/src/commands/transaction/sign.ts similarity index 64% rename from src/commands/transaction/sign.js rename to src/commands/transaction/sign.ts index 0d6f989e..317e1974 100644 --- a/src/commands/transaction/sign.js +++ b/src/commands/transaction/sign.ts @@ -13,21 +13,26 @@ * Removal or modification of this copyright notice is prohibited. * */ -import transactions from '@liskhq/lisk-transactions'; +import * as transactions from '@liskhq/lisk-transactions'; import { flags as flagParser } from '@oclif/command'; import BaseCommand from '../../base'; -import { getStdIn } from '../../utils/input/utils'; import { ValidationError } from '../../utils/error'; -import parseTransactionString from '../../utils/transactions'; -import getInputsFromSources from '../../utils/input'; -import commonFlags from '../../utils/flags'; +import { flags as commonFlags } from '../../utils/flags'; +import { getInputsFromSources } from '../../utils/input'; +import { getStdIn } from '../../utils/input/utils'; +import { parseTransactionString } from '../../utils/transactions'; + +interface Args { + readonly transaction?: string; +} -const getTransactionInput = async () => { +const getTransactionInput = async (): Promise => { try { const { data } = await getStdIn({ dataIsRequired: true }); if (!data) { throw new ValidationError('No transaction was provided.'); } + return data; } catch (e) { throw new ValidationError('No transaction was provided.'); @@ -35,15 +40,37 @@ const getTransactionInput = async () => { }; export default class SignCommand extends BaseCommand { - async run() { + static args = [ + { + name: 'transaction', + description: 'Transaction to sign in JSON format.', + }, + ]; + + static description = ` + Sign a transaction using your secret passphrase. + `; + + static examples = [ + 'transaction:sign \'{"amount":"100","recipientId":"13356260975429434553L","senderPublicKey":null,"timestamp":52871598,"type":0,"fee":"10000000","recipientPublicKey":null,"asset":{}}\'', + ]; + + static flags = { + ...BaseCommand.flags, + passphrase: flagParser.string(commonFlags.passphrase), + 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), + }; + + async run(): Promise { const { - args: { transaction }, + args, flags: { passphrase: passphraseSource, 'second-passphrase': secondPassphraseSource, }, } = this.parse(SignCommand); + const { transaction }: Args = args; const transactionInput = transaction || (await getTransactionInput()); const transactionObject = parseTransactionString(transactionInput); @@ -58,7 +85,7 @@ export default class SignCommand extends BaseCommand { repeatPrompt: true, }, secondPassphrase: !secondPassphraseSource - ? null + ? undefined : { source: secondPassphraseSource, repeatPrompt: true, @@ -74,24 +101,3 @@ export default class SignCommand extends BaseCommand { this.print(result); } } - -SignCommand.args = [ - { - name: 'transaction', - description: 'Transaction to sign in JSON format.', - }, -]; - -SignCommand.flags = { - ...BaseCommand.flags, - passphrase: flagParser.string(commonFlags.passphrase), - 'second-passphrase': flagParser.string(commonFlags.secondPassphrase), -}; - -SignCommand.description = ` -Sign a transaction using your secret passphrase. -`; - -SignCommand.examples = [ - 'transaction:sign \'{"amount":"100","recipientId":"13356260975429434553L","senderPublicKey":null,"timestamp":52871598,"type":0,"fee":"10000000","recipientPublicKey":null,"asset":{}}\'', -]; diff --git a/src/commands/transaction/verify.js b/src/commands/transaction/verify.ts similarity index 66% rename from src/commands/transaction/verify.js rename to src/commands/transaction/verify.ts index 736037c2..f9ad58b6 100644 --- a/src/commands/transaction/verify.js +++ b/src/commands/transaction/verify.ts @@ -13,12 +13,16 @@ * Removal or modification of this copyright notice is prohibited. * */ -import transactions from '@liskhq/lisk-transactions'; +import * as transactions from '@liskhq/lisk-transactions'; import { flags as flagParser } from '@oclif/command'; import BaseCommand from '../../base'; -import parseTransactionString from '../../utils/transactions'; -import { getStdIn, getData } from '../../utils/input/utils'; import { ValidationError } from '../../utils/error'; +import { getData, getStdIn } from '../../utils/input/utils'; +import { parseTransactionString } from '../../utils/transactions'; + +interface Args { + readonly transaction?: string; +} const secondPublicKeyDescription = `Specifies a source for providing a second public key to the command. The second public key must be provided via this option. Sources must be one of \`file\` or \`stdin\`. In the case of \`file\`, a corresponding identifier must also be provided. @@ -29,34 +33,60 @@ const secondPublicKeyDescription = `Specifies a source for providing a second pu - --second-public-key 790049f919979d5ea42cca7b7aa0812cbae8f0db3ee39c1fe3cef18e25b67951 `; -const getTransactionInput = async () => { +const getTransactionInput = async (): Promise => { try { const { data } = await getStdIn({ dataIsRequired: true }); if (!data) { throw new ValidationError('No transaction was provided.'); } + return data; } catch (e) { throw new ValidationError('No transaction was provided.'); } }; -const processSecondPublicKey = async secondPublicKey => +const processSecondPublicKey = async (secondPublicKey: string) => secondPublicKey.includes(':') ? getData(secondPublicKey) : secondPublicKey; export default class VerifyCommand extends BaseCommand { - async run() { + static args = [ + { + name: 'transaction', + description: 'Transaction to verify in JSON format.', + }, + ]; + + static description = ` + Verifies a transaction has a valid signature. + `; + + static examples = [ + 'transaction:verify \'{"type":0,"amount":"100",...}\'', + 'transaction:verify \'{"type":0,"amount":"100",...}\' --second-public-key=647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6', + ]; + + static flags = { + ...BaseCommand.flags, + 'second-public-key': flagParser.string({ + name: 'Second public key', + description: secondPublicKeyDescription, + }), + }; + + async run(): Promise { const { - args: { transaction }, + args, flags: { 'second-public-key': secondPublicKeySource }, } = this.parse(VerifyCommand); + const { transaction }: Args = args; const transactionInput = transaction || (await getTransactionInput()); const transactionObject = parseTransactionString(transactionInput); const secondPublicKey = secondPublicKeySource ? await processSecondPublicKey(secondPublicKeySource) - : null; + : undefined; const verified = transactions.utils.verifyTransaction( transactionObject, @@ -65,27 +95,3 @@ export default class VerifyCommand extends BaseCommand { this.print({ verified }); } } - -VerifyCommand.args = [ - { - name: 'transaction', - description: 'Transaction to verify in JSON format.', - }, -]; - -VerifyCommand.flags = { - ...BaseCommand.flags, - 'second-public-key': flagParser.string({ - name: 'Second public key', - description: secondPublicKeyDescription, - }), -}; - -VerifyCommand.description = ` -Verifies a transaction has a valid signature. -`; - -VerifyCommand.examples = [ - 'transaction:verify \'{"type":0,"amount":"100",...}\'', - 'transaction:verify \'{"type":0,"amount":"100",...}\' --second-public-key=647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6', -]; diff --git a/src/commands/warranty.js b/src/commands/warranty.ts similarity index 88% rename from src/commands/warranty.js rename to src/commands/warranty.ts index 9fed402d..8bee517a 100644 --- a/src/commands/warranty.js +++ b/src/commands/warranty.ts @@ -27,17 +27,17 @@ along with this program. If not, see . `.trim(); export default class WarrantyCommand extends BaseCommand { - async run() { - this.print({ warranty }); - } -} + static description = ` + Displays warranty notice. + `; -WarrantyCommand.flags = { - ...BaseCommand.flags, -}; + static examples = ['warranty']; -WarrantyCommand.description = ` -Displays warranty notice. -`; + static flags = { + ...BaseCommand.flags, + }; -WarrantyCommand.examples = ['warranty']; + async run(): Promise { + this.print({ warranty }); + } +} diff --git a/default_config.json b/src/default_config.json similarity index 100% rename from default_config.json rename to src/default_config.json diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 92d96221..00000000 --- a/src/index.js +++ /dev/null @@ -1 +0,0 @@ -export default '@oclif/command'; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..63a56fdf --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export { run } from '@oclif/command'; diff --git a/src/utils/api.js b/src/utils/api.ts similarity index 72% rename from src/utils/api.js rename to src/utils/api.ts index a9907527..5ab1ae1d 100644 --- a/src/utils/api.js +++ b/src/utils/api.ts @@ -13,19 +13,25 @@ * Removal or modification of this copyright notice is prohibited. * */ -import APIClient from '@liskhq/lisk-api-client'; +import { APIClient } from '@liskhq/lisk-api-client'; import { NETHASHES } from './constants'; -const seedNodes = { +const seedNodes: { readonly [key: string]: ReadonlyArray } = { main: APIClient.constants.MAINNET_NODES, test: APIClient.constants.TESTNET_NODES, - beta: APIClient.constants.BETANET_NODES, }; -const getAPIClient = ({ nodes, network }) => { +interface APIClientOptions { + readonly network: string; + readonly nodes: ReadonlyArray; +} + +export const getAPIClient = ({ + nodes, + network, +}: APIClientOptions): APIClient => { const nethash = NETHASHES[network] || network; const clientNodes = nodes && nodes.length > 0 ? nodes : seedNodes[network]; + return new APIClient(clientNodes, { nethash }); }; - -export default getAPIClient; diff --git a/src/utils/config.js b/src/utils/config.ts similarity index 60% rename from src/utils/config.js rename to src/utils/config.ts index 40dc9e60..6a254229 100644 --- a/src/utils/config.js +++ b/src/utils/config.ts @@ -14,20 +14,43 @@ * */ import fs from 'fs'; -import path from 'path'; import lockfile from 'lockfile'; -import defaultConfig from '../../default_config.json'; +import path from 'path'; +import * as defaultConfig from '../default_config.json'; import { CONFIG_VARIABLES } from './constants'; import { ValidationError } from './error'; import { readJSONSync, writeJSONSync } from './fs'; +export type WritableValue = + | string + | ReadonlyArray + | boolean + | number + | object; + +interface ConfigOptionsIndex { + // tslint:disable-next-line readonly-keyword + [key: string]: WritableValue; +} + +interface ConfigObject { + readonly api: { + readonly network: string; + readonly nodes: ReadonlyArray; + }; + readonly json: boolean; + readonly pretty: boolean; +} + +export type ConfigOptions = ConfigOptionsIndex & ConfigObject; + const configFileName = 'config.json'; const lockfileName = 'config.lock'; -const fileWriteErrorMessage = filePath => +const fileWriteErrorMessage = (filePath: string): string => `Could not write to \`${filePath}\`. Your configuration will not be persisted.`; -const attemptCallWithError = (fn, errorMessage) => { +const attemptCallWithError = (fn: () => T, errorMessage: string): T => { try { return fn(); } catch (_) { @@ -35,17 +58,17 @@ const attemptCallWithError = (fn, errorMessage) => { } }; -const attemptToCreateDir = dirPath => { - const fn = fs.mkdirSync.bind(null, dirPath); - return attemptCallWithError(fn, fileWriteErrorMessage(dirPath)); +const attemptToCreateDir = (dirPath: string): void => { + const fn = fs.mkdirSync.bind(undefined, dirPath); + attemptCallWithError(fn, fileWriteErrorMessage(dirPath)); }; -const attemptToCreateFile = filePath => { - const fn = writeJSONSync.bind(null, filePath, defaultConfig); - return attemptCallWithError(fn, fileWriteErrorMessage(filePath)); +const attemptToCreateFile = (filePath: string): void => { + const fn = writeJSONSync.bind(undefined, filePath, defaultConfig); + attemptCallWithError(fn, fileWriteErrorMessage(filePath)); }; -const checkLockfile = filePath => { +const checkLockfile = (filePath: string): void => { const locked = lockfile.checkSync(filePath); const errorMessage = `Config lockfile at ${filePath} found. Are you running Lisk Commander in another process?`; if (locked) { @@ -53,25 +76,31 @@ const checkLockfile = filePath => { } }; -const attemptToReadJSONFile = filePath => { - const fn = readJSONSync.bind(null, filePath); +const attemptToReadJSONFile = (filePath: string): T => { + const fn = readJSONSync.bind(undefined, filePath); const errorMessage = `Config file cannot be read or is not valid JSON. Please check ${filePath} or delete the file so we can create a new one from defaults.`; - return attemptCallWithError(fn, errorMessage); + + return attemptCallWithError(fn, errorMessage); }; -const attemptToValidateConfig = (config, filePath) => { +const attemptToValidateConfig = (config: object, filePath: string): void => { const rootKeys = CONFIG_VARIABLES.map(key => key.split('.')[0]); - const fn = () => + const fn = (): void => { rootKeys.forEach(key => { if (!Object.keys(config).includes(key)) { throw new ValidationError(`Key ${key} not found in config file.`); } }); + }; const errorMessage = `Config file seems to be corrupted: missing required keys. Please check ${filePath} or delete the file so we can create a new one from defaults.`; - return attemptCallWithError(fn, errorMessage); + + attemptCallWithError(fn, errorMessage); }; -export const setConfig = (configDirPath, newConfig) => { +export const setConfig = ( + configDirPath: string, + newConfig: object, +): boolean => { const lockFilePath = path.join(configDirPath, lockfileName); const configFilePath = path.join(configDirPath, configFileName); @@ -79,6 +108,7 @@ export const setConfig = (configDirPath, newConfig) => { lockfile.lockSync(lockFilePath); try { writeJSONSync(configFilePath, newConfig); + return true; } catch (e) { return false; @@ -87,7 +117,7 @@ export const setConfig = (configDirPath, newConfig) => { } }; -export const getConfig = configDirPath => { +export const getConfig = (configDirPath: string): ConfigOptions => { if (!fs.existsSync(configDirPath)) { attemptToCreateDir(configDirPath); } @@ -96,10 +126,11 @@ export const getConfig = configDirPath => { if (!fs.existsSync(configFilePath)) { attemptToCreateFile(configFilePath); + return defaultConfig; } - const config = attemptToReadJSONFile(configFilePath); + const config = attemptToReadJSONFile(configFilePath); attemptToValidateConfig(config, configFilePath); return config; diff --git a/src/utils/constants.js b/src/utils/constants.ts similarity index 68% rename from src/utils/constants.js rename to src/utils/constants.ts index d2b96506..e74ac214 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.ts @@ -15,7 +15,7 @@ */ import { MAINNET_NETHASH, TESTNET_NETHASH } from '@liskhq/lisk-constants'; -export const COMMAND_TYPES = [ +export const COMMAND_TYPES: ReadonlyArray = [ 'accounts', 'addresses', 'blocks', @@ -38,11 +38,25 @@ export const QUERY_INPUT_MAP = { transactions: 'id', }; -export const CONFIG_VARIABLES = ['api.nodes', 'api.network', 'json', 'pretty']; +export const CONFIG_VARIABLES: ReadonlyArray = [ + 'api.nodes', + 'api.network', + 'json', + 'pretty', +]; -export const API_PROTOCOLS = ['http:', 'https:']; +export const API_PROTOCOLS: ReadonlyArray = ['http:', 'https:']; -export const NETHASHES = { +export const NETHASHES: { readonly [key: string]: string } = { main: MAINNET_NETHASH, test: TESTNET_NETHASH, }; + +export const SORT_FIELDS: ReadonlyArray = [ + 'publicKey:asc', + 'publicKey:desc', + 'balance:asc', + 'balance:desc', + 'username:asc', + 'username:desc', +]; diff --git a/src/utils/cryptography.js b/src/utils/cryptography.ts similarity index 53% rename from src/utils/cryptography.js rename to src/utils/cryptography.ts index 6acc8cff..aeaa1f5e 100644 --- a/src/utils/cryptography.js +++ b/src/utils/cryptography.ts @@ -13,17 +13,34 @@ * Removal or modification of this copyright notice is prohibited. * */ -import cryptography from '@liskhq/lisk-cryptography'; +import * as cryptography from '@liskhq/lisk-cryptography'; -export const encryptMessage = ({ message, passphrase, recipient }) => +interface EncryptMessageInputs { + readonly message: string; + readonly passphrase: string; + readonly recipient: string; +} + +export const encryptMessage = ({ + message, + passphrase, + recipient, +}: EncryptMessageInputs) => cryptography.encryptMessageWithPassphrase(message, passphrase, recipient); +interface DecryptMessageInputs { + readonly cipher: string; + readonly nonce: string; + readonly passphrase: string; + readonly senderPublicKey: string; +} + export const decryptMessage = ({ cipher, nonce, passphrase, senderPublicKey, -}) => ({ +}: DecryptMessageInputs) => ({ message: cryptography.decryptMessageWithPassphrase( cipher, nonce, @@ -32,7 +49,15 @@ export const decryptMessage = ({ ), }); -export const encryptPassphrase = ({ passphrase, password }) => { +interface EncryptPassphraseInputs { + readonly passphrase: string; + readonly password: string; +} + +export const encryptPassphrase = ({ + passphrase, + password, +}: EncryptPassphraseInputs) => { const encryptedPassphraseObject = cryptography.encryptPassphraseWithPassword( passphrase, password, @@ -40,10 +65,19 @@ export const encryptPassphrase = ({ passphrase, password }) => { const encryptedPassphrase = cryptography.stringifyEncryptedPassphrase( encryptedPassphraseObject, ); + return { encryptedPassphrase }; }; -export const decryptPassphrase = ({ encryptedPassphrase, password }) => { +interface DecryptPassphraseInput { + readonly encryptedPassphrase: string; + readonly password: string; +} + +export const decryptPassphrase = ({ + encryptedPassphrase, + password, +}: DecryptPassphraseInput) => { const encryptedPassphraseObject = cryptography.parseEncryptedPassphrase( encryptedPassphrase, ); @@ -51,19 +85,37 @@ export const decryptPassphrase = ({ encryptedPassphrase, password }) => { encryptedPassphraseObject, password, ); + return { passphrase }; }; export const { getKeys } = cryptography; -export const getAddressFromPublicKey = publicKey => ({ +export const getAddressFromPublicKey = ( + publicKey: string, +): { readonly address: string } => ({ address: cryptography.getAddressFromPublicKey(publicKey), }); -export const signMessage = ({ message, passphrase }) => +interface SignMessageInputs { + readonly message: string; + readonly passphrase: string; +} + +export const signMessage = ({ message, passphrase }: SignMessageInputs) => cryptography.signMessageWithPassphrase(message, passphrase); -export const verifyMessage = ({ publicKey, signature, message }) => ({ +interface VerifyMessageInputs { + readonly message: string; + readonly publicKey: string; + readonly signature: string; +} + +export const verifyMessage = ({ + publicKey, + signature, + message, +}: VerifyMessageInputs) => ({ verified: cryptography.verifyMessageWithPublicKey({ publicKey, signature, diff --git a/src/utils/error.js b/src/utils/error.ts similarity index 87% rename from src/utils/error.js rename to src/utils/error.ts index 0da09194..1781592e 100644 --- a/src/utils/error.js +++ b/src/utils/error.ts @@ -13,10 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ +// tslint:disable max-classes-per-file import chalk from 'chalk'; export class FileSystemError extends Error { - constructor(message) { + public constructor(message: string) { super(message); this.message = chalk.red(message); this.name = 'FileSystemError'; @@ -24,7 +25,7 @@ export class FileSystemError extends Error { } export class ValidationError extends Error { - constructor(message) { + public constructor(message: string) { super(message); this.message = chalk.red(message); this.name = 'ValidationError'; diff --git a/src/utils/flags.js b/src/utils/flags.ts similarity index 92% rename from src/utils/flags.js rename to src/utils/flags.ts index dee10bb2..77328b8d 100644 --- a/src/utils/flags.js +++ b/src/utils/flags.ts @@ -65,7 +65,42 @@ const unvotesDescription = `Specifies the public keys for the delegate candidate const noSignatureDescription = 'Creates the transaction without a signature. Your passphrase will therefore not be required.'; -const flags = { +export type AlphabetLowercase = + | 'a' + | 'b' + | 'c' + | 'd' + | 'e' + | 'f' + | 'g' + | 'h' + | 'i' + | 'j' + | 'k' + | 'l' + | 'm' + | 'n' + | 'o' + | 'p' + | 'q' + | 'r' + | 's' + | 't' + | 'u' + | 'v' + | 'w' + | 'x' + | 'y' + | 'z'; + +interface FlagMap { + readonly [key: string]: { + readonly char?: AlphabetLowercase; + readonly description: string; + }; +} + +export const flags: FlagMap = { message: { char: 'm', description: messageDescription, @@ -92,5 +127,3 @@ const flags = { description: votesDescription, }, }; - -export default flags; diff --git a/src/utils/fs.js b/src/utils/fs.ts similarity index 72% rename from src/utils/fs.js rename to src/utils/fs.ts index 607f9fea..2ba0480b 100644 --- a/src/utils/fs.js +++ b/src/utils/fs.ts @@ -15,13 +15,14 @@ */ import { readFileSync, writeFileSync } from 'fs'; -export const readJSONSync = path => { +export const readJSONSync = (path: string): T => { const contents = readFileSync(path, 'utf8'); const stripped = contents.replace(/^\uFEFF/, ''); - return JSON.parse(stripped); + + return JSON.parse(stripped) as T; }; -export const writeJSONSync = (path, contents) => { - const json = JSON.stringify(contents, null, '\t'); - return writeFileSync(path, json); +export const writeJSONSync = (path: string, contents: unknown): void => { + const json = JSON.stringify(contents, undefined, '\t'); + writeFileSync(path, json); }; diff --git a/src/utils/helpers.js b/src/utils/helpers.ts similarity index 63% rename from src/utils/helpers.js rename to src/utils/helpers.ts index 931a89c0..7bd14b3b 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.ts @@ -17,46 +17,62 @@ import { ValidationError } from '../utils/error'; const regExpAmount = /^\d+(\.\d{1,8})?$/; -const isStringInteger = n => { +const isStringInteger = (n: string): boolean => { const parsed = parseInt(n, 10); + return !Number.isNaN(parsed) && parsed.toString() === n; }; -export const validateLifetime = lifetime => { +export const validateLifetime = (lifetime: string): boolean => { if (!isStringInteger(lifetime)) { throw new ValidationError('Lifetime must be an integer.'); } + return true; }; -export const validateMinimum = minimum => { +export const validateMinimum = (minimum: string): boolean => { if (!isStringInteger(minimum)) { throw new ValidationError( 'Minimum number of signatures must be an integer.', ); } + return true; }; -export const validateAmount = amount => { +export const validateAmount = (amount: string): boolean => { if (!amount.match(regExpAmount)) { throw new ValidationError( 'Amount must be a number with no more than 8 decimal places.', ); } + return true; }; -export const createErrorHandler = prefix => ({ message }) => ({ +interface ErrorMessageObject { + readonly error: string; +} + +export const createErrorHandler = (prefix: string) => ({ + message, +}: { + readonly message: string; +}): ErrorMessageObject => ({ error: `${prefix}: ${message}`, }); -export const handleEPIPE = err => { +interface ErrorObject { + readonly errno: string | number; +} + +export const handleEPIPE = (err: ErrorObject) => { if (err.errno !== 'EPIPE') { throw err; } }; -export const stdoutIsTTY = () => process.stdout.isTTY; +export const stdoutIsTTY = (): true | undefined => process.stdout.isTTY; -export const stdinIsTTY = () => process.stdin.isTTY; +export const stdinIsTTY = (): true | undefined => process.stdin.isTTY; diff --git a/src/utils/input/index.js b/src/utils/input/index.ts similarity index 53% rename from src/utils/input/index.js rename to src/utils/input/index.ts index f107a726..cbedd295 100644 --- a/src/utils/input/index.js +++ b/src/utils/input/index.ts @@ -13,19 +13,44 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { getStdIn, getPassphrase, getData } from './utils'; +import * as passphraseModule from '@liskhq/lisk-passphrase'; +import { getData, getPassphrase, getStdIn } from './utils'; -export const getFirstLineFromString = multilineString => +export const getFirstLineFromString = (multilineString: unknown) => typeof multilineString === 'string' ? multilineString.split(/[\r\n]+/)[0] - : null; + : undefined; -const getInputsFromSources = async ({ +interface InputSource { + readonly repeatPrompt?: boolean; + readonly source?: string; +} + +interface InputFromSourceInputs { + readonly data?: InputSource; + readonly passphrase?: InputSource; + readonly password?: InputSource; + readonly secondPassphrase?: InputSource; +} + +export interface InputFromSourceOutput { + readonly data?: string; + readonly passphrase?: string; + readonly password?: string; + readonly secondPassphrase?: string; +} + +interface MnemonicError { + readonly code: string; + readonly message: string; +} + +export const getInputsFromSources = async ({ passphrase: passphraseInput, secondPassphrase: secondPassphraseInput, password: passwordInput, data: dataInput, -}) => { +}: InputFromSourceInputs): Promise => { const [ passphraseIsRequired, secondPassphraseIsRequired, @@ -47,7 +72,7 @@ const getInputsFromSources = async ({ ? await getPassphrase(passphraseInput.source, { shouldRepeat: passphraseInput.repeatPrompt, }) - : stdIn.passphrase || null; + : stdIn.passphrase || undefined; const secondPassphrase = typeof stdIn.secondPassphrase !== 'string' && secondPassphraseInput @@ -55,7 +80,31 @@ const getInputsFromSources = async ({ displayName: 'your second secret passphrase', shouldRepeat: secondPassphraseInput.repeatPrompt, }) - : stdIn.secondPassphrase || null; + : stdIn.secondPassphrase || undefined; + + const passphraseErrors = [passphrase, secondPassphrase] + .filter(Boolean) + .map(pass => + passphraseModule.validation + .getPassphraseValidationErrors(pass as string) + .filter((error: MnemonicError) => error.message), + ); + + passphraseErrors.forEach(errors => { + if (errors.length > 0) { + const passphraseWarning = errors + .filter((error: MnemonicError) => error.code !== 'INVALID_MNEMONIC') + .reduce( + (accumulator: string, error: MnemonicError) => + accumulator.concat( + `${error.message.replace(' Please check the passphrase.', '')} `, + ), + 'Warning: ', + ); + // tslint:disable-next-line no-console + console.warn(passphraseWarning); + } + }); const password = typeof stdIn.password !== 'string' && passwordInput @@ -63,12 +112,12 @@ const getInputsFromSources = async ({ displayName: 'your password', shouldRepeat: passwordInput.repeatPrompt, }) - : stdIn.password || null; + : stdIn.password || undefined; const data = typeof stdIn.data !== 'string' && dataInput ? await getData(dataInput.source) - : stdIn.data || null; + : stdIn.data || undefined; return { passphrase, @@ -77,5 +126,3 @@ const getInputsFromSources = async ({ data, }; }; - -export default getInputsFromSources; diff --git a/src/utils/input/utils.js b/src/utils/input/utils.ts similarity index 58% rename from src/utils/input/utils.js rename to src/utils/input/utils.ts index 56ff93c2..3b13020f 100644 --- a/src/utils/input/utils.js +++ b/src/utils/input/utils.ts @@ -14,43 +14,66 @@ * */ import fs from 'fs'; -import readline from 'readline'; import inquirer from 'inquirer'; +import readline from 'readline'; import { FileSystemError, ValidationError } from '../error'; import { stdinIsTTY, stdoutIsTTY } from '../helpers'; -const capitalise = text => `${text.charAt(0).toUpperCase()}${text.slice(1)}`; +const capitalise = (text: string): string => + `${text.charAt(0).toUpperCase()}${text.slice(1)}`; -const getPassphraseVerificationFailError = displayName => +const getPassphraseVerificationFailError = (displayName: string): string => `${capitalise(displayName)} was not successfully repeated.`; -const getPassphraseSourceTypeUnknownError = displayName => +const getPassphraseSourceTypeUnknownError = (displayName: string): string => `${capitalise( displayName, )} was provided with an unknown source type. Must be one of \`env\`, \`file\`, or \`stdin\`. Leave blank for prompt.`; -const getPassphraseEnvVariableNotSetError = displayName => +const getPassphraseEnvVariableNotSetError = (displayName: string): string => `Environmental variable for ${displayName} not set.`; -const getFileDoesNotExistError = path => `File at ${path} does not exist.`; -const getFileUnreadableError = path => `File at ${path} could not be read.`; +const getFileDoesNotExistError = (path: string): string => + `File at ${path} does not exist.`; +const getFileUnreadableError = (path: string): string => + `File at ${path} could not be read.`; const ERROR_DATA_MISSING = 'No data was provided.'; const ERROR_DATA_SOURCE = 'Unknown data source type.'; const DEFAULT_TIMEOUT = 100; -export const splitSource = source => { +interface SplitSource { + readonly sourceIdentifier: string; + readonly sourceType: string; +} + +export const splitSource = (source: string): SplitSource => { const delimiter = ':'; const sourceParts = source.split(delimiter); + return { sourceType: sourceParts[0], sourceIdentifier: sourceParts.slice(1).join(delimiter), }; }; -export const getStdIn = ({ +interface GetStdInInputs { + readonly dataIsRequired?: boolean; + readonly passphraseIsRequired?: boolean; + readonly passwordIsRequired?: boolean; + readonly secondPassphraseIsRequired?: boolean; +} + +interface GetStdInOutput { + readonly data?: string; + readonly passphrase?: string; + readonly password?: string; + readonly secondPassphrase?: string; +} + +export const getStdIn = async ({ passphraseIsRequired, secondPassphraseIsRequired, passwordIsRequired, dataIsRequired, -} = {}) => { - const readFromStd = new Promise((resolve, reject) => { +}: GetStdInInputs = {}): Promise => { + const readFromStd = new Promise((resolve, reject) => { if ( !( passphraseIsRequired || @@ -59,9 +82,12 @@ export const getStdIn = ({ dataIsRequired ) ) { - return resolve({}); + resolve({}); + + return; } - const lines = []; + // tslint:disable readonly-array + const lines: string[] = []; const rl = readline.createInterface({ input: process.stdin }); // Prevent readline hanging when command called with no input or piped @@ -72,36 +98,48 @@ export const getStdIn = ({ const handleClose = () => { const passphraseIndex = 0; - const passphrase = passphraseIsRequired ? lines[passphraseIndex] : null; + const passphrase = passphraseIsRequired + ? lines[passphraseIndex] + : undefined; - const secondPassphraseIndex = passphraseIndex + (passphrase !== null); + const secondPassphraseIndex = + passphraseIndex + (passphrase !== undefined ? 1 : 0); const secondPassphrase = secondPassphraseIsRequired ? lines[secondPassphraseIndex] - : null; + : undefined; - const passwordIndex = secondPassphraseIndex + (secondPassphrase !== null); - const password = passwordIsRequired ? lines[passwordIndex] : null; + const passwordIndex = + secondPassphraseIndex + (secondPassphrase !== undefined ? 1 : 0); + const password = passwordIsRequired ? lines[passwordIndex] : undefined; - const dataStartIndex = passwordIndex + (password !== null); + const dataStartIndex = passwordIndex + (password !== undefined ? 1 : 0); const dataLines = lines.slice(dataStartIndex); - return resolve({ + resolve({ passphrase, secondPassphrase, password, - data: dataLines.length ? dataLines.join('\n') : null, + data: dataLines.length ? dataLines.join('\n') : undefined, }); + + return; }; return rl.on('line', line => lines.push(line)).on('close', handleClose); }); + return readFromStd; }; +interface GetPassphraseFromPromptInputs { + readonly displayName: string; + readonly shouldRepeat?: boolean; +} + export const getPassphraseFromPrompt = async ({ displayName, shouldRepeat, -}) => { +}: GetPassphraseFromPromptInputs): Promise => { const questions = [ { type: 'password', @@ -124,39 +162,51 @@ export const getPassphraseFromPrompt = async ({ ); } - const { passphrase, passphraseRepeat } = await inquirer.prompt(questions); - if (shouldRepeat && passphrase !== passphraseRepeat) { + const { passphrase, passphraseRepeat } = (await inquirer.prompt( + questions, + )) as { readonly passphrase?: string; readonly passphraseRepeat?: string }; + if (!passphrase || (shouldRepeat && passphrase !== passphraseRepeat)) { throw new ValidationError(getPassphraseVerificationFailError(displayName)); } return passphrase; }; -export const getPassphraseFromEnvVariable = async (key, displayName) => { +export const getPassphraseFromEnvVariable = async ( + key: string, + displayName: string, +) => { const passphrase = process.env[key]; if (!passphrase) { throw new ValidationError(getPassphraseEnvVariableNotSetError(displayName)); } + return passphrase; }; -export const getPassphraseFromFile = path => - new Promise((resolve, reject) => { +export const getPassphraseFromFile = async (path: string): Promise => + new Promise((resolve, reject) => { const stream = fs.createReadStream(path); - const handleReadError = error => { + const handleReadError = (error: Error) => { stream.close(); const { message } = error; if (message.match(/ENOENT/)) { - return reject(new FileSystemError(getFileDoesNotExistError(path))); + reject(new FileSystemError(getFileDoesNotExistError(path))); + + return; } if (message.match(/EACCES/)) { - return reject(new FileSystemError(getFileUnreadableError(path))); + reject(new FileSystemError(getFileUnreadableError(path))); + + return; } - return reject(error); + reject(error); + + return; }; - const handleLine = line => { + const handleLine = (line: string) => { stream.close(); resolve(line); }; @@ -169,7 +219,10 @@ export const getPassphraseFromFile = path => .on('line', handleLine); }); -export const getPassphraseFromSource = async (source, { displayName }) => { +export const getPassphraseFromSource = async ( + source: string, + { displayName }: { readonly displayName: string }, +): Promise => { const { sourceType, sourceIdentifier } = splitSource(source); switch (sourceType) { @@ -186,17 +239,21 @@ export const getPassphraseFromSource = async (source, { displayName }) => { } }; -export const getPassphrase = async (passphraseSource, options) => { - const optionsWithDefaults = Object.assign( - { displayName: 'your secret passphrase' }, - options, - ); +export const getPassphrase = async ( + passphraseSource: string | undefined, + options: object, +): Promise => { + const optionsWithDefaults = { + displayName: 'your secret passphrase', + ...options, + }; + return passphraseSource && passphraseSource !== 'prompt' ? getPassphraseFromSource(passphraseSource, optionsWithDefaults) : getPassphraseFromPrompt(optionsWithDefaults); }; -export const handleReadFileErrors = path => error => { +export const handleReadFileErrors = (path: string) => (error: Error) => { const { message } = error; if (message.match(/ENOENT/)) { throw new FileSystemError(getFileDoesNotExistError(path)); @@ -207,9 +264,10 @@ export const handleReadFileErrors = path => error => { throw error; }; -export const getDataFromFile = async path => fs.readFileSync(path, 'utf8'); +export const getDataFromFile = async (path: string) => + fs.readFileSync(path, 'utf8'); -export const getData = async source => { +export const getData = async (source?: string) => { if (!source) { throw new ValidationError(ERROR_DATA_MISSING); } diff --git a/src/utils/mnemonic.js b/src/utils/mnemonic.ts similarity index 92% rename from src/utils/mnemonic.js rename to src/utils/mnemonic.ts index 01724f8e..437ba2f8 100644 --- a/src/utils/mnemonic.js +++ b/src/utils/mnemonic.ts @@ -13,7 +13,7 @@ * Removal or modification of this copyright notice is prohibited. * */ -import Mnemonic from 'bip39'; +import { Mnemonic } from '@liskhq/lisk-passphrase'; export const createMnemonicPassphrase = Mnemonic.generateMnemonic; diff --git a/src/utils/print.js b/src/utils/print.js deleted file mode 100644 index ddc2c6c5..00000000 --- a/src/utils/print.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import stripANSI from 'strip-ansi'; -import tablify from './tablify'; - -const removeANSIFromObject = object => - Object.entries(object).reduce( - (strippedResult, [key, value]) => - Object.assign({}, strippedResult, { [key]: stripANSI(value) }), - {}, - ); - -const removeANSI = result => - Array.isArray(result) - ? result.map(removeANSIFromObject) - : removeANSIFromObject(result); - -const print = ({ json, pretty } = {}) => - function printResult(result) { - const resultToPrint = json ? removeANSI(result) : result; - - const output = json - ? JSON.stringify(resultToPrint, null, pretty ? '\t' : null) - : tablify(resultToPrint).toString(); - - const logger = this && this.log ? this : console; - logger.log(output); - }; - -export default print; diff --git a/src/utils/print.ts b/src/utils/print.ts new file mode 100644 index 00000000..53e8d5f9 --- /dev/null +++ b/src/utils/print.ts @@ -0,0 +1,64 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import strip_ansi from 'strip-ansi'; +import { tablify } from './tablify'; + +export interface StringMap { + readonly [key: string]: string; +} + +interface PrintInput { + readonly json?: boolean; + readonly pretty?: boolean; +} + +interface Printer { + // tslint:disable-next-line readonly-array + log(message?: string, ...args: Array): void; +} + +const removeANSIFromObject = (object: StringMap) => + Object.entries(object).reduce( + (strippedResult, [key, value]) => ({ + ...strippedResult, + [key]: strip_ansi(value), + }), + {}, + ); + +const isStringMapArray = ( + result: ReadonlyArray | StringMap, +): result is ReadonlyArray => Array.isArray(result); + +const removeANSI = (result: ReadonlyArray | StringMap) => + isStringMapArray(result) + ? result.map(removeANSIFromObject) + : removeANSIFromObject(result); + +export const print = ({ json, pretty }: PrintInput = {}) => + function printResult( + this: Printer, + result: ReadonlyArray | StringMap, + ): void { + const resultToPrint = json ? removeANSI(result) : result; + + const output = json + ? JSON.stringify(resultToPrint, undefined, pretty ? '\t' : undefined) + : tablify(resultToPrint).toString(); + + const logger = this && this.log ? this : console; + logger.log(output); + }; diff --git a/src/utils/query.js b/src/utils/query.js deleted file mode 100644 index 3e035f50..00000000 --- a/src/utils/query.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ - -const handleResponse = (endpoint, res, placeholder) => { - // Get endpoints with 2xx status code should always return with data key. - if (!res.data) { - throw new Error('No data was returned.'); - } - if (Array.isArray(res.data)) { - if (res.data.length === 0) { - if (placeholder) { - return placeholder; - } - throw new Error(`No ${endpoint} found using specified parameters.`); - } - return res.data[0]; - } - return res.data; -}; - -export default async (client, endpoint, parameters) => - Array.isArray(parameters) - ? Promise.all( - parameters.map(param => - client[endpoint] - .get(param.query) - .then(res => handleResponse(endpoint, res, param.placeholder)), - ), - ) - : client[endpoint] - .get(parameters.query) - .then(res => handleResponse(endpoint, res, parameters.placeholder)); diff --git a/src/utils/query.ts b/src/utils/query.ts new file mode 100644 index 00000000..e0447586 --- /dev/null +++ b/src/utils/query.ts @@ -0,0 +1,103 @@ +import { APIClient } from '@liskhq/lisk-api-client'; +// tslint:disable-next-line no-submodule-imports +import { NodeResource } from '@liskhq/lisk-api-client/dist-node/resources/node'; + +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ + +interface APIResponse { + readonly data?: unknown; +} + +const isArray = (val: T | ReadonlyArray): val is ReadonlyArray => + Array.isArray(val); + +export const handleResponse = ( + endpoint: string, + res: APIResponse, + placeholder?: object, +): unknown => { + // Get endpoints with 2xx status code should always return with data key. + if (!res.data) { + throw new Error('No data was returned.'); + } + if (isArray(res.data)) { + if (res.data.length === 0) { + if (placeholder) { + return placeholder; + } + throw new Error(`No ${endpoint} found using specified parameters.`); + } + if (res.data.length > 1) { + return res.data; + } + + return res.data[0]; + } + + return res.data; +}; + +interface QueryParameter { + readonly placeholder?: object; + readonly query: object; +} + +type EndpointTypes = + | 'accounts' + | 'blocks' + | 'dapps' + | 'delegates' + | 'peers' + | 'transactions' + | 'voters' + | 'votes'; + +export const query = async ( + client: APIClient, + endpoint: EndpointTypes, + parameters: QueryParameter | ReadonlyArray, +): Promise => + isArray(parameters) + ? Promise.all( + parameters.map((param: QueryParameter) => + client[endpoint] + .get(param.query) + .then((res: APIResponse) => + handleResponse(endpoint, res, param.placeholder), + ), + ), + ) + : client[endpoint] + .get(parameters.query) + .then((res: APIResponse) => + handleResponse(endpoint, res, parameters.placeholder), + ); + +export const queryNodeTransaction = async ( + client: NodeResource, + txnState: string, + parameters: ReadonlyArray, +): Promise => + Promise.all( + parameters.map(async (param: QueryParameter) => + client + .getTransactions(txnState, param.query) + .then(res => + handleResponse('node/transactions', res, param.placeholder), + ), + ), + ); diff --git a/src/utils/tablify.js b/src/utils/tablify.ts similarity index 68% rename from src/utils/tablify.js rename to src/utils/tablify.ts index 43e66e61..50a07123 100644 --- a/src/utils/tablify.js +++ b/src/utils/tablify.ts @@ -13,7 +13,7 @@ * Removal or modification of this copyright notice is prohibited. * */ -import Table from 'cli-table3'; +import CliTable, { Cell, HorizontalTable } from 'cli-table3'; const chars = { top: '═', @@ -33,21 +33,23 @@ const chars = { middle: '│', }; -const getKeyValueObject = object => { +const getKeyValueObject = (object: object) => { if (!object || typeof object !== 'object') { return object; } + return Object.entries(object) - .map(([key, value]) => `${key}: ${JSON.stringify(value, null, ' ')}`) + .map(([key, value]) => `${key}: ${JSON.stringify(value, undefined, ' ')}`) .join('\n'); }; -const getKeyValueArray = array => +const getKeyValueArray = (array: ReadonlyArray) => array.some(item => typeof item === 'object') ? array.map(getKeyValueObject).join('\n\n') : array.join('\n'); -const addValuesToTable = (table, data) => { +// tslint:disable-next-line readonly-array +const addValuesToTable = (table: object[], data: object) => { Object.entries(data).forEach(([key, values]) => { const strValue = Array.isArray(values) ? getKeyValueArray(values) @@ -56,20 +58,25 @@ const addValuesToTable = (table, data) => { }); }; -const tablify = data => { - const dataIsArray = Array.isArray(data); - - const table = new Table({ +export const tablify = (data: ReadonlyArray | object) => { + const table = new CliTable({ chars, style: { head: [], border: [], }, - }); + }) as HorizontalTable; - if (dataIsArray) { + if (Array.isArray(data)) { data.forEach((value, key) => { - table.push([{ colSpan: 2, content: `data ${key + 1}` }]); + // tslint:disable-next-line readonly-array + const cell: Cell[] = [ + { + colSpan: 2, + content: `data ${key + 1}`, + }, + ]; + table.push(cell); addValuesToTable(table, value); }); } else { @@ -78,5 +85,3 @@ const tablify = data => { return table; }; - -export default tablify; diff --git a/src/utils/transactions.js b/src/utils/transactions.ts similarity index 88% rename from src/utils/transactions.js rename to src/utils/transactions.ts index 825a9008..200c75d1 100644 --- a/src/utils/transactions.js +++ b/src/utils/transactions.ts @@ -15,12 +15,10 @@ */ import { ValidationError } from './error'; -const parseTransactionString = transactionStr => { +export const parseTransactionString = (transactionStr: string) => { try { return JSON.parse(transactionStr); } catch (error) { throw new ValidationError('Could not parse transaction JSON.'); } }; - -export default parseTransactionString; diff --git a/test/.eslintrc.json b/test/.eslintrc.json deleted file mode 100644 index 5ae52eac..00000000 --- a/test/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "env": { - "mocha": true - }, - "globals": { - "sandbox": true, - "expect": true, - "sinon": true - }, - "rules": { - "arrow-body-style": "off", - "no-unused-expressions": "off" - } -} diff --git a/test/_global_hooks.js b/test/_global_hooks.ts similarity index 83% rename from test/_global_hooks.js rename to test/_global_hooks.ts index 4d348702..5429b0d5 100644 --- a/test/_global_hooks.js +++ b/test/_global_hooks.ts @@ -1,4 +1,3 @@ -/* eslint-disable mocha/no-top-level-hooks */ import lockfile from 'lockfile'; afterEach(() => sandbox.restore()); @@ -7,5 +6,6 @@ after(() => { const configLockfilePath = `${ process.env.LISK_COMMANDER_CONFIG_DIR }/config.lock`; + return lockfile.unlockSync(configLockfilePath); }); diff --git a/test/commands/account/create.test.js b/test/commands/account/create.test.ts similarity index 92% rename from test/commands/account/create.test.js rename to test/commands/account/create.test.ts index c3ceceb5..3a310e63 100644 --- a/test/commands/account/create.test.js +++ b/test/commands/account/create.test.ts @@ -14,9 +14,9 @@ * */ import { expect, test } from '@oclif/test'; -import cryptography from '@liskhq/lisk-cryptography'; +import * as cryptography from '@liskhq/lisk-cryptography'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; +import * as printUtils from '../../../src/utils/print'; import * as mnemonic from '../../../src/utils/mnemonic'; describe('account:create', () => { @@ -54,7 +54,7 @@ describe('account:create', () => { .returns(secondDefaultAddress); return test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( mnemonic, @@ -79,7 +79,7 @@ describe('account:create', () => { setupTest() .command(['account:create']) .it('should create account', () => { - expect(print.default).to.be.called; + expect(printUtils.print).to.be.called; expect(cryptography.getKeys).to.be.calledWithExactly(defaultMnemonic); expect(cryptography.getAddressFromPublicKey).to.be.calledWithExactly( defaultKeys.publicKey, @@ -99,7 +99,7 @@ describe('account:create', () => { setupTest() .command(['account:create', `--number=${defaultNumber}`]) .it('should create account', () => { - expect(print.default).to.be.calledOnce; + expect(printUtils.print).to.be.calledOnce; expect(cryptography.getKeys).to.be.calledWithExactly(defaultMnemonic); expect(cryptography.getAddressFromPublicKey).to.be.calledWithExactly( defaultKeys.publicKey, @@ -121,7 +121,7 @@ describe('account:create', () => { setupTest() .command(['account:create', '--number=NaN']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Number flag must be an integer and greater than 0', ); @@ -130,7 +130,7 @@ describe('account:create', () => { setupTest() .command(['account:create', '--number=0']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Number flag must be an integer and greater than 0', ); @@ -139,7 +139,7 @@ describe('account:create', () => { setupTest() .command(['account:create', '--number=10sk24']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Number flag must be an integer and greater than 0', ); diff --git a/test/commands/account/get.test.js b/test/commands/account/get.test.ts similarity index 63% rename from test/commands/account/get.test.js rename to test/commands/account/get.test.ts index 4be96b98..4b89ab23 100644 --- a/test/commands/account/get.test.js +++ b/test/commands/account/get.test.ts @@ -15,9 +15,9 @@ */ import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as api from '../../../src/utils/api'; -import * as query from '../../../src/utils/query'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; +import * as queryHandler from '../../../src/utils/query'; describe('account:get command', () => { const endpoint = 'accounts'; @@ -29,15 +29,15 @@ describe('account:get command', () => { const apiClientStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({ api: apiConfig })) - .stub(api, 'default', sandbox.stub().returns(apiClientStub)); + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)); describe('account:get', () => { setupTest() .stdout() .command(['account:get']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain('Missing 1 required arg'), ) .it('should throw an error when arg is not provided'); @@ -53,23 +53,27 @@ describe('account:get command', () => { ]; setupTest() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .stdout() .command(['account:get', address]) .it('should get an account info and display as an object', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly(apiClientStub, endpoint, [ - { - query: { - limit: 1, - address, - }, - placeholder: { - address, - message: 'Address not found.', + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + limit: 1, + address, + }, + placeholder: { + address, + message: 'Address not found.', + }, }, - }, - ]); + ], + ); return expect(printMethodStub).to.be.calledWithExactly(queryResult); }); }); @@ -89,45 +93,49 @@ describe('account:get command', () => { ]; setupTest() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .stdout() .command(['account:get', addresses.join(',')]) .it('should get accounts info and display as an array', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly(apiClientStub, endpoint, [ - { - query: { - limit: 1, - address: addresses[0], - }, - placeholder: { - address: addresses[0], - message: 'Address not found.', - }, - }, - { - query: { - limit: 1, - address: addresses[1], + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + limit: 1, + address: addresses[0], + }, + placeholder: { + address: addresses[0], + message: 'Address not found.', + }, }, - placeholder: { - address: addresses[1], - message: 'Address not found.', + { + query: { + limit: 1, + address: addresses[1], + }, + placeholder: { + address: addresses[1], + message: 'Address not found.', + }, }, - }, - ]); + ], + ); return expect(printMethodStub).to.be.calledWithExactly(queryResult); }); setupTest() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .stdout() .command(['account:get', addressesWithEmpty.join(',')]) .it( 'should get accounts info only using non-empty args and display as an array', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly( + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( apiClientStub, endpoint, [ diff --git a/test/commands/account/show.test.js b/test/commands/account/show.test.ts similarity index 79% rename from test/commands/account/show.test.js rename to test/commands/account/show.test.ts index 9f9fdbfd..21ba4602 100644 --- a/test/commands/account/show.test.js +++ b/test/commands/account/show.test.ts @@ -14,10 +14,10 @@ * */ import { expect, test } from '@oclif/test'; -import cryptography from '@liskhq/lisk-cryptography'; +import * as cryptography from '@liskhq/lisk-cryptography'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as inputUtils from '../../../src/utils/input'; describe('account:show', () => { const defaultKeys = { @@ -33,7 +33,7 @@ describe('account:show', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub(cryptography, 'getKeys', sandbox.stub().returns(defaultKeys)) .stub( @@ -42,8 +42,8 @@ describe('account:show', () => { sandbox.stub().returns(defaultAddress), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(passphraseInput), ); @@ -52,8 +52,8 @@ describe('account:show', () => { .stdout() .command(['account:show']) .it('should show account with prompt', () => { - expect(print.default).to.be.called; - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(printUtils.print).to.be.called; + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, @@ -69,8 +69,8 @@ describe('account:show', () => { .stdout() .command(['account:show', '--passphrase=pass:123']) .it('should show account with pass', () => { - expect(print.default).to.be.called; - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(printUtils.print).to.be.called; + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, diff --git a/test/commands/block/get.test.js b/test/commands/block/get.test.ts similarity index 61% rename from test/commands/block/get.test.js rename to test/commands/block/get.test.ts index 2e81f1ea..fcb5180b 100644 --- a/test/commands/block/get.test.js +++ b/test/commands/block/get.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; +import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as api from '../../../src/utils/api'; -import * as query from '../../../src/utils/query'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; +import * as queryHandler from '../../../src/utils/query'; describe('block:get', () => { const endpoint = 'blocks'; @@ -29,15 +29,15 @@ describe('block:get', () => { const apiClientStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({ api: apiConfig })) - .stub(api, 'default', sandbox.stub().returns(apiClientStub)); + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)); describe('block:get', () => { setupTest() .stdout() .command(['block:get']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain('Missing 1 required arg'), ) .it('should throw an error when arg is not provided'); @@ -52,22 +52,26 @@ describe('block:get', () => { setupTest() .stdout() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .command(['block:get', blockId]) .it('should get block info and display as an object', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly(apiClientStub, endpoint, [ - { - query: { - limit: 1, - blockId, - }, - placeholder: { - id: blockId, - message: 'Block not found.', + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + limit: 1, + blockId, + }, + placeholder: { + id: blockId, + message: 'Block not found.', + }, }, - }, - ]); + ], + ); return expect(printMethodStub).to.be.calledWithExactly(queryResult); }); }); @@ -88,44 +92,48 @@ describe('block:get', () => { setupTest() .stdout() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .command(['block:get', blockIds.join(',')]) .it('should get blocks info and display as an array', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly(apiClientStub, endpoint, [ - { - query: { - limit: 1, - blockId: blockIds[0], - }, - placeholder: { - id: blockIds[0], - message: 'Block not found.', - }, - }, - { - query: { - limit: 1, - blockId: blockIds[1], + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + limit: 1, + blockId: blockIds[0], + }, + placeholder: { + id: blockIds[0], + message: 'Block not found.', + }, }, - placeholder: { - id: blockIds[1], - message: 'Block not found.', + { + query: { + limit: 1, + blockId: blockIds[1], + }, + placeholder: { + id: blockIds[1], + message: 'Block not found.', + }, }, - }, - ]); + ], + ); return expect(printMethodStub).to.be.calledWithExactly(queryResult); }); setupTest() .stdout() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .command(['block:get', blockIdsWithEmpty.join(',')]) .it( 'should get blocks info only using non-empty args and display as an array', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly( + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( apiClientStub, endpoint, [ diff --git a/test/commands/config/set.test.js b/test/commands/config/set.test.ts similarity index 94% rename from test/commands/config/set.test.js rename to test/commands/config/set.test.ts index df6e5499..67c02793 100644 --- a/test/commands/config/set.test.js +++ b/test/commands/config/set.test.ts @@ -15,7 +15,7 @@ */ import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; +import * as printUtils from '../../../src/utils/print'; describe('config:set', () => { const defaultConfig = { @@ -31,7 +31,7 @@ describe('config:set', () => { const setupTest = () => test .env({ LISK_COMMANDER_CONFIG_DIR: defaultDir }) - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns(defaultConfig)) .stub(config, 'setConfig', sandbox.stub().returns(true)); @@ -39,7 +39,7 @@ describe('config:set', () => { setupTest() .stdout() .command(['config:set']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain('Missing 1 required arg'), ) .it('should throw an error when no value is set'); @@ -50,7 +50,7 @@ describe('config:set', () => { setupTest() .stdout() .command(['config:set', 'newvalue']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain( `Expected ${unknownValue} to be one of:`, ), @@ -115,7 +115,7 @@ describe('config:set', () => { setupTest() .stdout() .command(['config:set', 'api.nodes', 'ws://hostname']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain( 'Node URLs must include a supported protocol (http, https) and a hostname.', ), @@ -127,7 +127,7 @@ describe('config:set', () => { setupTest() .stdout() .command(['config:set', 'api.nodes', 'http://']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain( 'Node URLs must include a supported protocol (http, https) and a hostname.', ), @@ -138,7 +138,7 @@ describe('config:set', () => { .stdout() .stub(config, 'getConfig', sandbox.stub().returns({})) .command(['config:set', 'api.nodes', 'http://hostname']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain( 'It looks like your configuration file is corrupted. Please check the file at', ), @@ -165,7 +165,7 @@ describe('config:set', () => { .stub(config, 'setConfig', sandbox.stub().returns(false)) .stdout() .command(['config:set', 'json', 'true']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain( 'Config file could not be written: your changes will not be persisted', ), @@ -175,7 +175,7 @@ describe('config:set', () => { setupTest() .stdout() .command(['config:set', 'json', 'truely']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain('Value must be a boolean.'), ) .it('should throw error when json value is not boolean'); @@ -183,7 +183,7 @@ describe('config:set', () => { setupTest() .stdout() .command(['config:set', 'json']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain('Value must be a boolean.'), ) .it('should throw error when json value is not specified'); @@ -233,7 +233,7 @@ describe('config:set', () => { 'api.network', '198f2b61a8eb95fbeed58b8216780b68f697f26b849acf00c8c93bb9b24f78', ]) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain( 'Value must be a hex string with 64 characters, or one of main or test.', ), @@ -249,7 +249,7 @@ describe('config:set', () => { 'api.network', '198f2b61a8eb95fbeed58b8216780b68f697f26b849acf00c8c93bb9zzzzzzzz', ]) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain( 'Value must be a hex string with 64 characters, or one of main or test.', ), diff --git a/test/commands/config/show.test.js b/test/commands/config/show.test.ts similarity index 84% rename from test/commands/config/show.test.js rename to test/commands/config/show.test.ts index e415377d..2536b3ec 100644 --- a/test/commands/config/show.test.js +++ b/test/commands/config/show.test.ts @@ -15,7 +15,7 @@ */ import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; +import * as printUtils from '../../../src/utils/print'; describe('config:show', () => { const defaultConfig = { @@ -28,7 +28,7 @@ describe('config:show', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns(defaultConfig)); describe('config:show', () => { @@ -36,7 +36,7 @@ describe('config:show', () => { .stdout() .command(['config:show']) .it('should call print with the user config', () => { - expect(print.default).to.be.called; + expect(printUtils.print).to.be.called; return expect(printMethodStub).to.be.calledWithExactly(defaultConfig); }); @@ -44,7 +44,7 @@ describe('config:show', () => { .stdout() .command(['config:show', '--json', '--pretty']) .it('should call print with json', () => { - expect(print.default).to.be.calledWith({ json: true, pretty: true }); + expect(printUtils.print).to.be.calledWith({ json: true, pretty: true }); return expect(printMethodStub).to.be.calledWithExactly(defaultConfig); }); }); diff --git a/test/commands/copyright.test.js b/test/commands/copyright.test.ts similarity index 100% rename from test/commands/copyright.test.js rename to test/commands/copyright.test.ts diff --git a/test/commands/delegate/get.test.js b/test/commands/delegate/get.test.ts similarity index 62% rename from test/commands/delegate/get.test.js rename to test/commands/delegate/get.test.ts index 27e6b8a3..b50af893 100644 --- a/test/commands/delegate/get.test.js +++ b/test/commands/delegate/get.test.ts @@ -15,9 +15,9 @@ */ import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as api from '../../../src/utils/api'; -import * as query from '../../../src/utils/query'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; +import * as queryHandler from '../../../src/utils/query'; describe('delegate:get', () => { const endpoint = 'delegates'; @@ -29,15 +29,15 @@ describe('delegate:get', () => { const apiClientStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({ api: apiConfig })) - .stub(api, 'default', sandbox.stub().returns(apiClientStub)); + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)); describe('delegate:get', () => { setupTest() .stdout() .command(['delegate:get']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain('Missing 1 required arg'), ) .it('should throw an error when arg is not provided'); @@ -54,22 +54,26 @@ describe('delegate:get', () => { setupTest() .stdout() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .command(['delegate:get', username]) .it('should get an delegate info and display as an object', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly(apiClientStub, endpoint, [ - { - query: { - limit: 1, - username, - }, - placeholder: { - username, - message: 'Delegate not found.', + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + limit: 1, + username, + }, + placeholder: { + username, + message: 'Delegate not found.', + }, }, - }, - ]); + ], + ); return expect(printMethodStub).to.be.calledWithExactly(queryResult); }); }); @@ -90,44 +94,48 @@ describe('delegate:get', () => { setupTest() .stdout() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .command(['delegate:get', usernames.join(',')]) .it('should get delegates info and display as an array', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly(apiClientStub, endpoint, [ - { - query: { - username: usernames[0], - limit: 1, - }, - placeholder: { - username: usernames[0], - message: 'Delegate not found.', - }, - }, - { - query: { - username: usernames[1], - limit: 1, + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + username: usernames[0], + limit: 1, + }, + placeholder: { + username: usernames[0], + message: 'Delegate not found.', + }, }, - placeholder: { - username: usernames[1], - message: 'Delegate not found.', + { + query: { + username: usernames[1], + limit: 1, + }, + placeholder: { + username: usernames[1], + message: 'Delegate not found.', + }, }, - }, - ]); + ], + ); return expect(printMethodStub).to.be.calledWithExactly(queryResult); }); setupTest() .stdout() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) .command(['delegate:get', usernamesWithEmpty.join(',')]) .it( 'should get delegates info only using non-empty args and display as an array', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly( + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( apiClientStub, endpoint, [ diff --git a/test/commands/delegate/voters.test.ts b/test/commands/delegate/voters.test.ts new file mode 100644 index 00000000..ece07f6d --- /dev/null +++ b/test/commands/delegate/voters.test.ts @@ -0,0 +1,301 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { expect, test } from '@oclif/test'; +import * as config from '../../../src/utils/config'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; +import * as queryHandler from '../../../src/utils/query'; + +describe('delegate:voters', () => { + const endpoint = 'voters'; + const apiConfig = { + nodes: ['http://local.host'], + network: 'main', + }; + const defaultQuery = { + limit: 10, + offset: 0, + sort: 'balance:desc', + }; + const printMethodStub = sandbox.stub(); + const apiClientStub = sandbox.stub(); + const usernames = ['genesis_5', 'genesis_6']; + const queryResult = [ + { + username: usernames[0], + balance: '0', + publicKey: + '0a47b151eafe8cfc278721ba14305071cae727395abf4c00bd298296c851dab9', + address: '10730473708113756935L', + voters: [ + { + address: '17534106505153007102L', + balance: '370400962539', + publicKey: + 'e2281b7bb0e7cd51cc5ac49d9463c6a1640aac20ae9baa9333ddc92a5ad63e42', + }, + ], + votes: 47, + }, + ]; + const setupTest = () => + test + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) + .stub(config, 'getConfig', sandbox.stub().returns({ api: apiConfig })) + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stdout(); + + describe('delegate:voters', () => { + setupTest() + .command(['delegate:voters']) + .catch((error: Error) => { + return expect(error.message).to.contain('Missing 1 required arg'); + }) + .it('should throw an error when arg is not provided'); + + describe('delegate:voters delegate', () => { + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:voters', usernames[0]]) + .it('should get delegate voters and display as an array', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + username: usernames[0], + ...defaultQuery, + }, + placeholder: { + username: usernames[0], + message: 'Delegate not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + + describe('delegate:voters delegates', () => { + const usernamesWithEmpty = ['genesis_4', '']; + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:voters', usernames.join(',')]) + .it('should get delegates voters and display as an array', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + username: usernames[0], + ...defaultQuery, + }, + placeholder: { + username: usernames[0], + message: 'Delegate not found.', + }, + }, + { + query: { + username: usernames[1], + ...defaultQuery, + }, + placeholder: { + username: usernames[1], + message: 'Delegate not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:voters', usernamesWithEmpty.join(',')]) + .it( + 'should get delegates voters only using non-empty args and display as an array', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + username: usernamesWithEmpty[0], + ...defaultQuery, + }, + placeholder: { + username: usernamesWithEmpty[0], + message: 'Delegate not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }, + ); + }); + + describe('delegate:voters --limit=xxx', () => { + setupTest() + .command(['delegate:voters', usernames[0], '--limit=wronglimit']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Limit must be an integer and greater than 0', + ); + }) + .it('should throw an error when limit is not a valid integer'); + + setupTest() + .command(['delegate:voters', usernames[0], '--limit=0']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Limit must be an integer and greater than 0', + ); + }) + .it('should throw an error when limit is 0'); + + setupTest() + .command(['delegate:voters', usernames[0], '--limit=101']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Maximum limit amount is 100', + ); + }) + .it('should throw an error when limit is greater than 100'); + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:voters', usernames[0], '--limit=3']) + .it('should get voters for delegate with limit', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + username: usernames[0], + limit: 3, + offset: 0, + sort: 'balance:desc', + }, + placeholder: { + username: usernames[0], + message: 'Delegate not found.', + }, + }, + ], + ); + + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + + describe('delegate:voters --offset=xxx', () => { + setupTest() + .command(['delegate:voters', usernames[0], '--offset=wrongoffset']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Offset must be an integer and greater than or equal to 0', + ); + }) + .it('should throw an error when offset is not a valid integer'); + + setupTest() + .command(['delegate:voters', usernames[0], '--offset=-1']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Offset must be an integer and greater than or equal to 0', + ); + }) + .it('should throw an error when offset is an integer less than 0'); + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:voters', usernames[0], '--offset=1']) + .it('should get voters for delegate with offset', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + username: usernames[0], + limit: 10, + offset: 1, + sort: 'balance:desc', + }, + placeholder: { + username: usernames[0], + message: 'Delegate not found.', + }, + }, + ], + ); + + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + + describe('delegate:voters --sort=xxx', () => { + setupTest() + .command(['delegate:voters', usernames[0], '--sort=wrongsort']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Sort must be one of: publicKey:asc, publicKey:desc, balance:asc, balance:desc, username:asc, username:desc', + ); + }) + .it('should throw an error when given incorrect sort input'); + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:voters', usernames[0], '--sort=publicKey:asc']) + .it('should get sorted voters for delegate', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + username: usernames[0], + limit: 10, + offset: 0, + sort: 'publicKey:asc', + }, + placeholder: { + username: usernames[0], + message: 'Delegate not found.', + }, + }, + ], + ); + + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + }); +}); diff --git a/test/commands/delegate/votes.test.ts b/test/commands/delegate/votes.test.ts new file mode 100644 index 00000000..5390b879 --- /dev/null +++ b/test/commands/delegate/votes.test.ts @@ -0,0 +1,302 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { expect, test } from '@oclif/test'; +import * as config from '../../../src/utils/config'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; +import * as queryHandler from '../../../src/utils/query'; + +describe('delegate:votes', () => { + const endpoint = 'votes'; + const apiConfig = { + nodes: ['http://local.host'], + network: 'main', + }; + const defaultQuery = { + limit: 10, + offset: 0, + sort: 'balance:desc', + }; + const printMethodStub = sandbox.stub(); + const apiClientStub = sandbox.stub(); + const addresses = ['13133549779353512613L', '16010222169256538112L']; + const queryResult = [ + { + address: addresses[0], + balance: '0', + publicKey: + '0a47b151eafe8cfc278721ba14305071cae727395abf4c00bd298296c851dab9', + votes: [ + { + balance: '999999999999', + username: 'mitsujutsu', + publicKey: + 'e7cz206a33d0f019d9d030c2e34870767d8994680e7b10ebdaf2af0e59332524', + address: '1721671824473341641L', + }, + ], + votesUsed: 101, + votesAvailable: 0, + }, + ]; + const setupTest = () => + test + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) + .stub(config, 'getConfig', sandbox.stub().returns({ api: apiConfig })) + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stdout(); + + describe('delegate:votes', () => { + setupTest() + .command(['delegate:votes']) + .catch((error: Error) => { + return expect(error.message).to.contain('Missing 1 required arg'); + }) + .it('should throw an error when arg is not provided'); + + describe('delegate:votes account', () => { + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:votes', addresses[0]]) + .it('should get account votes and display as an array', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + address: addresses[0], + ...defaultQuery, + }, + placeholder: { + address: addresses[0], + message: 'Account not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + + describe('delegate:votes accounts', () => { + const addressesWithEmpty = ['13133549779353512613L', '']; + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:votes', addresses.join(',')]) + .it('should get account votes and display as an array', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + address: addresses[0], + ...defaultQuery, + }, + placeholder: { + address: addresses[0], + message: 'Account not found.', + }, + }, + { + query: { + address: addresses[1], + ...defaultQuery, + }, + placeholder: { + address: addresses[1], + message: 'Account not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:votes', addressesWithEmpty.join(',')]) + .it( + 'should get account votes only using non-empty args and display as an array', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + address: addressesWithEmpty[0], + ...defaultQuery, + }, + placeholder: { + address: addressesWithEmpty[0], + message: 'Account not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }, + ); + }); + + describe('delegate:votes --limit=xxx', () => { + setupTest() + .command(['delegate:votes', addresses[0], '--limit=wronglimit']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Limit must be an integer and greater than 0', + ); + }) + .it('should throw an error when limit is not a valid integer'); + + setupTest() + .command(['delegate:votes', addresses[0], '--limit=0']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Limit must be an integer and greater than 0', + ); + }) + .it('should throw an error when limit is 0'); + + setupTest() + .command(['delegate:votes', addresses[0], '--limit=101']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Maximum limit amount is 100', + ); + }) + .it('should throw an error when limit is greater than 100'); + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:votes', addresses[0], '--limit=3']) + .it('should get votes for account with limit', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + address: addresses[0], + limit: 3, + offset: 0, + sort: 'balance:desc', + }, + placeholder: { + address: addresses[0], + message: 'Account not found.', + }, + }, + ], + ); + + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + + describe('delegate:votes --offset=xxx', () => { + setupTest() + .command(['delegate:votes', addresses[0], '--offset=wrongoffset']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Offset must be an integer and greater than or equal to 0', + ); + }) + .it('should throw an error when offset is not a valid integer'); + + setupTest() + .command(['delegate:votes', addresses[0], '--offset=-1']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Offset must be an integer and greater than or equal to 0', + ); + }) + .it('should throw an error when offset is an integer less than 0'); + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:votes', addresses[0], '--offset=1']) + .it('should get votes for account with offset', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + address: addresses[0], + limit: 10, + offset: 1, + sort: 'balance:desc', + }, + placeholder: { + address: addresses[0], + message: 'Account not found.', + }, + }, + ], + ); + + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + + describe('delegate:votes --sort=xxx', () => { + setupTest() + .command(['delegate:votes', addresses[0], '--sort=wrongsort']) + .catch((error: Error) => { + return expect(error.message).to.contain( + 'Sort must be one of: balance:asc, balance:desc, username:asc, username:desc', + ); + }) + .it('should throw an error when given incorrect sort input'); + + setupTest() + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['delegate:votes', addresses[0], '--sort=balance:asc']) + .it('should get sorted votes for account', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + address: addresses[0], + limit: 10, + offset: 0, + sort: 'balance:asc', + }, + placeholder: { + address: addresses[0], + message: 'Account not found.', + }, + }, + ], + ); + + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + }); +}); diff --git a/test/commands/message/decrypt.test.js b/test/commands/message/decrypt.test.ts similarity index 87% rename from test/commands/message/decrypt.test.js rename to test/commands/message/decrypt.test.ts index 9653f376..fa8a29c1 100644 --- a/test/commands/message/decrypt.test.js +++ b/test/commands/message/decrypt.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import cryptography from '@liskhq/lisk-cryptography'; +import { expect, test } from '@oclif/test'; +import * as cryptography from '@liskhq/lisk-cryptography'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as inputUtils from '../../../src/utils/input'; describe('message:decrypt', () => { const message = 'Hello World'; @@ -36,7 +36,7 @@ describe('message:decrypt', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( cryptography, @@ -44,8 +44,8 @@ describe('message:decrypt', () => { sandbox.stub().returns(message), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -53,7 +53,7 @@ describe('message:decrypt', () => { describe('message:decrypt', () => { setupTest() .command(['message:decrypt']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('Missing 2 required arg'); }) .it('should throw an error'); @@ -62,7 +62,7 @@ describe('message:decrypt', () => { describe('message:decrypt senderPublicKey', () => { setupTest() .command(['message:decrypt', defaultSenderPublicKey]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('Missing 1 required arg'); }) .it('should throw an error'); @@ -71,7 +71,7 @@ describe('message:decrypt', () => { describe('message:decrypt senderPublicKey nonce', () => { setupTest() .command(['message:decrypt', defaultSenderPublicKey, defaultNonce]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No message was provided.'); }) .it('should throw an error'); @@ -86,11 +86,11 @@ describe('message:decrypt', () => { defaultEncryptedMessage, ]) .it('should decrypt the message with the arg', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, }, - data: null, + data: undefined, }); expect( cryptography.decryptMessageWithPassphrase, @@ -115,7 +115,7 @@ describe('message:decrypt', () => { .it( 'should decrypt the message with the arg and the message flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, }, @@ -148,7 +148,7 @@ describe('message:decrypt', () => { .it( 'should decrypt the message with the arg and the message flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:"card earn shift valley learn scorpion cage select help title control satoshi"', diff --git a/test/commands/message/encrypt.test.js b/test/commands/message/encrypt.test.ts similarity index 87% rename from test/commands/message/encrypt.test.js rename to test/commands/message/encrypt.test.ts index 425c9cbb..d4e34450 100644 --- a/test/commands/message/encrypt.test.js +++ b/test/commands/message/encrypt.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import cryptography from '@liskhq/lisk-cryptography'; +import { expect, test } from '@oclif/test'; +import * as cryptography from '@liskhq/lisk-cryptography'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as inputUtils from '../../../src/utils/input'; describe('message:encrypt', () => { const message = 'Hello World'; @@ -37,7 +37,7 @@ describe('message:encrypt', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( cryptography, @@ -45,8 +45,8 @@ describe('message:encrypt', () => { sandbox.stub().returns(defaultEncryptedMessage), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -54,7 +54,7 @@ describe('message:encrypt', () => { describe('message:encrypt', () => { setupTest() .command(['message:encrypt']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('Missing 1 required arg'); }) .it('should throw an error'); @@ -63,7 +63,7 @@ describe('message:encrypt', () => { describe('message:encrypt recipientPublicKey', () => { setupTest() .command(['message:encrypt', defaultRecipientPublicKey]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No message was provided.'); }) .it('should throw an error'); @@ -73,12 +73,12 @@ describe('message:encrypt', () => { setupTest() .command(['message:encrypt', defaultRecipientPublicKey, message]) .it('should encrypt the message with the arg', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - data: null, + data: undefined, }); expect( cryptography.encryptMessageWithPassphrase, @@ -104,7 +104,7 @@ describe('message:encrypt', () => { .it( 'should encrypt the message with the arg and the message flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, @@ -139,7 +139,7 @@ describe('message:encrypt', () => { .it( 'should encrypt the message with the arg and the message flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:"card earn shift valley learn scorpion cage select help title control satoshi"', diff --git a/test/commands/message/sign.test.js b/test/commands/message/sign.test.ts similarity index 85% rename from test/commands/message/sign.test.js rename to test/commands/message/sign.test.ts index 43375099..46c842b4 100644 --- a/test/commands/message/sign.test.js +++ b/test/commands/message/sign.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import cryptography from '@liskhq/lisk-cryptography'; +import { expect, test } from '@oclif/test'; +import * as cryptography from '@liskhq/lisk-cryptography'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as inputUtils from '../../../src/utils/input'; describe('message:sign', () => { const message = 'Hello World'; @@ -37,7 +37,7 @@ describe('message:sign', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( cryptography, @@ -45,8 +45,8 @@ describe('message:sign', () => { sandbox.stub().returns(defaultSignedMessage), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -54,7 +54,7 @@ describe('message:sign', () => { describe('message:sign', () => { setupTest() .command(['message:sign']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No message was provided.'); }) .it('should throw an error'); @@ -64,12 +64,12 @@ describe('message:sign', () => { setupTest() .command(['message:sign', message]) .it('should sign the message with the arg', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - data: null, + data: undefined, }); expect(cryptography.signMessageWithPassphrase).to.be.calledWithExactly( message, @@ -86,7 +86,7 @@ describe('message:sign', () => { setupTest() .command(['message:sign', `--message=${messageSource}`]) .it('should sign the message from flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, @@ -116,7 +116,7 @@ describe('message:sign', () => { `--passphrase=${passphraseSource}`, ]) .it('should sign the message from the flag and passphrase', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: passphraseSource, repeatPrompt: true, diff --git a/test/commands/message/verify.test.js b/test/commands/message/verify.test.ts similarity index 85% rename from test/commands/message/verify.test.js rename to test/commands/message/verify.test.ts index 696a03e9..84fa2c14 100644 --- a/test/commands/message/verify.test.js +++ b/test/commands/message/verify.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import cryptography from '@liskhq/lisk-cryptography'; +import { expect, test } from '@oclif/test'; +import * as cryptography from '@liskhq/lisk-cryptography'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as inputUtils from '../../../src/utils/input'; describe('message:verify', () => { const message = 'Hello World'; @@ -35,7 +35,7 @@ describe('message:verify', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( cryptography, @@ -43,8 +43,8 @@ describe('message:verify', () => { sandbox.stub().returns(defaultVerifyMessageResult), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -52,7 +52,7 @@ describe('message:verify', () => { describe('message:verify', () => { setupTest() .command(['message:verify']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('Missing 2 required arg'); }) .it('should throw an error'); @@ -61,7 +61,7 @@ describe('message:verify', () => { describe('message:verify publicKey', () => { setupTest() .command(['message:verify', defaultPublicKey]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('Missing 1 required arg'); }) .it('should throw an error'); @@ -70,7 +70,7 @@ describe('message:verify', () => { describe('message:verify publicKey signature', () => { setupTest() .command(['message:verify', defaultPublicKey, defaultSignature]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No message was provided.'); }) .it('should throw an error'); @@ -80,8 +80,8 @@ describe('message:verify', () => { setupTest() .command(['message:verify', defaultPublicKey, defaultSignature, message]) .it('should verify message from the arg', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ - data: null, + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ + data: undefined, }); expect(cryptography.verifyMessageWithPublicKey).to.be.calledWithExactly( { @@ -106,7 +106,7 @@ describe('message:verify', () => { `--message=${messageSource}`, ]) .it('should verify message from the flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ data: { source: messageSource, }, diff --git a/test/commands/node/forging.test.js b/test/commands/node/forging.test.ts similarity index 83% rename from test/commands/node/forging.test.js rename to test/commands/node/forging.test.ts index 0276153c..d929d199 100644 --- a/test/commands/node/forging.test.js +++ b/test/commands/node/forging.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; +import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as api from '../../../src/utils/api'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; +import * as inputUtils from '../../../src/utils/input'; describe('node:forging', () => { const defaultInputs = { @@ -41,12 +41,12 @@ describe('node:forging', () => { }; const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) - .stub(api, 'default', sandbox.stub().returns(apiClientStub)) + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -54,7 +54,7 @@ describe('node:forging', () => { describe('node:forging', () => { setupTest() .command(['node:forging']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('Missing 2 required arg'); }) .it('should throw an error'); @@ -63,14 +63,14 @@ describe('node:forging', () => { describe('node:forging status', () => { setupTest() .command(['node:forging', 'disable']) - .catch(error => + .catch((error: Error) => expect(error.message).to.contain('Missing 1 required arg'), ) .it('should throw an error without public key'); setupTest() .command(['node:forging', 'wrong']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Expected wrong to be one of: enable, disable', ); @@ -85,7 +85,7 @@ describe('node:forging', () => { 'enable', '479b0fdb56199a211062203fa5c431bafe6a0a628661fc58f30fxxxxxxxxxxxx', ]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Argument must be a valid hex string.', ); @@ -97,7 +97,7 @@ describe('node:forging', () => { .it( 'should update the forging status of the node with the public key', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ password: { source: undefined, }, @@ -127,7 +127,7 @@ describe('node:forging', () => { .it( 'should disable the forging status of the node with the public key and the password from the flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ password: { source: 'pass:123', }, diff --git a/test/commands/node/get.test.js b/test/commands/node/get.test.ts similarity index 91% rename from test/commands/node/get.test.js rename to test/commands/node/get.test.ts index ab2421a6..5b9f489d 100644 --- a/test/commands/node/get.test.js +++ b/test/commands/node/get.test.ts @@ -13,10 +13,10 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; +import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as api from '../../../src/utils/api'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; describe('node:get', () => { const defaultGetConstantsResponse = { @@ -50,9 +50,9 @@ describe('node:get', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) - .stub(api, 'default', sandbox.stub().returns(apiClientStub)) + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) .stdout(); describe('node:get', () => { @@ -63,7 +63,7 @@ describe('node:get', () => { sandbox.stub().rejects(new Error('getConstants failed')), ) .command(['node:get']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('getConstants failed'); }) .it('should throw error when getConstants fails'); @@ -75,7 +75,7 @@ describe('node:get', () => { sandbox.stub().rejects(new Error('getStatus failed')), ) .command(['node:get']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('getStatus failed'); }) .it('should throw error when getStatus fails'); diff --git a/test/commands/passphrase/decrypt.test.js b/test/commands/passphrase/decrypt.test.ts similarity index 88% rename from test/commands/passphrase/decrypt.test.js rename to test/commands/passphrase/decrypt.test.ts index 7eab6990..b4b2339f 100644 --- a/test/commands/passphrase/decrypt.test.js +++ b/test/commands/passphrase/decrypt.test.ts @@ -14,10 +14,10 @@ * */ import { expect, test } from '@oclif/test'; -import cryptography from '@liskhq/lisk-cryptography'; +import * as cryptography from '@liskhq/lisk-cryptography'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as inputUtils from '../../../src/utils/input'; describe('passphrase:decrypt', () => { const defaultEncryptedPassphrase = @@ -39,7 +39,7 @@ describe('passphrase:decrypt', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( cryptography, @@ -52,8 +52,8 @@ describe('passphrase:decrypt', () => { sandbox.stub().returns(passphrase), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -61,7 +61,7 @@ describe('passphrase:decrypt', () => { describe('passphrase:decrypt', () => { setupTest() .command(['passphrase:decrypt']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'No encrypted passphrase was provided.', ); @@ -73,11 +73,11 @@ describe('passphrase:decrypt', () => { setupTest() .command(['passphrase:decrypt', defaultEncryptedPassphrase]) .it('should decrypt passphrase with arg', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ password: { source: undefined, }, - data: null, + data: undefined, }); expect(cryptography.parseEncryptedPassphrase).to.be.calledWithExactly( defaultEncryptedPassphrase, @@ -97,7 +97,7 @@ describe('passphrase:decrypt', () => { setupTest() .command(['passphrase:decrypt', `--passphrase=${passphraseSource}`]) .it('should decrypt passphrase with passphrase flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ password: { source: undefined, }, @@ -129,7 +129,7 @@ describe('passphrase:decrypt', () => { .it( 'should decrypt passphrase with passphrase flag and password flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ password: { source: 'pass:LbYpLpV9Wpec6ux8', }, diff --git a/test/commands/passphrase/encrypt.test.js b/test/commands/passphrase/encrypt.test.ts similarity index 90% rename from test/commands/passphrase/encrypt.test.js rename to test/commands/passphrase/encrypt.test.ts index 550b9d85..ba258df4 100644 --- a/test/commands/passphrase/encrypt.test.js +++ b/test/commands/passphrase/encrypt.test.ts @@ -14,10 +14,10 @@ * */ import { expect, test } from '@oclif/test'; -import cryptography from '@liskhq/lisk-cryptography'; +import * as cryptography from '@liskhq/lisk-cryptography'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as inputUtils from '../../../src/utils/input'; describe('passphrase:encrypt', () => { const encryptedPassphraseString = @@ -42,7 +42,7 @@ describe('passphrase:encrypt', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub(cryptography, 'getKey', sandbox.stub().returns(defaultKeys)) .stub( @@ -56,8 +56,8 @@ describe('passphrase:encrypt', () => { sandbox.stub().returns(encryptedPassphraseString), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -75,7 +75,7 @@ describe('passphrase:encrypt', () => { expect( cryptography.stringifyEncryptedPassphrase, ).to.be.calledWithExactly(encryptedPassphraseObject); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, @@ -104,7 +104,7 @@ describe('passphrase:encrypt', () => { expect( cryptography.stringifyEncryptedPassphrase, ).to.be.calledWithExactly(encryptedPassphraseObject); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, @@ -139,7 +139,7 @@ describe('passphrase:encrypt', () => { expect( cryptography.stringifyEncryptedPassphrase, ).to.be.calledWithExactly(encryptedPassphraseObject); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:"enemy pill squeeze gold spoil aisle awake thumb congress false box wagon"', @@ -176,7 +176,7 @@ describe('passphrase:encrypt', () => { expect( cryptography.stringifyEncryptedPassphrase, ).to.be.calledWithExactly(encryptedPassphraseObject); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:"enemy pill squeeze gold spoil aisle awake thumb congress false box wagon"', diff --git a/test/commands/signature/broadcast.test.js b/test/commands/signature/broadcast.test.ts similarity index 90% rename from test/commands/signature/broadcast.test.js rename to test/commands/signature/broadcast.test.ts index 978cefaf..f1219668 100644 --- a/test/commands/signature/broadcast.test.js +++ b/test/commands/signature/broadcast.test.ts @@ -14,9 +14,9 @@ * */ import { expect, test } from '@oclif/test'; +import * as apiUtils from '../../../src/utils/api'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as api from '../../../src/utils/api'; +import * as printUtils from '../../../src/utils/print'; import * as inputUtils from '../../../src/utils/input/utils'; describe('signature:broadcast', () => { @@ -38,9 +38,9 @@ describe('signature:broadcast', () => { const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) - .stub(api, 'default', sandbox.stub().returns(apiClientStub)) + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) .stub( inputUtils, 'getStdIn', @@ -52,7 +52,7 @@ describe('signature:broadcast', () => { setupTest() .stub(inputUtils, 'getStdIn', sandbox.stub().resolves({})) .command(['signature:broadcast']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No signature was provided.'); }) .it('should throw an error when no signature was provided'); @@ -61,7 +61,7 @@ describe('signature:broadcast', () => { describe('signature:broadcast signature', () => { setupTest() .command(['signature:broadcast', '{invalid: json, format: bad}']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Could not parse signature JSON. Did you use the `--json` option?', ); @@ -88,7 +88,7 @@ describe('signature:broadcast', () => { sandbox.stub().resolves({ data: '{invalid: json, format: bad}' }), ) .command(['signature:broadcast']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Could not parse signature JSON. Did you use the `--json` option?', ); diff --git a/test/commands/signature/create.test.js b/test/commands/signature/create.test.ts similarity index 83% rename from test/commands/signature/create.test.js rename to test/commands/signature/create.test.ts index b42bf894..59cb21c1 100644 --- a/test/commands/signature/create.test.js +++ b/test/commands/signature/create.test.ts @@ -13,12 +13,12 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import transactions from '@liskhq/lisk-transactions'; +import { expect, test } from '@oclif/test'; +import * as transactions from '@liskhq/lisk-transactions'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; +import * as printUtils from '../../../src/utils/print'; import * as inputUtils from '../../../src/utils/input/utils'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as inputUtilsModule from '../../../src/utils/input'; describe('signature:create', () => { const defaultTransaction = { @@ -51,7 +51,7 @@ describe('signature:create', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( transactions, @@ -62,8 +62,8 @@ describe('signature:create', () => { validateTransaction: sandbox.stub().returns({ valid: true }), }) .stub( - getInputsFromSources, - 'default', + inputUtilsModule, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -76,7 +76,7 @@ describe('signature:create', () => { sandbox.stub().rejects(new Error('Timeout error')), ) .command(['signature:create']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No transaction was provided.'); }) .it('should throw an error'); @@ -85,7 +85,7 @@ describe('signature:create', () => { describe('signature:create transaction', () => { setupTest() .command(['signature:create', invalidTransaction]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Could not parse transaction JSON.', ); @@ -97,7 +97,7 @@ describe('signature:create', () => { validateTransaction: sandbox.stub().returns({ valid: false }), }) .command(['signature:create', JSON.stringify(defaultTransaction)]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Provided transaction is invalid.', ); @@ -107,7 +107,7 @@ describe('signature:create', () => { setupTest() .command(['signature:create', JSON.stringify(defaultTransaction)]) .it('should take transaction from arg to create', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtilsModule.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, @@ -133,12 +133,14 @@ describe('signature:create', () => { .it( 'should take transaction from arg and passphrase from flag to create', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ - passphrase: { - source: 'pass:123', - repeatPrompt: true, + expect(inputUtilsModule.getInputsFromSources).to.be.calledWithExactly( + { + passphrase: { + source: 'pass:123', + repeatPrompt: true, + }, }, - }); + ); expect(transactions.createSignatureObject).to.be.calledWithExactly( defaultTransaction, defaultInputs.passphrase, @@ -154,7 +156,7 @@ describe('signature:create', () => { setupTest() .stub(inputUtils, 'getStdIn', sandbox.stub().resolves({})) .command(['signature:create']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No transaction was provided.'); }) .it('should throw an error when stdin is empty'); @@ -166,7 +168,7 @@ describe('signature:create', () => { sandbox.stub().resolves({ data: invalidTransaction }), ) .command(['signature:create']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Could not parse transaction JSON.', ); @@ -183,12 +185,14 @@ describe('signature:create', () => { .it( 'should take transaction from stdin and create signature object', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ - passphrase: { - source: undefined, - repeatPrompt: true, + expect(inputUtilsModule.getInputsFromSources).to.be.calledWithExactly( + { + passphrase: { + source: undefined, + repeatPrompt: true, + }, }, - }); + ); expect(transactions.createSignatureObject).to.be.calledWithExactly( defaultTransaction, defaultInputs.passphrase, @@ -211,12 +215,14 @@ describe('signature:create', () => { .it( 'should take transaction from stdin and sign with passphrase from flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ - passphrase: { - source: 'pass:123', - repeatPrompt: true, + expect(inputUtilsModule.getInputsFromSources).to.be.calledWithExactly( + { + passphrase: { + source: 'pass:123', + repeatPrompt: true, + }, }, - }); + ); expect(transactions.createSignatureObject).to.be.calledWithExactly( defaultTransaction, defaultInputs.passphrase, diff --git a/test/commands/transaction/broadcast.test.js b/test/commands/transaction/broadcast.test.ts similarity index 87% rename from test/commands/transaction/broadcast.test.js rename to test/commands/transaction/broadcast.test.ts index 7770a21b..bd455f28 100644 --- a/test/commands/transaction/broadcast.test.js +++ b/test/commands/transaction/broadcast.test.ts @@ -13,10 +13,10 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; +import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as api from '../../../src/utils/api'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; import * as inputUtils from '../../../src/utils/input/utils'; describe('transaction:broadcast', () => { @@ -55,9 +55,9 @@ describe('transaction:broadcast', () => { }; const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({ api: apiConfig })) - .stub(api, 'default', sandbox.stub().returns(apiClientStub)) + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) .stdout(); describe('transaction:broadcast', () => { @@ -68,7 +68,7 @@ describe('transaction:broadcast', () => { sandbox.stub().rejects(new Error('Timeout error')), ) .command(['transaction:broadcast']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No transaction was provided.'); }) .it('should throw an error without transaction'); @@ -77,7 +77,7 @@ describe('transaction:broadcast', () => { describe('transaction:broadcast transaction', () => { setupTest() .command(['transaction:broadcast', wrongTransaction]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Could not parse transaction JSON.', ); @@ -87,7 +87,7 @@ describe('transaction:broadcast', () => { setupTest() .command(['transaction:broadcast', JSON.stringify(defaultTransaction)]) .it('should broadcast the transaction', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); expect(apiClientStub.transactions.broadcast).to.be.calledWithExactly( defaultTransaction, ); @@ -101,7 +101,7 @@ describe('transaction:broadcast', () => { setupTest() .stub(inputUtils, 'getStdIn', sandbox.stub().resolves({})) .command(['transaction:broadcast']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No transaction was provided.'); }) .it('should throw an error with invalid transaction from stdin'); @@ -128,7 +128,7 @@ describe('transaction:broadcast', () => { ) .command(['transaction:broadcast']) .it('should broadcast the transaction', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); expect(apiClientStub.transactions.broadcast).to.be.calledWithExactly( defaultTransaction, ); diff --git a/test/commands/transaction/create.test.js b/test/commands/transaction/create.test.ts similarity index 96% rename from test/commands/transaction/create.test.js rename to test/commands/transaction/create.test.ts index c43e453d..6c00c220 100644 --- a/test/commands/transaction/create.test.js +++ b/test/commands/transaction/create.test.ts @@ -13,9 +13,9 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; +import { expect, test } from '@oclif/test'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; +import * as printUtils from '../../../src/utils/print'; import TransferCommand from '../../../src/commands/transaction/create/transfer'; import SecondPassphraseCommand from '../../../src/commands/transaction/create/second-passphrase'; import DelegateCommand from '../../../src/commands/transaction/create/delegate'; @@ -26,7 +26,7 @@ describe('transaction:create', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub(TransferCommand, 'run', sandbox.stub()) .stub(SecondPassphraseCommand, 'run', sandbox.stub()) diff --git a/test/commands/transaction/create/delegate.test.js b/test/commands/transaction/create/delegate.test.ts similarity index 84% rename from test/commands/transaction/create/delegate.test.js rename to test/commands/transaction/create/delegate.test.ts index 50901778..3435f6f3 100644 --- a/test/commands/transaction/create/delegate.test.js +++ b/test/commands/transaction/create/delegate.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import transactions from '@liskhq/lisk-transactions'; +import { expect, test } from '@oclif/test'; +import * as transactions from '@liskhq/lisk-transactions'; import * as config from '../../../../src/utils/config'; -import * as print from '../../../../src/utils/print'; -import * as getInputsFromSources from '../../../../src/utils/input'; +import * as printUtils from '../../../../src/utils/print'; +import * as inputUtils from '../../../../src/utils/input'; describe('transaction:create:delegate', () => { const defaultUsername = 'user-light'; @@ -40,7 +40,7 @@ describe('transaction:create:delegate', () => { const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( transactions, @@ -48,8 +48,8 @@ describe('transaction:create:delegate', () => { sandbox.stub().returns(defaultTransaction), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -67,12 +67,12 @@ describe('transaction:create:delegate', () => { setupTest() .command(['transaction:create:delegate', defaultUsername]) .it('create a transaction with the username', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactions.registerDelegate).to.be.calledWithExactly({ passphrase: defaultInputs.passphrase, @@ -95,12 +95,12 @@ describe('transaction:create:delegate', () => { .it( 'create a transaction with the username with the passphrase from flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactions.registerDelegate).to.be.calledWithExactly({ passphrase: defaultInputs.passphrase, @@ -125,7 +125,7 @@ describe('transaction:create:delegate', () => { .it( 'create a transaction with the username and the passphrase and second passphrase from the flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, @@ -156,11 +156,11 @@ describe('transaction:create:delegate', () => { ]) .it('create a transaction with the username without signature', () => { expect(transactions.registerDelegate).to.be.calledWithExactly({ - passphrase: null, - secondPassphrase: null, + passphrase: undefined, + secondPassphrase: undefined, username: defaultUsername, }); - expect(getInputsFromSources.default).not.to.be.called; + expect(inputUtils.getInputsFromSources).not.to.be.called; return expect(printMethodStub).to.be.calledWithExactly( defaultTransaction, ); diff --git a/test/commands/transaction/create/multisignature.test.js b/test/commands/transaction/create/multisignature.test.ts similarity index 90% rename from test/commands/transaction/create/multisignature.test.js rename to test/commands/transaction/create/multisignature.test.ts index 21add8bc..a047cba0 100644 --- a/test/commands/transaction/create/multisignature.test.js +++ b/test/commands/transaction/create/multisignature.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import transactions from '@liskhq/lisk-transactions'; +import { expect, test } from '@oclif/test'; +import * as transactions from '@liskhq/lisk-transactions'; import * as config from '../../../../src/utils/config'; -import * as print from '../../../../src/utils/print'; -import * as getInputsFromSources from '../../../../src/utils/input'; +import * as printUtils from '../../../../src/utils/print'; +import * as inputUtils from '../../../../src/utils/input'; describe('transaction:create:multisignature', () => { const defaultLifetime = '24'; @@ -48,7 +48,7 @@ describe('transaction:create:multisignature', () => { const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( transactions, @@ -57,8 +57,8 @@ describe('transaction:create:multisignature', () => { ) .stub(transactions, 'utils', transactionUtilStub) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -132,12 +132,12 @@ describe('transaction:create:multisignature', () => { expect(transactionUtilStub.validatePublicKeys).to.be.calledWithExactly( defaultKeysgroup, ); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactions.registerMultisignature).to.be.calledWithExactly({ passphrase: defaultInputs.passphrase, @@ -165,12 +165,12 @@ describe('transaction:create:multisignature', () => { expect(transactionUtilStub.validatePublicKeys).to.be.calledWithExactly( defaultKeysgroup, ); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactions.registerMultisignature).to.be.calledWithExactly({ passphrase: defaultInputs.passphrase, @@ -201,7 +201,7 @@ describe('transaction:create:multisignature', () => { expect( transactionUtilStub.validatePublicKeys, ).to.be.calledWithExactly(defaultKeysgroup); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, @@ -240,10 +240,10 @@ describe('transaction:create:multisignature', () => { expect( transactionUtilStub.validatePublicKeys, ).to.be.calledWithExactly(defaultKeysgroup); - expect(getInputsFromSources.default).not.to.be.called; + expect(inputUtils.getInputsFromSources).not.to.be.called; expect(transactions.registerMultisignature).to.be.calledWithExactly({ - passphrase: null, - secondPassphrase: null, + passphrase: undefined, + secondPassphrase: undefined, keysgroup: defaultKeysgroup, lifetime: parseInt(defaultLifetime, 10), minimum: parseInt(defaultMinimum, 10), diff --git a/test/commands/transaction/create/second-passphrase.test.js b/test/commands/transaction/create/second-passphrase.test.ts similarity index 85% rename from test/commands/transaction/create/second-passphrase.test.js rename to test/commands/transaction/create/second-passphrase.test.ts index 1eb2615b..683a97f5 100644 --- a/test/commands/transaction/create/second-passphrase.test.js +++ b/test/commands/transaction/create/second-passphrase.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import transactions from '@liskhq/lisk-transactions'; +import { expect, test } from '@oclif/test'; +import * as transactions from '@liskhq/lisk-transactions'; import * as config from '../../../../src/utils/config'; -import * as print from '../../../../src/utils/print'; -import * as getInputsFromSources from '../../../../src/utils/input'; +import * as printUtils from '../../../../src/utils/print'; +import * as inputUtils from '../../../../src/utils/input'; describe('transaction:create:second-passphrase', () => { const defaultInputs = { @@ -39,7 +39,7 @@ describe('transaction:create:second-passphrase', () => { const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( transactions, @@ -47,8 +47,8 @@ describe('transaction:create:second-passphrase', () => { sandbox.stub().returns(defaultTransaction), ) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -57,7 +57,7 @@ describe('transaction:create:second-passphrase', () => { setupTest() .command(['transaction:create:second-passphrase']) .it('should create second passphrase transaction', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, @@ -85,7 +85,7 @@ describe('transaction:create:second-passphrase', () => { .it( 'should create second passphrase transaction with passphrase from flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, @@ -115,7 +115,7 @@ describe('transaction:create:second-passphrase', () => { .it( 'should create second passphrase transaction with passphrase and second passphrase from flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, @@ -141,8 +141,8 @@ describe('transaction:create:second-passphrase', () => { .it( 'should create second passphrase transaction withoug passphrase', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ - passphrase: null, + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ + passphrase: undefined, secondPassphrase: { source: undefined, repeatPrompt: true, diff --git a/test/commands/transaction/create/transfer.test.js b/test/commands/transaction/create/transfer.test.ts similarity index 72% rename from test/commands/transaction/create/transfer.test.js rename to test/commands/transaction/create/transfer.test.ts index 1c28e7dd..20b96d76 100644 --- a/test/commands/transaction/create/transfer.test.js +++ b/test/commands/transaction/create/transfer.test.ts @@ -13,11 +13,11 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import transactions from '@liskhq/lisk-transactions'; +import { expect, test } from '@oclif/test'; +import * as transactions from '@liskhq/lisk-transactions'; import * as config from '../../../../src/utils/config'; -import * as print from '../../../../src/utils/print'; -import * as getInputsFromSources from '../../../../src/utils/input'; +import * as printUtils from '../../../../src/utils/print'; +import * as inputUtils from '../../../../src/utils/input'; describe('transaction:create:transfer', () => { const defaultAmount = '1'; @@ -45,7 +45,7 @@ describe('transaction:create:transfer', () => { const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( transactions, @@ -54,8 +54,8 @@ describe('transaction:create:transfer', () => { ) .stub(transactions, 'utils', transactionUtilStub) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -81,19 +81,47 @@ describe('transaction:create:transfer', () => { describe('transaction:create:transfer amount address', () => { setupTest() .command(['transaction:create:transfer', defaultAmount, defaultAddress]) - .it('should create an tranfer transaction', () => { + .it('should create a transfer transaction', () => { expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( defaultAddress, ); expect(transactionUtilStub.convertLSKToBeddows).to.be.calledWithExactly( defaultAmount, ); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, + }); + return expect(printMethodStub).to.be.calledWithExactly( + defaultTransaction, + ); + }); + }); + + describe('transaction:create:transfer amount address --data=xxx', () => { + setupTest() + .command([ + 'transaction:create:transfer', + defaultAmount, + defaultAddress, + '--data=Testing lisk transaction data.', + ]) + .it('should create a transfer transaction', () => { + expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( + defaultAddress, + ); + expect(transactionUtilStub.convertLSKToBeddows).to.be.calledWithExactly( + defaultAmount, + ); + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ + passphrase: { + source: undefined, + repeatPrompt: true, + }, + secondPassphrase: undefined, }); return expect(printMethodStub).to.be.calledWithExactly( defaultTransaction, @@ -109,14 +137,14 @@ describe('transaction:create:transfer', () => { defaultAddress, '--no-signature', ]) - .it('should create an tranfer transaction without signature', () => { + .it('should create a transfer transaction without signature', () => { expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( defaultAddress, ); expect(transactionUtilStub.convertLSKToBeddows).to.be.calledWithExactly( defaultAmount, ); - expect(getInputsFromSources.default).not.to.be.called; + expect(inputUtils.getInputsFromSources).not.to.be.called; return expect(printMethodStub).to.be.calledWithExactly( defaultTransaction, ); @@ -131,19 +159,19 @@ describe('transaction:create:transfer', () => { defaultAddress, '--passphrase=pass:123', ]) - .it('should create an tranfer transaction', () => { + .it('should create a transfer transaction', () => { expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( defaultAddress, ); expect(transactionUtilStub.convertLSKToBeddows).to.be.calledWithExactly( defaultAmount, ); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); return expect(printMethodStub).to.be.calledWithExactly( defaultTransaction, @@ -160,14 +188,14 @@ describe('transaction:create:transfer', () => { '--passphrase=pass:123', '--second-passphrase=pass:456', ]) - .it('should create an tranfer transaction', () => { + .it('should create a transfer transaction', () => { expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( defaultAddress, ); expect(transactionUtilStub.convertLSKToBeddows).to.be.calledWithExactly( defaultAmount, ); - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, diff --git a/test/commands/transaction/create/vote.test.js b/test/commands/transaction/create/vote.test.ts similarity index 86% rename from test/commands/transaction/create/vote.test.js rename to test/commands/transaction/create/vote.test.ts index dda07b97..2358ae24 100644 --- a/test/commands/transaction/create/vote.test.js +++ b/test/commands/transaction/create/vote.test.ts @@ -13,12 +13,12 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import transactions from '@liskhq/lisk-transactions'; +import { expect, test } from '@oclif/test'; +import * as transactions from '@liskhq/lisk-transactions'; import * as config from '../../../../src/utils/config'; -import * as print from '../../../../src/utils/print'; -import * as getInputsFromSources from '../../../../src/utils/input'; -import * as inputUtils from '../../../../src/utils/input/utils'; +import * as printUtils from '../../../../src/utils/print'; +import * as inputUtils from '../../../../src/utils/input'; +import * as inputModule from '../../../../src/utils/input/utils'; describe('transaction:create:vote', () => { const defaultVote = [ @@ -55,7 +55,7 @@ describe('transaction:create:vote', () => { const setupStub = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub( transactions, @@ -63,10 +63,14 @@ describe('transaction:create:vote', () => { sandbox.stub().returns(defaultTransaction), ) .stub(transactions, 'utils', transactionUtilStub) - .stub(inputUtils, 'getData', sandbox.stub().resolves(fileVotes.join(','))) .stub( - getInputsFromSources, - 'default', + inputModule, + 'getData', + sandbox.stub().resolves(fileVotes.join(',')), + ) + .stub( + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -86,12 +90,12 @@ describe('transaction:create:vote', () => { setupStub() .command(['transaction:create:vote', `--votes=${defaultVote.join(',')}`]) .it('should create transaction with only votes', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactionUtilStub.validatePublicKeys).to.be.calledWithExactly( defaultVote, @@ -110,14 +114,14 @@ describe('transaction:create:vote', () => { setupStub() .command(['transaction:create:vote', '--votes=file:vote.txt']) .it('should create transaction with only votes from the file', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); - expect(inputUtils.getData).to.be.calledWithExactly('file:vote.txt'); + expect(inputModule.getData).to.be.calledWithExactly('file:vote.txt'); expect(transactionUtilStub.validatePublicKeys).to.be.calledWithExactly( fileVotes, ); @@ -140,12 +144,12 @@ describe('transaction:create:vote', () => { `--unvotes=${defaultUnvote.join(',')}`, ]) .it('should create transaction with only unvotes', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactionUtilStub.validatePublicKeys).to.be.calledWithExactly( defaultUnvote, @@ -164,14 +168,14 @@ describe('transaction:create:vote', () => { setupStub() .command(['transaction:create:vote', '--unvotes=file:unvote.txt']) .it('should create transaction with only unvotes from the file', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); - expect(inputUtils.getData).to.be.calledWithExactly('file:unvote.txt'); + expect(inputModule.getData).to.be.calledWithExactly('file:unvote.txt'); expect(transactionUtilStub.validatePublicKeys).to.be.calledWithExactly( fileVotes, ); @@ -208,12 +212,12 @@ describe('transaction:create:vote', () => { `--unvotes=${defaultUnvote.join(',')}`, ]) .it('should create a transaction with votes and unvotes', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactionUtilStub.validatePublicKeys).to.be.calledWithExactly( defaultVote, @@ -244,7 +248,7 @@ describe('transaction:create:vote', () => { .it( 'should create a transaction with votes and unvotes without signature', () => { - expect(getInputsFromSources.default).not.to.be.called; + expect(inputUtils.getInputsFromSources).not.to.be.called; expect( transactionUtilStub.validatePublicKeys, ).to.be.calledWithExactly(defaultVote); @@ -252,8 +256,8 @@ describe('transaction:create:vote', () => { transactionUtilStub.validatePublicKeys, ).to.be.calledWithExactly(defaultUnvote); expect(transactions.castVotes).to.be.calledWithExactly({ - passphrase: null, - secondPassphrase: null, + passphrase: undefined, + secondPassphrase: undefined, votes: defaultVote, unvotes: defaultUnvote, }); @@ -275,12 +279,12 @@ describe('transaction:create:vote', () => { .it( 'should create a transaction with votes and unvotes with the passphrase from the flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect( transactionUtilStub.validatePublicKeys, @@ -313,7 +317,7 @@ describe('transaction:create:vote', () => { .it( 'should create a transaction with votes and unvotes with the passphrase and second passphrase from the flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, diff --git a/test/commands/transaction/get.test.js b/test/commands/transaction/get.test.js deleted file mode 100644 index f45a7897..00000000 --- a/test/commands/transaction/get.test.js +++ /dev/null @@ -1,157 +0,0 @@ -/* - * LiskHQ/lisk-commander - * Copyright © 2017–2018 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -import { test } from '@oclif/test'; -import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as api from '../../../src/utils/api'; -import * as query from '../../../src/utils/query'; - -describe('transaction:get', () => { - const endpoint = 'transactions'; - const apiConfig = { - nodes: ['http://local.host'], - network: 'main', - }; - const printMethodStub = sandbox.stub(); - const apiClientStub = sandbox.stub(); - const setupTest = () => - test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) - .stub(config, 'getConfig', sandbox.stub().returns({ api: apiConfig })) - .stub(api, 'default', sandbox.stub().returns(apiClientStub)) - .stdout(); - - setupTest() - .command(['transaction:get']) - .catch(error => { - return expect(error.message).to.contain('Missing 1 required arg'); - }) - .it('should throw an error when arg is not provided'); - - describe('transaction:get transaction', () => { - const transactionId = '3520445367460290306'; - const queryResult = { - id: transactionId, - type: 2, - }; - - setupTest() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) - .command(['transaction:get', transactionId]) - .it('should get a transaction’s info and display as an array', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly(apiClientStub, endpoint, [ - { - query: { - limit: 1, - id: transactionId, - }, - placeholder: { - id: transactionId, - message: 'Transaction not found.', - }, - }, - ]); - return expect(printMethodStub).to.be.calledWithExactly(queryResult); - }); - }); - - describe('transaction:get transactions', () => { - const transactionIds = ['3520445367460290306', '2802325248134221536']; - const transactionIdsWithEmpty = [ - '3520445367460290306', - '', - '2802325248134221536', - ]; - const queryResult = [ - { - id: transactionIds[0], - type: 0, - }, - { - id: transactionIds[1], - type: 3, - }, - ]; - - setupTest() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) - .command(['transaction:get', transactionIds.join(',')]) - .it('should get two transactions’ info and display as an array', () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly(apiClientStub, endpoint, [ - { - query: { - limit: 1, - id: transactionIds[0], - }, - placeholder: { - id: transactionIds[0], - message: 'Transaction not found.', - }, - }, - { - query: { - limit: 1, - id: transactionIds[1], - }, - placeholder: { - id: transactionIds[1], - message: 'Transaction not found.', - }, - }, - ]); - return expect(printMethodStub).to.be.calledWithExactly(queryResult); - }); - - setupTest() - .stub(query, 'default', sandbox.stub().resolves(queryResult)) - .command(['transaction:get', transactionIdsWithEmpty.join(',')]) - .it( - 'should get transactions info only using non-empty args and display as an array', - () => { - expect(api.default).to.be.calledWithExactly(apiConfig); - expect(query.default).to.be.calledWithExactly( - apiClientStub, - endpoint, - [ - { - query: { - limit: 1, - id: transactionIdsWithEmpty[0], - }, - placeholder: { - id: transactionIdsWithEmpty[0], - message: 'Transaction not found.', - }, - }, - { - query: { - limit: 1, - id: transactionIdsWithEmpty[2], - }, - placeholder: { - id: transactionIdsWithEmpty[2], - message: 'Transaction not found.', - }, - }, - ], - ); - return expect(printMethodStub).to.be.calledWithExactly(queryResult); - }, - ); - }); -}); diff --git a/test/commands/transaction/get.test.ts b/test/commands/transaction/get.test.ts new file mode 100644 index 00000000..3c53909e --- /dev/null +++ b/test/commands/transaction/get.test.ts @@ -0,0 +1,569 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { expect, test } from '@oclif/test'; +import * as config from '../../../src/utils/config'; +import * as printUtils from '../../../src/utils/print'; +import * as apiUtils from '../../../src/utils/api'; +import * as queryHandler from '../../../src/utils/query'; + +describe('transaction:get', () => { + const endpoint = 'transactions'; + const apiConfig = { + nodes: ['http://local.host'], + network: 'main', + }; + const printMethodStub = sandbox.stub(); + const apiClientStub = sandbox.stub(); + const setupTest = () => + test + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) + .stub(config, 'getConfig', sandbox.stub().returns({ api: apiConfig })) + .stdout(); + + describe('transaction:get transaction', () => { + const transactionId = '3520445367460290306'; + const queryResult = { + id: transactionId, + type: 2, + }; + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['transaction:get', transactionId]) + .it('should get a transaction’s info and display as an array', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + limit: 1, + id: transactionId, + }, + placeholder: { + id: transactionId, + message: 'Transaction not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + + describe('transaction:get transactions', () => { + const transactionIds = ['3520445367460290306', '2802325248134221536']; + const transactionIdsWithEmpty = [ + '3520445367460290306', + '', + '2802325248134221536', + ]; + const queryResult = [ + { + id: transactionIds[0], + type: 0, + height: 105, + }, + { + id: transactionIds[1], + type: 3, + height: 1010, + }, + ]; + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['transaction:get', transactionIds.join(',')]) + .it('should get two transaction’s info and display as an array.', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + limit: 1, + id: transactionIds[0], + }, + placeholder: { + id: transactionIds[0], + message: 'Transaction not found.', + }, + }, + { + query: { + limit: 1, + id: transactionIds[1], + }, + placeholder: { + id: transactionIds[1], + message: 'Transaction not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['transaction:get', transactionIdsWithEmpty.join(',')]) + .it( + 'should get transaction’s info only using non-empty args and display as an array.', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + [ + { + query: { + limit: 1, + id: transactionIdsWithEmpty[0], + }, + placeholder: { + id: transactionIdsWithEmpty[0], + message: 'Transaction not found.', + }, + }, + { + query: { + limit: 1, + id: transactionIdsWithEmpty[2], + }, + placeholder: { + id: transactionIdsWithEmpty[2], + message: 'Transaction not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }, + ); + + describe('transaction:get --sender-id', () => { + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['transaction:get', '--sender-id=12668885769632475474L']) + .it('should get all transactions for a given sender-id.', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + { + query: { + limit: '10', + offset: '0', + senderId: '12668885769632475474L', + sort: 'timestamp:desc', + }, + placeholder: { + message: 'No transactions found.', + }, + }, + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + }); + + describe('transaction: get --limit --offset', () => { + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['transaction:get', '--limit=10']) + .it('should get all transactions info limited by limit value.', () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + { + query: { + limit: '10', + offset: '0', + sort: 'timestamp:desc', + }, + placeholder: { + message: 'No transactions found.', + }, + }, + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }); + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stub(queryHandler, 'query', sandbox.stub().resolves(queryResult)) + .command(['transaction:get']) + .it( + 'should get all transactions based on default value of limit(10) and offset(0).', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + { + query: { + limit: '10', + offset: '0', + sort: 'timestamp:desc', + }, + placeholder: { + message: 'No transactions found.', + }, + }, + ); + return expect(printMethodStub).to.be.calledWithExactly(queryResult); + }, + ); + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStub)) + .stub( + queryHandler, + 'query', + sandbox.stub().resolves({ message: 'No transactions found.' }), + ) + .command(['transaction:get', '--offset=10']) + .it( + 'should return a message that no transactions found when there are no transactions after a given offset value.', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.query).to.be.calledWithExactly( + apiClientStub, + endpoint, + { + query: { + limit: '10', + offset: '10', + sort: 'timestamp:desc', + }, + placeholder: { + message: 'No transactions found.', + }, + }, + ); + return expect(printMethodStub).to.be.calledWithExactly({ + message: 'No transactions found.', + }); + }, + ); + }); + }); + + describe('transaction:get transactions --state', () => { + const transactionId = '3520445367460290306'; + const transactionIds = ['3520445367460290306', '2802325248134221536']; + const transactionIdsWithEmpty = [ + '3520445367460290306', + '', + '2802325248134221536', + ]; + + const defaultGetTransactionsResponse = { + data: [ + { + id: transactionIds[0], + type: 0, + }, + { + id: transactionIds[1], + type: 3, + }, + ], + }; + const apiClientStubNode = { + node: { + getTransactions: sandbox + .stub() + .resolves(defaultGetTransactionsResponse), + }, + }; + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(apiClientStubNode)) + .command(['transaction:get', '--state=unsign', '--offset=1']) + .catch(error => { + return expect(error.message).to.contain( + 'to be one of: unsigned, unprocessed', + ); + }) + .it('should throw an error when incorrect value of state is provided'); + + describe('transaction:get transaction --state=unprocessed', () => { + const singleTransactionsResponse = { + data: [ + { + id: transactionIds[0], + type: 0, + }, + ], + }; + const localClientStub = { + node: { + getTransactions: sandbox.stub().resolves(singleTransactionsResponse), + }, + }; + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(localClientStub)) + .stub( + queryHandler, + 'queryNodeTransaction', + sandbox.stub().resolves(singleTransactionsResponse.data), + ) + .command(['transaction:get', transactionId, '--state=unprocessed']) + .it( + 'should get an unprocessed transaction’s info by Id and display as an array.', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.queryNodeTransaction).to.be.calledWithExactly( + localClientStub.node, + 'unprocessed', + [ + { + query: { + id: '3520445367460290306', + limit: 1, + }, + placeholder: { + id: '3520445367460290306', + message: 'Transaction not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly( + singleTransactionsResponse.data, + ); + }, + ); + }); + + describe('transaction:get transactions --state=unprocessed', () => { + setupTest() + .stub( + apiUtils, + 'getAPIClient', + sandbox.stub().returns(apiClientStubNode), + ) + .stub( + queryHandler, + 'queryNodeTransaction', + sandbox.stub().resolves(defaultGetTransactionsResponse.data), + ) + .command([ + 'transaction:get', + transactionIdsWithEmpty.join(','), + '--state=unsigned', + ]) + .it( + 'should get transaction’s info for given ids and unsigned state.', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.queryNodeTransaction).to.be.calledWithExactly( + apiClientStubNode.node, + 'unsigned', + [ + { + query: { + id: '3520445367460290306', + limit: 1, + }, + placeholder: { + id: '3520445367460290306', + message: 'Transaction not found.', + }, + }, + { + query: { + id: '2802325248134221536', + limit: 1, + }, + placeholder: { + id: '2802325248134221536', + message: 'Transaction not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly( + defaultGetTransactionsResponse.data, + ); + }, + ); + }); + + describe('transaction:get --state-unsigned --sender-id', () => { + const senderTransactionsResponse = { + data: [ + { + id: transactionIds[0], + senderId: '12668885769632475474L', + type: 0, + }, + ], + }; + + const clientStubNode = { + node: { + getTransactions: sandbox.stub().resolves(senderTransactionsResponse), + }, + }; + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(clientStubNode)) + .stub( + queryHandler, + 'queryNodeTransaction', + sandbox.stub().resolves(senderTransactionsResponse.data), + ) + .command([ + 'transaction:get', + '--sender-id=12668885769632475474L', + '--state=unprocessed', + ]) + .it( + 'should get a transaction’s info for a given sender’s address and state and display as an array.', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.queryNodeTransaction).to.be.calledWithExactly( + clientStubNode.node, + 'unprocessed', + [ + { + query: { + limit: '10', + offset: '0', + senderId: '12668885769632475474L', + sort: 'timestamp:desc', + }, + placeholder: { + senderId: '12668885769632475474L', + message: 'Transaction not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly( + senderTransactionsResponse.data, + ); + }, + ); + + setupTest() + .stub(apiUtils, 'getAPIClient', sandbox.stub().returns(clientStubNode)) + .stub( + queryHandler, + 'queryNodeTransaction', + sandbox.stub().resolves(senderTransactionsResponse), + ) + .command([ + 'transaction:get', + '3520445367460290306', + '--sender-id=12668885769632475474L', + '--state=unprocessed', + ]) + .it( + 'should get a transaction’s info for a given txn Id, sender’s address and state and display as an array.', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.queryNodeTransaction).to.be.calledWithExactly( + clientStubNode.node, + 'unprocessed', + [ + { + query: { + limit: 1, + id: '3520445367460290306', + senderId: '12668885769632475474L', + }, + placeholder: { + senderId: '12668885769632475474L', + id: '3520445367460290306', + message: 'Transaction not found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly( + senderTransactionsResponse.data, + ); + }, + ); + + describe('transaction:get --state-unprocessed', () => { + const stateTransactionsResponse = { + data: [ + { + id: transactionIds[0], + type: 0, + }, + ], + }; + + const localClientStub = { + node: { + getTransactions: sandbox.stub().resolves(stateTransactionsResponse), + }, + }; + + setupTest() + .stub( + apiUtils, + 'getAPIClient', + sandbox.stub().returns(localClientStub), + ) + .stub( + queryHandler, + 'queryNodeTransaction', + sandbox.stub().resolves(stateTransactionsResponse.data), + ) + .command(['transaction:get', '--state=unprocessed', '--limit=50']) + .it( + 'should get transactions for a given state without specified txn id and limited by limit flag.', + () => { + expect(apiUtils.getAPIClient).to.be.calledWithExactly(apiConfig); + expect(queryHandler.queryNodeTransaction).to.be.calledWithExactly( + localClientStub.node, + 'unprocessed', + [ + { + query: { + limit: '50', + offset: '0', + sort: 'timestamp:desc', + }, + placeholder: { + message: 'No transactions found.', + }, + }, + ], + ); + return expect(printMethodStub).to.be.calledWithExactly( + defaultGetTransactionsResponse.data, + ); + }, + ); + }); + }); + }); +}); diff --git a/test/commands/transaction/sign.test.js b/test/commands/transaction/sign.test.ts similarity index 87% rename from test/commands/transaction/sign.test.js rename to test/commands/transaction/sign.test.ts index 9e5abb52..c6858e3f 100644 --- a/test/commands/transaction/sign.test.js +++ b/test/commands/transaction/sign.test.ts @@ -13,12 +13,12 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import transactions from '@liskhq/lisk-transactions'; +import { expect, test } from '@oclif/test'; +import * as transactions from '@liskhq/lisk-transactions'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; -import * as inputUtils from '../../../src/utils/input/utils'; -import * as getInputsFromSources from '../../../src/utils/input'; +import * as printUtils from '../../../src/utils/print'; +import * as inputModule from '../../../src/utils/input/utils'; +import * as inputUtils from '../../../src/utils/input'; describe('transaction:sign', () => { const defaultTransaction = { @@ -50,12 +50,12 @@ describe('transaction:sign', () => { const printMethodStub = sandbox.stub(); const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub(transactions, 'utils', transactionUtilStub) .stub( - getInputsFromSources, - 'default', + inputUtils, + 'getInputsFromSources', sandbox.stub().resolves(defaultInputs), ) .stdout(); @@ -63,7 +63,7 @@ describe('transaction:sign', () => { describe('transaction:sign', () => { setupTest() .stub( - inputUtils, + inputModule, 'getStdIn', sandbox.stub().rejects(new Error('Timeout error')), ) @@ -99,12 +99,12 @@ describe('transaction:sign', () => { setupTest() .command(['transaction:sign', JSON.stringify(defaultTransaction)]) .it('should take transaction from arg to sign', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactionUtilStub.prepareTransaction).to.be.calledWithExactly( defaultTransaction, @@ -127,12 +127,12 @@ describe('transaction:sign', () => { .it( 'should take transaction from arg and passphrase from flag to sign', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect( transactionUtilStub.prepareTransaction, @@ -159,7 +159,7 @@ describe('transaction:sign', () => { .it( 'should take transaction from arg and passphrase and second passphrase from flag to sign', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, @@ -185,7 +185,7 @@ describe('transaction:sign', () => { describe('transaction | transaction:sign', () => { setupTest() - .stub(inputUtils, 'getStdIn', sandbox.stub().resolves({})) + .stub(inputModule, 'getStdIn', sandbox.stub().resolves({})) .command(['transaction:sign']) .catch(error => { return expect(error.message).to.contain('No transaction was provided.'); @@ -194,7 +194,7 @@ describe('transaction:sign', () => { setupTest() .stub( - inputUtils, + inputModule, 'getStdIn', sandbox.stub().resolves({ data: invalidTransaction }), ) @@ -208,18 +208,18 @@ describe('transaction:sign', () => { setupTest() .stub( - inputUtils, + inputModule, 'getStdIn', sandbox.stub().resolves({ data: JSON.stringify(defaultTransaction) }), ) .command(['transaction:sign']) .it('should take transaction from stdin and sign', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: undefined, repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect(transactionUtilStub.prepareTransaction).to.be.calledWithExactly( defaultTransaction, @@ -235,7 +235,7 @@ describe('transaction:sign', () => { describe('transaction | transaction:sign --passphrase=pass:xxx', () => { setupTest() .stub( - inputUtils, + inputModule, 'getStdIn', sandbox.stub().resolves({ data: JSON.stringify(defaultTransaction) }), ) @@ -243,12 +243,12 @@ describe('transaction:sign', () => { .it( 'should take transaction from stdin and sign with passphrase from flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:123', repeatPrompt: true, }, - secondPassphrase: null, + secondPassphrase: undefined, }); expect( transactionUtilStub.prepareTransaction, @@ -267,7 +267,7 @@ describe('transaction:sign', () => { describe('transaction | transaction:sign --passphrase=pass:xxx --second-passphrase=pass:xxx', () => { setupTest() .stub( - inputUtils, + inputModule, 'getStdIn', sandbox.stub().resolves({ data: JSON.stringify(defaultTransaction) }), ) @@ -279,7 +279,7 @@ describe('transaction:sign', () => { .it( 'should take transaction from stdin and sign with passphrase and second passphrase from flag', () => { - expect(getInputsFromSources.default).to.be.calledWithExactly({ + expect(inputUtils.getInputsFromSources).to.be.calledWithExactly({ passphrase: { source: 'pass:abc', repeatPrompt: true, diff --git a/test/commands/transaction/verify.test.js b/test/commands/transaction/verify.test.ts similarity index 93% rename from test/commands/transaction/verify.test.js rename to test/commands/transaction/verify.test.ts index 95c16284..871555e2 100644 --- a/test/commands/transaction/verify.test.js +++ b/test/commands/transaction/verify.test.ts @@ -13,10 +13,10 @@ * Removal or modification of this copyright notice is prohibited. * */ -import { test } from '@oclif/test'; -import transactions from '@liskhq/lisk-transactions'; +import { expect, test } from '@oclif/test'; +import * as transactions from '@liskhq/lisk-transactions'; import * as config from '../../../src/utils/config'; -import * as print from '../../../src/utils/print'; +import * as printUtils from '../../../src/utils/print'; import * as inputUtils from '../../../src/utils/input/utils'; describe('transaction:verify', () => { @@ -48,7 +48,7 @@ describe('transaction:verify', () => { }; const setupTest = () => test - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) .stub(config, 'getConfig', sandbox.stub().returns({})) .stub(transactions, 'utils', transactionUtilStub) .stub( @@ -66,7 +66,7 @@ describe('transaction:verify', () => { sandbox.stub().rejects(new Error('Timeout error')), ) .command(['transaction:verify']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No transaction was provided.'); }) .it('should throw an error'); @@ -75,7 +75,7 @@ describe('transaction:verify', () => { describe('transaction:verify transaction', () => { setupTest() .command(['transaction:verify', invalidTransaction]) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Could not parse transaction JSON.', ); @@ -87,7 +87,7 @@ describe('transaction:verify', () => { .it('should verify transaction from arg', () => { expect(transactionUtilStub.verifyTransaction).to.be.calledWithExactly( defaultTransaction, - null, + undefined, ); return expect(printMethodStub).to.be.calledWithExactly( defaultVerifyTransactionResult, @@ -141,7 +141,7 @@ describe('transaction:verify', () => { setupTest() .stub(inputUtils, 'getStdIn', sandbox.stub().resolves({})) .command(['transaction:verify']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain('No transaction was provided.'); }) .it('should throw an error when no stdin was provided'); @@ -153,7 +153,7 @@ describe('transaction:verify', () => { sandbox.stub().resolves({ data: invalidTransaction }), ) .command(['transaction:verify']) - .catch(error => { + .catch((error: Error) => { return expect(error.message).to.contain( 'Could not parse transaction JSON.', ); @@ -170,7 +170,7 @@ describe('transaction:verify', () => { .it('should verify transaction from stdin', () => { expect(transactionUtilStub.verifyTransaction).to.be.calledWithExactly( defaultTransaction, - null, + undefined, ); return expect(printMethodStub).to.be.calledWithExactly( defaultVerifyTransactionResult, diff --git a/test/commands/warranty.test.js b/test/commands/warranty.test.ts similarity index 100% rename from test/commands/warranty.test.js rename to test/commands/warranty.test.ts diff --git a/test/helpers/utils.js b/test/helpers/utils.ts similarity index 79% rename from test/helpers/utils.js rename to test/helpers/utils.ts index 290960e4..308647a1 100644 --- a/test/helpers/utils.js +++ b/test/helpers/utils.ts @@ -13,8 +13,8 @@ * Removal or modification of this copyright notice is prohibited. * */ -export const createFakeInterface = value => ({ - on: (type, callback) => { +export const createFakeInterface = (value: any) => ({ + on: (type: string, callback: Function) => { if (type === 'line') { value.split('\n').forEach(callback); } @@ -25,13 +25,13 @@ export const createFakeInterface = value => ({ }, }); -export const createStreamStub = on => ({ +export const createStreamStub = (on: Function) => ({ resume: () => {}, close: () => {}, on, }); -export const objectToKeyValueString = value => +export const objectToKeyValueString = (value: object) => Object.entries(value) .map(([vKey, vValue]) => `${vKey}: ${JSON.stringify(vValue, null, ' ')}`) .join('\n'); diff --git a/test/mocha.opts b/test/mocha.opts index b6ace251..8c7a30e8 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,4 +1,8 @@ ---require babel-register ---require ./test/setup.js ---reporter spec --recursive +--timeout 8000 +--require ts-node/register +--require tsconfig-paths/register +--require source-map-support/register +--require ./test/setup.ts +--file ./test/_global_hooks.ts +--watch-extensions ts \ No newline at end of file diff --git a/test/package.json b/test/package.json deleted file mode 100644 index 240963c9..00000000 --- a/test/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "lisk-commander", - "oclif": { - "commands": "../src/commands", - "bin": "lisk", - "plugins": ["@oclif/plugin-help"] - }, - "files": ["/bin", "/npm-shrinkwrap.json", "/oclif.manifest.json", "/dist"], - "devDependencies": { - "@liskhq/lisk-api-client": "x.x.x", - "@liskhq/lisk-constants": "x.x.x", - "@liskhq/lisk-cryptography": "x.x.x", - "@liskhq/lisk-passphrase": "x.x.x", - "@liskhq/lisk-transactions": "x.x.x", - "@oclif/test": "x.x.x", - "babel-polyfill": "x.x.x", - "chai": "x.x.x", - "chai-as-promised": "x.x.x", - "chalk": "x.x.x", - "inquirer": "x.x.x", - "lockfile": "x.x.x", - "sinon": "x.x.x", - "sinon-chai": "x.x.x" - } -} diff --git a/test/setup.js b/test/setup.ts similarity index 79% rename from test/setup.js rename to test/setup.ts index 3d5b5efa..55fc3c4f 100644 --- a/test/setup.js +++ b/test/setup.ts @@ -14,23 +14,23 @@ * */ import os from 'os'; -import 'babel-polyfill'; import chai, { Assertion } from 'chai'; -import 'chai/register-expect'; import chaiAsPromised from 'chai-as-promised'; -import sinonChai from 'sinon-chai'; import sinon from 'sinon'; +import sinonChai from 'sinon-chai'; process.env.NODE_ENV = 'test'; process.env.LISK_COMMANDER_CONFIG_DIR = process.env.LISK_COMMANDER_CONFIG_DIR || `${os.homedir()}/.lisk-commander`; -/* eslint-disable no-underscore-dangle */ -Assertion.addMethod('matchAny', function handleAssert(matcher) { +Assertion.addMethod('matchAny', function handleAssert( + this: Chai.ChaiStatic, + matcher: (val: unknown) => boolean, +) { const obj = this._obj; new Assertion(obj).to.be.an('array'); - const result = obj.some(val => matcher(val)); + const result = obj.some((val: unknown) => matcher(val)); this.assert( result, 'expected #{this} to match at least once', @@ -38,17 +38,18 @@ Assertion.addMethod('matchAny', function handleAssert(matcher) { ); }); -Assertion.addMethod('customError', function handleAssert(error) { +Assertion.addMethod('customError', function handleAssert( + this: Chai.ChaiStatic, + error: Error, +) { const obj = this._obj; new Assertion(obj).to.be.instanceOf(Error); new Assertion(obj.name).to.equal(error.name); new Assertion(obj.message).to.equal(error.message); }); -/* eslint-enable no-underscore-dangle */ [sinonChai, chaiAsPromised].forEach(chai.use); -global.sinon = sinon; global.sandbox = sinon.sandbox.create({ useFakeTimers: true, }); diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 00000000..063deb05 --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig", + "compilerOptions": { + "baseUrl": ".", + "noEmit": true, + "typeRoots": ["../types", "../node_modules/@types"] + }, + "references": [{ "path": ".." }], + "include": ["./**/*", "../types/**/*", "../src/**/*"] +} diff --git a/test/tslint.json b/test/tslint.json new file mode 100644 index 00000000..bffafdbb --- /dev/null +++ b/test/tslint.json @@ -0,0 +1,6 @@ +{ + "rules": { + "arrow-return-shorthand": false, + "no-expression-statement": "off" + } +} diff --git a/test/utils/api.js b/test/utils/api.ts similarity index 93% rename from test/utils/api.js rename to test/utils/api.ts index ea8a47d9..76970c90 100644 --- a/test/utils/api.js +++ b/test/utils/api.ts @@ -13,7 +13,9 @@ * Removal or modification of this copyright notice is prohibited. * */ -import getAPIClient from '../../src/utils/api'; +import { expect } from 'chai'; +import { getAPIClient } from '../../src/utils/api'; +import { APIClient } from '@liskhq/lisk-api-client'; describe('api utils', () => { const mainnetNethash = @@ -32,8 +34,13 @@ describe('api utils', () => { ]; const testnetNode = 'https://testnet.lisk.io:443'; - let apiClient; - let apiConfig; + interface APIConfig { + readonly network: string; + readonly nodes: ReadonlyArray; + } + + let apiClient: APIClient; + let apiConfig: APIConfig; describe('when the network is set to main and nodes are provided', () => { beforeEach(() => { diff --git a/test/base.js b/test/utils/base.ts similarity index 79% rename from test/base.js rename to test/utils/base.ts index 661a9c9a..096673aa 100644 --- a/test/base.js +++ b/test/utils/base.ts @@ -14,10 +14,10 @@ * */ import os from 'os'; -import { test } from '@oclif/test'; -import BaseCommand, { defaultConfigFolder } from '../src/base'; -import * as config from '../src/utils/config'; -import * as print from '../src/utils/print'; +import { test, expect } from '@oclif/test'; +import BaseCommand, { defaultConfigFolder } from '../../src/base'; +import * as configUtils from '../../src/utils/config'; +import * as printUtils from '../../src/utils/print'; describe('base command', () => { const defaultFlags = { @@ -30,13 +30,17 @@ describe('base command', () => { const printMethodStub = sandbox.stub(); + class BaseExtended extends BaseCommand { + async run(): Promise {} + } + const setupTest = () => { - const command = new BaseCommand(); + const command = new BaseExtended([], {} as any); return test .stub(command, 'parse', sandbox.stub().returns({ flags: defaultFlags })) .stub(command, 'error', sandbox.stub()) - .stub(print, 'default', sandbox.stub().returns(printMethodStub)) - .stub(config, 'getConfig', sandbox.stub().returns(defaultConfig)) + .stub(printUtils, 'print', sandbox.stub().returns(printMethodStub)) + .stub(configUtils, 'getConfig', sandbox.stub().returns(defaultConfig)) .add('command', () => command); }; @@ -62,14 +66,15 @@ describe('base command', () => { .do(async ctx => ctx.command.init()) .it( 'should call getConfig with the config folder set by the environment variable', - () => expect(config.getConfig).to.be.calledWithExactly(configFolder), + () => + expect(configUtils.getConfig).to.be.calledWithExactly(configFolder), ); setupTest() .do(async ctx => ctx.command.init()) .it( 'should set the flags to the return value of the parse function', - ctx => expect(ctx.command.flags).to.equal(defaultFlags), + ctx => expect(ctx.command.printFlags).to.equal(defaultFlags), ); setupTest() @@ -117,24 +122,24 @@ describe('base command', () => { .it( 'should call getConfig with the process.env.XDG_CONFIG_HOME when readAgain is true', () => - expect(config.getConfig).to.be.calledWithExactly( + expect(configUtils.getConfig).to.be.calledWithExactly( process.env.XDG_CONFIG_HOME, ), ); setupTest() .do(async ctx => { - ctx.command.userConfig = {}; + ctx.command.userConfig = {} as any; return ctx.command.print(result); }) .it( 'should not call getConfig when readAgain is falsy', - () => expect(config.getConfig).not.to.be.called, + () => expect(configUtils.getConfig).not.to.be.called, ); setupTest() .do(async ctx => { - ctx.command.userConfig = {}; + ctx.command.userConfig = {} as any; return ctx.command.print(result); }) .it('should call print method with the result', () => @@ -145,11 +150,11 @@ describe('base command', () => { .do(async ctx => { ctx.command.userConfig = { json: false, - }; + } as any; return ctx.command.print(result); }) .it('should call print with the userConfig', () => - expect(print.default).to.be.calledWithExactly({ + expect(printUtils.print).to.be.calledWithExactly({ json: false, pretty: undefined, }), @@ -164,12 +169,12 @@ describe('base command', () => { ctx.command.userConfig = { json: false, pretty: true, - }; - ctx.command.flags = ctx.overwritingFlags; + } as any; + ctx.command.printFlags = ctx.overwritingFlags; ctx.command.print(result); }) .it('should call print method with flags overriding the config', ctx => - expect(print.default).to.be.calledWithExactly(ctx.overwritingFlags), + expect(printUtils.print).to.be.calledWithExactly(ctx.overwritingFlags), ); }); }); diff --git a/test/utils/config.js b/test/utils/config.ts similarity index 78% rename from test/utils/config.js rename to test/utils/config.ts index 422b7b96..19240890 100644 --- a/test/utils/config.js +++ b/test/utils/config.ts @@ -13,12 +13,14 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { expect } from 'chai'; import fs from 'fs'; import os from 'os'; import lockfile from 'lockfile'; import { getConfig, setConfig } from '../../src/utils/config'; import * as fsUtils from '../../src/utils/fs'; -import defaultConfig from '../../default_config.json'; +import * as defaultConfig from '../../src/default_config.json'; +import { SinonStub } from 'sinon'; describe('config utils', () => { const configDirName = '.lisk'; @@ -27,22 +29,29 @@ describe('config utils', () => { const defaultPath = `${os.homedir()}/${configDirName}`; + let existsSyncStub: SinonStub; + let mkdirSyncStub: SinonStub; + let readJSONSyncStub: SinonStub; + let writeJSONSyncStub: SinonStub; + beforeEach(() => { - sandbox.stub(fsUtils, 'writeJSONSync'); + writeJSONSyncStub = sandbox.stub(fsUtils, 'writeJSONSync'); return Promise.resolve(); }); describe('#getConfig', () => { beforeEach(() => { - sandbox.stub(fs, 'existsSync'); - sandbox.stub(fs, 'mkdirSync'); - sandbox.stub(fsUtils, 'readJSONSync').returns(defaultConfig); + existsSyncStub = sandbox.stub(fs, 'existsSync'); + mkdirSyncStub = sandbox.stub(fs, 'mkdirSync'); + readJSONSyncStub = sandbox + .stub(fsUtils, 'readJSONSync') + .returns(defaultConfig); return Promise.resolve(); }); describe('when config folder does not exist', () => { beforeEach(() => { - return fs.existsSync.returns(false); + return existsSyncStub.returns(false); }); it('should create config folder', () => { @@ -51,7 +60,7 @@ describe('config utils', () => { }); it('should log error when it fails to write', () => { - fs.mkdirSync.throws(new Error('failed to create folder')); + mkdirSyncStub.throws(new Error('failed to create folder')); return expect(getConfig.bind(null, defaultPath)).to.throw( `Could not write to \`${defaultPath}\`. Your configuration will not be persisted.`, ); @@ -60,7 +69,7 @@ describe('config utils', () => { describe('when only the config directory exists', () => { beforeEach(() => { - return fs.existsSync.withArgs(defaultPath).returns(true); + return existsSyncStub.withArgs(defaultPath).returns(true); }); it('should create and return the default config', () => { @@ -69,11 +78,11 @@ describe('config utils', () => { `${defaultPath}/${configFileName}`, defaultConfig, ); - return expect(result).to.be.equal(defaultConfig); + return expect(result).to.be.eql(defaultConfig); }); it('should log error when it fails to write', () => { - fsUtils.writeJSONSync.throws(new Error('failed to write to the file')); + writeJSONSyncStub.throws(new Error('failed to write to the file')); return expect(getConfig.bind(null, defaultPath)).to.throw( `Could not write to \`${defaultPath}/${configFileName}\`. Your configuration will not be persisted.`, ); @@ -82,14 +91,14 @@ describe('config utils', () => { describe('when config file exists', () => { beforeEach(() => { - return fs.existsSync.returns(true); + return existsSyncStub.returns(true); }); it('should return the custom config when it is valid', () => { const customConfig = Object.assign({}, defaultConfig, { name: 'custom config', }); - fsUtils.readJSONSync.returns(customConfig); + readJSONSyncStub.returns(customConfig); const result = getConfig(defaultPath); expect(fsUtils.readJSONSync).to.be.calledWithExactly( `${defaultPath}/${configFileName}`, @@ -98,14 +107,14 @@ describe('config utils', () => { }); it('should log error and exit when it fails to read', () => { - fsUtils.readJSONSync.throws(new Error('failed to read to the file')); + readJSONSyncStub.throws(new Error('failed to read to the file')); return expect(getConfig.bind(null, defaultPath)).to.throw( `Config file cannot be read or is not valid JSON. Please check ${defaultPath}/${configFileName} or delete the file so we can create a new one from defaults.`, ); }); it('should log error and exit when it has invalid keys', () => { - fsUtils.readJSONSync.returns({ random: 'values' }); + readJSONSyncStub.returns({ random: 'values' }); return expect(getConfig.bind(null, defaultPath)).to.throw( `Config file seems to be corrupted: missing required keys. Please check ${defaultPath}/${configFileName} or delete the file so we can create a new one from defaults.`, ); @@ -119,8 +128,10 @@ describe('config utils', () => { some: 'value', }; + let checkSyncStub: SinonStub; + beforeEach(() => { - sandbox.stub(lockfile, 'checkSync'); + checkSyncStub = sandbox.stub(lockfile, 'checkSync'); sandbox.stub(lockfile, 'lockSync'); sandbox.stub(lockfile, 'unlockSync'); return Promise.resolve(); @@ -128,7 +139,7 @@ describe('config utils', () => { describe('when lockfile exists', () => { it('should log error and exit', () => { - lockfile.checkSync.returns(true); + checkSyncStub.returns(true); return expect( setConfig.bind(null, defaultPath, newConfigValue), ).to.throw( @@ -139,7 +150,7 @@ describe('config utils', () => { describe('when lockfile does not exist', () => { beforeEach(() => { - return lockfile.checkSync.returns(false); + return checkSyncStub.returns(false); }); it('should write new config to defined file', () => { @@ -166,7 +177,7 @@ describe('config utils', () => { }); it('should log error if fail to write', () => { - fsUtils.writeJSONSync.throws(new Error('failed to write to the file')); + writeJSONSyncStub.throws(new Error('failed to write to the file')); const result = setConfig(defaultPath, newConfigValue); return expect(result).to.be.false; }); diff --git a/test/utils/constants.ts b/test/utils/constants.ts new file mode 100644 index 00000000..edcfc027 --- /dev/null +++ b/test/utils/constants.ts @@ -0,0 +1,97 @@ +/* + * LiskHQ/lisk-commander + * Copyright © 2017–2018 Lisk Foundation + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, + * no part of this software, including this file, may be copied, modified, + * propagated, or distributed except according to the terms contained in the + * LICENSE file. + * + * Removal or modification of this copyright notice is prohibited. + * + */ +import { expect } from 'chai'; +import { + COMMAND_TYPES, + PLURALS, + QUERY_INPUT_MAP, + CONFIG_VARIABLES, + API_PROTOCOLS, + NETHASHES, + SORT_FIELDS, +} from '../../src/utils/constants'; + +describe('constants utils', () => { + describe('COMMAND_TYPES', () => { + it('should be an array', () => { + return expect(COMMAND_TYPES).to.be.an('array'); + }); + + it('should not be empty', () => { + return expect(COMMAND_TYPES).not.to.be.empty; + }); + }); + + describe('PLURALS', () => { + it('should be an object', () => { + return expect(PLURALS).to.be.an('object'); + }); + + it('should not be empty', () => { + return expect(PLURALS).not.to.be.empty; + }); + }); + + describe('QUERY_INPUT_MAP', () => { + it('should be an object', () => { + return expect(QUERY_INPUT_MAP).to.be.an('object'); + }); + + it('should not be empty', () => { + return expect(QUERY_INPUT_MAP).not.to.be.empty; + }); + }); + + describe('CONFIG_VARIABLES', () => { + it('should be an array', () => { + return expect(CONFIG_VARIABLES).to.be.an('array'); + }); + + it('should not be empty', () => { + return expect(CONFIG_VARIABLES).not.to.be.empty; + }); + }); + + describe('API_PROTOCOLS', () => { + it('should be an array', () => { + return expect(API_PROTOCOLS).to.be.an('array'); + }); + + it('should not be empty', () => { + return expect(API_PROTOCOLS).not.to.be.empty; + }); + }); + + describe('NETHASHES', () => { + it('should be an object', () => { + return expect(NETHASHES).to.be.an('object'); + }); + + it('should not be empty', () => { + return expect(NETHASHES).not.to.be.empty; + }); + }); + + describe('SORT_FIELDS', () => { + it('should be an array', () => { + return expect(SORT_FIELDS).to.be.an('array'); + }); + + it('should not be empty', () => { + return expect(SORT_FIELDS).not.to.be.empty; + }); + }); +}); diff --git a/test/utils/cryptography.js b/test/utils/cryptography.ts similarity index 98% rename from test/utils/cryptography.js rename to test/utils/cryptography.ts index 47f2c5b2..38f40f16 100644 --- a/test/utils/cryptography.js +++ b/test/utils/cryptography.ts @@ -13,7 +13,8 @@ * Removal or modification of this copyright notice is prohibited. * */ -import cryptographyModule from '@liskhq/lisk-cryptography'; +import { expect } from 'chai'; +import * as cryptographyModule from '@liskhq/lisk-cryptography'; import * as cryptography from '../../src/utils/cryptography'; describe('crypto utils', () => { diff --git a/test/utils/error.js b/test/utils/error.ts similarity index 96% rename from test/utils/error.js rename to test/utils/error.ts index d3b403f4..5d8272bf 100644 --- a/test/utils/error.js +++ b/test/utils/error.ts @@ -13,6 +13,7 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { expect } from 'chai'; import chalk from 'chalk'; import { FileSystemError, ValidationError } from '../../src/utils/error'; @@ -20,7 +21,7 @@ describe('error utils', () => { const errorMessage = 'error message'; describe('#FileSystemError', () => { - let error; + let error: Error; beforeEach(() => { error = new FileSystemError(errorMessage); return Promise.resolve(); @@ -40,7 +41,7 @@ describe('error utils', () => { }); describe('#ValidationError', () => { - let error; + let error: Error; beforeEach(() => { error = new ValidationError(errorMessage); return Promise.resolve(); diff --git a/test/utils/fs.js b/test/utils/fs.ts similarity index 97% rename from test/utils/fs.js rename to test/utils/fs.ts index 135179e8..280b1e68 100644 --- a/test/utils/fs.js +++ b/test/utils/fs.ts @@ -13,6 +13,7 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { expect } from 'chai'; import fs from 'fs'; import { readJSONSync, writeJSONSync } from '../../src/utils/fs'; @@ -25,12 +26,12 @@ describe('fs utils', () => { }; const path = './file/path.json'; const encoding = 'utf8'; - let result; + let result: object; describe('when file does not include BOM', () => { beforeEach(() => { - sandbox.stub(JSON, 'parse').returns(fileObject); sandbox.stub(fs, 'readFileSync').returns(fileContents); + sandbox.stub(JSON, 'parse').returns(fileObject); result = readJSONSync(path); return Promise.resolve(); }); @@ -51,8 +52,8 @@ describe('fs utils', () => { const BOM = '\uFEFF'; const bomFileContents = `${BOM}${fileContents}`; beforeEach(() => { - sandbox.stub(JSON, 'parse').returns(fileObject); sandbox.stub(fs, 'readFileSync').returns(bomFileContents); + sandbox.stub(JSON, 'parse').returns(fileObject); result = readJSONSync(path); return Promise.resolve(); }); @@ -89,7 +90,7 @@ describe('fs utils', () => { it('JSON.stringify should be called with the object using tab indentation', () => { return expect(JSON.stringify).to.be.calledWithExactly( writingObject, - null, + undefined, '\t', ); }); diff --git a/test/utils/helpers.js b/test/utils/helpers.ts similarity index 96% rename from test/utils/helpers.js rename to test/utils/helpers.ts index 7ecbfe68..d702f655 100644 --- a/test/utils/helpers.js +++ b/test/utils/helpers.ts @@ -13,6 +13,7 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { expect } from 'chai'; import { validateLifetime, validateMinimum, @@ -110,8 +111,12 @@ describe('helpers utils', () => { }); describe('#handleEPIPE', () => { + interface CustomError extends Error { + errno: string | number; + } + it('should handle EPIPE error', () => { - const err = new Error(); + const err = new Error() as CustomError; err.errno = 'EPIPE'; return expect(handleEPIPE.bind(null, err)).to.not.throw(); }); diff --git a/test/utils/input/index.js b/test/utils/input/index.ts similarity index 70% rename from test/utils/input/index.js rename to test/utils/input/index.ts index 971aed5b..65814c38 100644 --- a/test/utils/input/index.js +++ b/test/utils/input/index.ts @@ -13,16 +13,18 @@ * Removal or modification of this copyright notice is prohibited. * */ -import getInputsFromSources, { +import { expect } from 'chai'; +import { + getInputsFromSources, getFirstLineFromString, } from '../../../src/utils/input/index'; -// Required for stubbing -const inputUtils = require('../../../src/utils/input/utils'); +import * as inputUtils from '../../../src/utils/input/utils'; +import { SinonStub } from 'sinon'; describe('input utils', () => { describe('#getFirstLineFromString', () => { it('should return null when input is not a string', () => { - return expect(getFirstLineFromString({})).to.be.null; + return expect(getFirstLineFromString({})).to.be.undefined; }); it('should return first line of string', () => { @@ -38,14 +40,17 @@ describe('input utils', () => { }); describe('#getInputsFromSources', () => { + let getStdInStub: SinonStub; + beforeEach(() => { - sandbox.stub(inputUtils, 'getStdIn').resolves({ - passphrase: null, - password: null, - secondPassphrase: null, - data: null, + getStdInStub = sandbox.stub(inputUtils, 'getStdIn').resolves({ + passphrase: undefined, + password: undefined, + secondPassphrase: undefined, + data: undefined, }); sandbox.stub(inputUtils, 'getPassphrase'); + sandbox.stub(console, 'warn').returns(''); return sandbox.stub(inputUtils, 'getData'); }); @@ -67,7 +72,7 @@ describe('input utils', () => { it('should resolve to stdin', async () => { const stdin = 'some passphrase'; - inputUtils.getStdIn.resolves({ + getStdInStub.resolves({ passphrase: stdin, }); const result = await getInputsFromSources(inputs); @@ -75,10 +80,21 @@ describe('input utils', () => { return expect(result.passphrase).to.equal(stdin); }); - it('should resolve to null when input is not supplied', async () => { + it('should resolve to undefined when input is not supplied', async () => { const result = await getInputsFromSources({}); expect(inputUtils.getPassphrase).not.to.be.called; - return expect(result.passphrase).to.be.null; + return expect(result.passphrase).to.be.undefined; + }); + + it('should print a warning if passphase not in mnemonic format', async () => { + const stdin = 'some passphrase'; + getStdInStub.resolves({ + passphrase: stdin, + }); + await getInputsFromSources(inputs); + return expect(console.warn).to.be.calledWithExactly( + 'Warning: Passphrase contains 2 words instead of expected 12. Passphrase contains 1 whitespaces instead of expected 11. ', + ); }); }); @@ -103,7 +119,7 @@ describe('input utils', () => { it('should resolve to stdin', async () => { const stdin = 'some passphrase'; - inputUtils.getStdIn.resolves({ + getStdInStub.resolves({ secondPassphrase: stdin, }); const result = await getInputsFromSources(inputs); @@ -111,10 +127,21 @@ describe('input utils', () => { return expect(result.secondPassphrase).to.equal(stdin); }); - it('should resolve to null when input is not supplied', async () => { + it('should resolve to undefined when input is not supplied', async () => { const result = await getInputsFromSources({}); expect(inputUtils.getPassphrase).not.to.be.called; - return expect(result.secondPassphrase).to.be.null; + return expect(result.secondPassphrase).to.be.undefined; + }); + + it('should print a warning if secondPassphase not in mnemonic format', async () => { + const stdin = 'some passphrase'; + getStdInStub.resolves({ + secondPassphrase: stdin, + }); + await getInputsFromSources(inputs); + return expect(console.warn).to.be.calledWithExactly( + 'Warning: Passphrase contains 2 words instead of expected 12. Passphrase contains 1 whitespaces instead of expected 11. ', + ); }); }); @@ -139,7 +166,7 @@ describe('input utils', () => { it('should resolve to stdin', async () => { const stdin = 'some password'; - inputUtils.getStdIn.resolves({ + getStdInStub.resolves({ password: stdin, }); const result = await getInputsFromSources(inputs); @@ -147,10 +174,10 @@ describe('input utils', () => { return expect(result.password).to.equal(stdin); }); - it('should resolve to null when input is not supplied', async () => { + it('should resolve to undefined when input is not supplied', async () => { const result = await getInputsFromSources({}); expect(inputUtils.getPassphrase).not.to.be.called; - return expect(result.password).to.be.null; + return expect(result.password).to.be.undefined; }); }); @@ -171,7 +198,7 @@ describe('input utils', () => { it('should resolve to stdin', async () => { const stdin = 'random data'; - inputUtils.getStdIn.resolves({ + getStdInStub.resolves({ data: stdin, }); const result = await getInputsFromSources(inputs); @@ -180,10 +207,10 @@ describe('input utils', () => { return expect(result.data).to.equal(stdin); }); - it('should resolve to null when input is not supplied', async () => { + it('should resolve to undefined when input is not supplied', async () => { const result = await getInputsFromSources({}); expect(inputUtils.getPassphrase).not.to.be.called; - return expect(result.password).to.be.null; + return expect(result.password).to.be.undefined; }); }); }); diff --git a/test/utils/input/utils.js b/test/utils/input/utils.ts similarity index 90% rename from test/utils/input/utils.js rename to test/utils/input/utils.ts index 3935e9ac..b0f7822e 100644 --- a/test/utils/input/utils.js +++ b/test/utils/input/utils.ts @@ -13,6 +13,7 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { expect } from 'chai'; import fs from 'fs'; import readline from 'readline'; import inquirer from 'inquirer'; @@ -20,6 +21,7 @@ import * as inputUtils from '../../../src/utils/input/utils'; import { FileSystemError, ValidationError } from '../../../src/utils/error'; import * as utilHelpers from '../../../src/utils/helpers'; import { createStreamStub, createFakeInterface } from '../../helpers/utils'; +import { SinonStub } from 'sinon'; describe('input/utils utils', () => { describe('#splitSource', () => { @@ -42,10 +44,13 @@ describe('input/utils utils', () => { describe('#getStdIn', () => { const stdInContents = 'some contents'; + let createInterfaceStub: SinonStub; + beforeEach(() => { - return sandbox + createInterfaceStub = sandbox .stub(readline, 'createInterface') .returns(createFakeInterface(stdInContents)); + return Promise.resolve(); }); it('should resolve to empty object', () => { @@ -59,10 +64,10 @@ describe('input/utils utils', () => { }; const result = inputUtils.getStdIn(options); return expect(result).to.eventually.eql({ - data: null, + data: undefined, passphrase: stdInContents, - password: null, - secondPassphrase: null, + password: undefined, + secondPassphrase: undefined, }); }); @@ -72,10 +77,10 @@ describe('input/utils utils', () => { }; const result = inputUtils.getStdIn(options); return expect(result).to.eventually.eql({ - data: null, - passphrase: null, + data: undefined, + passphrase: undefined, password: stdInContents, - secondPassphrase: null, + secondPassphrase: undefined, }); }); @@ -85,9 +90,9 @@ describe('input/utils utils', () => { }; const result = inputUtils.getStdIn(options); return expect(result).to.eventually.eql({ - data: null, - passphrase: null, - password: null, + data: undefined, + passphrase: undefined, + password: undefined, secondPassphrase: stdInContents, }); }); @@ -99,9 +104,9 @@ describe('input/utils utils', () => { const result = inputUtils.getStdIn(options); return expect(result).to.eventually.eql({ data: stdInContents, - passphrase: null, - password: null, - secondPassphrase: null, + passphrase: undefined, + password: undefined, + secondPassphrase: undefined, }); }); @@ -109,7 +114,7 @@ describe('input/utils utils', () => { const multilineStdContents = 'passphrase\nsecondPassphrase\npassword\ndata'; beforeEach(() => { - return readline.createInterface.returns( + return createInterfaceStub.returns( createFakeInterface(multilineStdContents), ); }); @@ -122,7 +127,7 @@ describe('input/utils utils', () => { const expectedResults = multilineStdContents.split('\n'); const result = inputUtils.getStdIn(options); return expect(result).to.eventually.eql({ - passphrase: null, + passphrase: undefined, secondPassphrase: expectedResults[0], password: expectedResults[1], data: `${expectedResults[2]}\n${expectedResults[3]}`, @@ -138,7 +143,7 @@ describe('input/utils utils', () => { const result = inputUtils.getStdIn(options); return expect(result).to.eventually.eql({ passphrase: expectedResults[0], - secondPassphrase: null, + secondPassphrase: undefined, password: expectedResults[1], data: `${expectedResults[2]}\n${expectedResults[3]}`, }); @@ -166,15 +171,19 @@ describe('input/utils utils', () => { describe('#getPassphraseFromPrompt', () => { const displayName = 'password'; + let promptStub: SinonStub; + let stdoutisTTYStub: SinonStub; + beforeEach(() => { - sandbox.stub(utilHelpers, 'stdoutIsTTY').returns(true); + stdoutisTTYStub = sandbox.stub(utilHelpers, 'stdoutIsTTY').returns(true); sandbox.stub(utilHelpers, 'stdinIsTTY').returns(true); - return sandbox.stub(inquirer, 'prompt'); + promptStub = sandbox.stub(inquirer, 'prompt'); + return Promise.resolve(); }); it('passphrase should equal to the result of the prompt', async () => { const promptResult = { passphrase: '123' }; - inquirer.prompt.resolves(promptResult); + promptStub.resolves(promptResult); const passphrase = await inputUtils.getPassphraseFromPrompt({ displayName, }); @@ -183,7 +192,7 @@ describe('input/utils utils', () => { it('should prompt once with shouldRepeat false', async () => { const promptResult = { passphrase: '123' }; - inquirer.prompt.resolves(promptResult); + promptStub.resolves(promptResult); await inputUtils.getPassphraseFromPrompt({ displayName, }); @@ -198,7 +207,7 @@ describe('input/utils utils', () => { it('should prompt twice with shouldRepeat true', async () => { const promptResult = { passphrase: '123', passphraseRepeat: '123' }; - inquirer.prompt.resolves(promptResult); + promptStub.resolves(promptResult); await inputUtils.getPassphraseFromPrompt({ shouldRepeat: true, displayName, @@ -219,7 +228,7 @@ describe('input/utils utils', () => { it('should reject with error when repeated passphrase does not match', () => { const promptResult = { passphrase: '123', passphraseRepeat: '456' }; - inquirer.prompt.resolves(promptResult); + promptStub.resolves(promptResult); return expect( inputUtils.getPassphraseFromPrompt({ shouldRepeat: true, displayName }), ).to.be.rejectedWith( @@ -229,9 +238,9 @@ describe('input/utils utils', () => { }); it('should reject with error when in TTY mode', () => { - utilHelpers.stdoutIsTTY.returns(false); + stdoutisTTYStub.returns(false); const promptResult = { passphrase: '123', passphraseRepeat: '456' }; - inquirer.prompt.resolves(promptResult); + promptStub.resolves(promptResult); return expect( inputUtils.getPassphraseFromPrompt({ displayName }), ).to.be.rejectedWith( @@ -242,7 +251,7 @@ describe('input/utils utils', () => { describe('#getPassphraseFromEnvVariable', () => { const displayName = 'passphrase'; - let envPassphrase; + let envPassphrase: string | undefined; before(() => { envPassphrase = process.env.PASSPHRASE; return Promise.resolve(); @@ -287,7 +296,8 @@ describe('input/utils utils', () => { beforeEach(() => { const error = new Error('ENOENT: no such file or directory'); const streamStub = createStreamStub( - (type, callback) => type === 'error' && callback(error), + (type: string, callback: Function) => + type === 'error' && callback(error), ); return sandbox.stub(fs, 'createReadStream').returns(streamStub); }); @@ -306,7 +316,8 @@ describe('input/utils utils', () => { beforeEach(() => { const error = new Error('EACCES: permission denied'); const streamStub = createStreamStub( - (type, callback) => type === 'error' && callback(error), + (type: string, callback: Function) => + type === 'error' && callback(error), ); return sandbox.stub(fs, 'createReadStream').returns(streamStub); }); @@ -325,7 +336,8 @@ describe('input/utils utils', () => { beforeEach(() => { const error = new Error('random error'); const streamStub = createStreamStub( - (type, callback) => type === 'error' && callback(error), + (type: string, callback: Function) => + type === 'error' && callback(error), ); return sandbox.stub(fs, 'createReadStream').returns(streamStub); }); @@ -356,7 +368,7 @@ describe('input/utils utils', () => { describe('#getPassphraseFromSource', () => { const displayName = 'password'; const password = 'somepassword'; - let envPassword; + let envPassword: string | undefined; before(() => { envPassword = process.env.PASSWORD; return Promise.resolve(); @@ -487,8 +499,13 @@ describe('input/utils utils', () => { const path = './some/path.txt'; const resultFileData = 'file data'; + let readFileSyncStub: SinonStub; + beforeEach(() => { - return sandbox.stub(fs, 'readFileSync').returns(resultFileData); + readFileSyncStub = sandbox + .stub(fs, 'readFileSync') + .returns(resultFileData); + return Promise.resolve(); }); it('should throw validation error when source is empty', () => { @@ -517,7 +534,7 @@ describe('input/utils utils', () => { it('should be rejected if an error occurs', () => { const error = new Error('some random error'); - fs.readFileSync.throws(error); + readFileSyncStub.throws(error); return expect(inputUtils.getData(`file:${path}`)).to.be.rejectedWith( Error, error.message, diff --git a/test/utils/mnemonic.js b/test/utils/mnemonic.ts similarity index 98% rename from test/utils/mnemonic.js rename to test/utils/mnemonic.ts index 3d64a2f0..d9f8c396 100644 --- a/test/utils/mnemonic.js +++ b/test/utils/mnemonic.ts @@ -13,6 +13,7 @@ * Removal or modification of this copyright notice is prohibited. * */ +import { expect } from 'chai'; import * as mnemonic from '../../src/utils/mnemonic'; describe('mnemonic utils', () => { diff --git a/test/utils/print.js b/test/utils/print.ts similarity index 85% rename from test/utils/print.js rename to test/utils/print.ts index 972314af..9281d62a 100644 --- a/test/utils/print.js +++ b/test/utils/print.ts @@ -13,9 +13,10 @@ * Removal or modification of this copyright notice is prohibited. * */ -import print from '../../src/utils/print'; -// Required for stubbing -const tablify = require('../../src/utils/tablify'); +import { expect } from 'chai'; +import { print, StringMap } from '../../src/utils/print'; +import { SinonStub } from 'sinon'; +import * as tablifyUtil from '../../src/utils/tablify'; describe('print utils', () => { const objectToPrint = { @@ -37,14 +38,16 @@ describe('print utils', () => { const stringifyResult = '[{"lisk":"Some prefix: JS"},{"lisk":"Some suffix: awsome"}]'; + type Printer = (result: ReadonlyArray | StringMap) => void; + beforeEach(() => { - sandbox.stub(tablify, 'default').returns(tablifyResult); + sandbox.stub(tablifyUtil, 'tablify').returns(tablifyResult); sandbox.stub(JSON, 'stringify').returns(stringifyResult); return Promise.resolve(); }); describe('when json and pretty are false', () => { - let printer; + let printer: Printer; beforeEach(() => { printer = print(); return Promise.resolve(); @@ -53,7 +56,9 @@ describe('print utils', () => { describe('when result is array', () => { it('should call tablify with the ANSI', () => { printer(arrayToPrint); - return expect(tablify.default).to.be.calledWithExactly(arrayToPrint); + return expect(tablifyUtil.tablify).to.be.calledWithExactly( + arrayToPrint, + ); }); }); @@ -61,7 +66,7 @@ describe('print utils', () => { it('should call tablify with the result and call the log of the context', () => { const log = sandbox.stub(); printer.call({ log }, arrayToPrint); - expect(tablify.default).to.be.calledWithExactly(arrayToPrint); + expect(tablifyUtil.tablify).to.be.calledWithExactly(arrayToPrint); return expect(log).to.be.calledWithExactly(tablifyResult); }); }); @@ -69,7 +74,7 @@ describe('print utils', () => { describe('when json is true and pretty is false and the context has a log method', () => { describe('when result is array', () => { - let log; + let log: SinonStub; beforeEach(() => { log = sandbox.stub(); print({ json: true }).call({ log }, arrayToPrint); @@ -79,8 +84,8 @@ describe('print utils', () => { it('should call JSON.stringify without the ANSI', () => { return expect(JSON.stringify).to.be.calledWithExactly( arrayToPrintWithoutANSI, - null, - null, + undefined, + undefined, ); }); @@ -90,7 +95,7 @@ describe('print utils', () => { }); describe('when result is object', () => { - let log; + let log: SinonStub; beforeEach(() => { log = sandbox.stub(); print({ json: true }).call({ log }, objectToPrint); @@ -100,8 +105,8 @@ describe('print utils', () => { it('should call JSON.stringify without the ANSI', () => { return expect(JSON.stringify).to.be.calledWithExactly( objectToPrintWithoutANSI, - null, - null, + undefined, + undefined, ); }); @@ -112,7 +117,7 @@ describe('print utils', () => { }); describe('when json and pretty are true and the context has a log method', () => { - let log; + let log: SinonStub; beforeEach(() => { log = sandbox.stub(); return Promise.resolve(); @@ -126,7 +131,7 @@ describe('print utils', () => { it('should call JSON.stringify without the ANSI', () => { return expect(JSON.stringify).to.be.calledWithExactly( arrayToPrintWithoutANSI, - null, + undefined, '\t', ); }); @@ -145,7 +150,7 @@ describe('print utils', () => { it('should call JSON.stringify without the ANSI', () => { return expect(JSON.stringify).to.be.calledWithExactly( objectToPrintWithoutANSI, - null, + undefined, '\t', ); }); diff --git a/test/utils/query.js b/test/utils/query.ts similarity index 58% rename from test/utils/query.js rename to test/utils/query.ts index 7a56fab3..f11f1b97 100644 --- a/test/utils/query.js +++ b/test/utils/query.ts @@ -13,7 +13,9 @@ * Removal or modification of this copyright notice is prohibited. * */ -import query from '../../src/utils/query'; +import { expect } from 'chai'; +import { query, queryNodeTransaction } from '../../src/utils/query'; +import { APIClient } from '@liskhq/lisk-api-client'; describe('query utils', () => { const defaultEndpoint = 'accounts'; @@ -38,9 +40,13 @@ describe('query utils', () => { }, ]; - let apiClient; - let response; - let queryResult; + let apiClient: APIClient; + let response: { + readonly data?: unknown; + readonly no?: string; + }; + let queryResult: Promise; + describe('when the response does not have data', () => { beforeEach(() => { response = { @@ -50,7 +56,7 @@ describe('query utils', () => { accounts: { get: sandbox.stub().resolves(response), }, - }; + } as any; queryResult = query(apiClient, defaultEndpoint, defaultParameters); return Promise.resolve(); }); @@ -76,7 +82,7 @@ describe('query utils', () => { accounts: { get: sandbox.stub().resolves(response), }, - }; + } as any; return Promise.resolve(); }); @@ -123,7 +129,7 @@ describe('query utils', () => { accounts: { get: sandbox.stub().resolves(response), }, - }; + } as any; queryResult = query(apiClient, defaultEndpoint, defaultParameters); return Promise.resolve(); }); @@ -132,7 +138,39 @@ describe('query utils', () => { expect(apiClient.accounts.get).to.be.calledWithExactly( defaultParameters.query, ); - return expect(queryResult).to.eventually.eql(response.data[0]); + const resData = response.data as Array; + return expect(queryResult).to.eventually.eql(resData[0]); + }); + }); + + describe('when the response is an array with more than 1 records', () => { + beforeEach(() => { + response = { + data: [ + { + id: 'someid', + address: 'address', + }, + { + id: 'someid', + address: 'address', + }, + ], + }; + apiClient = { + accounts: { + get: sandbox.stub().resolves(response), + }, + } as any; + queryResult = query(apiClient, defaultEndpoint, defaultParameters); + return Promise.resolve(); + }); + + it('should call API client and resolve to an array', () => { + expect(apiClient.accounts.get).to.be.calledWithExactly( + defaultParameters.query, + ); + return expect(queryResult).to.eventually.eql(response.data); }); }); @@ -148,7 +186,7 @@ describe('query utils', () => { accounts: { get: sandbox.stub().resolves(response), }, - }; + } as any; queryResult = query(apiClient, defaultEndpoint, defaultParameters); return Promise.resolve(); }); @@ -174,7 +212,7 @@ describe('query utils', () => { accounts: { get: sandbox.stub().resolves(response), }, - }; + } as any; query(apiClient, defaultEndpoint, defaultArrayParameters); return Promise.resolve(); }); @@ -186,4 +224,103 @@ describe('query utils', () => { return Promise.resolve(); }); }); + + describe('query node transaction handler', () => { + const txnState = 'unprocessed'; + const transactionParameters = { + query: { + id: 'transaction1', + limit: 1, + }, + }; + const transactionArray = [ + { + query: { + id: 'transaction1', + limit: 1, + }, + }, + ]; + + beforeEach(() => { + response = { + data: [ + { + id: 'transaction1', + }, + ], + }; + apiClient = { + node: { + getTransactions: sandbox.stub().resolves(response), + }, + } as any; + queryResult = queryNodeTransaction( + apiClient.node, + txnState, + transactionArray, + ); + return Promise.resolve(); + }); + + it('should call node API client and resolve to an object', () => { + expect(apiClient.node.getTransactions).to.be.calledWithExactly( + txnState, + transactionParameters.query, + ); + return expect(queryResult).to.eventually.eql(response.data); + }); + }); + + describe('an array of parameters objects is provided to query node transaction', () => { + const txnState = 'unsigned'; + const transactionArray = [ + { + query: { + id: 'transaction1', + limit: 1, + }, + }, + { + query: { + id: 'transaction2', + limit: 1, + }, + }, + ]; + + beforeEach(() => { + response = { + data: [ + { + id: 'transaction1', + }, + { + id: 'transaction2', + }, + ], + }; + apiClient = { + node: { + getTransactions: sandbox.stub().resolves(response), + }, + } as any; + queryResult = queryNodeTransaction( + apiClient.node, + txnState, + transactionArray, + ); + return Promise.resolve(); + }); + + it('should call getTransaction handler of node API client', () => { + transactionArray.forEach(param => + expect(apiClient.node.getTransactions).to.be.calledWithExactly( + txnState, + param.query, + ), + ); + return Promise.resolve(); + }); + }); }); diff --git a/test/utils/tablify.js b/test/utils/tablify.ts similarity index 90% rename from test/utils/tablify.js rename to test/utils/tablify.ts index b7b76578..fa224aaa 100644 --- a/test/utils/tablify.js +++ b/test/utils/tablify.ts @@ -13,10 +13,19 @@ * Removal or modification of this copyright notice is prohibited. * */ -import tablify from '../../src/utils/tablify'; +import { expect } from 'chai'; +import { tablify } from '../../src/utils/tablify'; import { objectToKeyValueString } from '../helpers/utils'; describe('tablify utils', () => { + interface TestPrintValue { + readonly [key: string]: + | string + | number + | boolean + | object + | ReadonlyArray; + } describe('when an empty object is used', () => { it('should have 0 length', () => { const printValue = {}; @@ -97,7 +106,8 @@ describe('tablify utils', () => { describe('a cyclic object', () => { it('should throw an error', () => { - const printValue = { + // tslint:disable-next-line no-any + const printValue: any = { root: 'value', nested: { object: 'values', @@ -115,7 +125,7 @@ describe('tablify utils', () => { describe('an array of objects with the same keys', () => { it('should have the corresponding rows', () => { - const printValue = [ + const printValue: ReadonlyArray = [ { lisk: 'js', version: 1, @@ -142,7 +152,7 @@ describe('tablify utils', () => { describe('an array of objects with divergent keys', () => { it('should have the corresponding rows', () => { - const printValue = [ + const printValue: ReadonlyArray = [ { lisk: 'js', version: 1, @@ -175,11 +185,9 @@ describe('tablify utils', () => { }; const returnValue = tablify(printValue); return Object.entries(printValue).forEach(([key, value], arrayKey) => { - const parseValue = val => { + const parseValue = (val: string | { sample: number }[]) => { if (Array.isArray(val)) { return val.map(objectToKeyValueString).join('\n\n'); - } else if (typeof value === 'object' && value !== null) { - return objectToKeyValueString(val); } return val; }; @@ -191,7 +199,7 @@ describe('tablify utils', () => { describe('an array of objects with nested keys', () => { it('should have the corresponding rows', () => { - const printValue = [ + const printValue: ReadonlyArray = [ { lisk: 'js', version: 1, @@ -225,7 +233,7 @@ describe('tablify utils', () => { innerObjectKeys.forEach((key, keyIndex) => { let strValue = values[key]; if (Array.isArray(values[key])) { - strValue = values[key].join('\n'); + strValue = (values[key] as ReadonlyArray).join('\n'); } else if (typeof values[key] === 'object') { strValue = Object.entries(values[key]) .map( diff --git a/test/utils/transactions.js b/test/utils/transactions.ts similarity index 95% rename from test/utils/transactions.js rename to test/utils/transactions.ts index b2fd08f3..ed1bf633 100644 --- a/test/utils/transactions.js +++ b/test/utils/transactions.ts @@ -13,7 +13,8 @@ * Removal or modification of this copyright notice is prohibited. * */ -import parseTransactionString from '../../src/utils/transactions'; +import { expect } from 'chai'; +import { parseTransactionString } from '../../src/utils/transactions'; import { ValidationError } from '../../src/utils/error'; describe('transactions utils', () => { diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..2733440e --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "esModuleInterop": true, + "importHelpers": true, + "forceConsistentCasingInFileNames": true, + "target": "es2017", + "module": "commonjs", + "newLine": "lf", + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "pretty": true, + "removeComments": true, + "resolveJsonModule": true, + "sourceMap": true, + "strict": true, + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src/**/*", "types/**/*"], + "files": ["src/default_config.json"] +} diff --git a/tslint.json b/tslint.json new file mode 100644 index 00000000..fba0ee94 --- /dev/null +++ b/tslint.json @@ -0,0 +1,33 @@ +{ + "defaultSeverity": "error", + "extends": ["tslint:all", "tslint-immutable/all", "tslint-config-prettier"], + "rules": { + "completed-docs": false, + "file-name-casing": false, + "interface-name": [true, "never-prefix"], + "member-access": false, + "no-class": false, + "no-default-export": false, + "no-delete": true, + "no-expression-statement": false, + "no-if-statement": false, + "no-let": true, + "no-loop-statement": true, + "no-method-signature": false, + "no-mixed-interface": true, + "no-object-mutation": false, + "no-parameter-reassignment": true, + "no-this": false, + "no-unsafe-any": false, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "prefer-method-signature": false, + "readonly-array": false, + "readonly-keyword": [true, "ignore-class"], + "strict-boolean-expressions": false, + "strict-type-predicates": false + }, + "linterOptions": { + "exclude": ["src/**/*.json"] + } +} diff --git a/types/chai/index.d.ts b/types/chai/index.d.ts new file mode 100644 index 00000000..4c7d3e82 --- /dev/null +++ b/types/chai/index.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable:callable-types no-any no-method-signature readonly-keyword */ +declare module 'chai' { + global { + export namespace Chai { + interface ChaiStatic { + _obj: any; + Assertion: { + new (value: any): Assertion; + addProperty(name: string, handler: () => void): void; + addMethod(name: string, handler: (val: any) => void): void; + }; + } + interface Assert { + (expression: any, message?: string, messageNegative?: string): void; + } + export interface TypeComparison { + customError: (obj?: Error | typeof Error | string) => Assertion; + matchAny: Assertion; + } + } + } +} diff --git a/types/cli-table3/index.d.ts b/types/cli-table3/index.d.ts new file mode 100644 index 00000000..330c0f3c --- /dev/null +++ b/types/cli-table3/index.d.ts @@ -0,0 +1,103 @@ +// Type definitions for cli-table2 0.2 +// Project: https://github.com/jamestalmage/cli-table2 +// Definitions by: Melvin Groenhoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare module 'cli-table3' { + namespace CliTable { + type CharName = + "top" | + "top-mid" | + "top-left" | + "top-right" | + "bottom" | + "bottom-mid" | + "bottom-left" | + "bottom-right" | + "left" | + "left-mid" | + "mid" | + "mid-mid" | + "right" | + "right-mid" | + "middle"; + + type HorizontalAlignment = "left" | "center" | "right"; + type VerticalAlignment = "top" | "center" | "bottom"; + + interface TableOptions { + truncate: string; + colWidths: Array; + rowHeights: Array; + colAligns: HorizontalAlignment[]; + rowAligns: VerticalAlignment[]; + head: Cell[]; + wordWrap: boolean; + } + + interface TableInstanceOptions extends TableOptions { + chars: Record; + style: { + "padding-left": number; + "padding-right": number; + head: string[]; + border: string[]; + compact: boolean; + }; + } + + interface TableConstructorOptions extends Partial { + chars?: Partial>; + style?: Partial; + } + + type CellValue = boolean | number | string | null | undefined; + + interface CellOptions { + content: CellValue; + chars?: Partial>; + truncate?: string; + colSpan?: number; + rowSpan?: number; + hAlign?: HorizontalAlignment; + vAlign?: VerticalAlignment; + style?: { + "padding-left"?: number; + "padding-right"?: number; + head?: string[]; + border?: string[]; + }; + } + + interface GenericTable extends Array { + options: TableInstanceOptions; + readonly width: number; + } + + type Table = HorizontalTable | VerticalTable | CrossTable; + type Cell = CellValue | CellOptions; + + type HorizontalTable = GenericTable; + type HorizontalTableRow = Cell[]; + + type VerticalTable = GenericTable; + interface VerticalTableRow { + [name: string]: Cell; + } + + type CrossTable = GenericTable; + interface CrossTableRow { + [name: string]: Cell[]; + } + } + + interface CliTable { + new (options?: CliTable.TableConstructorOptions): CliTable.Table; + readonly prototype: CliTable.Table; + } + + const CliTable: CliTable; + + export = CliTable; +} \ No newline at end of file diff --git a/types/globals/index.d.ts b/types/globals/index.d.ts new file mode 100644 index 00000000..dfa12677 --- /dev/null +++ b/types/globals/index.d.ts @@ -0,0 +1,13 @@ +/* tslint:disable:readonly-keyword */ +/// + +declare global { + export namespace NodeJS { + export interface Global { + sandbox: sinon.SinonSandbox; + } + } + var sandbox: sinon.SinonSandbox; +} + +export {}; \ No newline at end of file diff --git a/types/json/index.d.ts b/types/json/index.d.ts new file mode 100644 index 00000000..6614cf24 --- /dev/null +++ b/types/json/index.d.ts @@ -0,0 +1,5 @@ +/* tslint:disable:no-any */ +declare module '*.json' { + const value: any; + export default value; +} \ No newline at end of file