diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..b504a74a --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +test/migrations diff --git a/.gitignore b/.gitignore index b98f0223..ca810953 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ database.json *.sublime-workspace archive .db-migraterc +coverage.html # Vim swap files .*.sw[a-z] diff --git a/.labrc.js b/.labrc.js new file mode 100644 index 00000000..c496fc53 --- /dev/null +++ b/.labrc.js @@ -0,0 +1,12 @@ +module.exports = { + coverage: true, + threshold: 74, + lint: true, + globals: 'verbose,dryRun,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask', + assert: '@hapi/code', + verbose: true, + 'coverage-exclude': [ + 'lib/interface', + 'lib/transitions', + ] +}; diff --git a/Makefile b/Makefile deleted file mode 100644 index 4a31ec19..00000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -test: - @node node_modules/lab/bin/lab -I verbose,dryRun,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask --coverage-exclude lib/interface --coverage-exclude lib/transitions -test-cov: - @node node_modules/lab/bin/lab -t 66 -I verbose,dryRun,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask --coverage-exclude lib/interface --coverage-exclude lib/transitions -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -I verbose,dryRun,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask --coverage-exclude lib/interface --coverage-exclude lib/transitions - -.PHONY: test test-cov test-cov-html diff --git a/index.js b/index.js index d19ba2c7..97e16632 100644 --- a/index.js +++ b/index.js @@ -70,7 +70,7 @@ module.exports.getInstance = function ( callback ) { delete require.cache[require.resolve('./api.js')]; - delete require.cache[require.resolve('optimist')]; + delete require.cache[require.resolve('yargs')]; var Mod = require('./api.js'); var plugins = {}; diff --git a/lib/commands/create-migration.js b/lib/commands/create-migration.js index 0cf3df2a..1a1f0353 100644 --- a/lib/commands/create-migration.js +++ b/lib/commands/create-migration.js @@ -5,7 +5,7 @@ const log = require('db-migrate-shared').log; const mkdirp = Promise.promisify(require('mkdirp')); const fs = require('fs'); const stat = Promise.promisify(fs.stat); -const optimist = require('optimist'); +const yargs = require('yargs'); const util = require('util'); async function createMigrationDir (dir) { @@ -33,7 +33,7 @@ async function executeCreateMigration (internals, config) { if (internals.argv._.length === 0) { log.error("'migrationName' is required."); if (!internals.isModule) { - optimist.showHelp(); + yargs.showHelp(); } throw new Error("'migrationName' is required."); diff --git a/lib/commands/run.js b/lib/commands/run.js index bfdfe819..21979b58 100644 --- a/lib/commands/run.js +++ b/lib/commands/run.js @@ -1,7 +1,7 @@ 'use strict'; var log = require('db-migrate-shared').log; -var optimist = require('optimist'); +var yargs = require('yargs'); var load = require('./'); var transition = load('transition'); @@ -117,7 +117,7 @@ function run (internals, config) { 'Invalid Action: Must be [up|down|check|create|reset|sync|' + 'db|transition].' ); - optimist.showHelp(); + yargs.showHelp(); process.exit(1); } break; diff --git a/lib/commands/set-default-argv.js b/lib/commands/set-default-argv.js index 776a490e..e8a24811 100644 --- a/lib/commands/set-default-argv.js +++ b/lib/commands/set-default-argv.js @@ -1,4 +1,4 @@ -var optimist = require('optimist'); +var yargs = require('yargs'); var log = require('db-migrate-shared').log; module.exports = function (internals, isModule) { @@ -20,7 +20,7 @@ module.exports = function (internals, isModule) { }; if (!isModule) { - internals.argv = optimist + internals.argv = yargs .default(defaultConfig) .usage( 'Usage: db-migrate [up|down|check|reset|sync|create|db|transition] ' + @@ -110,29 +110,25 @@ module.exports = function (internals, isModule) { .describe('ignore-completed-migrations', 'Start at the first migration') .boolean('ignore-completed-migrations') .describe('log-level', 'Set the log-level, for example sql|warn') - .string('log-level'); + .string('log-level') + .parse(); } else { - const _internalsArgv = Object.assign(defaultConfig, internals.cmdOptions); - internals.argv = { - get argv () { - return _internalsArgv; - } - }; + internals.argv = Object.assign(defaultConfig, internals.cmdOptions); } var plugins = internals.plugins; var plugin = plugins.hook('init:cli:config:hook'); - var _config = internals.argv.argv.config; + var _config = internals.argv.config; if (plugin) { plugin.forEach(function (plugin) { // var configs = plugin['init:cli:config:hook'](); // if (!configs) return; - // hook not yet used, we look into migrating away from optimist first + // hook not yet used, we look into migrating away from yargs first }); } - internals.argv = deepExtend(internals.argv.argv, rc('db-migrate', {})); + internals.argv = deepExtend(internals.argv, rc('db-migrate', {})); internals.argv.rcconfig = internals.argv.config; internals.argv.config = internals.argv.configFile || _config; @@ -142,7 +138,7 @@ module.exports = function (internals, isModule) { } if (!isModule && (internals.argv.help || internals.argv._.length === 0)) { - optimist.showHelp(); + yargs.showHelp(); process.exit(1); } diff --git a/package-lock.json b/package-lock.json index 881aced0..92ecb242 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,221 @@ "js-tokens": "^4.0.0" } }, + "@hapi/address": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", + "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==", + "dev": true + }, + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + }, + "dependencies": { + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", + "dev": true + } + } + }, + "@hapi/bossy": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@hapi/bossy/-/bossy-4.1.3.tgz", + "integrity": "sha512-a3+tEnP2OeN1rm3Bqpo8rO11RAIAOIre4pmjzABkAQp23Y0qv/bD2txkdTl9Gajxo6YNYsgy9dlyQcCUczx8JQ==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/joi": "16.x.x" + }, + "dependencies": { + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", + "dev": true + } + } + }, + "@hapi/code": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@hapi/code/-/code-5.3.1.tgz", + "integrity": "sha512-gPOtttouEx0BGusbm3cNKJ7x0y6mdXt6D08xXxaDvv9TaY1/oqn+dd3L4vkwIfrQGiHRFU6x00d26MrtknWjAQ==", + "dev": true, + "requires": { + "@hapi/hoek": "6.x.x" + } + }, + "@hapi/eslint-config-hapi": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/@hapi/eslint-config-hapi/-/eslint-config-hapi-12.3.0.tgz", + "integrity": "sha512-P3ZdC97vYUAVgV6fBuAEXh2Ol04R+Zp5LMNmJ9SAF69u8wT7v6vCgdX/SqZiXEzEKQ9YFpuh+m28wNj5aJ1tDg==", + "dev": true + }, + "@hapi/eslint-plugin-hapi": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@hapi/eslint-plugin-hapi/-/eslint-plugin-hapi-4.3.5.tgz", + "integrity": "sha512-2o6eJrE6qH0orR0kDB3B+lyQ1Swq7SrZ+ZubvE5UGmXBrHOYmWV/RhuvCU0mmSwRn0vyU3sK41doEqya7G3lIA==", + "dev": true, + "requires": { + "@hapi/rule-capitalize-modules": "1.x.x", + "@hapi/rule-for-loop": "1.x.x", + "@hapi/rule-no-arrowception": "1.x.x", + "@hapi/rule-no-var": "1.x.x", + "@hapi/rule-scope-start": "2.x.x" + } + }, + "@hapi/formula": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz", + "integrity": "sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA==", + "dev": true + }, + "@hapi/hoek": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-6.2.4.tgz", + "integrity": "sha512-HOJ20Kc93DkDVvjwHyHawPwPkX44sIrbXazAUDiUXaY2R9JwQGo2PhFfnQtdrsIe4igjG2fPgMra7NYw7qhy0A==", + "dev": true + }, + "@hapi/joi": { + "version": "16.1.8", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.8.tgz", + "integrity": "sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg==", + "dev": true, + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + }, + "dependencies": { + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", + "dev": true + } + } + }, + "@hapi/lab": { + "version": "18.1.2", + "resolved": "https://registry.npmjs.org/@hapi/lab/-/lab-18.1.2.tgz", + "integrity": "sha512-jjJfK+mLPg0mUw7JrYaqZtOslRxS3GmX9FFA5UJit7PDrc+4xE4HEk62LujrDLmX5IGU9xQeXnbFmFfFAKrA9g==", + "dev": true, + "requires": { + "@hapi/bossy": "4.x.x", + "@hapi/eslint-config-hapi": "12.x.x", + "@hapi/eslint-plugin-hapi": "4.x.x", + "@hapi/hoek": "6.x.x", + "diff": "4.x.x", + "eslint": "5.x.x", + "espree": "5.x.x", + "find-rc": "4.x.x", + "handlebars": "4.x.x", + "json-stable-stringify": "1.x.x", + "json-stringify-safe": "5.x.x", + "mkdirp": "0.5.x", + "seedrandom": "2.x.x", + "source-map": "0.7.x", + "source-map-support": "0.5.x", + "supports-color": "6.x.x", + "will-call": "1.x.x" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "find-rc": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-rc/-/find-rc-4.0.0.tgz", + "integrity": "sha512-jvkAF340j/ntR8cBRPLg/ElqWodgjfInY4SwLqDVqrmYDJormOIfM4lbtIcLZ0x8W5xWyrUy+mdoMwyo6OYuaQ==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@hapi/pinpoint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz", + "integrity": "sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ==", + "dev": true + }, + "@hapi/rule-capitalize-modules": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@hapi/rule-capitalize-modules/-/rule-capitalize-modules-1.2.1.tgz", + "integrity": "sha512-XduBSQQehgY/PJX/Ud2H5UdVyNVEC3QiU00vOHWvpn+kbH1co2dmzpu2JEGGxKmdGHjm8jdDkrlqVxGFXHAuhQ==", + "dev": true + }, + "@hapi/rule-for-loop": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@hapi/rule-for-loop/-/rule-for-loop-1.2.1.tgz", + "integrity": "sha512-9Y2yjNpmhntryViPTb6JlTCqma9fF+H0lCtjvlWA0La/ckxPSzXfwh9kgroyjQ3mJiwKDUYboqC4/BK6L5DFUg==", + "dev": true + }, + "@hapi/rule-no-arrowception": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@hapi/rule-no-arrowception/-/rule-no-arrowception-1.1.2.tgz", + "integrity": "sha512-NV6IpfcUpI6w/6oR2oBFaBUoOGC3j3xzfXq7ZciBnmOyReqwuSiyvwLb9SeSomei/n1LHaVdnIXJnMD9IAma2Q==", + "dev": true + }, + "@hapi/rule-no-var": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@hapi/rule-no-var/-/rule-no-var-1.1.4.tgz", + "integrity": "sha512-u0gtMRd9uxlmmew3H5pBZJe1D64dTz5yhPWU3UcurOwZGTbGYU2PAUpjxE0TOaeCRDW+tL5Y/9f7637P2vqQSA==", + "dev": true + }, + "@hapi/rule-scope-start": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@hapi/rule-scope-start/-/rule-scope-start-2.2.0.tgz", + "integrity": "sha512-n0adld0osaYNXlus/64dCN0GlkMvmwuJfkpM0OtrA2U7x2Iu1XoHV6Lmne3C+9gM8X/xLUviYLoTCOC7IW8RYg==", + "dev": true + }, + "@hapi/topo": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", + "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^8.3.0" + }, + "dependencies": { + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", + "dev": true + } + } + }, "@sinonjs/commons": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.3.0.tgz", @@ -53,6 +268,11 @@ "lodash.get": "^4.4.2" } }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -60,61 +280,15 @@ "dev": true }, "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "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=", - "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 - } - } - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", "dev": true }, "ansi-escapes": { @@ -204,64 +378,11 @@ "dev": true }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", "dev": true }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "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": "https://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" - } - }, - "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 - }, - "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 - } - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -272,7 +393,6 @@ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, - "optional": true, "requires": { "tweetnacl": "^0.14.3" } @@ -288,16 +408,6 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" }, - "bossy": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/bossy/-/bossy-3.0.4.tgz", - "integrity": "sha1-+a6fJugbQaMY9O4Ng2huSlwlB7k=", - "dev": true, - "requires": { - "hoek": "4.x.x", - "joi": "10.x.x" - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -326,23 +436,6 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "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" - }, - "dependencies": { - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - } - } - }, "callsites": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", @@ -350,11 +443,9 @@ "dev": true }, "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true, - "optional": true + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "caseless": { "version": "0.12.0", @@ -362,17 +453,6 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -391,9 +471,9 @@ "dev": true }, "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, "circular-json": { @@ -418,41 +498,45 @@ "dev": true }, "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "optional": true, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" }, "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "optional": true + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } } } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/code/-/code-4.1.0.tgz", - "integrity": "sha1-IJrRHQWvigwceq9pTZ+k0sfZW4U=", - "dev": true, - "requires": { - "hoek": "4.x.x" - } - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -480,31 +564,26 @@ "integrity": "sha512-s8+wktIuDSLffCywiwSxQOMqtPxML11a/dtHE17tMn4B1MSWw/C22EKf7M2KGUBcDaVFEGT+S8N02geDXeuNKg==" }, "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -598,9 +677,7 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "optional": true + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "deep-equal": { "version": "0.2.2", @@ -661,12 +738,16 @@ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, - "optional": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" } }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -728,9 +809,9 @@ }, "dependencies": { "acorn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz", - "integrity": "sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true }, "acorn-jsx": { @@ -797,12 +878,6 @@ } } }, - "eslint-config-hapi": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-hapi/-/eslint-config-hapi-10.1.0.tgz", - "integrity": "sha512-tAUedyvZla1qKt6jhOx7mj5tYDVCwdSyImpEK7wk/A/atKUjg18aHUK6Q6qWWM6rq21I1F/A8JAhIpkk0SvFMQ==", - "dev": true - }, "eslint-config-standard": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", @@ -839,19 +914,6 @@ "regexpp": "^2.0.1" } }, - "eslint-plugin-hapi": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-hapi/-/eslint-plugin-hapi-4.1.0.tgz", - "integrity": "sha512-z1yUoSWArx6pXaC0FoWRFpqjbHn8QWonJiTVhJmiC14jOAT7FZKdKWCkhM4jQrgrkEK9YEv3p2HuzSf5dtWmuQ==", - "dev": true, - "requires": { - "hapi-capitalize-modules": "1.x.x", - "hapi-for-you": "1.x.x", - "hapi-no-var": "1.x.x", - "hapi-scope-start": "2.x.x", - "no-arrowception": "1.x.x" - } - }, "eslint-plugin-import": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", @@ -942,10 +1004,21 @@ } }, "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + } + } }, "eslint-visitor-keys": { "version": "1.0.0", @@ -953,16 +1026,6 @@ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "dev": true, - "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" - } - }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -1038,12 +1101,6 @@ "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "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", @@ -1094,12 +1151,6 @@ "when": "~2.0.1" } }, - "find-rc": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/find-rc/-/find-rc-3.0.1.tgz", - "integrity": "sha1-VKQXg3DxC8k3H6jRssKAmir6DM4=", - "dev": true - }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", @@ -1129,23 +1180,23 @@ "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=", + "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": { "asynckit": "^0.4.0", - "combined-stream": "1.0.6", + "combined-stream": "^1.0.6", "mime-types": "^2.1.12" } }, "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", "dev": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.6.0" } }, "fs.realpath": { @@ -1212,6 +1263,11 @@ } } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1247,58 +1303,26 @@ "dev": true }, "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" }, "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, - "hapi-capitalize-modules": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/hapi-capitalize-modules/-/hapi-capitalize-modules-1.1.6.tgz", - "integrity": "sha1-eZEXFBXhXmqjIx5k3ac8gUZmUxg=", - "dev": true - }, - "hapi-for-you": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hapi-for-you/-/hapi-for-you-1.0.0.tgz", - "integrity": "sha1-02L77o172pwseAHiB+WlzRoLans=", - "dev": true - }, - "hapi-no-var": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hapi-no-var/-/hapi-no-var-1.0.1.tgz", - "integrity": "sha512-kk2xyyTzI+eQ/oA1rO4eVdCpYsrPHVERHa6+mTHD08XXFLaAkkaEs6reMg1VyqGh2o5xPt//DO4EhCacLx/cRA==", - "dev": true - }, - "hapi-scope-start": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/hapi-scope-start/-/hapi-scope-start-2.1.1.tgz", - "integrity": "sha1-dJWnJv5yt7yo3izcwdh82M5qtPI=", - "dev": true - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -1306,13 +1330,39 @@ "dev": true }, "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "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": { - "ajv": "^5.3.0", + "ajv": "^6.5.5", "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "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==", + "dev": true + } } }, "has": { @@ -1324,15 +1374,6 @@ "function-bind": "^1.1.1" } }, - "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": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -1345,12 +1386,6 @@ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, - "hoek": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", - "dev": true - }, "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", @@ -1389,9 +1424,9 @@ "dev": true }, "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", "dev": true, "requires": { "minimatch": "^3.0.4" @@ -1481,12 +1516,6 @@ "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==", - "dev": true - }, "is-builtin-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", @@ -1514,12 +1543,6 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "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-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1532,335 +1555,89 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, - "isemail": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isemail/-/isemail-2.2.1.tgz", - "integrity": "sha1-A1PT2aYpUQgMJiwqoKQrjqjp4qY=", - "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 - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "items": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/items/-/items-2.1.1.tgz", - "integrity": "sha1-i9FtnIOxlSneWuoyGsqtp4NkoZg=", - "dev": true - }, - "joi": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-10.6.0.tgz", - "integrity": "sha512-hBF3LcqyAid+9X/pwg+eXjD2QBZI5eXnBFJYaAkH4SK3mp9QSRiiQnDYlmlz5pccMvnLcJRS4whhDOTCkmsAdQ==", - "dev": true, - "requires": { - "hoek": "4.x.x", - "isemail": "2.x.x", - "items": "2.x.x", - "topo": "2.x.x" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "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 - }, - "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": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "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 - }, - "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" - } - }, - "just-extend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", - "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", - "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" - } - }, - "lab": { - "version": "14.3.4", - "resolved": "https://registry.npmjs.org/lab/-/lab-14.3.4.tgz", - "integrity": "sha512-IFnuYVRd6CtnFTFgUbjPCFrrCIked5BvGH/dX+/h+6pi3IrQrK21JsKy/J1CshEm6sMe980+oswtK8lZCusHSA==", - "dev": true, - "requires": { - "bossy": "3.x.x", - "code": "4.1.x", - "diff": "3.5.x", - "eslint": "4.19.x", - "eslint-config-hapi": "10.x.x", - "eslint-plugin-hapi": "4.x.x", - "espree": "3.5.x", - "find-rc": "3.0.x", - "handlebars": "4.x.x", - "hoek": "4.x.x", - "items": "2.x.x", - "json-stable-stringify": "1.x.x", - "json-stringify-safe": "5.x.x", - "mkdirp": "0.5.x", - "seedrandom": "2.4.x", - "source-map": "0.6.x", - "source-map-support": "0.4.x", - "supports-color": "4.4.x" - }, - "dependencies": { - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "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" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "eslint": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", - "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.4", - "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", - "regexpp": "^1.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "4.0.2", - "text-table": "~0.2.0" - } - }, - "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "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": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "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" - } - }, - "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 - }, - "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", - "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" - } - }, - "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" - } - }, - "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", - "dev": true, - "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - } - } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "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 + }, + "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-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" } }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "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 + }, + "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, - "optional": true + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", + "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", + "dev": true }, "levn": { "version": "0.3.0", @@ -1903,9 +1680,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "lodash.defaults": { @@ -1925,22 +1702,6 @@ "integrity": "sha512-hcnW80h3j2lbUfFdMArd5UPA/vxZJ+G8vobd+wg3nVEQA0EigStbYcrG030FJxL6xiDDPEkoMatV9xIh5OecQQ==", "dev": true }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "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, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -1948,18 +1709,18 @@ "dev": true }, "mime-db": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", "dev": true }, "mime-types": { - "version": "2.1.20", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", - "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", "dev": true, "requires": { - "mime-db": "~1.36.0" + "mime-db": "1.43.0" } }, "mimic-fn": { @@ -1977,14 +1738,15 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true }, "minipass": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.4.tgz", - "integrity": "sha512-mlouk1OHlaUE8Odt1drMtG1bAJA4ZA6B/ehysgV0LUIrDHdKgo1KorZq3pK0b/7Z7LJIQ12MNM6aC+Tn6lUZ5w==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "dev": true, "requires": { "safe-buffer": "^5.1.2", @@ -1992,34 +1754,41 @@ }, "dependencies": { "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==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true }, "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } }, "minizlib": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", "dev": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.9.0" } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + } } }, "module-not-found-error": { @@ -2062,9 +1831,9 @@ } }, "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "dev": true }, "natural-compare": { @@ -2079,16 +1848,39 @@ "integrity": "sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY=" }, "needle": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.2.tgz", - "integrity": "sha512-mW7W8dKuVYefCpNzE3Z7xUmPI9wSrSL/1qH31YGMxmSOAnjatS3S9Zv3cmiHrhx3Jkp1SrWWBdOFXjfF48Uq3A==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.1.tgz", + "integrity": "sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g==", "dev": true, "requires": { - "debug": "^2.1.2", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -2116,21 +1908,15 @@ } } }, - "no-arrowception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/no-arrowception/-/no-arrowception-1.0.0.tgz", - "integrity": "sha1-W/PpXrnEG1c4SoBTM9qjtzTuMno=", - "dev": true - }, "node-fs": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/node-fs/-/node-fs-0.1.7.tgz", "integrity": "sha1-MjI8zLRsn78PwRgS1FAhzDHTJbs=" }, "node-pre-gyp": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz", - "integrity": "sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", + "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==", "dev": true, "requires": { "detect-libc": "^1.0.2", @@ -2146,9 +1932,9 @@ } }, "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", "dev": true, "requires": { "abbrev": "1", @@ -2168,19 +1954,29 @@ } }, "npm-bundled": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", - "integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", + "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", + "dev": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", "dev": true }, "npm-packlist": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.11.tgz", - "integrity": "sha512-CxKlZ24urLkJk+9kCm48RTQ7L4hsmgSVzEk0TLGPzzyuFxD7VNgy5Sl24tOLMzQv773a/NeJ1ce1DKeacqffEA==", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", "dev": true, "requires": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" } }, "npmlog": { @@ -2230,15 +2026,6 @@ "mimic-fn": "^1.0.0" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -2487,22 +2274,16 @@ } } }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "qs": { @@ -2528,9 +2309,9 @@ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" } } }, @@ -2595,16 +2376,10 @@ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "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 - }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -2614,7 +2389,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -2624,36 +2399,28 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" }, "dependencies": { "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==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "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" - }, - "dependencies": { - "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 - } - } + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "resolve": { "version": "1.7.0", @@ -2684,16 +2451,6 @@ "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -2711,21 +2468,6 @@ "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 - }, - "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": "6.3.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", @@ -2754,9 +2496,9 @@ "dev": true }, "seedrandom": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz", - "integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.4.tgz", + "integrity": "sha512-9A+PDmgm+2du77B5i0Ip2cxOqqHjgNxnBgglxLcX78A2D6c2rTo61z4jnVABpF4cKeDMDG+cmXXvdnqse2VqMA==", "dev": true }, "semver": { @@ -2767,8 +2509,7 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "shebang-command": { "version": "1.2.0", @@ -2818,24 +2559,25 @@ } }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true }, "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==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", "dev": true, "requires": { - "source-map": "^0.5.6" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" }, "dependencies": { "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } @@ -2879,13 +2621,13 @@ "dev": true }, "sqlite3": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.0.2.tgz", - "integrity": "sha512-51ferIRwYOhzUEtogqOa/y9supADlAht98bF/gbIi6WkzRJX6Yioldxbzj1MV4yV+LgdKD/kkHwFTeFXOG4htA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.1.1.tgz", + "integrity": "sha512-CvT5XY+MWnn0HkbwVKJAyWEMfzpAPwnTiB3TobA5Mri44SrTovmmh499NPQP+gatkeOipqPlBLel7rn4E/PCQg==", "dev": true, "requires": { - "nan": "~2.10.0", - "node-pre-gyp": "^0.10.3", + "nan": "^2.12.1", + "node-pre-gyp": "^0.11.0", "request": "^2.87.0" } }, @@ -2914,9 +2656,9 @@ } }, "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -3035,30 +2777,30 @@ } }, "tar": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.6.tgz", - "integrity": "sha512-tMkTnh9EdzxyfW+6GK6fCahagXsnYk6kE6S9Gr9pjVdys769+laCTbodXDhPAjzVtEBazRgP0gYqOjnk9dQzLg==", + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", "dev": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.3", - "minizlib": "^1.1.0", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" }, "dependencies": { "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==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true }, "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -3090,23 +2832,14 @@ "os-tmpdir": "~1.0.2" } }, - "topo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz", - "integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=", - "dev": true, - "requires": { - "hoek": "4.x.x" - } - }, "tough-cookie": { - "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==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "tslib": { @@ -3138,8 +2871,7 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true + "dev": true }, "type-check": { "version": "0.3.2", @@ -3156,40 +2888,26 @@ "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=", - "dev": true - }, "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.8.1.tgz", + "integrity": "sha512-W7KxyzeaQmZvUFbGj4+YFshhVrMBGSg2IbcYAjGWGvx8DHvJMclbTDMpffdxFUGPBHjIytk7KJUR/KUXstUGDw==", "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "commander": "~2.20.3", + "source-map": "~0.6.1" }, "dependencies": { "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "optional": true } } }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -3227,9 +2945,9 @@ } }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, "validate-npm-package-license": { @@ -3267,6 +2985,11 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", @@ -3276,12 +2999,11 @@ "string-width": "^1.0.2 || 2" } }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true + "will-call": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/will-call/-/will-call-1.0.1.tgz", + "integrity": "sha512-1hEeV8SfBYhNRc/bNXeQfyUBX8Dl9SCYME3qXh99iZP9wJcnhnlBsoBw8Y0lXVZ3YuPsoxImTzBiol1ouNR/hg==", + "dev": true }, "winston": { "version": "2.1.1", @@ -3315,9 +3037,72 @@ } }, "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } }, "wrappy": { "version": "1.0.2", @@ -3333,23 +3118,109 @@ "mkdirp": "^0.5.1" } }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "optional": true, + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "yargs-parser": { + "version": "18.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.2.tgz", + "integrity": "sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ==", "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } diff --git a/package.json b/package.json index 7eb5786e..52a119ce 100644 --- a/package.json +++ b/package.json @@ -52,16 +52,17 @@ "final-fs": "^1.6.0", "inflection": "^1.10.0", "mkdirp": "~0.5.0", - "optimist": "~0.6.1", "parse-database-url": "~0.3.0", "prompt": "^1.0.0", "rc": "^1.2.8", "resolve": "^1.1.6", "semver": "^5.3.0", - "tunnel-ssh": "^4.0.0" + "tunnel-ssh": "^4.0.0", + "yargs": "^15.3.1" }, "devDependencies": { - "code": "^4.1.0", + "@hapi/lab": "18.x", + "@hapi/code": "5.x", "db-migrate-base": "^1.2.5", "db-migrate-mysql": "^1.1.10", "db-migrate-sqlite3": "^0.3.1", @@ -71,13 +72,13 @@ "eslint-plugin-node": "^8.0.1", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^4.0.0", - "lab": "^14.3.1", "proxyquire": "^1.4.0", "rimraf": "^2.6.2", "sinon": "^7.2.2" }, "scripts": { "pretest": "eslint *.js lib/*.js test/*.js bin/*", - "test": "make test-cov" + "test": "lab", + "test:coverage": "lab -r html -o coverage.html" } } diff --git a/test/config_test.js b/test/config_test.js index 500b3837..a9b5f9ee 100644 --- a/test/config_test.js +++ b/test/config_test.js @@ -1,5 +1,5 @@ -var Code = require('code'); -var Lab = require('lab'); +var Code = require('@hapi/code'); +var Lab = require('@hapi/lab'); var lab = (exports.lab = Lab.script()); var config = require('../lib/config'); var path = require('path'); @@ -12,29 +12,21 @@ lab.experiment('config', function () { var configPath = path.join(__dirname, 'database.json'); var _config = config.load(configPath, 'dev'); - lab.test( - 'should export all environment settings', - - function (done) { - Code.expect(_config.dev).to.exists(); - Code.expect(_config.test).to.exists(); - Code.expect(_config.prod).to.exists(); - done(); - } - ); + lab.test('should export all environment settings', () => { + Code.expect(_config.dev).to.exists(); + Code.expect(_config.test).to.exists(); + Code.expect(_config.prod).to.exists(); + }); lab.test( 'should export a getCurrent function with all current ' + - 'environment settings', - - function (done) { + 'environment settings', () => { var current; Code.expect(_config.getCurrent).to.exists(); current = _config.getCurrent(); Code.expect(current.env).to.equal('dev'); Code.expect(current.settings.driver).to.equal('sqlite3'); Code.expect(current.settings.filename).to.equal(':memory:'); - done(); } ); }); @@ -45,12 +37,11 @@ lab.experiment('config', function () { function () { var configPath = path.join(__dirname, 'database_with_syntax_error.json'); - lab.test('should throw a syntax error', function (done) { + lab.test('should throw a syntax error', async () => { Code.expect( config.load.bind(this, configPath, 'dev'), 'Expected broken file to produce syntax error' ).to.throw(SyntaxError); - done(); }); } ); @@ -63,14 +54,11 @@ lab.experiment('config', function () { var _config = config.load(configPath); lab.test( - 'should load a value from the default env', - - function (done) { + 'should load a value from the default env', () => { var current = _config.getCurrent(); Code.expect(current.env).to.equal('local'); Code.expect(current.settings.driver).to.equal('sqlite3'); Code.expect(current.settings.filename).to.equal(':memory:'); - done(); } ); } @@ -88,13 +76,10 @@ lab.experiment('config', function () { var _config = config.load(configPath); lab.test( - 'should load a value from the env set in NODE_ENV', - - function (done) { + 'should load a value from the env set in NODE_ENV', () => { var current = _config.getCurrent(); Code.expect(current.settings.driver).to.equal('sqlite3'); Code.expect(current.settings.filename).to.equal(':memory:'); - done(); } ); } @@ -109,11 +94,8 @@ lab.experiment('config', function () { var _config = config.load(configPath, 'prod'); lab.test( - 'should load a value from the environments', - - function (done) { + 'should load a value from the environments', () => { Code.expect(_config.prod.username).to.equal('username_from_env'); - done(); } ); } @@ -128,16 +110,13 @@ lab.experiment('config', function () { var _config = config.load(configPath, 'prod'); lab.test( - 'should load a value from the environments', - - function (done) { + 'should load a value from the environments', () => { var current = _config.getCurrent(); Code.expect(current.settings.driver).to.equal('postgres'); Code.expect(current.settings.user).to.equal('uname'); Code.expect(current.settings.password).to.equal('pw'); Code.expect(current.settings.host).to.equal('server.com'); Code.expect(current.settings.database).to.equal('dbname'); - done(); } ); } @@ -148,19 +127,14 @@ lab.experiment('config', function () { var _config = config.loadUrl(databaseUrl, 'dev'); lab.test( - 'should export the settings as the current environment', - - function (done) { + 'should export the settings as the current environment', () => { Code.expect(_config.dev).to.exists(); - done(); } ); lab.test( 'should export a getCurrent function with all current ' + - 'environment settings', - - function (done) { + 'environment settings', () => { var current; Code.expect(_config.getCurrent).to.exists(); current = _config.getCurrent(); @@ -170,7 +144,6 @@ lab.experiment('config', function () { Code.expect(current.settings.password).to.equal('pw'); Code.expect(current.settings.host).to.equal('server.com'); Code.expect(current.settings.database).to.equal('dbname'); - done(); } ); }); @@ -180,14 +153,13 @@ lab.experiment('config', function () { config.load = _configLoad; config.loadUrl = _configLoadUrl; - lab.test('should something', function (done) { + lab.test('should something', () => { Code.expect(config.load.bind(this, configPath, 'dev')).to.not.throw(); - done(); }); }); lab.experiment('loading a url from url property', function () { - lab.test('should export a valid config', function (done) { + lab.test('should export a valid config', () => { var databaseUrl = { dev: { url: 'postgres://uname:pw@server.com/dbname' @@ -204,13 +176,9 @@ lab.experiment('config', function () { Code.expect(current.settings.password).to.equal('pw'); Code.expect(current.settings.host).to.equal('server.com'); Code.expect(current.settings.database).to.equal('dbname'); - - done(); }); - lab.test('should export the value if specified in suboject', function ( - done - ) { + lab.test('should export the value if specified in suboject', () => { var databaseUrl = { dev: { url: { @@ -224,8 +192,6 @@ lab.experiment('config', function () { var current = cfg.getCurrent(); Code.expect(current.env).to.equal('dev'); Code.expect(current.settings.url).to.equal('http://example.com'); - - done(); }); }); @@ -241,16 +207,12 @@ lab.experiment('config', function () { var cfg = config.loadObject(databaseUrl, 'dev'); - lab.test('should export the settings as the current environment', function ( - done - ) { + lab.test('should export the settings as the current environment', () => { Code.expect(cfg.dev).to.exists(); - done(); }); lab.test( - 'should export a getCurrent function with all current environment settings', - function (done) { + 'should export a getCurrent function with all current environment settings', () => { Code.expect(cfg.getCurrent).to.exists(); var current = cfg.getCurrent(); Code.expect(current.env).to.equal('dev'); @@ -262,8 +224,6 @@ lab.experiment('config', function () { Code.expect(current.settings.host).to.equal('server.com'); Code.expect(current.settings.database).to.equal('dbname'); Code.expect(current.settings.ssl).to.equal(true); - - done(); } ); }); @@ -273,7 +233,7 @@ lab.experiment('config', function () { function () { lab.test( 'should export a getCurrent function with all current environment settings', - function (done, cleanup) { + function (flags) { process.env.DATABASE_URL = 'postgres://uname:pw@server.com/dbname'; var databaseUrl = { dev: { @@ -285,10 +245,9 @@ lab.experiment('config', function () { }; var cfg = config.loadObject(databaseUrl, 'dev'); - cleanup(function (next) { + flags.onCleanup = () => { delete process.env.DATABASE_URL; - next(); - }); + }; Code.expect(cfg.getCurrent).to.exists(); var current = cfg.getCurrent(); @@ -301,8 +260,6 @@ lab.experiment('config', function () { Code.expect(current.settings.host).to.equal('server.com'); Code.expect(current.settings.database).to.equal('dbname'); Code.expect(current.settings.ssl).to.equal(true); - - done(); } ); } @@ -311,7 +268,7 @@ lab.experiment('config', function () { lab.experiment( 'loading from an ENV URL within the object and extending it from the ENV', function () { - lab.test('', function (done, cleanup) { + lab.test('', function (flags) { process.env.DATABASE_URL = 'postgres://uname:pw@server.com/dbname?ssl=false&testing=false'; var databaseUrl = { @@ -332,10 +289,9 @@ lab.experiment('config', function () { }; var cfg = config.loadObject(databaseUrl, 'dev'); - cleanup(function (next) { + flags.onCleanup = () => { delete process.env.DATABASE_URL; - next(); - }); + }; Code.expect(cfg.getCurrent).to.exists(); var current = cfg.getCurrent(); @@ -352,8 +308,6 @@ lab.experiment('config', function () { Code.expect(current.settings.testing).to.equal('false'); Code.expect(current.settings.cache).to.equal(false); Code.expect(current.settings.ssl).to.equal(true); - - done(); }); } ); diff --git a/test/driver/base_test.js b/test/driver/base_test.js index 5c6462f1..129017e7 100644 --- a/test/driver/base_test.js +++ b/test/driver/base_test.js @@ -1,5 +1,5 @@ -var Code = require('code'); -var Lab = require('lab'); +var Code = require('@hapi/code'); +var Lab = require('@hapi/lab'); var lab = (exports.lab = Lab.script()); var Base = require('db-migrate-base'); @@ -15,13 +15,12 @@ lab.experiment('base', function () { lab.experiment('default implementation', function () { var base = new Base(internals); - lab.test('inherits from EventEmitter', function (done) { + lab.test('inherits from EventEmitter', () => { Code.expect(base.on).to.be.not.null(); Code.expect(base.emit).to.be.not.null(); - done(); }); - lab.test('throws errors for all API methods', function (done) { + lab.test('throws errors for all API methods', () => { Code.expect(function () { base.createTable(); }).to.throw(Error); @@ -77,15 +76,12 @@ lab.experiment('base', function () { Code.expect(function () { base.runSql(); }).to.throw(Error); - - done(); }); - lab.test('escapes single quotes', function (done) { + lab.test('escapes single quotes', () => { Code.expect("Bill''s Mother''s House").to.equal( base.escape("Bill's Mother's House") ); - done(); }); }); }); diff --git a/test/driver/index_test.js b/test/driver/index_test.js index a5ccc2b8..4b360584 100644 --- a/test/driver/index_test.js +++ b/test/driver/index_test.js @@ -1,7 +1,7 @@ var proxyquire = require('proxyquire').noPreserveCache(); var sinon = require('sinon'); -var Code = require('code'); -var Lab = require('lab'); +var Code = require('@hapi/code'); +var Lab = require('@hapi/lab'); var lab = exports.lab = Lab.script(); var validDbConfigWithTunnel = { driver: 'mysql', @@ -14,10 +14,6 @@ var validDbConfigWithTunnel = { } }; -var internals = { - migrationTable: 'migrations' -}; - var indexConnectCallback = function (tunnelStub, driverSpy, callback) { return function (err, db) { if (err) { @@ -31,7 +27,7 @@ var indexConnectCallback = function (tunnelStub, driverSpy, callback) { lab.experiment('index', function () { lab.test('a successful connection with ssh tunnel with expected parameters', - function (done, cleanup) { + function (flags) { // Ensure that require gets a new copy of the module for each test delete require.cache[require.resolve('db-migrate-mysql')]; var driver = require('db-migrate-mysql'); @@ -44,13 +40,13 @@ lab.experiment('index', function () { 'tunnel-ssh': tunnelStub, './mysql': driver }); + // register clean up - cleanup(function (next) { + flags.onCleanup = () => { driverSpy.restore(); delete require.cache[require.resolve('tunnel-ssh')]; delete require.cache[require.resolve('db-migrate-mysql')]; - next(); - }); + }; index.connect( validDbConfigWithTunnel, @@ -85,12 +81,10 @@ lab.experiment('index', function () { Code.expect( driverSpy.withArgs(expectedDbConfig).calledOnce ).to.be.true(); - - done(); } }); - lab.test('a failed connection with ssh tunnel', function (done, cleanup) { + lab.test('a failed connection with ssh tunnel', (flags) => { // Ensure that require gets a new copy of the module for each test delete require.cache[require.resolve('db-migrate-mysql')]; var driver = require('db-migrate-mysql'); @@ -110,12 +104,11 @@ lab.experiment('index', function () { ); // register clean up - cleanup(function (next) { + flags.onCleanup = () => { driverSpy.restore(); delete require.cache[require.resolve('tunnel-ssh')]; delete require.cache[require.resolve('db-migrate-mysql')]; - next(); - }); + }; function validate (err, db, tunnelStub, driverSpy) { Code.expect(err, 'err should be non-null') @@ -127,13 +120,11 @@ lab.experiment('index', function () { .to.be.true(); Code.expect(driverSpy.notCalled, 'driver.connect should not be called') .to.be.true(); - - done(); } }); lab.test('privateKey gets set as expected', - function (done, cleanup) { + function (flags) { // Ensure that require gets a new copy of the module for each test delete require.cache[require.resolve('db-migrate-mysql')]; var driver = require('db-migrate-mysql'); @@ -150,13 +141,12 @@ lab.experiment('index', function () { }); // register clean up - cleanup(function (next) { + flags.onCleanup = () => { driverSpy.restore(); delete require.cache[require.resolve('tunnel-ssh')]; delete require.cache[require.resolve('db-migrate-mysql')]; - next(); - }); + }; validDbConfigWithTunnel.tunnel.privateKeyPath = '/test/key'; @@ -200,8 +190,6 @@ lab.experiment('index', function () { Code.expect( driverSpy.withArgs(expectedDbConfig).calledOnce ).to.be.true(); - - done(); } }); }); diff --git a/test/driver/shadow_test.js b/test/driver/shadow_test.js index 79aa7196..1a60c2ef 100644 --- a/test/driver/shadow_test.js +++ b/test/driver/shadow_test.js @@ -1,13 +1,12 @@ -var Code = require('code'); // assertion library -var Lab = require('lab'); +var Code = require('@hapi/code'); // assertion library +var Lab = require('@hapi/lab'); var lab = exports.lab = Lab.script(); var sinon = require('sinon'); -var Bluebird = require('bluebird'); var shadow = require('../../lib/driver/shadow.js'); lab.experiment('shadow', function () { lab.test('shadow function and original function get called in serial', - function (done) { + function () { var stub = sinon.stub().callsArg(0); var shadowStub = sinon.stub().resolves(); var infected = shadow.infect({ @@ -19,7 +18,6 @@ lab.experiment('shadow', function () { infected.test(function () { Code.expect(shadowStub.calledOnce).to.be.true(); Code.expect(stub.calledOnce).to.be.true(); - done(); }); }); }); diff --git a/test/integration/api_test.js b/test/integration/api_test.js index 63be14cf..931e4cad 100644 --- a/test/integration/api_test.js +++ b/test/integration/api_test.js @@ -1,5 +1,5 @@ -var Code = require('code'); -var Lab = require('lab'); +var Code = require('@hapi/code'); +var Lab = require('@hapi/lab'); var lab = (exports.lab = Lab.script()); var sinon = require('sinon'); var proxyquire = require('proxyquire').noPreserveCache(); @@ -7,16 +7,14 @@ var Promise = require('bluebird'); lab.experiment('api', function () { lab.test( - 'force process exit after migrations have been run', - - function (done, onCleanup) { + 'force process exit after migrations have been run', (flags) => { var processExit = process.exit; var argv = process.argv; var called = false; var config = {}; // register cleanup method and start preparing the test - onCleanup(teardown); + flags.onCleanup = teardown; overwriteExit(); var dbmigrate = stubApiInstance( @@ -44,7 +42,6 @@ lab.experiment('api', function () { */ function validate () { Code.expect(called).to.be.true(); - done(); } function upStub (internals) { @@ -75,15 +72,14 @@ lab.experiment('api', function () { }; } - function teardown (next) { + function teardown () { process.exit = processExit; process.argv = argv; - return next(); } } ); - lab.test('should load config from parameter', function (done) { + lab.test('should load config from parameter', () => { var options = { env: 'dev', cwd: process.cwd() + '/test/integration', @@ -107,12 +103,9 @@ lab.experiment('api', function () { delete actual.getCurrent; Code.expect(actual).to.equal(expected); - done(); }); - lab.test('should load commandline options from options parameter', function ( - done - ) { + lab.test('should load commandline options from options parameter', () => { var options = { cmdOptions: { 'migrations-dir': './test' @@ -127,7 +120,6 @@ lab.experiment('api', function () { delete actual.getCurrent; Code.expect(actual).to.equal(expected); - done(); }); lab.test( @@ -249,7 +241,7 @@ function loader (stubs) { function stubApiInstance (isModule, stubs, options, callback) { delete require.cache[require.resolve('../../api.js')]; - delete require.cache[require.resolve('optimist')]; + delete require.cache[require.resolve('yargs')]; var Mod = proxyquire('../../api.js', { './lib/commands': loader(stubs) }); diff --git a/test/integration/create_test.js b/test/integration/create_test.js index c6a640df..b948923e 100644 --- a/test/integration/create_test.js +++ b/test/integration/create_test.js @@ -1,18 +1,19 @@ 'use strict'; -const Code = require('code'); -const Lab = require('lab'); +const Code = require('@hapi/code'); +const Lab = require('@hapi/lab'); +const Promise = require('bluebird'); const lab = (exports.lab = Lab.script()); const fs = require('fs'); const path = require('path'); const cp = require('child_process'); const dbmUtil = require('db-migrate-shared').util; -const rmdir = require('rimraf'); +const rmdir = Promise.promisify(require('rimraf')); -function wipeMigrations (callback) { +function wipeMigrations () { const dir = path.join(__dirname, 'migrations'); - rmdir(dir, callback); + return rmdir(dir); } function dbMigrate () { @@ -23,73 +24,61 @@ function dbMigrate () { } lab.experiment('create', function () { - lab.experiment('without a migration directory', function () { + lab.experiment('without a migration directory', () => { let exitCode; - lab.before(function (done) { - wipeMigrations(function (err) { - Code.expect(err).to.be.null(); - const db = dbMigrate('create', 'first migration'); - // db.stderr.on('data', data => console.log(data.toString())); - // db.stdout.on('data', data => console.log(data.toString())); + lab.before(async () => { + await wipeMigrations(); - db.on('exit', function (code) { - exitCode = code; - done(); - }); - }); + const db = dbMigrate('create', 'first migration'); + // db.stderr.on('data', data => console.log(data.toString())); + // db.stdout.on('data', data => console.log(data.toString())); + + const exitCodePromise = new Promise((resolve) => db.on('exit', resolve)); + exitCode = await exitCodePromise; }); - lab.test('does not cause an error', function (done) { + lab.test('does not cause an error', () => { Code.expect(exitCode).to.equal(0); - done(); }); - lab.test('will create a new migration directory', function (done) { + lab.test('will create a new migration directory', () => { const stats = fs.statSync(path.join(__dirname, 'migrations')); Code.expect(stats.isDirectory()).to.be.true(); - done(); }); - lab.test('will create a new migration', function (done) { + lab.test('will create a new migration', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations')); Code.expect(files.length).to.equal(1); const file = files[0]; Code.expect(file).to.match(/first-migration\.js$/); - done(); }); }); lab.experiment( - 'with sql-file option set to true from config file', - function () { + 'with sql-file option set to true from config file', () => { let exitCode; - lab.before(function (done) { + lab.before(async () => { const configOption = path.join( '--config=', __dirname, 'database_with_sql_file.json' ); - wipeMigrations(function (err) { - Code.expect(err).to.not.exist(); - dbMigrate('create', 'second migration', configOption).on( - 'exit', - function (code) { - exitCode = code; - done(); - } - ); + await wipeMigrations(); + const exitCodePromise = new Promise((resolve) => { + dbMigrate('create', 'second migration', configOption) + .on('exit', resolve); }); + exitCode = await exitCodePromise; }); - lab.test('does not cause an error', function (done) { + lab.test('does not cause an error', () => { Code.expect(exitCode).to.equal(0); - done(); }); - lab.test('will create a new migration', function (done) { + lab.test('will create a new migration', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations')); for (let i = 0; i < files.length; i++) { @@ -99,51 +88,42 @@ lab.experiment('create', function () { Code.expect(file).to.match(/second-migration\.js$/); } } - - done(); }); - lab.test('will create a new migration/sqls directory', function (done) { + lab.test('will create a new migration/sqls directory', () => { const stats = fs.statSync(path.join(__dirname, 'migrations/sqls')); Code.expect(stats.isDirectory()).to.be.true(); - done(); }); - lab.test('will create a new migration sql up file', function (done) { + lab.test('will create a new migration sql up file', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations/sqls')); Code.expect(files.length).to.equal(2); const file = files[1]; Code.expect(file).to.match(/second-migration-up\.sql$/); - done(); }); } ); lab.experiment( - 'with sql-file option set to true as a command parameter', - function () { + 'with sql-file option set to true as a command parameter', () => { let exitCode; - lab.before(function (done) { + lab.before(async () => { const configOption = path.join('--sql-file'); - wipeMigrations(function (err) { - Code.expect(err).to.not.exist(); - dbMigrate('create', 'third migration', configOption).on( - 'exit', - function (code) { - exitCode = code; - done(); - } - ); + + await wipeMigrations(); + const exitCodePromise = new Promise((resolve) => { + dbMigrate('create', 'third migration', configOption).on('exit', resolve); }); + + exitCode = await exitCodePromise; }); - lab.test('does not cause an error', function (done) { + lab.test('does not cause an error', () => { Code.expect(exitCode).to.equal(0); - done(); }); - lab.test('will create a new migration', function (done) { + lab.test('will create a new migration', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations')); for (let i = 0; i < files.length; i++) { @@ -153,55 +133,45 @@ lab.experiment('create', function () { Code.expect(file).to.match(/third-migration\.js$/); } } - done(); }); - lab.test('will create a new migration/sqls directory', function (done) { + lab.test('will create a new migration/sqls directory', () => { const stats = fs.statSync(path.join(__dirname, 'migrations/sqls')); Code.expect(stats.isDirectory()).to.be.true(); - done(); }); - lab.test('will create a new migration sql up file', function (done) { + lab.test('will create a new migration sql up file', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations/sqls')); Code.expect(files.length).to.equal(2); const file = files[1]; Code.expect(file).to.match(/third-migration-up\.sql$/); - done(); }); } ); lab.experiment( - 'with coffee-file option set to true from config file', - function () { + 'with coffee-file option set to true from config file', () => { let exitCode; - lab.before(function (done) { + lab.before(async () => { const configOption = path.join( '--config=', __dirname, 'database_with_coffee_file.json' ); - wipeMigrations(function (err) { - Code.expect(err).to.not.exist(); - dbMigrate('create', 'fourth migration', configOption).on( - 'exit', - function (code) { - exitCode = code; - done(); - } - ); + await wipeMigrations(); + const exitCodePromise = new Promise((resolve) => { + dbMigrate('create', 'fourth migration', configOption).on('exit', resolve); }); + exitCode = await exitCodePromise; }); - lab.test('does not cause an error', function (done) { + lab.test('does not cause an error', () => { Code.expect(exitCode).to.equal(0); - done(); }); - lab.test('will create a new coffeescript migration', function (done) { + lab.test('will create a new coffeescript migration', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations')); for (let i = 0; i < files.length; i++) { @@ -211,92 +181,74 @@ lab.experiment('create', function () { Code.expect(file).to.match(/fourth-migration\.coffee$/); } } - - done(); }); } ); lab.experiment( - 'with scoped migration', - function () { - let exitCode; - lab.experiment('without a migration directory', function () { + 'with scoped migration', () => { + lab.experiment('without a migration directory', () => { let exitCode; - lab.before(function (done) { - wipeMigrations(function (err) { - Code.expect(err).to.be.null(); - const configOption = path.join('--sql-file'); - const db = dbMigrate('create', 'test/first migration', configOption); - // db.stderr.on('data', data => console.log(data.toString())); - // db.stdout.on('data', data => console.log(data.toString())); - - db.on('exit', function (code) { - exitCode = code; - done(); - }); - }); + lab.before(async () => { + await wipeMigrations(); + const configOption = path.join('--sql-file'); + const db = dbMigrate('create', 'test/first migration', configOption); + // db.stderr.on('data', data => console.log(data.toString())); + // db.stdout.on('data', data => console.log(data.toString())); + + const exitCodePromise = new Promise((resolve) => db.on('exit', resolve)); + exitCode = await exitCodePromise; }); - lab.test('does not cause an error', function (done) { + lab.test('does not cause an error', () => { Code.expect(exitCode).to.equal(0); - done(); }); - lab.test('will create a new migration directory', function (done) { + lab.test('will create a new migration directory', () => { const stats = fs.statSync(path.join(__dirname, 'migrations/test')); Code.expect(stats.isDirectory()).to.be.true(); - done(); }); - lab.test('will create a new migration', function (done) { + lab.test('will create a new migration', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations/test')); Code.expect(files.length).to.equal(2); const file = files[0]; Code.expect(file).to.match(/first-migration\.js$/); - done(); }); - lab.test('will create a new migration/test/sqls directory', function (done) { + lab.test('will create a new migration/test/sqls directory', () => { const stats = fs.statSync(path.join(__dirname, 'migrations/test/sqls')); Code.expect(stats.isDirectory()).to.be.true(); - done(); }); - lab.test('will create a new migration sql up file', function (done) { + lab.test('will create a new migration sql up file', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations/test/sqls')); Code.expect(files.length).to.equal(2); const file = files[1]; Code.expect(file).to.match(/first-migration-up\.sql$/); - done(); }); }); } ); lab.experiment( - 'with coffee-file option set to true as a command parameter', - function () { + 'with coffee-file option set to true as a command parameter', () => { let exitCode; - lab.before(function (done) { + lab.before(async () => { const configOption = path.join('--coffee-file'); - wipeMigrations(function (err) { - Code.expect(err).to.not.exist(); - dbMigrate('create', 'fifth migration', configOption).on( - 'exit', - function (code) { - exitCode = code; - done(); - } - ); + + await wipeMigrations(); + + const exitCodePromise = new Promise((resolve) => { + dbMigrate('create', 'fifth migration', configOption).on('exit', resolve); }); + exitCode = await exitCodePromise; }); - lab.test('does not cause an error', function (done) { + lab.test('does not cause an error', () => { Code.expect(exitCode).to.equal(0); - done(); }); - lab.test('will create a new coffeescript migration', function (done) { + lab.test('will create a new coffeescript migration', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations')); for (let i = 0; i < files.length; i++) { @@ -306,53 +258,49 @@ lab.experiment('create', function () { Code.expect(file).to.match(/fifth-migration\.coffee$/); } } - done(); }); } ); lab.experiment( - 'with sql-file and a bad migration, causes an exit', - function () { + 'with sql-file and a bad migration, causes an exit', () => { let exitCode; - lab.before(function (done) { + lab.before(async () => { const configOption = path.join('--sql-file'); - wipeMigrations(function (err) { - Code.expect(err).to.not.exist(); - dbMigrate('create', 'sixth migration', configOption).on( - 'exit', - function () { - const files = fs.readdirSync(path.join(__dirname, 'migrations')); - - for (let i = 0; i < files.length; i++) { - const file = files[i]; - const stats = fs.statSync( - path.join(__dirname, 'migrations', file) - ); - - if (stats.isFile() && file.match(/sixth-migration\.js$/)) { - fs.writeFileSync( - path.join(__dirname, 'migrations', file), - 'asdfghij;' - ); - dbMigrate('up').on('exit', function (code) { - exitCode = code; - done(); - }); - } - } + + await wipeMigrations(); + + dbMigrate('create', 'sixth migration', configOption).on('exit', () => { + const files = fs.readdirSync(path.join(__dirname, 'migrations')); + + for (let i = 0; i < files.length; i++) { + const file = files[i]; + const stats = fs.statSync( + path.join(__dirname, 'migrations', file) + ); + + if (stats.isFile() && file.match(/sixth-migration\.js$/)) { + fs.writeFileSync( + path.join(__dirname, 'migrations', file), + 'asdfghij;' + ); } - ); + } + }); + + const codePromise = new Promise((resolve) => { + dbMigrate('up').on('exit', resolve); }); + + exitCode = await codePromise; }); - lab.test('does cause an error', function (done) { + lab.test('does cause an error', () => { Code.expect(exitCode).to.equal(1); - done(); }); - lab.test('did create the new migration', function (done) { + lab.test('did create the new migration', () => { const files = fs.readdirSync(path.join(__dirname, 'migrations')); for (let i = 0; i < files.length; i++) { @@ -362,12 +310,10 @@ lab.experiment('create', function () { Code.expect(file).to.match(/sixth-migration\.js$/); } } - - done(); }); - lab.after(function (done) { - cp.exec('rm -r ' + path.join(__dirname, 'migrations'), done); + lab.after(() => { + cp.exec('rm -r ' + path.join(__dirname, 'migrations')); }); } ); diff --git a/test/migration_test.js b/test/migration_test.js index 8b51d0dc..276c2130 100644 --- a/test/migration_test.js +++ b/test/migration_test.js @@ -1,7 +1,7 @@ 'use strict'; -const Code = require('code'); -const Lab = require('lab'); +const Code = require('@hapi/code'); +const Lab = require('@hapi/lab'); const proxyquire = require('proxyquire').noPreserveCache(); const lab = (exports.lab = Lab.script()); const Migration = require('../lib/file.js'); @@ -34,11 +34,11 @@ lab.experiment('migration', function () { }); function asModule () { - lab.test('should create migration', function (done) { + lab.test('should create migration', async () => { const dbmigrate = stubApiInstance(true, {}, {}); dbmigrate.setConfigParam('_', []); - dbmigrate.create('migrationName').then(done); + await dbmigrate.create('migrationName'); }); } @@ -53,42 +53,33 @@ function newMigrationObject () { ); lab.test( - 'should have title set without file extension', - - function (done) { + 'should have title set without file extension', () => { Code.expect(migration.title).to.equal(fileNameNoExtension); - done(); } ); - lab.test('should have date set', function (done) { + lab.test('should have date set', () => { migration.date.setMilliseconds(0); date.setMilliseconds(0); Code.expect(migration.date.getTime()).to.equal(date.getTime()); - done(); }); lab.test( - 'should have name set without file extension', - - function (done) { + 'should have name set without file extension', () => { Code.expect(migration.name).to.equal( dateString + '-' + fileNameNoExtension ); - done(); } ); - lab.test('should have path set', function (done) { + lab.test('should have path set', () => { Code.expect(migration.path).to.equal( dirName + dateString + '-' + fileName ); - done(); }); - lab.test('should have templateType not set', function (done) { + lab.test('should have templateType not set', () => { Code.expect(migration.templateType).to.be.undefined(); - done(); }); } ); @@ -96,31 +87,26 @@ function newMigrationObject () { lab.experiment('with 3 parameters', function () { const migration = new Migration(fileName, dirName, date); - lab.test('should have title set', function (done) { + lab.test('should have title set', () => { Code.expect(migration.title).to.equal(fileName); - done(); }); - lab.test('should have date set with month', function (done) { + lab.test('should have date set with month', () => { Code.expect(migration.date).to.equal(date); - done(); }); - lab.test('should have name set', function (done) { + lab.test('should have name set', () => { Code.expect(migration.name).to.equal(dateString + '-' + fileName); - done(); }); - lab.test('should have path set', function (done) { + lab.test('should have path set', () => { Code.expect(migration.path).to.equal( dirName + dateString + '-' + fileName ); - done(); }); - lab.test('should have templateType not set', function (done) { + lab.test('should have templateType not set', () => { Code.expect(migration.templateType).to.be.undefined(); - done(); }); }); @@ -133,31 +119,26 @@ function newMigrationObject () { internals ); - lab.test('should have title set', function (done) { + lab.test('should have title set', () => { Code.expect(migration.file.title).to.equal(fileName); - done(); }); - lab.test('should have date set', function (done) { + lab.test('should have date set', () => { Code.expect(migration.file.date).to.equal(date); - done(); }); - lab.test('should have name set', function (done) { + lab.test('should have name set', () => { Code.expect(migration.file.name).to.equal(dateString + '-' + fileName); - done(); }); - lab.test('should have path set', function (done) { + lab.test('should have path set', () => { Code.expect(migration.file.path).to.equal( dirName + dateString + '-' + fileName ); - done(); }); - lab.test('should have templateType set', function (done) { + lab.test('should have templateType set', () => { Code.expect(migration.templateType).to.equal(templateType); - done(); }); }); } @@ -170,12 +151,9 @@ function getTemplate () { const migration = new Template(fileName, dirName, date, internals); lab.test( - 'should return default javascript template', - - function (done) { + 'should return default javascript template', () => { const actual = migration.getTemplate(); Code.expect(actual).to.equal(migration.defaultJsTemplate()); - done(); } ); } @@ -192,12 +170,9 @@ function getTemplate () { ); lab.test( - 'should return sql file loader template', - - function (done) { + 'should return sql file loader template', () => { const actual = migration.getTemplate(); Code.expect(actual).to.equal(migration.sqlFileLoaderTemplate()); - done(); } ); }); @@ -212,12 +187,9 @@ function getTemplate () { ); lab.test( - 'should return default sql template', - - function (done) { + 'should return default sql template', () => { const actual = migration.getTemplate(); Code.expect(actual).to.equal(migration.defaultSqlTemplate()); - done(); } ); }); @@ -232,12 +204,9 @@ function getTemplate () { ); lab.test( - 'should return default coffee template', - - function (done) { + 'should return default coffee template', () => { const actual = migration.getTemplate(); Code.expect(actual).to.equal(migration.defaultCoffeeTemplate()); - done(); } ); }); @@ -252,12 +221,9 @@ function getTemplate () { ); lab.test( - 'should return default coffee template', - - function (done) { + 'should return default coffee template', () => { const actual = migration.getTemplate(); Code.expect(actual).to.equal(migration.coffeeSqlFileLoaderTemplate()); - done(); } ); }); @@ -272,12 +238,9 @@ function getTemplate () { ); lab.test( - 'should return default sql template', - - function (done) { + 'should return default sql template', () => { const actual = migration.getTemplate(); Code.expect(actual).to.equal(migration.defaultJsTemplate()); - done(); } ); }); @@ -286,7 +249,7 @@ function getTemplate () { function stubApiInstance (isModule, stubs, options, callback) { delete require.cache[require.resolve('../api.js')]; - delete require.cache[require.resolve('optimist')]; + delete require.cache[require.resolve('yargs')]; const Mod = proxyquire('../api.js', stubs); const plugins = {}; options = options || {}; diff --git a/test/migrator_test.js b/test/migrator_test.js index f3493fc1..e4fd8a9b 100644 --- a/test/migrator_test.js +++ b/test/migrator_test.js @@ -1,12 +1,12 @@ const Promise = require('bluebird'); -const Code = require('code'); -const Lab = require('lab'); +const Code = require('@hapi/code'); +const Lab = require('@hapi/lab'); const proxyquire = require('proxyquire').noPreserveCache(); const lab = (exports.lab = Lab.script()); lab.experiment('migrators', function () { lab.experiment('check', function () { - lab.test('should return the migrations to be run', function (done) { + lab.test('should return the migrations to be run', async () => { const completedMigration = { name: '20180330020329-thisMigrationIsCompleted' }; @@ -23,10 +23,11 @@ lab.experiment('migrators', function () { } } }); + Migrator.prototype.check(null, function (err, res) { + Code.expect(err).to.be.null(); Code.expect(res.length).to.equal(1); Code.expect(res[0].name).to.equal(uncompletedMigration.name); - done(err, res); }); }); }); diff --git a/test/on_complete_test.js b/test/on_complete_test.js index fc6809a3..58ad6109 100644 --- a/test/on_complete_test.js +++ b/test/on_complete_test.js @@ -1,5 +1,5 @@ -var Code = require('code'); -var Lab = require('lab'); +var Code = require('@hapi/code'); +var Lab = require('@hapi/lab'); var lab = (exports.lab = Lab.script()); var onComplete = require('../lib/commands/on-complete'); diff --git a/test/util_test.js b/test/util_test.js index 3d4b93b7..7ec29066 100644 --- a/test/util_test.js +++ b/test/util_test.js @@ -1,5 +1,5 @@ -var Code = require('code'); -var Lab = require('lab'); +var Code = require('@hapi/code'); +var Lab = require('@hapi/lab'); var lab = (exports.lab = Lab.script()); var util = require('db-migrate-shared').util; @@ -9,47 +9,34 @@ lab.experiment('util', function () { function lpad () { lab.test( - 'should left pad the number of characters to equal the total length', - function (done) { + 'should left pad the number of characters to equal the total length', () => { var actual = util.lpad('prompt', '>', 8); Code.expect(actual).to.equal('>>prompt'); - - done(); } ); lab.test( - 'should apply no left padding if already equal to the total length', - function (done) { + 'should apply no left padding if already equal to the total length', () => { var actual = util.lpad('>>prompt', '>', 8); Code.expect(actual).to.equal('>>prompt'); - - done(); } ); lab.test( 'should apply no left padding if already greater than the total ' + - 'length', - function (done) { + 'length', () => { var actual = util.lpad('>>>prompt', '>', 8); Code.expect(actual).to.equal('>>>prompt'); - - done(); } ); - lab.test('should be apple to pad numbers', function (done) { + lab.test('should be apple to pad numbers', () => { var actual = util.lpad(12, '>', 4); Code.expect(actual).to.equal('>>12'); - - done(); }); - lab.test('should be apple to pad using numbers', function (done) { + lab.test('should be apple to pad using numbers', () => { var actual = util.lpad(12, 0, 4); Code.expect(actual).to.equal('0012'); - - done(); }); }