From f3dd416287ecd3067c799e9c1499217dd26b58e9 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Fri, 19 Nov 2021 08:52:07 +0900 Subject: [PATCH 01/32] Migrate to cosmiconfig --- command-line-options.js | 15 +- index.js | 8 +- package-lock.json | 194 +++++++--- package.json | 4 +- postgrator-cli.js | 136 +++---- test/sample-config.json => postgrator.json | 0 .../.postgratorrc.js | 9 + .../.postgratorrc.json} | 2 +- .../other-migrations/001.do.sql | 0 .../other-migrations/001.undo.sql | 0 .../002.do.some-description.sql | 0 .../002.undo.some-description.sql | 0 .../.postgratorrc.json} | 2 +- test/postgrator-cli-tests.js | 350 ++++++------------ .../.postgratorrc.json} | 2 +- 15 files changed, 323 insertions(+), 399 deletions(-) rename test/sample-config.json => postgrator.json (100%) create mode 100644 test/config-with-non-existing-directory/.postgratorrc.js rename test/{config-with-other-directory.json => config-with-other-directory/.postgratorrc.json} (75%) rename test/{ => config-with-other-directory}/other-migrations/001.do.sql (100%) rename test/{ => config-with-other-directory}/other-migrations/001.undo.sql (100%) rename test/{ => config-with-other-directory}/other-migrations/002.do.some-description.sql (100%) rename test/{ => config-with-other-directory}/other-migrations/002.undo.some-description.sql (100%) rename test/{config-without-password.json => config-without-password/.postgratorrc.json} (73%) rename test/{config-with-non-existing-directory.json => sample-config/.postgratorrc.json} (69%) diff --git a/command-line-options.js b/command-line-options.js index 2b99987..89f274e 100644 --- a/command-line-options.js +++ b/command-line-options.js @@ -44,8 +44,8 @@ const optionDefinitions = [ alias: 's', type: Boolean, }, { - name: 'config', description: 'Load configuration from a JSON file. With a configuration file you can also use additional configuration parameters available on postgrator. See syntax from https://github.com/rickbergfalk/postgrator', - alias: 'c', type: String, typeLabel: '{underline file}', + name: 'no-config', description: 'Disable config loading', + type: Boolean, }, { name: 'version', description: 'Print version.', @@ -63,8 +63,7 @@ const sections = [ content: { options: { columns: [{ name: 'one', maxWidth: 200 }] }, data: [ - { one: 'postgrator [[--to=]version] [--database=] [--driver=] [--host=] [--port=] [--username=] [--password=]' }, - { one: 'postgrator [[--to=]version] [--config=]' }, + { one: 'postgrator [[--to=]version] [--database=] [--driver=] [--host=] [--port=] [--username=] [--password=] [--no-config]' }, ], }, }, @@ -80,15 +79,15 @@ const sections = [ example: 'postgrator 23 --host 127.0.0.1 --database sampledb --username testuser --password testpassword', }, { - desc: '2. Use configuration file', - example: 'postgrator 2 --config myConfig.json', + desc: '2. Explicitly disable loading configuration file', + example: 'postgrator 2 --no-config', }, { - desc: '3. Use default configuration file (postgrator.json)', + desc: '3. Use default configuration file to migrate to version 5', example: 'postgrator 5', }, { - desc: '4. Migrate to latest version using default configuration file (postgrator.json)', + desc: '4. Migrate to latest version using the configuration files', example: 'postgrator', }, ], diff --git a/index.js b/index.js index 7615156..893a4bc 100755 --- a/index.js +++ b/index.js @@ -7,9 +7,7 @@ const commandLineOptions = require('./command-line-options'); const optionList = commandLineOptions.optionList; // eslint-disable-line prefer-destructuring const options = commandLineArgs(optionList); -postgratorCli.run(options, (err) => { - if (err) { - console.log(`Error: ${err.message}`); - process.exit(1); - } +postgratorCli.run(options).catch((err) => { + console.log(`Error: ${err.message}`); + process.exit(1); }); diff --git a/package-lock.json b/package-lock.json index 3070eec..6fa5641 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", - "dev": true, "requires": { "@babel/highlight": "^7.8.3" } @@ -16,14 +15,12 @@ "@babel/helper-validator-identifier": { "version": "7.9.5", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", - "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", - "dev": true + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==" }, "@babel/highlight": { "version": "7.9.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", - "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.9.0", "chalk": "^2.0.0", @@ -36,6 +33,11 @@ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, "acorn": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", @@ -116,6 +118,12 @@ "is-string": "^1.0.5" } }, + "array-uniq": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz", + "integrity": "sha1-X8w3OSB3VyPP1k1lxkvvU7+eum0=", + "dev": true + }, "array.prototype.flat": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", @@ -132,12 +140,6 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, - "async": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", - "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", - "dev": true - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -161,8 +163,7 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "chalk": { "version": "2.4.2", @@ -259,6 +260,36 @@ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, + "cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "dependencies": { + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + } + } + }, "crlf": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/crlf/-/crlf-1.1.1.tgz", @@ -328,7 +359,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -867,7 +897,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", - "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -969,8 +998,7 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-callable": { "version": "1.1.5", @@ -1044,8 +1072,7 @@ "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 + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.13.1", @@ -1057,6 +1084,11 @@ "esprima": "^4.0.0" } }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -1079,6 +1111,11 @@ "type-check": "~0.4.0" } }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -1141,6 +1178,16 @@ "minimist": "^1.2.5" } }, + "mock-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mock-cwd/-/mock-cwd-1.0.0.tgz", + "integrity": "sha512-g+hi96nCWcS4HC5lA6VtL9SHmPywPkXSX6S4DTctmGoi6H8uYVa7lK/h22s8rMQie8b+b1+ywnPC61iXF6mriQ==", + "dev": true, + "requires": { + "randomstring": "^1.1.5", + "temp-dir": "^2.0.0" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1261,6 +1308,12 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -1295,7 +1348,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "requires": { "callsites": "^3.0.0" } @@ -1366,9 +1418,9 @@ } }, "pg-connection-string": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.2.3.tgz", - "integrity": "sha512-I/KCSQGmOrZx6sMHXkOs2MjddrYcqpza3Dtsy0AjIgBr/bZiPJRK9WhABXN1Uy1UDazRbi9gZEzO2sAhL5EqiQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==", "dev": true }, "pg-int8": { @@ -1378,15 +1430,15 @@ "dev": true }, "pg-pool": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.1.tgz", - "integrity": "sha512-BQDPWUeKenVrMMDN9opfns/kZo4lxmSWhIqo+cSAF7+lfi9ZclQbr9vfnlNaPr8wYF3UYjm5X0yPAhbcgqNOdA==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.4.1.tgz", + "integrity": "sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ==", "dev": true }, "pg-protocol": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.2.4.tgz", - "integrity": "sha512-/8L/G+vW/VhWjTGXpGh8XVkXOFx1ZDY+Yuz//Ab8CfjInzFkreI+fDG3WjCeSra7fIZwAFxzbGptNbm8xSXenw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", + "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==", "dev": true }, "pg-types": { @@ -1403,12 +1455,12 @@ } }, "pgpass": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.2.tgz", - "integrity": "sha1-Knu0G2BltnkH6R2hsHwYR8h3swY=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", + "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", "dev": true, "requires": { - "split": "^1.0.0" + "split2": "^3.1.1" } }, "pify": { @@ -1448,9 +1500,9 @@ "dev": true }, "postgres-date": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.5.tgz", - "integrity": "sha512-pdau6GRPERdAYUQwkBnGKxEfPyhVZXG/JiS44iZWiNdSOWE09N2lUgN6yshuq6fVSon4Pm0VMXd1srUUkLe9iA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", "dev": true }, "postgres-interval": { @@ -1480,6 +1532,22 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "randombytes": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz", + "integrity": "sha1-Z0yZdgkBw8QRJ3GjHlIdw0nMCew=", + "dev": true + }, + "randomstring": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/randomstring/-/randomstring-1.2.1.tgz", + "integrity": "sha512-eMnfell9XuU3jfCx3f4xCaFAt0YMFPZhx9R3PSStmLarDKg5j5vivqKhf/8pvG+VX/YkxsckHK/VPUrKa5V07A==", + "dev": true, + "requires": { + "array-uniq": "1.0.2", + "randombytes": "2.0.3" + } + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -1501,6 +1569,17 @@ "read-pkg": "^2.0.0" } }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "reduce-flatten": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", @@ -1524,8 +1603,7 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, "restore-cursor": { "version": "3.1.0", @@ -1561,6 +1639,12 @@ "tslib": "^1.9.0" } }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1645,13 +1729,13 @@ "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", "dev": true, "requires": { - "through": "2" + "readable-stream": "^3.0.0" } }, "sprintf-js": { @@ -1713,6 +1797,15 @@ "es-abstract": "^1.17.5" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "strip-ansi": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", @@ -1817,6 +1910,12 @@ } } }, + "temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "dev": true + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -1882,6 +1981,12 @@ "punycode": "^2.1.0" } }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, "v8-compile-cache": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", @@ -1948,6 +2053,11 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" } } } diff --git a/package.json b/package.json index d0dd636..f9858e7 100644 --- a/package.json +++ b/package.json @@ -53,14 +53,16 @@ "dependencies": { "command-line-args": "^5.1.1", "command-line-usage": "^6.1.0", + "cosmiconfig": "^7.0.1", "postgrator": "^4.0.0" }, "devDependencies": { - "async": "3.2.0", "crlf": "^1.1.1", "eslint": "^7.0.0", "eslint-config-airbnb-base": "^14.0.0", "eslint-plugin-import": "^2.18.2", + "mock-cwd": "^1.0.0", + "p-each-series": "^2.2.0", "pg": "^8.2.1" } } diff --git a/postgrator-cli.js b/postgrator-cli.js index fda50c7..f81c102 100644 --- a/postgrator-cli.js +++ b/postgrator-cli.js @@ -2,24 +2,15 @@ const fs = require('fs'); const path = require('path'); const getUsage = require('command-line-usage'); const Postgrator = require('postgrator'); +const { cosmiconfig } = require('cosmiconfig'); const pjson = require('./package.json'); const commandLineOptions = require('./command-line-options'); -const DEFAULT_CONFIG_FILE = 'postgrator.json'; - function printUsage() { const usage = getUsage(commandLineOptions.sections); console.log(usage); } -function promiseToCallback(promise, callback) { - promise.then((data) => { - process.nextTick(callback, null, data); - }, (err) => { - process.nextTick(callback, err); - }); -} - function logMessage(message) { // Using the system default time locale/options for now const messagePrefix = `[${new Date().toLocaleTimeString()}]`; @@ -33,34 +24,12 @@ function getMigrateToNumber(toArgument) { return Number(toArgument).toString(); } -function hasDefaultConfigFile() { - const defaultConfigFilePath = path.join(process.cwd(), DEFAULT_CONFIG_FILE); - return fileIsAccessible(defaultConfigFilePath); -} - -function getPostgratorConfigFromFile(configFile) { - const configFilePath = getAbsolutePath(configFile); - if (!fileIsAccessible(configFilePath)) { - throw new Error(`Config file not found: ${configFilePath}`); - } - return require(configFilePath); -} - function getAbsolutePath(fileOrDirectory) { return (path.isAbsolute(fileOrDirectory)) ? fileOrDirectory : path.join(process.cwd(), fileOrDirectory); } -function fileIsAccessible(filePath) { - try { - fs.accessSync(filePath, fs.F_OK); - return true; - } catch (e) { - return false; - } -} - function getPostgratorConfigFromCommandLineArgs(commandLineArgs) { return { migrationDirectory: commandLineArgs['migration-directory'], @@ -120,13 +89,11 @@ function migrate(postgrator, to, migrationDirectory) { /** * Gets password from postgrator config or as user input * @param {object} postgratorConfig - * @param {Function} callback - * @returns {string} password + * @returns {string} Promise */ -function getPassword(postgratorConfig, callback) { +async function getPassword(postgratorConfig) { if (postgratorConfig.password !== null && postgratorConfig.password !== undefined) { - callback(postgratorConfig.password); - return; + return postgratorConfig.password; } // Ask password if it is not set @@ -139,13 +106,6 @@ function getPassword(postgratorConfig, callback) { rl.stdoutMuted = true; - rl.question('Password: ', (password) => { - rl.history = rl.history.slice(1); - rl.close(); - console.log('\n'); - callback(password); - }); - // eslint-disable-next-line no-underscore-dangle rl._writeToOutput = function _writeToOutput(stringToWrite) { if (rl.stdoutMuted) { @@ -162,41 +122,40 @@ function getPassword(postgratorConfig, callback) { rl.output.write(stringToWrite); } }; + + const password = await new Promise((res) => rl.question('Password: ', res)); + rl.history = rl.history.slice(1); + rl.close(); + console.log('\n'); + return password; } /* -------------------------- Main ---------------------------------- */ -function run(commandLineArgs, callback) { +async function run(commandLineArgs) { // Print help if requested if (commandLineArgs.help) { printUsage(); - callback(null); - return; + return Promise.resolve(); } // Print version if requested if (commandLineArgs.version) { console.log(`Version: ${pjson.version}`); - callback(null); - return; + return Promise.resolve(); } - // Search for default config file if not specified - if (!commandLineArgs.config && hasDefaultConfigFile()) { - commandLineArgs.config = DEFAULT_CONFIG_FILE; + let postgratorConfig; + if (!commandLineArgs.noConfig) { + const explorer = cosmiconfig('postgrator'); + const result = await explorer.search(); + postgratorConfig = (!result || result.isEmpty) ? null : result.config; } - let postgratorConfig; - if (commandLineArgs.config) { - try { - postgratorConfig = getPostgratorConfigFromFile(commandLineArgs.config); - } catch (err) { - callback(err); - return; - } - } else { + if (!postgratorConfig) { postgratorConfig = getPostgratorConfigFromCommandLineArgs(commandLineArgs); } + if (!postgratorConfig.migrationDirectory) { postgratorConfig.migrationDirectory = commandLineOptions.DEFAULT_MIGRATION_DIRECTORY; } @@ -206,45 +165,34 @@ function run(commandLineArgs, callback) { if (!commandLineArgs.config && commandLineArgs['migration-directory'] === commandLineOptions.DEFAULT_MIGRATION_DIRECTORY) { printUsage(); } - callback(new Error(`Directory "${postgratorConfig.migrationDirectory}" does not exist.`)); - return; + return Promise.reject(new Error(`Directory "${postgratorConfig.migrationDirectory}" does not exist.`)); } const migrateTo = getMigrateToNumber(commandLineArgs.to); - getPassword(postgratorConfig, (password) => { - postgratorConfig.password = password; + postgratorConfig.password = await getPassword(postgratorConfig); - // Create postgrator - let postgrator; - try { - postgrator = new Postgrator(postgratorConfig); - } catch (err) { - printUsage(); - callback(err); - return; - } + // Create postgrator + let postgrator; + try { + postgrator = new Postgrator(postgratorConfig); + } catch (err) { + printUsage(); + return Promise.reject(err); + } - // Postgrator events - postgrator.on( - 'validation-started', - (migration) => logMessage(`verifying checksum of migration ${migration.filename}`), - ); - postgrator.on( - 'migration-started', - (migration) => logMessage(`running ${migration.filename}`), - ); - - const migratePromise = migrate(postgrator, migrateTo, postgratorConfig.migrationDirectory); - - promiseToCallback(migratePromise, (err, migrations) => { - // connection is closed, or will close in the case of SQL Server - if (err && typeof err === 'string') { - err = new Error(err); - } - return callback(err, migrations); - }); - }); + // Postgrator events + postgrator.on( + 'validation-started', + (migration) => logMessage(`verifying checksum of migration ${migration.filename}`), + ); + postgrator.on( + 'migration-started', + (migration) => logMessage(`running ${migration.filename}`), + ); + + return migrate(postgrator, migrateTo, postgratorConfig.migrationDirectory) + .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); } module.exports.run = run; diff --git a/test/sample-config.json b/postgrator.json similarity index 100% rename from test/sample-config.json rename to postgrator.json diff --git a/test/config-with-non-existing-directory/.postgratorrc.js b/test/config-with-non-existing-directory/.postgratorrc.js new file mode 100644 index 0000000..b802b17 --- /dev/null +++ b/test/config-with-non-existing-directory/.postgratorrc.js @@ -0,0 +1,9 @@ +module.exports = { + migrationDirectory: 'test/non-existing-migrations-directory', + driver: 'pg', + host: '127.0.0.1', + port: 5432, + database: 'postgrator', + username: 'postgrator', + password: 'postgrator', +}; diff --git a/test/config-with-other-directory.json b/test/config-with-other-directory/.postgratorrc.json similarity index 75% rename from test/config-with-other-directory.json rename to test/config-with-other-directory/.postgratorrc.json index 790f358..99a2974 100644 --- a/test/config-with-other-directory.json +++ b/test/config-with-other-directory/.postgratorrc.json @@ -1,5 +1,5 @@ { - "migrationDirectory": "test/other-migrations", + "migrationDirectory": "other-migrations", "driver": "pg", "host": "127.0.0.1", "port": 5432, diff --git a/test/other-migrations/001.do.sql b/test/config-with-other-directory/other-migrations/001.do.sql similarity index 100% rename from test/other-migrations/001.do.sql rename to test/config-with-other-directory/other-migrations/001.do.sql diff --git a/test/other-migrations/001.undo.sql b/test/config-with-other-directory/other-migrations/001.undo.sql similarity index 100% rename from test/other-migrations/001.undo.sql rename to test/config-with-other-directory/other-migrations/001.undo.sql diff --git a/test/other-migrations/002.do.some-description.sql b/test/config-with-other-directory/other-migrations/002.do.some-description.sql similarity index 100% rename from test/other-migrations/002.do.some-description.sql rename to test/config-with-other-directory/other-migrations/002.do.some-description.sql diff --git a/test/other-migrations/002.undo.some-description.sql b/test/config-with-other-directory/other-migrations/002.undo.some-description.sql similarity index 100% rename from test/other-migrations/002.undo.some-description.sql rename to test/config-with-other-directory/other-migrations/002.undo.some-description.sql diff --git a/test/config-without-password.json b/test/config-without-password/.postgratorrc.json similarity index 73% rename from test/config-without-password.json rename to test/config-without-password/.postgratorrc.json index e6dc057..605a529 100644 --- a/test/config-without-password.json +++ b/test/config-without-password/.postgratorrc.json @@ -1,5 +1,5 @@ { - "migrationDirectory": "test/migrations", + "migrationDirectory": "../migrations", "driver": "pg", "host": "127.0.0.1", "port": 5432, diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 676d8c0..f60e547 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -1,15 +1,14 @@ const assert = require('assert'); -const async = require('async'); const commandLineArgs = require('command-line-args'); -const fs = require('fs'); const path = require('path'); const readline = require('readline'); +const eachSeries = require('p-each-series'); +const { mockCwd } = require('mock-cwd'); const commandLineOptions = require('../command-line-options'); const postgratorCli = require('../postgrator-cli'); const MAX_REVISION = 5; -const DEFAULT_CONFIG_FILE_NAME = 'postgrator.json'; const optionList = commandLineOptions.optionList; // eslint-disable-line prefer-destructuring const originalConsoleLog = console.log; @@ -21,15 +20,7 @@ function consoleLogCapture(...args) { log += [].slice.call(args); } -function promiseToCallback(promise, callback) { - promise.then((data) => { - process.nextTick(callback, null, data); - }, (err) => { - process.nextTick(callback, err); - }); -} - -function removeVersionTable(options, callback) { +function removeVersionTable(options) { const config = { migrationDirectory: options['migration-directory'], driver: options.driver, @@ -43,28 +34,12 @@ function removeVersionTable(options, callback) { const Postgrator = require('../node_modules/postgrator/postgrator.js'); const pg = new Postgrator(config); - promiseToCallback(pg.runQuery('DROP TABLE IF EXISTS schemaversion, animal, person'), (err) => { + return pg.runQuery('DROP TABLE IF EXISTS schemaversion, animal, person').catch((err) => { assert.ifError(err); - callback(err); + return Promise.reject(err); }); } -function copyConfigToFile(file) { - fs.writeFileSync(file, fs.readFileSync('test/sample-config.json')); -} - -function deleteConfigFile(file) { - fs.unlinkSync(file); -} - -function copyConfigToDefaultFile() { - copyConfigToFile(DEFAULT_CONFIG_FILE_NAME); -} - -function deleteDefaultConfigFile() { - deleteConfigFile(DEFAULT_CONFIG_FILE_NAME); -} - function getDefaultOptions() { return commandLineArgs(optionList, { partial: true }); } @@ -81,305 +56,203 @@ function buildTestsForOptions(options) { options = JSON.parse(JSON.stringify(originalOptions)); } - function resetMigrations(callback) { + async function resetMigrations() { console.log('\n----- Reset migrations-----'); const originalTo = options.to; options.to = 0; - postgratorCli.run(options, (err) => { - assert.ifError(err); - options.to = originalTo; - return callback(); - }); + await postgratorCli.run(options); + options.to = originalTo; } - tests.push((callback) => { - removeVersionTable(options, (err) => { - assert.ifError(err); - return callback(); - }); - }); + tests.push(() => removeVersionTable(options).catch((err) => { + assert.ifError(err); + return Promise.resolve(); + })); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing show help (output suppressed)-----'); options.help = true; console.log = consoleLogCapture; - postgratorCli.run(options, (err, migrations) => { - console.log = originalConsoleLog; - restoreOptions(); - assert.strictEqual(migrations, undefined); - assert.ok(log.indexOf('Examples') >= 0, 'No help was displayed'); - assert.ifError(err); - return callback(); - }); + const migrations = await postgratorCli.run(options); + console.log = originalConsoleLog; + restoreOptions(); + assert.strictEqual(migrations, undefined); + assert.ok(log.indexOf('Examples') >= 0, 'No help was displayed'); }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing show version (output suppressed)-----'); options.version = true; console.log = consoleLogCapture; - postgratorCli.run(options, (err, migrations) => { - console.log = originalConsoleLog; - restoreOptions(); - assert.strictEqual(migrations, undefined); - assert.ok(log.indexOf('Version: ') >= 0, 'No version was displayed'); - assert.ifError(err); - return callback(); - }); + const migrations = await postgratorCli.run(options); + console.log = originalConsoleLog; + restoreOptions(); + assert.strictEqual(migrations, undefined); + assert.ok(log.indexOf('Version: ') >= 0, 'No version was displayed'); }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing migration to 003 -----'); - postgratorCli.run(options, (err, migrations) => { - assert.ifError(err); - assert.equal(migrations.length, 3); - assert.equal(migrations[2].version, 3); - return callback(); - }); + const migrations = await postgratorCli.run(options); + assert.equal(migrations.length, 3); + assert.equal(migrations[2].version, 3); }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing migration to 000 with conflict detection-----'); options.to = 0; - postgratorCli.run(options, (err, migrations) => { - restoreOptions(); - assert.equal(migrations.length, 3); - assert.equal(migrations[2].version, 1); - assert.equal(migrations[2].action, 'undo'); - assert.ifError(err); - return callback(); - }); + const migrations = await postgratorCli.run(options); + restoreOptions(); + assert.equal(migrations.length, 3); + assert.equal(migrations[2].version, 1); + assert.equal(migrations[2].action, 'undo'); }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing migration to 001 -----'); options.to = 1; - postgratorCli.run(options, (err, migrations) => { - restoreOptions(); - assert.equal(migrations.length, 1); - assert.equal(migrations[0].version, 1); - assert.equal(migrations[0].action, 'do'); - assert.ifError(err); - return callback(); - }); + const migrations = await postgratorCli.run(options); + restoreOptions(); + assert.equal(migrations.length, 1); + assert.equal(migrations[0].version, 1); + assert.equal(migrations[0].action, 'do'); }); - tests.push((callback) => { + tests.push(() => { console.log('\n----- testing migration from 001 to 003 using config file -----'); options.to = '0003'; options.username = ''; options.database = ''; - options.config = 'test/sample-config.json'; - postgratorCli.run(options, (err, migrations) => { + return mockCwd(path.join(__dirname, 'sample-config'), async () => { + const migrations = await postgratorCli.run(options); restoreOptions(); assert.equal(migrations[migrations.length - 1].version, 3); - assert.ifError(err); - return callback(); }); }); - tests.push((callback) => { + tests.push(() => { console.log('\n----- testing migration from 003 to 002 using config file -----'); options.to = '02'; options.username = ''; options.database = ''; - options.config = 'test/sample-config.json'; - postgratorCli.run(options, (err, migrations) => { + return mockCwd(path.join(__dirname, 'sample-config'), async () => { + const migrations = await postgratorCli.run(options); restoreOptions(); assert.equal(migrations[0].version, 3); assert.equal(migrations[0].action, 'undo'); - assert.ifError(err); - return callback(); - }); - }); - - tests.push((callback) => { - console.log('\n----- testing non-existing config file-----'); - options.config = 'test/config-which-does-not-exist.json'; - options.to = '003'; - - postgratorCli.run(options, (err) => { - restoreOptions(); - assert(err); - assert(err.message.indexOf('Config file not found:') >= 0); - return callback(); - }); - }); - - tests.push((callback) => { - console.log('\n----- testing searching default config file (postgrator.json)-----'); - - copyConfigToDefaultFile(); - options.config = ''; - options.password = ''; - options.to = '000'; - - postgratorCli.run(options, (err, migrations) => { - restoreOptions(); - deleteDefaultConfigFile(); - assert.ifError(err); - assert(migrations.length > 0); - return callback(); }); }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing using latest revision without specifying to-----'); options.to = getDefaultOptions().to; // is 'max' - postgratorCli.run(options, (err, migrations) => { - restoreOptions(); - assert.ifError(err); - assert.equal(migrations.length, MAX_REVISION); - assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); - return callback(); - }); - }); - - tests.push(resetMigrations); - - tests.push((callback) => { - console.log('\n----- testing using latest revision with default config file-----'); - copyConfigToDefaultFile(); - - options.config = ''; - options.password = ''; - options.to = ''; - - postgratorCli.run(options, (err, migrations) => { - restoreOptions(); - deleteDefaultConfigFile(); - assert.ifError(err); - assert.equal(migrations.length, MAX_REVISION); - return callback(); - }); - }); - - tests.push(resetMigrations); - - tests.push((callback) => { - console.log('\n----- testing using latest revision with config file set by absolute path-----'); - const absolutePath = path.resolve(__dirname, './sample-config.json'); - options.config = absolutePath; - options.password = ''; - options.to = ''; - - postgratorCli.run(options, (err, migrations) => { - restoreOptions(); - assert.ifError(err); - assert.equal(migrations.length, MAX_REVISION); - return callback(); - }); + const migrations = await postgratorCli.run(options); + restoreOptions(); + assert.equal(migrations.length, MAX_REVISION - 2); + assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); }); - tests.push((callback) => { + tests.push(() => { console.log('\n----- testing it does not re-apply same migrations -----'); - const absolutePath = path.resolve(__dirname, './sample-config.json'); - options.config = absolutePath; options.password = ''; options.to = ''; - postgratorCli.run(options, (err, migrations) => { + return mockCwd(path.join(__dirname, 'sample-config'), async () => { + const migrations = await postgratorCli.run(options); restoreOptions(); - assert.ifError(err); assert.equal(migrations.length, 0); // returns number of applied migrations - return callback(); }); }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing with no migration files found-----'); - options.config = ''; options.to = 3; options['migration-directory'] = 'test/empty-migrations'; console.log = consoleLogCapture; - postgratorCli.run(options, (err, migrations) => { + try { + await postgratorCli.run(options); + } catch (err) { console.log = originalConsoleLog; restoreOptions(); assert(err, 'No error when there should be'); assert(err.message.indexOf('No migration files found') >= 0); - assert.strictEqual(migrations, undefined); assert(log.indexOf('Examples') < 0, "Help was displayed when shouldn't"); - return callback(); - }); + } }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing with non-existing migration directory set-----'); - options.config = ''; options.to = 3; options['migration-directory'] = 'test/non-existing-directory'; console.log = consoleLogCapture; - postgratorCli.run(options, (err, migrations) => { + try { + await postgratorCli.run(options); + } catch (err) { console.log = originalConsoleLog; restoreOptions(); assert(err.message.indexOf('does not exist') >= 0); assert(log.indexOf('Examples') < 0, "Help was displayed when shouldn't"); - assert.strictEqual(migrations, undefined); - return callback(); - }); + } }); - tests.push((callback) => { + tests.push(() => { console.log('\n----- testing with non-existing migration directory set in config file-----'); options.username = ''; options.database = ''; - options.config = 'test/config-with-non-existing-directory.json'; console.log = consoleLogCapture; - postgratorCli.run(options, (err, migrations) => { - console.log = originalConsoleLog; - restoreOptions(); - assert(err.message.indexOf('non-existing-migrations-directory') >= 0); - assert(err.message.indexOf('does not exist') >= 0); - assert(log.indexOf('Examples') < 0, "Help was displayed when shouldn't"); - assert.strictEqual(migrations, undefined); - return callback(); + return mockCwd(path.join(__dirname, 'config-with-non-existing-directory'), async () => { + try { + await postgratorCli.run(options); + } catch (err) { + console.log = originalConsoleLog; + restoreOptions(); + assert(err.message.indexOf('non-existing-migrations-directory') >= 0); + assert(err.message.indexOf('does not exist') >= 0); + assert(log.indexOf('Examples') < 0, "Help was displayed when shouldn't"); + } }); }); tests.push(resetMigrations); - tests.push((callback) => { + tests.push(() => { console.log('\n----- testing with alternative migration directory set in config file-----'); options.to = 'max'; options.username = ''; options.database = ''; - options.config = 'test/config-with-other-directory.json'; - postgratorCli.run(options, (err, migrations) => { - assert.ifError(err); + return mockCwd(path.join(__dirname, 'config-with-other-directory'), async () => { + const migrations = await postgratorCli.run(options); assert(migrations.length, 2); - return resetMigrations(() => { - restoreOptions(); - callback(); - }); + await resetMigrations(); + restoreOptions(); }); }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing empty password-----'); - options.config = ''; options.password = ''; - postgratorCli.run(options, (err) => { - restoreOptions(); - assert(err.length > 0); - return callback(null); - }); + postgratorCli.run(options); + // this error is not thrown down the chain so it cannot be caught + const err = await new Promise((res) => process.once('uncaughtException', res)); + assert(err, 'ERR_INVALID_ARG_TYPE'); + restoreOptions(); }); - tests.push((callback) => { + tests.push(async () => { console.log('\n----- testing null password asks from user-----'); let passwordAsked = false; - options.config = ''; options.password = null; // mock readline @@ -392,21 +265,19 @@ function buildTestsForOptions(options) { }; }; - postgratorCli.run(options, (err) => { + return postgratorCli.run(options).catch((err) => { restoreOptions(); assert(passwordAsked); assert(err.length > 0); readline.createInterface = originalCreateInterface; - return callback(null); }); }); - tests.push((callback) => { + tests.push(() => { console.log('\n----- testing that config file without password asks from user -----'); options.to = 'max'; options.username = ''; options.database = ''; - options.config = 'test/config-without-password.json'; let passwordAsked = false; // mock readline @@ -419,48 +290,37 @@ function buildTestsForOptions(options) { }; }; - postgratorCli.run(options, (err, migrations) => { - assert.ifError(err); + return mockCwd(path.join(__dirname, 'config-without-password'), async () => { + const migrations = await postgratorCli.run(options); assert(migrations.length); assert(passwordAsked); + await resetMigrations(); readline.createInterface = originalCreateInterface; - return resetMigrations(() => { - restoreOptions(); - callback(); - }); + restoreOptions(); }); }); - tests.push((callback) => { + tests.push(() => { console.log('\n----- testing showing help and error without any cmd params if no migrations directory-----'); const defaultOptions = getDefaultOptions(); console.log = consoleLogCapture; - postgratorCli.run(defaultOptions, (err, migrations) => { + return postgratorCli.run(defaultOptions).catch((err) => { console.log = originalConsoleLog; restoreOptions(); - assert.strictEqual(migrations, undefined); assert.ok(log.indexOf('Examples') >= 0, 'No help was displayed'); assert(err.message.indexOf('does not exist') >= 0, 'No directory does not exist error was displayed'); - return callback(); }); }); - tests.push((callback) => { + tests.push(() => { console.log('\n----- testing detecting migration files with same number-----'); - options.config = ''; options.to = 3; options['migration-directory'] = 'test/conflicting-migrations'; - postgratorCli.run(options, (err, migrations) => { + return postgratorCli.run(options).catch((err) => { restoreOptions(); - assert.strictEqual( - migrations, - undefined, - 'Migrations were run although there were migration files with same number', - ); assert(err.message.indexOf('Two migrations found with version 2 and action do') >= 0, 'No migration conflicts were detected'); - return callback(); }); }); } @@ -482,17 +342,15 @@ buildTestsForOptions(options); // Run the tests console.log(`Running ${tests.length} tests`); -async.eachSeries(tests, (testFunc, callback) => { +eachSeries(tests, (testFunc) => { console.log = originalConsoleLog; log = ''; - testFunc(callback); -}, (err) => { - if (err) { - console.log = originalConsoleLog; - console.log(err); - assert.ifError(err); - } - + return testFunc(); +}).then(() => { console.log('\nIt works!'); process.exit(0); +}).catch((err) => { + console.log = originalConsoleLog; + console.log(err); + assert.ifError(err); }); diff --git a/test/config-with-non-existing-directory.json b/test/sample-config/.postgratorrc.json similarity index 69% rename from test/config-with-non-existing-directory.json rename to test/sample-config/.postgratorrc.json index 691fb5e..7d4dfbc 100644 --- a/test/config-with-non-existing-directory.json +++ b/test/sample-config/.postgratorrc.json @@ -1,5 +1,5 @@ { - "migrationDirectory": "test/non-existing-migrations-directory", + "migrationDirectory": "../migrations", "driver": "pg", "host": "127.0.0.1", "port": 5432, From 4a369ceef67e343f88f6892fd17aeab1298093e7 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Fri, 19 Nov 2021 09:27:56 +0900 Subject: [PATCH 02/32] Test --no-config option --- postgrator-cli.js | 10 +++------- test/postgrator-cli-tests.js | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/postgrator-cli.js b/postgrator-cli.js index f81c102..cac5372 100644 --- a/postgrator-cli.js +++ b/postgrator-cli.js @@ -145,15 +145,11 @@ async function run(commandLineArgs) { return Promise.resolve(); } - let postgratorConfig; - if (!commandLineArgs.noConfig) { + let postgratorConfig = getPostgratorConfigFromCommandLineArgs(commandLineArgs); + if (!commandLineArgs['no-config']) { const explorer = cosmiconfig('postgrator'); const result = await explorer.search(); - postgratorConfig = (!result || result.isEmpty) ? null : result.config; - } - - if (!postgratorConfig) { - postgratorConfig = getPostgratorConfigFromCommandLineArgs(commandLineArgs); + postgratorConfig = (!result || result.isEmpty) ? postgratorConfig : result.config; } if (!postgratorConfig.migrationDirectory) { diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index f60e547..ae1ae12 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -148,13 +148,15 @@ function buildTestsForOptions(options) { }); }); + tests.push(resetMigrations); + tests.push(async () => { console.log('\n----- testing using latest revision without specifying to-----'); options.to = getDefaultOptions().to; // is 'max' const migrations = await postgratorCli.run(options); restoreOptions(); - assert.equal(migrations.length, MAX_REVISION - 2); + assert.equal(migrations.length, MAX_REVISION); assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); }); @@ -224,6 +226,22 @@ function buildTestsForOptions(options) { tests.push(resetMigrations); + tests.push(() => { + console.log('\n----- testing ignoring config file -----'); + options['migration-directory'] = '../migrations'; + options['no-config'] = true; + options.to = 'max'; + + return mockCwd(path.join(__dirname, 'config-with-non-existing-directory'), async () => { + const migrations = await postgratorCli.run(options); + restoreOptions(); + assert.equal(migrations.length, MAX_REVISION); + assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); + }); + }); + + tests.push(resetMigrations); + tests.push(() => { console.log('\n----- testing with alternative migration directory set in config file-----'); options.to = 'max'; From f5d5cd4f9c3ae23d2064438bf778ed0871c0b28f Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Fri, 19 Nov 2021 09:35:28 +0900 Subject: [PATCH 03/32] Update README.md --- README.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b17230f..3d5a564 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ environment variables such as the above. You can specify all the parameters from command line (see below) but the easiest way is to: -* Create `postgrator.json` configuration file. For example: +* Create `.postgratorrc.json`, or any config file supported by [cosmiconfig](https://github.com/davidtheclark/cosmiconfig). For example: ``` { @@ -103,7 +103,7 @@ You can specify all the parameters from command line (see below) but the easiest } ``` -* Migrate to latest version (it looks settings by default from `postgrator.json`): +* Migrate to latest version (it looks settings by default from `.postgratorrc.json`, etc): ``` $ postgrator ``` @@ -117,8 +117,7 @@ $ postgrator 4 ### Synopsis ``` -postgrator [[--to=]] --database= [--driver=] [--host=] [--port=] [--username=] [--password=] -postgrator [[--to=]] [--config=] +postgrator [[--to=]] --database= [--driver=] [--host=] [--port=] [--username=] [--password=] [--no-config] ``` ### Options @@ -133,9 +132,7 @@ postgrator [[--to=]] [--config=] -p, --password password Password -m, --migration-directory directory A directory to run migration files from. Default: 'migrations'' -s, --secure Secure connection (Azure). Default: false - -c, --config file Load configuration from a JSON file. With a configuration file you can also - use additional configuration parameters available on postgrator. See syntax - from https://github.com/rickbergfalk/postgrator + --no-config Do not load options from a configuration file. -v, --version Print version. -?, --help Print this usage guide. @@ -143,10 +140,10 @@ Examples 1. Specify parameters on command line postgrator 23 --host 127.0.0.1 --database sampledb --username testuser --password testpassword - 2. Use configuration file postgrator 2 --config myConfig.json - 3. Use default configuration file (postgrator.json) postgrator 5 + 2. Explicitly disable loading configuration file postgrator 2 --no-config + 3. Use default configuration file to migrate to version 5 postgrator 5 4. Migrate to latest version using default configuration postgrator - file (postgrator.json) + file (.postgratorrc.json, etc) ``` ## Tests From 1ef8b013eac7732b530c41a53d5a808f4e2a2fad Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Sun, 21 Nov 2021 12:01:24 +0900 Subject: [PATCH 04/32] Upgrade eslint and eslint-config-airbnb --- package-lock.json | 3725 +++++++++++++++++++++++++++------- package.json | 7 +- postgrator-cli.js | 2 +- test/postgrator-cli-tests.js | 7 +- 4 files changed, 2963 insertions(+), 778 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6fa5641..53e89d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,2435 @@ { - "name": "postgrator-cli", - "version": "4.0.0", - "lockfileVersion": 1, + "name": "@perrin4869/postgrator-cli", + "version": "5.0.0-beta.0", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "@perrin4869/postgrator-cli", + "version": "5.0.0-beta.0", + "license": "MIT", + "dependencies": { + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "cosmiconfig": "^7.0.1", + "postgrator": "^4.0.0" + }, + "bin": { + "postgrator": "index.js" + }, + "devDependencies": { + "crlf": "^1.1.1", + "eslint": "^8.2.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.25.3", + "mock-cwd": "^1.0.0", + "p-each-series": "^2.2.0", + "p-event": "^4.2.0", + "pg": "^8.2.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dependencies": { + "@babel/highlight": "^7.8.3" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==" + }, + "node_modules/@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", + "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.0.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@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==", + "dev": true + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, + "node_modules/@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, + "node_modules/acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/array-includes": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz", + "integrity": "sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-uniq": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz", + "integrity": "sha1-X8w3OSB3VyPP1k1lxkvvU7+eum0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", + "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/command-line-args": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.1.1.tgz", + "integrity": "sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg==", + "dependencies": { + "array-back": "^3.0.1", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.0.tgz", + "integrity": "sha512-Ew1clU4pkUeo6AFVDFxCbnN7GIZfXl48HIOQeFQnkO3oOqvpI7wdqtLRwv9iOCZ/7A+z4csVZeiDdEcj8g6Wiw==", + "dependencies": { + "array-back": "^4.0.0", + "chalk": "^2.4.2", + "table-layout": "^1.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.1.tgz", + "integrity": "sha512-Z/JnaVEXv+A9xabHzN43FiiiWEE7gPCRXMrVmRm00tWbjZRul1iHm7ECzlyNq1p4a4ATXz+G9FJ3GqGOkOV3fg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", + "dev": true + }, + "node_modules/cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cosmiconfig/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cosmiconfig/node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/crlf": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/crlf/-/crlf-1.1.1.tgz", + "integrity": "sha1-JBcoQbTINSmmqkSJ337tlYsu0W8=", + "dev": true, + "dependencies": { + "glub": "^1.0.0", + "transform-file": "^1.0.1" + }, + "bin": { + "crlf": "bin/crlf" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.2.0.tgz", + "integrity": "sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.0.4", + "@humanwhocodes/config-array": "^0.6.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^6.0.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", + "dev": true, + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", + "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "find-up": "^2.1.0", + "pkg-dir": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz", + "integrity": "sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.1", + "has": "^1.0.3", + "is-core-module": "^2.8.0", + "is-glob": "^4.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.5", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.11.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/eslint-scope": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", + "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/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==", + "dev": true, + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/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==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/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==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", + "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "dev": true, + "dependencies": { + "acorn": "^8.5.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glub": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/glub/-/glub-1.0.3.tgz", + "integrity": "sha1-VsFkMpiuJQZcYxUAMze7pp0vuGY=", + "dev": true, + "dependencies": { + "glob": "^5.0.5", + "minimist": "^1.1.1" + }, + "bin": { + "glub": "bin/glub" + } + }, + "node_modules/glub/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", + "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "node_modules/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 + }, + "node_modules/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 + }, + "node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, + "node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/mock-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mock-cwd/-/mock-cwd-1.0.0.tgz", + "integrity": "sha512-g+hi96nCWcS4HC5lA6VtL9SHmPywPkXSX6S4DTctmGoi6H8uYVa7lK/h22s8rMQie8b+b1+ywnPC61iXF6mriQ==", + "dev": true, + "dependencies": { + "randomstring": "^1.1.5", + "temp-dir": "^2.0.0" + } + }, + "node_modules/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 + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/newline": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/newline/-/newline-0.0.3.tgz", + "integrity": "sha1-D2p0STIj26BP59v7bNyAS/fkbdA=" + }, + "node_modules/object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", + "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-event": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", + "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "dev": true, + "dependencies": { + "p-timeout": "^3.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dev": true, + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==", + "dev": true + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/pg": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.2.1.tgz", + "integrity": "sha512-DKzffhpkWRr9jx7vKxA+ur79KG+SKw+PdjMb1IRhMiKI9zqYUGczwFprqy+5Veh/DCcFs1Y6V8lRLN5I1DlleQ==", + "dev": true, + "dependencies": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.2.3", + "pg-pool": "^3.2.1", + "pg-protocol": "^1.2.4", + "pg-types": "^2.1.0", + "pgpass": "1.x", + "semver": "4.3.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/pg-connection-string": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==", + "dev": true + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.4.1.tgz", + "integrity": "sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ==", + "dev": true, + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", + "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==", + "dev": true + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dev": true, + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pg/node_modules/semver": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.2.tgz", + "integrity": "sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c=", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/pgpass": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", + "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", + "dev": true, + "dependencies": { + "split2": "^3.1.1" + } + }, + "node_modules/pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postgrator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postgrator/-/postgrator-4.0.0.tgz", + "integrity": "sha512-kuJDNYetiUMhpXP3rkWFL+yJj+SkbX3i1rfOUVn0icVZrUXb/BFhfJamym7Y911KrWOaHackBIgzgvWGpe7S1Q==", + "dependencies": { + "glob": "^7.1.6", + "newline": "0.0.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dev": true, + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/punycode": { + "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, + "engines": { + "node": ">=6" + } + }, + "node_modules/randombytes": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz", + "integrity": "sha1-Z0yZdgkBw8QRJ3GjHlIdw0nMCew=", + "dev": true + }, + "node_modules/randomstring": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/randomstring/-/randomstring-1.2.1.tgz", + "integrity": "sha512-eMnfell9XuU3jfCx3f4xCaFAt0YMFPZhx9R3PSStmLarDKg5j5vivqKhf/8pvG+VX/YkxsckHK/VPUrKa5V07A==", + "dev": true, + "dependencies": { + "array-uniq": "1.0.2", + "randombytes": "2.0.3" + }, + "bin": { + "randomstring": "bin/randomstring" + }, + "engines": { + "node": "*" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "engines": { + "node": ">=6" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/table-layout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.1.tgz", + "integrity": "sha512-dEquqYNJiGwY7iPfZ3wbXDI944iqanTSchrACLL2nOB+1r+h1Nzu2eH+DuPPvWvm5Ry7iAPeFlgEtP5bIp5U7Q==", + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.1.tgz", + "integrity": "sha512-Z/JnaVEXv+A9xabHzN43FiiiWEE7gPCRXMrVmRm00tWbjZRul1iHm7ECzlyNq1p4a4ATXz+G9FJ3GqGOkOV3fg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/transform-file": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/transform-file/-/transform-file-1.0.1.tgz", + "integrity": "sha1-f5WYSs0j1Ov4q7R+6dg74WbRJoc=", + "dev": true, + "dependencies": { + "os-tmpdir": "^1.0.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", + "integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrapjs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.0.tgz", + "integrity": "sha512-Svqw723a3R34KvsMgpjFBYCgNOSdcW3mQFK4wIfhGQhtaFVOJmdYoXgi63ne3dTlWgatVcUc7t4HtQ/+bUVIzQ==", + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + } + }, "dependencies": { "@babel/code-frame": { "version": "7.8.3", @@ -27,33 +2454,74 @@ "js-tokens": "^4.0.0" } }, + "@eslint/eslintrc": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", + "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.0.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "@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==", "dev": true }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, "acorn": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", - "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true }, "acorn-jsx": { - "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 + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} }, "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -62,27 +2530,16 @@ "uri-js": "^4.2.2" } }, - "ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", - "dev": true, - "requires": { - "type-fest": "^0.11.0" - }, - "dependencies": { - "type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", - "dev": true - } - } + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -94,13 +2551,10 @@ } }, "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "array-back": { "version": "3.1.0", @@ -108,14 +2562,16 @@ "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==" }, "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz", + "integrity": "sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", - "is-string": "^1.0.5" + "es-abstract": "^1.19.1", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" } }, "array-uniq": { @@ -125,21 +2581,16 @@ "dev": true }, "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", + "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.19.0" } }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -160,6 +2611,16 @@ "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", "dev": true }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -175,27 +2636,6 @@ "supports-color": "^5.3.0" } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -249,15 +2689,9 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "confusing-browser-globals": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz", - "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", - "dev": true - }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", "dev": true }, "cosmiconfig": { @@ -312,12 +2746,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "deep-extend": { @@ -349,11 +2783,14 @@ "esutils": "^2.0.2" } }, - "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==", - "dev": true + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } }, "error-ex": { "version": "1.3.2", @@ -364,22 +2801,31 @@ } }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" } }, "es-to-primitive": { @@ -399,45 +2845,47 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz", - "integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.2.0.tgz", + "integrity": "sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^1.0.4", + "@humanwhocodes/config-array": "^0.6.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0", - "eslint-visitor-keys": "^1.1.0", - "espree": "^7.0.0", - "esquery": "^1.2.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^6.0.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.14", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -477,6 +2925,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -501,88 +2955,79 @@ } }, "eslint-config-airbnb-base": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.1.0.tgz", - "integrity": "sha512-+XCcfGyCnbzOnktDVhwsCAx+9DmrzEmuwxyHUJpw+kqBVT744OUBrB09khgFKlK1lshVww6qXGsYPZpavoNjJw==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "requires": { - "confusing-browser-globals": "^1.0.9", - "object.assign": "^4.1.0", - "object.entries": "^1.1.1" + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" } }, "eslint-import-resolver-node": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", - "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" + "debug": "^3.2.7", + "resolve": "^1.20.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, "eslint-module-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", - "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", + "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", "dev": true, "requires": { - "debug": "^2.6.9", + "debug": "^3.2.7", + "find-up": "^2.1.0", "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, "eslint-plugin-import": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz", - "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==", + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz", + "integrity": "sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==", "dev": true, "requires": { - "array-includes": "^3.0.3", - "array.prototype.flat": "^1.2.1", - "contains-path": "^0.1.0", + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.1", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.1", "has": "^1.0.3", + "is-core-module": "^2.8.0", + "is-glob": "^4.0.3", "minimatch": "^3.0.4", - "object.values": "^1.1.0", - "read-pkg-up": "^2.0.0", - "resolve": "^1.12.0" + "object.values": "^1.1.5", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.11.0" }, "dependencies": { "debug": { @@ -595,13 +3040,12 @@ } }, "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" } }, "ms": { @@ -613,77 +3057,71 @@ } }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", + "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" } }, "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } } }, "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==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true }, "espree": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz", - "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", + "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^8.5.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.0.0" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", - "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", - "dev": true - } } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { @@ -692,21 +3130,10 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "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==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-json-stable-stringify": { @@ -721,22 +3148,13 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "find-replace": { @@ -757,20 +3175,19 @@ } }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, "fs.realpath": { @@ -790,6 +3207,27 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -804,21 +3242,21 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" } }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "glub": { @@ -846,12 +3284,6 @@ } } }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", - "dev": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -861,30 +3293,30 @@ "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "has-symbols": "^1.0.2" } }, "ignore": { @@ -922,77 +3354,15 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "inquirer": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", - "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", "dev": true, "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^3.0.0", - "cli-cursor": "^3.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.5.3", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "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==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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==", - "dev": true, - "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==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" } }, "is-arrayish": { @@ -1000,17 +3370,48 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, + "is-core-module": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-extglob": { "version": "2.1.1", @@ -1018,50 +3419,72 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "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==", - "dev": true - }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" } }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", "dev": true }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, "requires": { - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.2" } }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "is-weakref": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", + "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } }, "isexe": { "version": "2.0.0", @@ -1075,13 +3498,12 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, "json-parse-even-better-errors": { @@ -1101,6 +3523,15 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -1116,18 +3547,6 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -1138,21 +3557,15 @@ "path-exists": "^3.0.0" } }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "minimatch": { @@ -1169,15 +3582,6 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "mock-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mock-cwd/-/mock-cwd-1.0.0.tgz", @@ -1194,12 +3598,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -1211,22 +3609,10 @@ "resolved": "https://registry.npmjs.org/newline/-/newline-0.0.3.tgz", "integrity": "sha1-D2p0STIj26BP59v7bNyAS/fkbdA=" }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", "dev": true }, "object-keys": { @@ -1236,39 +3622,37 @@ "dev": true }, "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" } }, "object.entries": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz", - "integrity": "sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", + "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" + "es-abstract": "^1.19.1" } }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" + "es-abstract": "^1.19.1" } }, "once": { @@ -1279,15 +3663,6 @@ "wrappy": "1" } }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -1314,6 +3689,21 @@ "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", "dev": true }, + "p-event": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", + "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "dev": true, + "requires": { + "p-timeout": "^3.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -1332,6 +3722,15 @@ "p-limit": "^1.1.0" } }, + "p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -1352,15 +3751,6 @@ "callsites": "^3.0.0" } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -1379,20 +3769,11 @@ "dev": true }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, "pg": { "version": "8.2.1", "resolved": "https://registry.npmjs.org/pg/-/pg-8.2.1.tgz", @@ -1433,7 +3814,8 @@ "version": "3.4.1", "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.4.1.tgz", "integrity": "sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ==", - "dev": true + "dev": true, + "requires": {} }, "pg-protocol": { "version": "1.5.0", @@ -1463,12 +3845,6 @@ "split2": "^3.1.1" } }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", @@ -1548,27 +3924,6 @@ "randombytes": "2.0.3" } }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -1586,17 +3941,18 @@ "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==" }, "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, "requires": { + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" } }, @@ -1605,56 +3961,25 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" } }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true - }, - "rxjs": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", - "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, "shebang-command": { @@ -1672,63 +3997,17 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - } - } - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" } }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, "split2": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", @@ -1738,81 +4017,42 @@ "readable-stream": "^3.0.0" } }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "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==", + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "safe-buffer": "~5.2.0" } }, "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimstart": "^1.0.0" - } - }, - "string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimend": "^1.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", "dev": true, "requires": { - "safe-buffer": "~5.2.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, "strip-bom": { @@ -1822,9 +4062,9 @@ "dev": true }, "strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { @@ -1835,58 +4075,6 @@ "has-flag": "^3.0.0" } }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, "table-layout": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.1.tgz", @@ -1922,21 +4110,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "transform-file": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/transform-file/-/transform-file-1.0.1.tgz", @@ -1946,11 +4119,17 @@ "os-tmpdir": "^1.0.0" } }, - "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true + "tsconfig-paths": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", + "integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } }, "type-check": { "version": "0.4.0", @@ -1962,9 +4141,9 @@ } }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "typical": { @@ -1972,10 +4151,22 @@ "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==" }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -1993,16 +4184,6 @@ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2012,6 +4193,19 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -2039,15 +4233,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index f9858e7..621b92f 100644 --- a/package.json +++ b/package.json @@ -58,11 +58,12 @@ }, "devDependencies": { "crlf": "^1.1.1", - "eslint": "^7.0.0", - "eslint-config-airbnb-base": "^14.0.0", - "eslint-plugin-import": "^2.18.2", + "eslint": "^8.2.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.25.3", "mock-cwd": "^1.0.0", "p-each-series": "^2.2.0", + "p-event": "^4.2.0", "pg": "^8.2.1" } } diff --git a/postgrator-cli.js b/postgrator-cli.js index cac5372..bf37684 100644 --- a/postgrator-cli.js +++ b/postgrator-cli.js @@ -123,7 +123,7 @@ async function getPassword(postgratorConfig) { } }; - const password = await new Promise((res) => rl.question('Password: ', res)); + const password = await new Promise((res) => { rl.question('Password: ', res); }); rl.history = rl.history.slice(1); rl.close(); console.log('\n'); diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index ae1ae12..45fdd64 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -3,6 +3,7 @@ const commandLineArgs = require('command-line-args'); const path = require('path'); const readline = require('readline'); const eachSeries = require('p-each-series'); +const fromEvent = require('p-event'); const { mockCwd } = require('mock-cwd'); const commandLineOptions = require('../command-line-options'); @@ -31,7 +32,7 @@ function removeVersionTable(options) { password: options.password, }; console.log(`\n----- ${config.driver} removing tables -----`); - const Postgrator = require('../node_modules/postgrator/postgrator.js'); + const Postgrator = require('postgrator'); const pg = new Postgrator(config); return pg.runQuery('DROP TABLE IF EXISTS schemaversion, animal, person').catch((err) => { @@ -44,7 +45,6 @@ function getDefaultOptions() { return commandLineArgs(optionList, { partial: true }); } - /* Build a set of tests for a given config. This will be helpful when we want to run the same kinds of tests on postgres, mysql, sql server, etc. @@ -262,7 +262,7 @@ function buildTestsForOptions(options) { postgratorCli.run(options); // this error is not thrown down the chain so it cannot be caught - const err = await new Promise((res) => process.once('uncaughtException', res)); + const err = await fromEvent(process, 'uncaughtException'); assert(err, 'ERR_INVALID_ARG_TYPE'); restoreOptions(); }); @@ -357,7 +357,6 @@ const options = { // Command line parameters buildTestsForOptions(options); - // Run the tests console.log(`Running ${tests.length} tests`); eachSeries(tests, (testFunc) => { From 16df32ac1b63d0d67f7621736f8d40ad0b3eca83 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Sun, 21 Nov 2021 12:03:29 +0900 Subject: [PATCH 05/32] Remove redundant postgrator.json --- postgrator.json | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 postgrator.json diff --git a/postgrator.json b/postgrator.json deleted file mode 100644 index 984bcff..0000000 --- a/postgrator.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "migrationDirectory": "test/migrations", - "driver": "pg", - "host": "127.0.0.1", - "port": 5432, - "database": "postgrator", - "username": "postgrator", - "password": "postgrator" -} From bb8e7f4e61704edb221554420c458c5d4b45dceb Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Sun, 21 Nov 2021 13:27:47 +0900 Subject: [PATCH 06/32] Make type module --- .eslintrc | 5 ++ .github/workflows/nodejs.yml | 2 +- command-line-options.js | 14 +-- index.js | 10 +-- package-lock.json | 89 +++++++++---------- package.json | 6 +- postgrator-cli.js | 30 +++---- .../{.postgratorrc.js => .postgratorrc.cjs} | 0 test/migrations/package.json | 3 + test/postgrator-cli-tests.js | 67 +++++++------- 10 files changed, 116 insertions(+), 110 deletions(-) rename test/config-with-non-existing-directory/{.postgratorrc.js => .postgratorrc.cjs} (100%) create mode 100644 test/migrations/package.json diff --git a/.eslintrc b/.eslintrc index dbec440..80c8552 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,11 @@ { "extends": "airbnb-base", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "env": { "es6": true, "node": true, diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index e772a1c..9f8f963 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x] + node-version: [12.x, 14.x, 16.x] steps: - uses: actions/checkout@v2 diff --git a/command-line-options.js b/command-line-options.js index 89f274e..654e9a4 100644 --- a/command-line-options.js +++ b/command-line-options.js @@ -1,8 +1,10 @@ /* eslint max-len: 0 */ -const pjson = require('./package.json'); +import { readFileSync } from 'fs'; -const DEFAULT_MIGRATION_DIRECTORY = 'migrations'; +const pjson = JSON.parse(readFileSync(new URL('./package.json', import.meta.url))); + +export const DEFAULT_MIGRATION_DIRECTORY = 'migrations'; /* eslint-disable object-property-newline */ @@ -57,7 +59,9 @@ const optionDefinitions = [ }, ]; -const sections = [ +export { optionDefinitions as optionList }; + +export const sections = [ { header: 'Postgrator CLI', content: { @@ -100,7 +104,3 @@ const sections = [ ], }, ]; - -module.exports.sections = sections; -module.exports.optionList = optionDefinitions; -module.exports.DEFAULT_MIGRATION_DIRECTORY = DEFAULT_MIGRATION_DIRECTORY; diff --git a/index.js b/index.js index 893a4bc..520b240 100755 --- a/index.js +++ b/index.js @@ -1,13 +1,11 @@ #!/usr/bin/env node -const commandLineArgs = require('command-line-args'); -const postgratorCli = require('./postgrator-cli'); -const commandLineOptions = require('./command-line-options'); - -const optionList = commandLineOptions.optionList; // eslint-disable-line prefer-destructuring +import commandLineArgs from 'command-line-args'; +import { run } from './postgrator-cli.js'; // eslint-disable-line import/extensions +import { optionList } from './command-line-options.js'; // eslint-disable-line import/extensions const options = commandLineArgs(optionList); -postgratorCli.run(options).catch((err) => { +run(options).catch((err) => { console.log(`Error: ${err.message}`); process.exit(1); }); diff --git a/package-lock.json b/package-lock.json index 53e89d7..4d2a561 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,12 +19,13 @@ }, "devDependencies": { "crlf": "^1.1.1", + "dirname-filename-esm": "^1.1.1", "eslint": "^8.2.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.3", "mock-cwd": "^1.0.0", - "p-each-series": "^2.2.0", - "p-event": "^4.2.0", + "p-each-series": "^3.0.0", + "p-event": "^5.0.1", "pg": "^8.2.1" }, "engines": { @@ -471,6 +472,12 @@ "node": ">= 0.4" } }, + "node_modules/dirname-filename-esm": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/dirname-filename-esm/-/dirname-filename-esm-1.1.1.tgz", + "integrity": "sha512-BWBkv157Cf/z7Hjod2v2JS7vyC36Dk1QQolAtuLjpl8RBlv7Z92X7+Ufc2cjfR/B3iJUiK0QmGZkgtsmmLz0Tw==", + "dev": true + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1667,41 +1674,32 @@ } }, "node_modules/p-each-series": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", - "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-3.0.0.tgz", + "integrity": "sha512-lastgtAdoH9YaLyDa5i5z64q+kzOcQHsQ5SsZJD3q0VEyI8mq872S3geuNbRUQLVAE9siMfgKrpj7MloKFHruw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz", + "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==", "dev": true, "dependencies": { - "p-timeout": "^3.1.0" + "p-timeout": "^5.0.2" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -1727,15 +1725,15 @@ } }, "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.0.2.tgz", + "integrity": "sha512-sEmji9Yaq+Tw+STwsGAE56hf7gMy9p0tQfJojIAamB7WHJYJKf1qlsg9jqBWG8q9VCxKPhZaP/AcXwEoBcYQhQ==", "dev": true, - "dependencies": { - "p-finally": "^1.0.0" - }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-try": { @@ -2774,6 +2772,12 @@ "object-keys": "^1.0.12" } }, + "dirname-filename-esm": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/dirname-filename-esm/-/dirname-filename-esm-1.1.1.tgz", + "integrity": "sha512-BWBkv157Cf/z7Hjod2v2JS7vyC36Dk1QQolAtuLjpl8RBlv7Z92X7+Ufc2cjfR/B3iJUiK0QmGZkgtsmmLz0Tw==", + "dev": true + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3684,26 +3688,20 @@ "dev": true }, "p-each-series": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", - "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-3.0.0.tgz", + "integrity": "sha512-lastgtAdoH9YaLyDa5i5z64q+kzOcQHsQ5SsZJD3q0VEyI8mq872S3geuNbRUQLVAE9siMfgKrpj7MloKFHruw==", "dev": true }, "p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz", + "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==", "dev": true, "requires": { - "p-timeout": "^3.1.0" + "p-timeout": "^5.0.2" } }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -3723,13 +3721,10 @@ } }, "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.0.2.tgz", + "integrity": "sha512-sEmji9Yaq+Tw+STwsGAE56hf7gMy9p0tQfJojIAamB7WHJYJKf1qlsg9jqBWG8q9VCxKPhZaP/AcXwEoBcYQhQ==", + "dev": true }, "p-try": { "version": "1.0.0", diff --git a/package.json b/package.json index 621b92f..4ef2848 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "4.0.0", "description": "Command line interface for Postgrator", "author": "Matti Lehtinen (https://twitter.com/MattiLehtinen)", + "type": "module", "bin": { "postgrator": "./index.js" }, @@ -58,12 +59,13 @@ }, "devDependencies": { "crlf": "^1.1.1", + "dirname-filename-esm": "^1.1.1", "eslint": "^8.2.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.3", "mock-cwd": "^1.0.0", - "p-each-series": "^2.2.0", - "p-event": "^4.2.0", + "p-each-series": "^3.0.0", + "p-event": "^5.0.1", "pg": "^8.2.1" } } diff --git a/postgrator-cli.js b/postgrator-cli.js index bf37684..4947058 100644 --- a/postgrator-cli.js +++ b/postgrator-cli.js @@ -1,13 +1,14 @@ -const fs = require('fs'); -const path = require('path'); -const getUsage = require('command-line-usage'); -const Postgrator = require('postgrator'); -const { cosmiconfig } = require('cosmiconfig'); -const pjson = require('./package.json'); -const commandLineOptions = require('./command-line-options'); +import { existsSync, readFileSync } from 'fs'; +import path from 'path'; +import getUsage from 'command-line-usage'; +import Postgrator from 'postgrator'; +import { cosmiconfig } from 'cosmiconfig'; +import { DEFAULT_MIGRATION_DIRECTORY, sections } from './command-line-options.js'; // eslint-disable-line import/extensions + +const pjson = JSON.parse(readFileSync(new URL('./package.json', import.meta.url))); function printUsage() { - const usage = getUsage(commandLineOptions.sections); + const usage = getUsage(sections); console.log(usage); } @@ -97,7 +98,7 @@ async function getPassword(postgratorConfig) { } // Ask password if it is not set - const readline = require('readline'); + const readline = (await import('readline')).default; const rl = readline.createInterface({ input: process.stdin, @@ -132,7 +133,8 @@ async function getPassword(postgratorConfig) { /* -------------------------- Main ---------------------------------- */ -async function run(commandLineArgs) { +// eslint-disable-next-line import/prefer-default-export +export async function run(commandLineArgs) { // Print help if requested if (commandLineArgs.help) { printUsage(); @@ -153,12 +155,12 @@ async function run(commandLineArgs) { } if (!postgratorConfig.migrationDirectory) { - postgratorConfig.migrationDirectory = commandLineOptions.DEFAULT_MIGRATION_DIRECTORY; + postgratorConfig.migrationDirectory = DEFAULT_MIGRATION_DIRECTORY; } postgratorConfig.migrationDirectory = getAbsolutePath(postgratorConfig.migrationDirectory); - if (!fs.existsSync(postgratorConfig.migrationDirectory)) { - if (!commandLineArgs.config && commandLineArgs['migration-directory'] === commandLineOptions.DEFAULT_MIGRATION_DIRECTORY) { + if (!existsSync(postgratorConfig.migrationDirectory)) { + if (!commandLineArgs.config && commandLineArgs['migration-directory'] === DEFAULT_MIGRATION_DIRECTORY) { printUsage(); } return Promise.reject(new Error(`Directory "${postgratorConfig.migrationDirectory}" does not exist.`)); @@ -190,5 +192,3 @@ async function run(commandLineArgs) { return migrate(postgrator, migrateTo, postgratorConfig.migrationDirectory) .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); } - -module.exports.run = run; diff --git a/test/config-with-non-existing-directory/.postgratorrc.js b/test/config-with-non-existing-directory/.postgratorrc.cjs similarity index 100% rename from test/config-with-non-existing-directory/.postgratorrc.js rename to test/config-with-non-existing-directory/.postgratorrc.cjs diff --git a/test/migrations/package.json b/test/migrations/package.json new file mode 100644 index 0000000..5bbefff --- /dev/null +++ b/test/migrations/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 45fdd64..8fcf8a4 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -1,16 +1,19 @@ -const assert = require('assert'); -const commandLineArgs = require('command-line-args'); -const path = require('path'); -const readline = require('readline'); -const eachSeries = require('p-each-series'); -const fromEvent = require('p-event'); -const { mockCwd } = require('mock-cwd'); +import assert from 'assert'; +import commandLineArgs from 'command-line-args'; +import path from 'path'; +import readline from 'readline'; +import eachSeries from 'p-each-series'; +import { pEvent as fromEvent } from 'p-event'; +import { dirname } from 'dirname-filename-esm'; -const commandLineOptions = require('../command-line-options'); -const postgratorCli = require('../postgrator-cli'); +import { mockCwd } from 'mock-cwd'; + +import { optionList } from '../command-line-options.js'; // eslint-disable-line import/extensions +import { run } from '../postgrator-cli.js'; // eslint-disable-line import/extensions + +const __dirname = dirname(import.meta); // eslint-disable-line no-underscore-dangle const MAX_REVISION = 5; -const optionList = commandLineOptions.optionList; // eslint-disable-line prefer-destructuring const originalConsoleLog = console.log; const tests = []; @@ -21,7 +24,7 @@ function consoleLogCapture(...args) { log += [].slice.call(args); } -function removeVersionTable(options) { +async function removeVersionTable(options) { const config = { migrationDirectory: options['migration-directory'], driver: options.driver, @@ -32,7 +35,7 @@ function removeVersionTable(options) { password: options.password, }; console.log(`\n----- ${config.driver} removing tables -----`); - const Postgrator = require('postgrator'); + const Postgrator = (await import('postgrator')).default; const pg = new Postgrator(config); return pg.runQuery('DROP TABLE IF EXISTS schemaversion, animal, person').catch((err) => { @@ -60,7 +63,7 @@ function buildTestsForOptions(options) { console.log('\n----- Reset migrations-----'); const originalTo = options.to; options.to = 0; - await postgratorCli.run(options); + await run(options); options.to = originalTo; } @@ -74,7 +77,7 @@ function buildTestsForOptions(options) { options.help = true; console.log = consoleLogCapture; - const migrations = await postgratorCli.run(options); + const migrations = await run(options); console.log = originalConsoleLog; restoreOptions(); assert.strictEqual(migrations, undefined); @@ -86,7 +89,7 @@ function buildTestsForOptions(options) { options.version = true; console.log = consoleLogCapture; - const migrations = await postgratorCli.run(options); + const migrations = await run(options); console.log = originalConsoleLog; restoreOptions(); assert.strictEqual(migrations, undefined); @@ -95,7 +98,7 @@ function buildTestsForOptions(options) { tests.push(async () => { console.log('\n----- testing migration to 003 -----'); - const migrations = await postgratorCli.run(options); + const migrations = await run(options); assert.equal(migrations.length, 3); assert.equal(migrations[2].version, 3); }); @@ -104,7 +107,7 @@ function buildTestsForOptions(options) { console.log('\n----- testing migration to 000 with conflict detection-----'); options.to = 0; - const migrations = await postgratorCli.run(options); + const migrations = await run(options); restoreOptions(); assert.equal(migrations.length, 3); assert.equal(migrations[2].version, 1); @@ -114,7 +117,7 @@ function buildTestsForOptions(options) { tests.push(async () => { console.log('\n----- testing migration to 001 -----'); options.to = 1; - const migrations = await postgratorCli.run(options); + const migrations = await run(options); restoreOptions(); assert.equal(migrations.length, 1); assert.equal(migrations[0].version, 1); @@ -128,7 +131,7 @@ function buildTestsForOptions(options) { options.database = ''; return mockCwd(path.join(__dirname, 'sample-config'), async () => { - const migrations = await postgratorCli.run(options); + const migrations = await run(options); restoreOptions(); assert.equal(migrations[migrations.length - 1].version, 3); }); @@ -141,7 +144,7 @@ function buildTestsForOptions(options) { options.database = ''; return mockCwd(path.join(__dirname, 'sample-config'), async () => { - const migrations = await postgratorCli.run(options); + const migrations = await run(options); restoreOptions(); assert.equal(migrations[0].version, 3); assert.equal(migrations[0].action, 'undo'); @@ -154,7 +157,7 @@ function buildTestsForOptions(options) { console.log('\n----- testing using latest revision without specifying to-----'); options.to = getDefaultOptions().to; // is 'max' - const migrations = await postgratorCli.run(options); + const migrations = await run(options); restoreOptions(); assert.equal(migrations.length, MAX_REVISION); assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); @@ -166,7 +169,7 @@ function buildTestsForOptions(options) { options.to = ''; return mockCwd(path.join(__dirname, 'sample-config'), async () => { - const migrations = await postgratorCli.run(options); + const migrations = await run(options); restoreOptions(); assert.equal(migrations.length, 0); // returns number of applied migrations }); @@ -179,7 +182,7 @@ function buildTestsForOptions(options) { console.log = consoleLogCapture; try { - await postgratorCli.run(options); + await run(options); } catch (err) { console.log = originalConsoleLog; restoreOptions(); @@ -196,7 +199,7 @@ function buildTestsForOptions(options) { console.log = consoleLogCapture; try { - await postgratorCli.run(options); + await run(options); } catch (err) { console.log = originalConsoleLog; restoreOptions(); @@ -213,7 +216,7 @@ function buildTestsForOptions(options) { console.log = consoleLogCapture; return mockCwd(path.join(__dirname, 'config-with-non-existing-directory'), async () => { try { - await postgratorCli.run(options); + await run(options); } catch (err) { console.log = originalConsoleLog; restoreOptions(); @@ -233,7 +236,7 @@ function buildTestsForOptions(options) { options.to = 'max'; return mockCwd(path.join(__dirname, 'config-with-non-existing-directory'), async () => { - const migrations = await postgratorCli.run(options); + const migrations = await run(options); restoreOptions(); assert.equal(migrations.length, MAX_REVISION); assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); @@ -249,7 +252,7 @@ function buildTestsForOptions(options) { options.database = ''; return mockCwd(path.join(__dirname, 'config-with-other-directory'), async () => { - const migrations = await postgratorCli.run(options); + const migrations = await run(options); assert(migrations.length, 2); await resetMigrations(); restoreOptions(); @@ -260,7 +263,7 @@ function buildTestsForOptions(options) { console.log('\n----- testing empty password-----'); options.password = ''; - postgratorCli.run(options); + run(options); // this error is not thrown down the chain so it cannot be caught const err = await fromEvent(process, 'uncaughtException'); assert(err, 'ERR_INVALID_ARG_TYPE'); @@ -283,7 +286,7 @@ function buildTestsForOptions(options) { }; }; - return postgratorCli.run(options).catch((err) => { + return run(options).catch((err) => { restoreOptions(); assert(passwordAsked); assert(err.length > 0); @@ -309,7 +312,7 @@ function buildTestsForOptions(options) { }; return mockCwd(path.join(__dirname, 'config-without-password'), async () => { - const migrations = await postgratorCli.run(options); + const migrations = await run(options); assert(migrations.length); assert(passwordAsked); await resetMigrations(); @@ -323,7 +326,7 @@ function buildTestsForOptions(options) { const defaultOptions = getDefaultOptions(); console.log = consoleLogCapture; - return postgratorCli.run(defaultOptions).catch((err) => { + return run(defaultOptions).catch((err) => { console.log = originalConsoleLog; restoreOptions(); assert.ok(log.indexOf('Examples') >= 0, 'No help was displayed'); @@ -336,7 +339,7 @@ function buildTestsForOptions(options) { options.to = 3; options['migration-directory'] = 'test/conflicting-migrations'; - return postgratorCli.run(options).catch((err) => { + return run(options).catch((err) => { restoreOptions(); assert(err.message.indexOf('Two migrations found with version 2 and action do') >= 0, 'No migration conflicts were detected'); }); From b922d237b9db5f583be6290d606a0ee64324d1e8 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Sun, 21 Nov 2021 17:20:39 +0900 Subject: [PATCH 07/32] Update command-line dependencies --- package-lock.json | 48 +++++++++++++++++++++++------------------------ package.json | 4 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4d2a561..6ac5f26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { - "name": "@perrin4869/postgrator-cli", - "version": "5.0.0-beta.0", + "name": "postgrator-cli", + "version": "4.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@perrin4869/postgrator-cli", - "version": "5.0.0-beta.0", + "name": "postgrator-cli", + "version": "4.0.0", "license": "MIT", "dependencies": { - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.0", + "command-line-args": "^5.2.0", + "command-line-usage": "^6.1.1", "cosmiconfig": "^7.0.1", "postgrator": "^4.0.0" }, @@ -308,11 +308,11 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "node_modules/command-line-args": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.1.1.tgz", - "integrity": "sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-4zqtU1hYsSJzcJBOcNZIbW5Fbk9BkjCp1pZVhQKoRaWL5J7N4XphDLwo8aWwdQpTugxwu+jf9u2ZhkXiqp5Z6A==", "dependencies": { - "array-back": "^3.0.1", + "array-back": "^3.1.0", "find-replace": "^3.0.0", "lodash.camelcase": "^4.3.0", "typical": "^4.0.0" @@ -322,13 +322,13 @@ } }, "node_modules/command-line-usage": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.0.tgz", - "integrity": "sha512-Ew1clU4pkUeo6AFVDFxCbnN7GIZfXl48HIOQeFQnkO3oOqvpI7wdqtLRwv9iOCZ/7A+z4csVZeiDdEcj8g6Wiw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.1.tgz", + "integrity": "sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA==", "dependencies": { - "array-back": "^4.0.0", + "array-back": "^4.0.1", "chalk": "^2.4.2", - "table-layout": "^1.0.0", + "table-layout": "^1.0.1", "typical": "^5.2.0" }, "engines": { @@ -2648,24 +2648,24 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "command-line-args": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.1.1.tgz", - "integrity": "sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-4zqtU1hYsSJzcJBOcNZIbW5Fbk9BkjCp1pZVhQKoRaWL5J7N4XphDLwo8aWwdQpTugxwu+jf9u2ZhkXiqp5Z6A==", "requires": { - "array-back": "^3.0.1", + "array-back": "^3.1.0", "find-replace": "^3.0.0", "lodash.camelcase": "^4.3.0", "typical": "^4.0.0" } }, "command-line-usage": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.0.tgz", - "integrity": "sha512-Ew1clU4pkUeo6AFVDFxCbnN7GIZfXl48HIOQeFQnkO3oOqvpI7wdqtLRwv9iOCZ/7A+z4csVZeiDdEcj8g6Wiw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.1.tgz", + "integrity": "sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA==", "requires": { - "array-back": "^4.0.0", + "array-back": "^4.0.1", "chalk": "^2.4.2", - "table-layout": "^1.0.0", + "table-layout": "^1.0.1", "typical": "^5.2.0" }, "dependencies": { diff --git a/package.json b/package.json index 4ef2848..71628df 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,8 @@ ], "license": "MIT", "dependencies": { - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.0", + "command-line-args": "^5.2.0", + "command-line-usage": "^6.1.1", "cosmiconfig": "^7.0.1", "postgrator": "^4.0.0" }, From 91b2118ed0670d850edd708acdf3984dcb958214 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Sun, 21 Nov 2021 17:32:59 +0900 Subject: [PATCH 08/32] Small improvements --- .eslintrc => .eslintrc.json | 4 ---- .gitignore | 1 + package-lock.json | 2 +- package.json | 4 ++-- 4 files changed, 4 insertions(+), 7 deletions(-) rename .eslintrc => .eslintrc.json (96%) diff --git a/.eslintrc b/.eslintrc.json similarity index 96% rename from .eslintrc rename to .eslintrc.json index 80c8552..4ef77a0 100644 --- a/.eslintrc +++ b/.eslintrc.json @@ -1,17 +1,13 @@ { "extends": "airbnb-base", - "parserOptions": { "ecmaVersion": "latest", "sourceType": "module" }, - "env": { - "es6": true, "node": true, "browser": false }, - "rules": { "arrow-body-style": "off", "comma-dangle": ["error", "always-multiline"], diff --git a/.gitignore b/.gitignore index 07e6e47..4d9a859 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /node_modules +.eslintcache diff --git a/package-lock.json b/package-lock.json index 6ac5f26..b3718a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "pg": "^8.2.1" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.2.0" } }, "node_modules/@babel/code-frame": { diff --git a/package.json b/package.json index 71628df..fc1d170 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "postgrator": "./index.js" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.2.0" }, "scripts": { - "lint": "eslint .", + "lint": "eslint --cache .", "pretest": "npm run lint", "test": "npm run tests", "tests": "node test/postgrator-cli-tests.js", From fefe4338ab57a0f06b6b93a2bf5218b44dbf5518 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Sun, 21 Nov 2021 17:43:28 +0900 Subject: [PATCH 09/32] Add docker-compose.yml --- .github/dependabot.yml | 7 ++++++ .github/workflows/nodejs.yml | 29 ------------------------- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++ .github/workflows/test.yml | 41 +++++++++++++++++++++++++++++++++++ docker-compose.yml | 10 +++++++++ 5 files changed, 95 insertions(+), 29 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/nodejs.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml create mode 100644 docker-compose.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2902a7b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: "/" + versioning-strategy: increase + schedule: + interval: daily diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index 9f8f963..0000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build --if-present - - run: npm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..30c3f33 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: release +on: + release: + types: [published] + +jobs: + publish: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js 16 + uses: actions/setup-node@v2 + with: + node-version: 16 + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + + - name: Start postgres + run: docker-compose up -d + + - name: Test + run: npm test + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + + - name: Stop postgres + run: docker-compose down diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7f0a2a1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: test +on: + push: + branches: + - master + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: + - 12.x + - 14.x + - 16.x + redis-version: [6] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + + - name: Start postgres + run: docker-compose up -d + + - name: Test + run: npm test + + - name: Stop postgres + run: docker-compose down diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1e86dfd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3' +services: + database: + image: ubuntu/postgres:latest # use latest official postgres version + ports: + - 5432:5432 + environment: + - POSTGRES_USER=postgrator + - POSTGRES_PASSWORD=postgrator + - POSTGRES_DB=postgrator From c6a8ddec2318daf159282dcbd52dd14a3e4234e9 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 22 Nov 2021 12:51:01 +0900 Subject: [PATCH 10/32] Upgrade to postgrator 5 --- index.js | 5 +- lib/clients/index.js | 8 + lib/clients/pg.js | 15 ++ .../command-line-options.js | 16 +- postgrator-cli.js => lib/postgrator-cli.js | 87 ++++++--- package-lock.json | 184 +++++++++--------- package.json | 15 +- .../.postgratorrc.cjs | 4 +- .../.postgratorrc.json | 9 - .../.postgratorrc.json | 2 +- test/postgrator-cli-tests.js | 76 ++------ test/sample-config/.postgratorrc.json | 2 +- 12 files changed, 229 insertions(+), 194 deletions(-) create mode 100644 lib/clients/index.js create mode 100644 lib/clients/pg.js rename command-line-options.js => lib/command-line-options.js (82%) rename postgrator-cli.js => lib/postgrator-cli.js (68%) rename test/{config-with-non-existing-directory => config-with-other-directory}/.postgratorrc.cjs (69%) delete mode 100644 test/config-with-other-directory/.postgratorrc.json diff --git a/index.js b/index.js index 520b240..f5825e4 100755 --- a/index.js +++ b/index.js @@ -1,8 +1,9 @@ #!/usr/bin/env node import commandLineArgs from 'command-line-args'; -import { run } from './postgrator-cli.js'; // eslint-disable-line import/extensions -import { optionList } from './command-line-options.js'; // eslint-disable-line import/extensions + +import { run } from './lib/postgrator-cli.js'; // eslint-disable-line import/extensions +import { optionList } from './lib/command-line-options.js'; // eslint-disable-line import/extensions const options = commandLineArgs(optionList); run(options).catch((err) => { diff --git a/lib/clients/index.js b/lib/clients/index.js new file mode 100644 index 0000000..225a015 --- /dev/null +++ b/lib/clients/index.js @@ -0,0 +1,8 @@ +export default async (driver, config) => { + const { default: getClient } = await ( + driver === 'pg' + ? import('./pg.js') // eslint-disable-line import/extensions + : Promise.reject(new Error('The supported drivers are pg')) + ); + return getClient(config); +}; diff --git a/lib/clients/pg.js b/lib/clients/pg.js new file mode 100644 index 0000000..87c8540 --- /dev/null +++ b/lib/clients/pg.js @@ -0,0 +1,15 @@ +import pg from 'pg'; + +// secure does not apply here +export default ({ username, secure, ...config }) => { + const client = new pg.Client({ + ...config, + ...username !== undefined ? { user: username } : {}, + }); + + return { + connect: () => client.connect(), + query: (query) => client.query(query), + end: () => client.end(), + }; +}; diff --git a/command-line-options.js b/lib/command-line-options.js similarity index 82% rename from command-line-options.js rename to lib/command-line-options.js index 654e9a4..643a8f4 100644 --- a/command-line-options.js +++ b/lib/command-line-options.js @@ -2,9 +2,9 @@ import { readFileSync } from 'fs'; -const pjson = JSON.parse(readFileSync(new URL('./package.json', import.meta.url))); +const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); -export const DEFAULT_MIGRATION_DIRECTORY = 'migrations'; +export const DEFAULT_MIGRATION_PATTERN = 'migrations/*'; /* eslint-disable object-property-newline */ @@ -38,8 +38,16 @@ const optionDefinitions = [ alias: 'p', type: String, typeLabel: '[{underline password}]', defaultValue: '', }, { - name: 'migration-directory', description: "A directory to run migration files from. Default: 'migrations''", - alias: 'm', type: String, typeLabel: '{underline directory}', defaultValue: 'migrations', + name: 'migration-pattern', description: "A pattern matching files to run migration files from. Default: 'migrations/*''", + alias: 'm', type: String, typeLabel: '{underline directory}', defaultValue: DEFAULT_MIGRATION_PATTERN, + }, + { + name: 'schema-table', description: 'Table created to track schema version.', + alias: 't', type: String, defaultValue: 'schemaversion', + }, + { + name: 'validate-checksum', description: 'Validates checksum of existing SQL migration files already run prior to executing migrations.', + alias: 'c', type: Boolean, defaultValue: true, }, { name: 'secure', description: 'Secure connection (Azure). Default: false', diff --git a/postgrator-cli.js b/lib/postgrator-cli.js similarity index 68% rename from postgrator-cli.js rename to lib/postgrator-cli.js index 4947058..c4506f6 100644 --- a/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -1,11 +1,13 @@ -import { existsSync, readFileSync } from 'fs'; +import { readFileSync } from 'fs'; import path from 'path'; import getUsage from 'command-line-usage'; import Postgrator from 'postgrator'; import { cosmiconfig } from 'cosmiconfig'; -import { DEFAULT_MIGRATION_DIRECTORY, sections } from './command-line-options.js'; // eslint-disable-line import/extensions +import tap from 'p-tap'; +import getClient from './clients/index.js'; // eslint-disable-line import/extensions +import { DEFAULT_MIGRATION_PATTERN, sections } from './command-line-options.js'; // eslint-disable-line import/extensions -const pjson = JSON.parse(readFileSync(new URL('./package.json', import.meta.url))); +const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); function printUsage() { const usage = getUsage(sections); @@ -33,17 +35,53 @@ function getAbsolutePath(fileOrDirectory) { function getPostgratorConfigFromCommandLineArgs(commandLineArgs) { return { - migrationDirectory: commandLineArgs['migration-directory'], driver: commandLineArgs.driver, + database: commandLineArgs.database, + migrationPattern: commandLineArgs['migration-pattern'], + schemaTable: commandLineArgs['schema-table'], + validateChecksum: commandLineArgs['validate-checksum'], + }; +} + +function getClientConfigFromCommandLineArgs(commandLineArgs) { + return { host: commandLineArgs.host, port: commandLineArgs.port, database: commandLineArgs.database, username: commandLineArgs.username, password: commandLineArgs.password, - options: { encrypt: commandLineArgs.secure || false }, + secure: commandLineArgs.secure, }; } +function pick(keys, obj) { + return Object.keys(obj).reduce((acc, key) => { + if (keys.some((k) => k === key)) acc[key] = obj[key]; + return acc; + }, {}); +} + +function getPostgratorConfigFromConfigFile(config) { + return pick([ + 'driver', + 'database', + 'migrationPattern', + 'schemaTable', + 'validateChecksum', + ], config); +} + +function getClientConfigFromConfigFile(config) { + return pick([ + 'host', + 'port', + 'database', + 'username', + 'password', + 'secure', + ], config); +} + /** * Gets version to migrate to as number * @param {string|number} to Version or "max" @@ -57,18 +95,18 @@ function getMigrateToVersion(to, postgrator) { return Promise.resolve(to); } -function checkMigrations(migrations, migrationDirectory) { +function checkMigrations(migrations, migrationPattern) { if (!migrations || !migrations.length) { - throw new Error(`No migration files found from "${migrationDirectory}"`); + throw new Error(`No migration files found from "${migrationPattern}"`); } } -function migrate(postgrator, to, migrationDirectory) { +function migrate(postgrator, to, migrationPattern) { let toVersion; return postgrator.getMigrations() .then((migrations) => { - checkMigrations(migrations, migrationDirectory); + checkMigrations(migrations, migrationPattern); }) .then(() => { return getMigrateToVersion(to, postgrator); @@ -148,32 +186,34 @@ export async function run(commandLineArgs) { } let postgratorConfig = getPostgratorConfigFromCommandLineArgs(commandLineArgs); + let clientConfig = getClientConfigFromCommandLineArgs(commandLineArgs); if (!commandLineArgs['no-config']) { const explorer = cosmiconfig('postgrator'); const result = await explorer.search(); - postgratorConfig = (!result || result.isEmpty) ? postgratorConfig : result.config; - } - - if (!postgratorConfig.migrationDirectory) { - postgratorConfig.migrationDirectory = DEFAULT_MIGRATION_DIRECTORY; + postgratorConfig = (!result || result.isEmpty) ? postgratorConfig : getPostgratorConfigFromConfigFile(result.config); + clientConfig = (!result || result.isEmpty) ? clientConfig : getClientConfigFromConfigFile(result.config); } - postgratorConfig.migrationDirectory = getAbsolutePath(postgratorConfig.migrationDirectory); - if (!existsSync(postgratorConfig.migrationDirectory)) { - if (!commandLineArgs.config && commandLineArgs['migration-directory'] === DEFAULT_MIGRATION_DIRECTORY) { - printUsage(); - } - return Promise.reject(new Error(`Directory "${postgratorConfig.migrationDirectory}" does not exist.`)); + if (!postgratorConfig.migrationPattern) { + postgratorConfig.migrationPattern = DEFAULT_MIGRATION_PATTERN; } + postgratorConfig.migrationPattern = getAbsolutePath(postgratorConfig.migrationPattern); const migrateTo = getMigrateToNumber(commandLineArgs.to); - postgratorConfig.password = await getPassword(postgratorConfig); + clientConfig.password = await getPassword(clientConfig); + + // eslint-disable-next-line import/extensions + const client = await getClient(postgratorConfig.driver, clientConfig); + await client.connect(); // Create postgrator let postgrator; try { - postgrator = new Postgrator(postgratorConfig); + postgrator = new Postgrator({ + ...postgratorConfig, + execQuery: client.query, + }); } catch (err) { printUsage(); return Promise.reject(err); @@ -189,6 +229,7 @@ export async function run(commandLineArgs) { (migration) => logMessage(`running ${migration.filename}`), ); - return migrate(postgrator, migrateTo, postgratorConfig.migrationDirectory) + return migrate(postgrator, migrateTo, postgratorConfig.migrationPattern) + .then(tap(() => client.end())) .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); } diff --git a/package-lock.json b/package-lock.json index b3718a1..60c06c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "command-line-args": "^5.2.0", "command-line-usage": "^6.1.1", "cosmiconfig": "^7.0.1", - "postgrator": "^4.0.0" + "p-tap": "^4.0.0", + "postgrator": "^5.0.0" }, "bin": { "postgrator": "index.js" @@ -20,16 +21,24 @@ "devDependencies": { "crlf": "^1.1.1", "dirname-filename-esm": "^1.1.1", - "eslint": "^8.2.0", + "eslint": "^8.3.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.3", "mock-cwd": "^1.0.0", "p-each-series": "^3.0.0", "p-event": "^5.0.1", - "pg": "^8.2.1" + "pg": "^8.7.1" }, "engines": { "node": ">=12.2.0" + }, + "peerDependencies": { + "pg": "^8.7.1" + }, + "peerDependenciesMeta": { + "pg": { + "optional": true + } } }, "node_modules/@babel/code-frame": { @@ -570,9 +579,9 @@ } }, "node_modules/eslint": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.2.0.tgz", - "integrity": "sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", + "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.0.4", @@ -584,10 +593,10 @@ "doctrine": "^3.0.0", "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^6.0.0", + "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.1.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -740,9 +749,9 @@ "dev": true }, "node_modules/eslint-scope": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", - "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -884,14 +893,14 @@ } }, "node_modules/espree": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", - "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", + "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", "dev": true, "dependencies": { - "acorn": "^8.5.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.0.0" + "eslint-visitor-keys": "^3.1.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1059,9 +1068,9 @@ } }, "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1567,11 +1576,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node_modules/newline": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/newline/-/newline-0.0.3.tgz", - "integrity": "sha1-D2p0STIj26BP59v7bNyAS/fkbdA=" - }, "node_modules/object-inspect": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", @@ -1724,6 +1728,17 @@ "node": ">=4" } }, + "node_modules/p-tap": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-tap/-/p-tap-4.0.0.tgz", + "integrity": "sha512-G7GTcera93GkIIt5iM57ITilyMR1nSlGKjwSEifhP7F8I2QtOsHbokoRulAgHW2V5JxLS5Tg/7ToX2YHkPjlFA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-timeout": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.0.2.tgz", @@ -1795,22 +1810,29 @@ "dev": true }, "node_modules/pg": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.2.1.tgz", - "integrity": "sha512-DKzffhpkWRr9jx7vKxA+ur79KG+SKw+PdjMb1IRhMiKI9zqYUGczwFprqy+5Veh/DCcFs1Y6V8lRLN5I1DlleQ==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", + "integrity": "sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA==", "dev": true, "dependencies": { "buffer-writer": "2.0.0", "packet-reader": "1.0.0", - "pg-connection-string": "^2.2.3", - "pg-pool": "^3.2.1", - "pg-protocol": "^1.2.4", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.4.1", + "pg-protocol": "^1.5.0", "pg-types": "^2.1.0", - "pgpass": "1.x", - "semver": "4.3.2" + "pgpass": "1.x" }, "engines": { "node": ">= 8.0.0" + }, + "peerDependencies": { + "pg-native": ">=2.0.0" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } } }, "node_modules/pg-connection-string": { @@ -1859,15 +1881,6 @@ "node": ">=4" } }, - "node_modules/pg/node_modules/semver": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.2.tgz", - "integrity": "sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c=", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/pgpass": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", @@ -1890,15 +1903,14 @@ } }, "node_modules/postgrator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postgrator/-/postgrator-4.0.0.tgz", - "integrity": "sha512-kuJDNYetiUMhpXP3rkWFL+yJj+SkbX3i1rfOUVn0icVZrUXb/BFhfJamym7Y911KrWOaHackBIgzgvWGpe7S1Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postgrator/-/postgrator-5.0.0.tgz", + "integrity": "sha512-8ngKQcNBvWRULmH5/Utp/Vy4yGsl1WDJbf04bBCR9mTxCoIxY5SIwm9Ys0zqlwppd6/aB6H5otgs5TnYahTNxQ==", "dependencies": { - "glob": "^7.1.6", - "newline": "0.0.3" + "glob": "^7.2.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } }, "node_modules/postgres-array": { @@ -2849,9 +2861,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.2.0.tgz", - "integrity": "sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", + "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", "dev": true, "requires": { "@eslint/eslintrc": "^1.0.4", @@ -2863,10 +2875,10 @@ "doctrine": "^3.0.0", "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^6.0.0", + "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.1.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3061,9 +3073,9 @@ } }, "eslint-scope": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", - "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -3094,14 +3106,14 @@ "dev": true }, "espree": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", - "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", + "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", "dev": true, "requires": { - "acorn": "^8.5.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.0.0" + "eslint-visitor-keys": "^3.1.0" } }, "esquery": { @@ -3233,9 +3245,9 @@ } }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3608,11 +3620,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "newline": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/newline/-/newline-0.0.3.tgz", - "integrity": "sha1-D2p0STIj26BP59v7bNyAS/fkbdA=" - }, "object-inspect": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", @@ -3720,6 +3727,11 @@ "p-limit": "^1.1.0" } }, + "p-tap": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-tap/-/p-tap-4.0.0.tgz", + "integrity": "sha512-G7GTcera93GkIIt5iM57ITilyMR1nSlGKjwSEifhP7F8I2QtOsHbokoRulAgHW2V5JxLS5Tg/7ToX2YHkPjlFA==" + }, "p-timeout": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.0.2.tgz", @@ -3770,27 +3782,18 @@ "dev": true }, "pg": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.2.1.tgz", - "integrity": "sha512-DKzffhpkWRr9jx7vKxA+ur79KG+SKw+PdjMb1IRhMiKI9zqYUGczwFprqy+5Veh/DCcFs1Y6V8lRLN5I1DlleQ==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", + "integrity": "sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA==", "dev": true, "requires": { "buffer-writer": "2.0.0", "packet-reader": "1.0.0", - "pg-connection-string": "^2.2.3", - "pg-pool": "^3.2.1", - "pg-protocol": "^1.2.4", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.4.1", + "pg-protocol": "^1.5.0", "pg-types": "^2.1.0", - "pgpass": "1.x", - "semver": "4.3.2" - }, - "dependencies": { - "semver": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.2.tgz", - "integrity": "sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c=", - "dev": true - } + "pgpass": "1.x" } }, "pg-connection-string": { @@ -3850,12 +3853,11 @@ } }, "postgrator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postgrator/-/postgrator-4.0.0.tgz", - "integrity": "sha512-kuJDNYetiUMhpXP3rkWFL+yJj+SkbX3i1rfOUVn0icVZrUXb/BFhfJamym7Y911KrWOaHackBIgzgvWGpe7S1Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postgrator/-/postgrator-5.0.0.tgz", + "integrity": "sha512-8ngKQcNBvWRULmH5/Utp/Vy4yGsl1WDJbf04bBCR9mTxCoIxY5SIwm9Ys0zqlwppd6/aB6H5otgs5TnYahTNxQ==", "requires": { - "glob": "^7.1.6", - "newline": "0.0.3" + "glob": "^7.2.0" } }, "postgres-array": { diff --git a/package.json b/package.json index fc1d170..8ef78af 100644 --- a/package.json +++ b/package.json @@ -55,17 +55,26 @@ "command-line-args": "^5.2.0", "command-line-usage": "^6.1.1", "cosmiconfig": "^7.0.1", - "postgrator": "^4.0.0" + "p-tap": "^4.0.0", + "postgrator": "^5.0.0" }, "devDependencies": { "crlf": "^1.1.1", "dirname-filename-esm": "^1.1.1", - "eslint": "^8.2.0", + "eslint": "^8.3.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.3", "mock-cwd": "^1.0.0", "p-each-series": "^3.0.0", "p-event": "^5.0.1", - "pg": "^8.2.1" + "pg": "^8.7.1" + }, + "peerDependencies": { + "pg": "^8.7.1" + }, + "peerDependenciesMeta": { + "pg": { + "optional": true + } } } diff --git a/test/config-with-non-existing-directory/.postgratorrc.cjs b/test/config-with-other-directory/.postgratorrc.cjs similarity index 69% rename from test/config-with-non-existing-directory/.postgratorrc.cjs rename to test/config-with-other-directory/.postgratorrc.cjs index b802b17..0fdce00 100644 --- a/test/config-with-non-existing-directory/.postgratorrc.cjs +++ b/test/config-with-other-directory/.postgratorrc.cjs @@ -1,9 +1,9 @@ module.exports = { - migrationDirectory: 'test/non-existing-migrations-directory', + migrationPattern: 'other-migrations/*', driver: 'pg', host: '127.0.0.1', port: 5432, database: 'postgrator', username: 'postgrator', password: 'postgrator', -}; +} diff --git a/test/config-with-other-directory/.postgratorrc.json b/test/config-with-other-directory/.postgratorrc.json deleted file mode 100644 index 99a2974..0000000 --- a/test/config-with-other-directory/.postgratorrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "migrationDirectory": "other-migrations", - "driver": "pg", - "host": "127.0.0.1", - "port": 5432, - "database": "postgrator", - "username": "postgrator", - "password": "postgrator" -} diff --git a/test/config-without-password/.postgratorrc.json b/test/config-without-password/.postgratorrc.json index 605a529..769b6bd 100644 --- a/test/config-without-password/.postgratorrc.json +++ b/test/config-without-password/.postgratorrc.json @@ -1,5 +1,5 @@ { - "migrationDirectory": "../migrations", + "migrationPattern": "../migrations/*", "driver": "pg", "host": "127.0.0.1", "port": 5432, diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 8fcf8a4..1b7cad3 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -8,8 +8,9 @@ import { dirname } from 'dirname-filename-esm'; import { mockCwd } from 'mock-cwd'; -import { optionList } from '../command-line-options.js'; // eslint-disable-line import/extensions -import { run } from '../postgrator-cli.js'; // eslint-disable-line import/extensions +import getClient from '../lib/clients/index.js'; // eslint-disable-line import/extensions +import { optionList } from '../lib/command-line-options.js'; // eslint-disable-line import/extensions +import { run } from '../lib/postgrator-cli.js'; // eslint-disable-line import/extensions const __dirname = dirname(import.meta); // eslint-disable-line no-underscore-dangle @@ -26,7 +27,7 @@ function consoleLogCapture(...args) { async function removeVersionTable(options) { const config = { - migrationDirectory: options['migration-directory'], + migrationPattern: options['migration-pattern'], driver: options.driver, host: options.host, port: options.port, @@ -35,10 +36,15 @@ async function removeVersionTable(options) { password: options.password, }; console.log(`\n----- ${config.driver} removing tables -----`); - const Postgrator = (await import('postgrator')).default; - const pg = new Postgrator(config); + const { default: Postgrator } = await import('postgrator'); + const client = await getClient(config.driver, config); + await client.connect(); + const pg = new Postgrator({ + ...config, + execQuery: client.query, + }); - return pg.runQuery('DROP TABLE IF EXISTS schemaversion, animal, person').catch((err) => { + return pg.runQuery('DROP TABLE IF EXISTS schemaversion, animal, person').then(() => client.end()).catch((err) => { assert.ifError(err); return Promise.reject(err); }); @@ -178,7 +184,7 @@ function buildTestsForOptions(options) { tests.push(async () => { console.log('\n----- testing with no migration files found-----'); options.to = 3; - options['migration-directory'] = 'test/empty-migrations'; + options['migration-pattern'] = 'test/empty-migrations/*'; console.log = consoleLogCapture; try { @@ -192,46 +198,11 @@ function buildTestsForOptions(options) { } }); - tests.push(async () => { - console.log('\n----- testing with non-existing migration directory set-----'); - options.to = 3; - options['migration-directory'] = 'test/non-existing-directory'; - - console.log = consoleLogCapture; - try { - await run(options); - } catch (err) { - console.log = originalConsoleLog; - restoreOptions(); - assert(err.message.indexOf('does not exist') >= 0); - assert(log.indexOf('Examples') < 0, "Help was displayed when shouldn't"); - } - }); - - tests.push(() => { - console.log('\n----- testing with non-existing migration directory set in config file-----'); - options.username = ''; - options.database = ''; - - console.log = consoleLogCapture; - return mockCwd(path.join(__dirname, 'config-with-non-existing-directory'), async () => { - try { - await run(options); - } catch (err) { - console.log = originalConsoleLog; - restoreOptions(); - assert(err.message.indexOf('non-existing-migrations-directory') >= 0); - assert(err.message.indexOf('does not exist') >= 0); - assert(log.indexOf('Examples') < 0, "Help was displayed when shouldn't"); - } - }); - }); - tests.push(resetMigrations); tests.push(() => { console.log('\n----- testing ignoring config file -----'); - options['migration-directory'] = '../migrations'; + options['migration-pattern'] = '../migrations/*'; options['no-config'] = true; options.to = 'max'; @@ -321,23 +292,10 @@ function buildTestsForOptions(options) { }); }); - tests.push(() => { - console.log('\n----- testing showing help and error without any cmd params if no migrations directory-----'); - const defaultOptions = getDefaultOptions(); - - console.log = consoleLogCapture; - return run(defaultOptions).catch((err) => { - console.log = originalConsoleLog; - restoreOptions(); - assert.ok(log.indexOf('Examples') >= 0, 'No help was displayed'); - assert(err.message.indexOf('does not exist') >= 0, 'No directory does not exist error was displayed'); - }); - }); - tests.push(() => { console.log('\n----- testing detecting migration files with same number-----'); options.to = 3; - options['migration-directory'] = 'test/conflicting-migrations'; + options['migration-pattern'] = 'test/conflicting-migrations/*'; return run(options).catch((err) => { restoreOptions(); @@ -354,7 +312,9 @@ const options = { database: 'postgrator', username: 'postgrator', password: 'postgrator', - 'migration-directory': 'test/migrations', + 'migration-pattern': 'test/migrations/*', + 'schema-table': 'schemaversion', + 'validate-checksum': true, }; // Command line parameters diff --git a/test/sample-config/.postgratorrc.json b/test/sample-config/.postgratorrc.json index 7d4dfbc..b8df6bd 100644 --- a/test/sample-config/.postgratorrc.json +++ b/test/sample-config/.postgratorrc.json @@ -1,5 +1,5 @@ { - "migrationDirectory": "../migrations", + "migrationPattern": "../migrations/*", "driver": "pg", "host": "127.0.0.1", "port": 5432, From 41234fb8fbccdbd1e5063a67ca27830b03a9a4fa Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 22 Nov 2021 14:08:14 +0900 Subject: [PATCH 11/32] Add mysql and mssql support --- docker-compose.yml | 30 +- lib/clients/index.js | 8 +- lib/clients/mssql.js | 40 + lib/clients/mysql.js | 19 + package-lock.json | 3421 +++++++++++++++++++++++++- package.json | 10 + test/mssql-config/.postgratorrc.json | 10 + test/mysql-config/.postgratorrc.json | 9 + test/postgrator-cli-tests.js | 37 + 9 files changed, 3556 insertions(+), 28 deletions(-) create mode 100644 lib/clients/mssql.js create mode 100644 lib/clients/mysql.js create mode 100644 test/mssql-config/.postgratorrc.json create mode 100644 test/mysql-config/.postgratorrc.json diff --git a/docker-compose.yml b/docker-compose.yml index 1e86dfd..65c0892 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,28 @@ version: '3' services: - database: - image: ubuntu/postgres:latest # use latest official postgres version + postgres: + image: postgres:9.6-alpine + environment: + POSTGRES_PASSWORD: postgrator + POSTGRES_USER: postgrator + POSTGRES_DB: postgrator + ports: + - "5432:5432" + mariadb: + image: mariadb:10.3 + environment: + MYSQL_ROOT_PASSWORD: postgrator + MYSQL_DATABASE: postgrator + MYSQL_USER: postgrator + MYSQL_PASSWORD: postgrator ports: - - 5432:5432 + - "3306:3306" + # SQL Server needs 2.00 GB of RAM + sqlserver: + image: "mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04" environment: - - POSTGRES_USER=postgrator - - POSTGRES_PASSWORD=postgrator - - POSTGRES_DB=postgrator + ACCEPT_EULA: Y + SA_PASSWORD: Postgrator123! + MSSQL_PID: Express + ports: + - "1433:1433" diff --git a/lib/clients/index.js b/lib/clients/index.js index 225a015..7e10d01 100644 --- a/lib/clients/index.js +++ b/lib/clients/index.js @@ -1,8 +1,12 @@ export default async (driver, config) => { const { default: getClient } = await ( - driver === 'pg' + driver === 'pg' // eslint-disable-line no-nested-ternary ? import('./pg.js') // eslint-disable-line import/extensions - : Promise.reject(new Error('The supported drivers are pg')) + : driver === 'mysql' // eslint-disable-line no-nested-ternary + ? import('./mysql.js') // eslint-disable-line import/extensions + : driver === 'mssql' + ? import('./mssql.js') // eslint-disable-line import/extensions + : Promise.reject(new Error('The supported drivers are pg|mysql|mssql')) ); return getClient(config); }; diff --git a/lib/clients/mssql.js b/lib/clients/mssql.js new file mode 100644 index 0000000..89f0b03 --- /dev/null +++ b/lib/clients/mssql.js @@ -0,0 +1,40 @@ +import mssql from 'mssql'; + +// TODO: one day use named exports +const { ConnectionPool, Request } = mssql; + +export default ({ + username, host, secure, ...config +}) => { + const connection = new ConnectionPool({ + ...config, + ...host !== undefined ? { server: host } : {}, + ...username !== undefined ? { user: username } : {}, + ...secure !== undefined ? { options: { encrypt: secure } } : {}, + }); + + return { + connect: () => connection.connect(), + query: (query) => new Promise((resolve, reject) => { + const request = new Request(connection); + const batches = query.split(/^\s*GO\s*$/im); + + function runBatch(batchIndex) { + request.batch(batches[batchIndex], (err, result) => { + if (err) { + return reject(err); + } + if (batchIndex === batches.length - 1) { + return resolve({ + rows: result && result.recordset ? result.recordset : result, + }); + } + return runBatch(batchIndex + 1); + }); + } + + runBatch(0); + }), + end: () => Promise.resolve(connection.close()), + }; +}; diff --git a/lib/clients/mysql.js b/lib/clients/mysql.js new file mode 100644 index 0000000..3803d5e --- /dev/null +++ b/lib/clients/mysql.js @@ -0,0 +1,19 @@ +import { promisify } from 'util'; +import { createConnection } from 'mysql'; + +// secure does not apply here +export default ({ username, secure, ...config }) => { + const connection = createConnection({ + multipleStatements: true, + ...config, + ...username !== undefined ? { user: username } : {}, + }); + + return { + connect: promisify(connection.connect.bind(connection)), + query: (query) => new Promise((resolve, reject) => { + connection.query(query, (err, rows, fields) => (err ? reject(err) : resolve({ rows, fields }))); + }), + end: promisify(connection.end.bind(connection)), + }; +}; diff --git a/package-lock.json b/package-lock.json index 60c06c5..7d1f3c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,8 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.3", "mock-cwd": "^1.0.0", + "mssql": "^7.3.0", + "mysql": "^2.18.1", "p-each-series": "^3.0.0", "p-event": "^5.0.1", "pg": "^8.7.1" @@ -33,14 +35,371 @@ "node": ">=12.2.0" }, "peerDependencies": { + "mssql": "^7.3.0", + "mysql": "^2.18.1", "pg": "^8.7.1" }, "peerDependenciesMeta": { + "mysql": { + "optional": true + }, "pg": { "optional": true } } }, + "node_modules/@azure/abort-controller": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", + "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", + "dev": true, + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@azure/core-asynciterator-polyfill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", + "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==", + "dev": true + }, + "node_modules/@azure/core-auth": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.2.tgz", + "integrity": "sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-client": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.3.2.tgz", + "integrity": "sha512-qfkRYKmeEmisluMdGTbBtXeyBLaImjFeVW0gcT5yRAwxJmlnTvSyD+a3PjukAtjIrl/tnb4WSJOBpONSJ91+5Q==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-asynciterator-polyfill": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-tracing": "1.0.0-preview.13", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-client/node_modules/@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "dependencies": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-http": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.2.tgz", + "integrity": "sha512-V1DdoO9V/sFimKpdWoNBgsE+QUjQgpXYnxrTdUp5RyhsTJjvEVn/HKmTQXIHuLUUo6IyIWj+B+Dg4VaXse9dIA==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-asynciterator-polyfill": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "@types/node-fetch": "^2.5.0", + "@types/tunnel": "^0.0.3", + "form-data": "^4.0.0", + "node-fetch": "^2.6.0", + "process": "^0.11.10", + "tough-cookie": "^4.0.0", + "tslib": "^2.2.0", + "tunnel": "^0.0.6", + "uuid": "^8.3.0", + "xml2js": "^0.4.19" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-http/node_modules/@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "dependencies": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-lro": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.1.tgz", + "integrity": "sha512-HE6PBl+mlKa0eBsLwusHqAqjLc5n9ByxeDo3Hz4kF3B1hqHvRkBr4oMgoT6tX7Hc3q97KfDctDUon7EhvoeHPA==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-lro/node_modules/@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "dependencies": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-paging": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.2.0.tgz", + "integrity": "sha512-ZX1bCjm/MjKPCN6kQD/9GJErYSoKA8YWp6YWoo5EIzcTWlSBLXu3gNaBTUl8usGl+UShiKo7b4Gdy1NSTIlpZg==", + "dev": true, + "dependencies": { + "@azure/core-asynciterator-polyfill": "^1.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-rest-pipeline": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.3.2.tgz", + "integrity": "sha512-kymICKESeHBpVLgQiAxllgWdSTopkqtmfPac8ITwMCxNEC6hzbSpqApYbjzxbBNkBMgoD4GESo6LLhR/sPh6kA==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "form-data": "^4.0.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "tslib": "^2.2.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-rest-pipeline/node_modules/@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "dependencies": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-tracing": { + "version": "1.0.0-preview.12", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.12.tgz", + "integrity": "sha512-nvo2Wc4EKZGN6eFu9n3U7OXmASmL8VxoPIH7xaD6OlQqi44bouF0YIi9ID5rEsKLiAU59IYx6M297nqWVMWPDg==", + "dev": true, + "dependencies": { + "@opentelemetry/api": "^1.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/identity": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-1.5.2.tgz", + "integrity": "sha512-vqyeRbd2i0h9F4mqW5JbkP1xfabqKQ21l/81osKhpOQ2LtwaJW6nw4+0PsVYnxcbPHFCIZt6EWAk74a3OGYZJA==", + "dev": true, + "dependencies": { + "@azure/core-auth": "^1.3.0", + "@azure/core-client": "^1.0.0", + "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-tracing": "1.0.0-preview.12", + "@azure/logger": "^1.0.0", + "@azure/msal-node": "1.0.0-beta.6", + "@types/stoppable": "^1.1.0", + "axios": "^0.21.1", + "events": "^3.0.0", + "jws": "^4.0.0", + "msal": "^1.0.2", + "open": "^7.0.0", + "qs": "^6.7.0", + "stoppable": "^1.1.0", + "tslib": "^2.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "optionalDependencies": { + "keytar": "^7.3.0" + } + }, + "node_modules/@azure/keyvault-keys": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.3.0.tgz", + "integrity": "sha512-OEosl0/rE/mKD5Ji9KaQN7UH+yQnV5MS0MRhGqQIiJrG+qAvAla0MYudJzv3XvBlplpGk0+MVgyL9H3KX/UAwQ==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-http": "^2.0.0", + "@azure/core-lro": "^2.0.0", + "@azure/core-paging": "^1.1.1", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@azure/keyvault-keys/node_modules/@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "dependencies": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/logger": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", + "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", + "dev": true, + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/ms-rest-azure-env": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-2.0.0.tgz", + "integrity": "sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==", + "dev": true + }, + "node_modules/@azure/ms-rest-js": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.0.tgz", + "integrity": "sha512-4C5FCtvEzWudblB+h92/TYYPiq7tuElX8icVYToxOdggnYqeec4Se14mjse5miInKtZahiFHdl8lZA/jziEc5g==", + "dev": true, + "dependencies": { + "@azure/core-auth": "^1.1.4", + "abort-controller": "^3.0.0", + "form-data": "^2.5.0", + "node-fetch": "^2.6.0", + "tough-cookie": "^3.0.1", + "tslib": "^1.10.0", + "tunnel": "0.0.6", + "uuid": "^8.3.2", + "xml2js": "^0.4.19" + } + }, + "node_modules/@azure/ms-rest-js/node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/@azure/ms-rest-js/node_modules/tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "dev": true, + "dependencies": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@azure/ms-rest-js/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@azure/ms-rest-nodeauth": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-nodeauth/-/ms-rest-nodeauth-3.1.0.tgz", + "integrity": "sha512-F4NKrbkZg0qD3+rUM8fvJHOFRkXFoEiptYTZtLBruN3VwBFIqbTFW0fmgRyBW9seZl+mX2OexQA5GzWenSA3Kw==", + "dev": true, + "dependencies": { + "@azure/ms-rest-azure-env": "^2.0.0", + "@azure/ms-rest-js": "^2.0.4", + "adal-node": "^0.2.2" + } + }, + "node_modules/@azure/msal-common": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-4.5.1.tgz", + "integrity": "sha512-/i5dXM+QAtO+6atYd5oHGBAx48EGSISkXNXViheliOQe+SIFMDo3gSq3lL54W0suOSAsVPws3XnTaIHlla0PIQ==", + "dev": true, + "dependencies": { + "debug": "^4.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@azure/msal-node": { + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.0.0-beta.6.tgz", + "integrity": "sha512-ZQI11Uz1j0HJohb9JZLRD8z0moVcPks1AFW4Q/Gcl67+QvH4aKEJti7fjCcipEEZYb/qzLSO8U6IZgPYytsiJQ==", + "dev": true, + "dependencies": { + "@azure/msal-common": "^4.0.0", + "axios": "^0.21.1", + "jsonwebtoken": "^8.5.1", + "uuid": "^8.3.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", @@ -104,6 +463,36 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@js-joda/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-3.2.0.tgz", + "integrity": "sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg==", + "dev": true + }, + "node_modules/@opentelemetry/api": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.3.tgz", + "integrity": "sha512-puWxACExDe9nxbBB3lOymQFrLYml2dVOrd7USiVRnSbgXE+KwBu+HxFvxrzfqsiSda9IWsXJG1ef7C1O2/GmKQ==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@tediousjs/connection-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.3.0.tgz", + "integrity": "sha512-d/keJiNKfpHo+GmSB8QcsAwBx8h+V1UbdozA5TD+eSLXprNY53JAYub47J9evsSKWDdNG5uVj0FiMozLKuzowQ==", + "dev": true + }, + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", @@ -116,11 +505,80 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "node_modules/@types/node": { + "version": "16.11.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.9.tgz", + "integrity": "sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A==", + "dev": true + }, + "node_modules/@types/node-fetch": { + "version": "2.5.12", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", + "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "node_modules/@types/node-fetch/node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, + "node_modules/@types/stoppable": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/stoppable/-/stoppable-1.1.1.tgz", + "integrity": "sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/tunnel": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", + "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@xmldom/xmldom": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.5.tgz", + "integrity": "sha512-V3BIhmY36fXZ1OtVcI9W+FxQqxVLsPKcNjWigIaa81dLC9IolJl5Mt4Cvhmr0flUnjSpTdrbMTSbXqYqV5dT6A==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/acorn": { "version": "8.6.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", @@ -142,6 +600,68 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/adal-node": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/adal-node/-/adal-node-0.2.3.tgz", + "integrity": "sha512-gMKr8RuYEYvsj7jyfCv/4BfKToQThz20SP71N3AtFn3ia3yAR8Qt2T3aVQhuJzunWs2b38ZsQV0qsZPdwZr7VQ==", + "dev": true, + "dependencies": { + "@xmldom/xmldom": "^0.7.0", + "async": "^2.6.3", + "axios": "^0.21.1", + "date-utils": "*", + "jws": "3.x.x", + "underscore": ">= 1.3.1", + "uuid": "^3.1.0", + "xpath.js": "~1.1.0" + }, + "engines": { + "node": ">= 0.6.15" + } + }, + "node_modules/adal-node/node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/adal-node/node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/adal-node/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -187,6 +707,57 @@ "node": ">=4" } }, + "node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "node_modules/are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "dev": true, + "optional": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "optional": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/are-we-there-yet/node_modules/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==", + "dev": true, + "optional": true + }, + "node_modules/are-we-there-yet/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -235,15 +806,39 @@ "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.0" } }, "node_modules/balanced-match": { @@ -251,6 +846,46 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/bl": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.0.0.tgz", + "integrity": "sha512-8vxFNZ0pflFfi0WXA3WQXlj6CaMEwsmh63I1CNp0q+wWv8sD0ARx1KovSQd0l2GkwrMIOyedq0EF1FxI+RCZLQ==", + "dev": true, + "dependencies": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -260,6 +895,36 @@ "concat-map": "0.0.1" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", + "dev": true + }, "node_modules/buffer-writer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", @@ -303,6 +968,23 @@ "node": ">=4" } }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "optional": true + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -316,6 +998,18 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/command-line-args": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.0.tgz", @@ -371,6 +1065,19 @@ "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", "dev": true }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true, + "optional": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, "node_modules/cosmiconfig": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", @@ -438,6 +1145,15 @@ "node": ">= 8" } }, + "node_modules/date-utils": { + "version": "1.2.21", + "resolved": "https://registry.npmjs.org/date-utils/-/date-utils-1.2.21.tgz", + "integrity": "sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=", + "dev": true, + "engines": { + "node": ">0.4.0" + } + }, "node_modules/debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -455,6 +1171,19 @@ } } }, + "node_modules/decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "dev": true, + "optional": true, + "dependencies": { + "mimic-response": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -481,6 +1210,44 @@ "node": ">= 0.4" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/dirname-filename-esm": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/dirname-filename-esm/-/dirname-filename-esm-1.1.1.tgz", @@ -499,6 +1266,25 @@ "node": ">=6.0.0" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "optional": true, + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -948,6 +1734,34 @@ "node": ">=0.10.0" } }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=6" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1020,6 +1834,47 @@ "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.14.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", + "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "optional": true + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1037,6 +1892,46 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "node_modules/gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "dependencies": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "node_modules/gauge/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gauge/node_modules/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, + "optional": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -1067,6 +1962,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", + "dev": true, + "optional": true + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -1198,6 +2100,72 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -1242,6 +2210,13 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "optional": true + }, "node_modules/internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -1256,6 +2231,15 @@ "node": ">= 0.4" } }, + "node_modules/ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -1328,6 +2312,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1337,6 +2336,19 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "optional": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -1443,6 +2455,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1466,6 +2496,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbi": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", + "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -1495,6 +2531,91 @@ "json5": "lib/cli.js" } }, + "node_modules/jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dev": true, + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=4", + "npm": ">=1.4.28" + } + }, + "node_modules/jsonwebtoken/node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jsonwebtoken/node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "dev": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "dev": true, + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keytar": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.7.0.tgz", + "integrity": "sha512-YEY9HWqThQc5q5xbXbRwsZTh2PJ36OSYRjSv3NN2xf5s5dpLTjEZnC2YikR29OaVybf9nQ0dJ/80i40RS97t/A==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-addon-api": "^3.0.0", + "prebuild-install": "^6.0.0" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -1526,17 +2647,99 @@ "node": ">=4" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", + "dev": true + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", + "dev": true + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", + "dev": true + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "dev": true + }, + "node_modules/mime-db": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "dev": true, + "dependencies": { + "mime-db": "1.51.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "dev": true, + "optional": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -1554,6 +2757,13 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true, + "optional": true + }, "node_modules/mock-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mock-cwd/-/mock-cwd-1.0.0.tgz", @@ -1570,12 +2780,185 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/msal": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/msal/-/msal-1.4.15.tgz", + "integrity": "sha512-H/CxkeZJ4laEK6GZ/cDKQoYjBTvDNFK3hDC8mfU8IkuZvKFfFdo9KM89r8spXY7xnBK9SQBAjIuQgwUogeUw7g==", + "dev": true, + "dependencies": { + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/msal/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/mssql": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/mssql/-/mssql-7.3.0.tgz", + "integrity": "sha512-3NGxDomH5Lci2g0EUrsejHIsvtFwlIE6A9SNFWQ2/JD4Dh0+5XVFHeyB4RXKb+nRMDosSUBAQDIVSuLXo5XFZA==", + "dev": true, + "dependencies": { + "@tediousjs/connection-string": "^0.3.0", + "debug": "^4.3.2", + "rfdc": "^1.3.0", + "tarn": "^3.0.1", + "tedious": "^11.4.0" + }, + "bin": { + "mssql": "bin/mssql" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dev": true, + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/mysql/node_modules/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==", + "dev": true + }, + "node_modules/mysql/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "dev": true, + "optional": true + }, + "node_modules/native-duplexpair": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", + "integrity": "sha1-eJkHjmS/PIo9cyYBs9QP8F21j6A=", + "dev": true + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node_modules/node-abi": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", + "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", + "dev": true, + "optional": true, + "dependencies": { + "semver": "^5.4.1" + } + }, + "node_modules/node-abi/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/node-abort-controller": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-2.0.0.tgz", + "integrity": "sha512-L8RfEgjBTHAISTuagw51PprVAqNZoG6KSB6LQ6H1bskMVkFs5E71IyjauLBv3XbuomJlguWF/VnRHdJ1gqiAqA==", + "dev": true + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true, + "optional": true + }, + "node_modules/node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", @@ -1651,6 +3034,22 @@ "wrappy": "1" } }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -1952,6 +3351,34 @@ "node": ">=0.10.0" } }, + "node_modules/prebuild-install": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", + "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", + "dev": true, + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.21.0", + "npmlog": "^4.0.1", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^3.0.3", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -1961,6 +3388,21 @@ "node": ">= 0.8.0" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -1970,6 +3412,23 @@ "node": ">=0.4.0" } }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "optional": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -1979,6 +3438,21 @@ "node": ">=6" } }, + "node_modules/qs": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", + "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/randombytes": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz", @@ -2001,6 +3475,32 @@ "node": "*" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "optional": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -2056,6 +3556,12 @@ "node": ">=4" } }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -2091,6 +3597,18 @@ } ] }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -2100,6 +3618,13 @@ "semver": "bin/semver.js" } }, + "node_modules/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, + "optional": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2135,13 +3660,78 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/split2": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", - "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "node_modules/signal-exit": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", + "dev": true, + "optional": true + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "optional": true + }, + "node_modules/simple-get": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", + "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", + "dev": true, + "optional": true, + "dependencies": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stoppable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", + "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", "dev": true, - "dependencies": { - "readable-stream": "^3.0.0" + "engines": { + "node": ">=4", + "npm": ">=6" } }, "node_modules/string_decoder": { @@ -2153,6 +3743,44 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "optional": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width/node_modules/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, + "optional": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/string.prototype.trimend": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", @@ -2253,6 +3881,106 @@ "node": ">=8" } }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "optional": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "optional": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "optional": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/tar-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "optional": true, + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/tarn": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.1.tgz", + "integrity": "sha512-6usSlV9KyHsspvwu2duKH+FMUhqJnAh6J5J/4MITl8s94iSUQTLkJggdiewKv4RyARQccnigV48Z+khiuVZDJw==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/tedious": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/tedious/-/tedious-11.8.0.tgz", + "integrity": "sha512-GtFrO694x/7CRiUBt0AI4jrMtrkXV+ywifiOrDy4K0ufJLeKB4rgmPjy5Ws366fCaBaKlqQ9RnJ+sCJ1Jbd1lw==", + "dev": true, + "dependencies": { + "@azure/identity": "^1.3.0", + "@azure/keyvault-keys": "^4.1.0", + "@azure/ms-rest-nodeauth": "^3.0.6", + "@js-joda/core": "^3.2.0", + "adal-node": "^0.2.1", + "bl": "^5.0.0", + "depd": "^2.0.0", + "iconv-lite": "^0.6.3", + "jsbi": "^3.1.5", + "native-duplexpair": "^1.0.0", + "node-abort-controller": "^2.0.0", + "punycode": "^2.1.0", + "sprintf-js": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -2268,6 +3996,26 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "node_modules/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, "node_modules/transform-file": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/transform-file/-/transform-file-1.0.1.tgz", @@ -2289,6 +4037,34 @@ "strip-bom": "^3.0.0" } }, + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "dev": true, + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "optional": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2336,6 +4112,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/underscore": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==", + "dev": true + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -2351,12 +4142,37 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-compile-cache": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2388,6 +4204,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "optional": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -2422,6 +4248,37 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xpath.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", + "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -2441,6 +4298,311 @@ } }, "dependencies": { + "@azure/abort-controller": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", + "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", + "dev": true, + "requires": { + "tslib": "^2.0.0" + } + }, + "@azure/core-asynciterator-polyfill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", + "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==", + "dev": true + }, + "@azure/core-auth": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.2.tgz", + "integrity": "sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA==", + "dev": true, + "requires": { + "@azure/abort-controller": "^1.0.0", + "tslib": "^2.2.0" + } + }, + "@azure/core-client": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.3.2.tgz", + "integrity": "sha512-qfkRYKmeEmisluMdGTbBtXeyBLaImjFeVW0gcT5yRAwxJmlnTvSyD+a3PjukAtjIrl/tnb4WSJOBpONSJ91+5Q==", + "dev": true, + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-asynciterator-polyfill": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-tracing": "1.0.0-preview.13", + "tslib": "^2.2.0" + }, + "dependencies": { + "@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "requires": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + } + } + } + }, + "@azure/core-http": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.2.tgz", + "integrity": "sha512-V1DdoO9V/sFimKpdWoNBgsE+QUjQgpXYnxrTdUp5RyhsTJjvEVn/HKmTQXIHuLUUo6IyIWj+B+Dg4VaXse9dIA==", + "dev": true, + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-asynciterator-polyfill": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "@types/node-fetch": "^2.5.0", + "@types/tunnel": "^0.0.3", + "form-data": "^4.0.0", + "node-fetch": "^2.6.0", + "process": "^0.11.10", + "tough-cookie": "^4.0.0", + "tslib": "^2.2.0", + "tunnel": "^0.0.6", + "uuid": "^8.3.0", + "xml2js": "^0.4.19" + }, + "dependencies": { + "@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "requires": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + } + } + } + }, + "@azure/core-lro": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.1.tgz", + "integrity": "sha512-HE6PBl+mlKa0eBsLwusHqAqjLc5n9ByxeDo3Hz4kF3B1hqHvRkBr4oMgoT6tX7Hc3q97KfDctDUon7EhvoeHPA==", + "dev": true, + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "tslib": "^2.2.0" + }, + "dependencies": { + "@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "requires": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + } + } + } + }, + "@azure/core-paging": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.2.0.tgz", + "integrity": "sha512-ZX1bCjm/MjKPCN6kQD/9GJErYSoKA8YWp6YWoo5EIzcTWlSBLXu3gNaBTUl8usGl+UShiKo7b4Gdy1NSTIlpZg==", + "dev": true, + "requires": { + "@azure/core-asynciterator-polyfill": "^1.0.0", + "tslib": "^2.2.0" + } + }, + "@azure/core-rest-pipeline": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.3.2.tgz", + "integrity": "sha512-kymICKESeHBpVLgQiAxllgWdSTopkqtmfPac8ITwMCxNEC6hzbSpqApYbjzxbBNkBMgoD4GESo6LLhR/sPh6kA==", + "dev": true, + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "form-data": "^4.0.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "tslib": "^2.2.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "requires": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + } + } + } + }, + "@azure/core-tracing": { + "version": "1.0.0-preview.12", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.12.tgz", + "integrity": "sha512-nvo2Wc4EKZGN6eFu9n3U7OXmASmL8VxoPIH7xaD6OlQqi44bouF0YIi9ID5rEsKLiAU59IYx6M297nqWVMWPDg==", + "dev": true, + "requires": { + "@opentelemetry/api": "^1.0.0", + "tslib": "^2.2.0" + } + }, + "@azure/identity": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-1.5.2.tgz", + "integrity": "sha512-vqyeRbd2i0h9F4mqW5JbkP1xfabqKQ21l/81osKhpOQ2LtwaJW6nw4+0PsVYnxcbPHFCIZt6EWAk74a3OGYZJA==", + "dev": true, + "requires": { + "@azure/core-auth": "^1.3.0", + "@azure/core-client": "^1.0.0", + "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-tracing": "1.0.0-preview.12", + "@azure/logger": "^1.0.0", + "@azure/msal-node": "1.0.0-beta.6", + "@types/stoppable": "^1.1.0", + "axios": "^0.21.1", + "events": "^3.0.0", + "jws": "^4.0.0", + "keytar": "^7.3.0", + "msal": "^1.0.2", + "open": "^7.0.0", + "qs": "^6.7.0", + "stoppable": "^1.1.0", + "tslib": "^2.0.0", + "uuid": "^8.3.0" + } + }, + "@azure/keyvault-keys": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.3.0.tgz", + "integrity": "sha512-OEosl0/rE/mKD5Ji9KaQN7UH+yQnV5MS0MRhGqQIiJrG+qAvAla0MYudJzv3XvBlplpGk0+MVgyL9H3KX/UAwQ==", + "dev": true, + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-http": "^2.0.0", + "@azure/core-lro": "^2.0.0", + "@azure/core-paging": "^1.1.1", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "tslib": "^2.2.0" + }, + "dependencies": { + "@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dev": true, + "requires": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + } + } + } + }, + "@azure/logger": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", + "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", + "dev": true, + "requires": { + "tslib": "^2.2.0" + } + }, + "@azure/ms-rest-azure-env": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-2.0.0.tgz", + "integrity": "sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==", + "dev": true + }, + "@azure/ms-rest-js": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.0.tgz", + "integrity": "sha512-4C5FCtvEzWudblB+h92/TYYPiq7tuElX8icVYToxOdggnYqeec4Se14mjse5miInKtZahiFHdl8lZA/jziEc5g==", + "dev": true, + "requires": { + "@azure/core-auth": "^1.1.4", + "abort-controller": "^3.0.0", + "form-data": "^2.5.0", + "node-fetch": "^2.6.0", + "tough-cookie": "^3.0.1", + "tslib": "^1.10.0", + "tunnel": "0.0.6", + "uuid": "^8.3.2", + "xml2js": "^0.4.19" + }, + "dependencies": { + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "dev": true, + "requires": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@azure/ms-rest-nodeauth": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-nodeauth/-/ms-rest-nodeauth-3.1.0.tgz", + "integrity": "sha512-F4NKrbkZg0qD3+rUM8fvJHOFRkXFoEiptYTZtLBruN3VwBFIqbTFW0fmgRyBW9seZl+mX2OexQA5GzWenSA3Kw==", + "dev": true, + "requires": { + "@azure/ms-rest-azure-env": "^2.0.0", + "@azure/ms-rest-js": "^2.0.4", + "adal-node": "^0.2.2" + } + }, + "@azure/msal-common": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-4.5.1.tgz", + "integrity": "sha512-/i5dXM+QAtO+6atYd5oHGBAx48EGSISkXNXViheliOQe+SIFMDo3gSq3lL54W0suOSAsVPws3XnTaIHlla0PIQ==", + "dev": true, + "requires": { + "debug": "^4.1.1" + } + }, + "@azure/msal-node": { + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.0.0-beta.6.tgz", + "integrity": "sha512-ZQI11Uz1j0HJohb9JZLRD8z0moVcPks1AFW4Q/Gcl67+QvH4aKEJti7fjCcipEEZYb/qzLSO8U6IZgPYytsiJQ==", + "dev": true, + "requires": { + "@azure/msal-common": "^4.0.0", + "axios": "^0.21.1", + "jsonwebtoken": "^8.5.1", + "uuid": "^8.3.0" + } + }, "@babel/code-frame": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", @@ -2498,6 +4660,30 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@js-joda/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-3.2.0.tgz", + "integrity": "sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg==", + "dev": true + }, + "@opentelemetry/api": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.3.tgz", + "integrity": "sha512-puWxACExDe9nxbBB3lOymQFrLYml2dVOrd7USiVRnSbgXE+KwBu+HxFvxrzfqsiSda9IWsXJG1ef7C1O2/GmKQ==", + "dev": true + }, + "@tediousjs/connection-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.3.0.tgz", + "integrity": "sha512-d/keJiNKfpHo+GmSB8QcsAwBx8h+V1UbdozA5TD+eSLXprNY53JAYub47J9evsSKWDdNG5uVj0FiMozLKuzowQ==", + "dev": true + }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", @@ -2510,11 +4696,73 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/node": { + "version": "16.11.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.9.tgz", + "integrity": "sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A==", + "dev": true + }, + "@types/node-fetch": { + "version": "2.5.12", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", + "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", + "dev": true, + "requires": { + "@types/node": "*", + "form-data": "^3.0.0" + }, + "dependencies": { + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, + "@types/stoppable": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/stoppable/-/stoppable-1.1.1.tgz", + "integrity": "sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/tunnel": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", + "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@xmldom/xmldom": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.5.tgz", + "integrity": "sha512-V3BIhmY36fXZ1OtVcI9W+FxQqxVLsPKcNjWigIaa81dLC9IolJl5Mt4Cvhmr0flUnjSpTdrbMTSbXqYqV5dT6A==", + "dev": true + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "requires": { + "event-target-shim": "^5.0.0" + } + }, "acorn": { "version": "8.6.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", @@ -2528,6 +4776,60 @@ "dev": true, "requires": {} }, + "adal-node": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/adal-node/-/adal-node-0.2.3.tgz", + "integrity": "sha512-gMKr8RuYEYvsj7jyfCv/4BfKToQThz20SP71N3AtFn3ia3yAR8Qt2T3aVQhuJzunWs2b38ZsQV0qsZPdwZr7VQ==", + "dev": true, + "requires": { + "@xmldom/xmldom": "^0.7.0", + "async": "^2.6.3", + "axios": "^0.21.1", + "date-utils": "*", + "jws": "3.x.x", + "underscore": ">= 1.3.1", + "uuid": "^3.1.0", + "xpath.js": "~1.1.0" + }, + "dependencies": { + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2560,6 +4862,59 @@ "color-convert": "^1.9.0" } }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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==", + "dev": true, + "optional": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2601,11 +4956,58 @@ "es-abstract": "^1.19.0" } }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.0" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "dev": true + }, + "bl": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.0.0.tgz", + "integrity": "sha512-8vxFNZ0pflFfi0WXA3WQXlj6CaMEwsmh63I1CNp0q+wWv8sD0ARx1KovSQd0l2GkwrMIOyedq0EF1FxI+RCZLQ==", + "dev": true, + "requires": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2615,6 +5017,22 @@ "concat-map": "0.0.1" } }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", + "dev": true + }, "buffer-writer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", @@ -2646,6 +5064,20 @@ "supports-color": "^5.3.0" } }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "optional": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2659,6 +5091,15 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "combined-stream": { + "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" + } + }, "command-line-args": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.0.tgz", @@ -2704,6 +5145,19 @@ "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", "dev": true }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, "cosmiconfig": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", @@ -2755,6 +5209,12 @@ "which": "^2.0.1" } }, + "date-utils": { + "version": "1.2.21", + "resolved": "https://registry.npmjs.org/date-utils/-/date-utils-1.2.21.tgz", + "integrity": "sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=", + "dev": true + }, "debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -2764,6 +5224,16 @@ "ms": "2.1.2" } }, + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "dev": true, + "optional": true, + "requires": { + "mimic-response": "^2.0.0" + } + }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -2784,6 +5254,32 @@ "object-keys": "^1.0.12" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "optional": true + }, "dirname-filename-esm": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/dirname-filename-esm/-/dirname-filename-esm-1.1.1.tgz", @@ -2799,6 +5295,25 @@ "esutils": "^2.0.2" } }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "optional": true, + "requires": { + "once": "^1.4.0" + } + }, "enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -3146,6 +5661,25 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "optional": true + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3206,6 +5740,30 @@ "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, + "follow-redirects": { + "version": "1.14.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", + "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==", + "dev": true + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "optional": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3223,6 +5781,42 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "optional": 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, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -3244,6 +5838,13 @@ "get-intrinsic": "^1.1.1" } }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", + "dev": true, + "optional": true + }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -3335,6 +5936,49 @@ "has-symbols": "^1.0.2" } }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -3370,6 +6014,13 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "optional": true + }, "internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -3381,6 +6032,12 @@ "side-channel": "^1.0.4" } }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -3429,12 +6086,28 @@ "has-tostringtag": "^1.0.0" } }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -3502,6 +6175,21 @@ "call-bind": "^1.0.0" } }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3522,6 +6210,12 @@ "argparse": "^2.0.1" } }, + "jsbi": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", + "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==", + "dev": true + }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -3539,13 +6233,92 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dev": true, + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "dependencies": { + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "dev": true, + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "dev": true, + "requires": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "keytar": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.7.0.tgz", + "integrity": "sha512-YEY9HWqThQc5q5xbXbRwsZTh2PJ36OSYRjSv3NN2xf5s5dpLTjEZnC2YikR29OaVybf9nQ0dJ/80i40RS97t/A==", "dev": true, + "optional": true, "requires": { - "minimist": "^1.2.0" + "node-addon-api": "^3.0.0", + "prebuild-install": "^6.0.0" } }, "levn": { @@ -3573,17 +6346,87 @@ "path-exists": "^3.0.0" } }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", + "dev": true + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", + "dev": true + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", + "dev": true + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "dev": true + }, + "mime-db": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "dev": true + }, + "mime-types": { + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "dev": true, + "requires": { + "mime-db": "1.51.0" + } + }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "dev": true, + "optional": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -3598,6 +6441,13 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true, + "optional": true + }, "mock-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mock-cwd/-/mock-cwd-1.0.0.tgz", @@ -3614,12 +6464,167 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "msal": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/msal/-/msal-1.4.15.tgz", + "integrity": "sha512-H/CxkeZJ4laEK6GZ/cDKQoYjBTvDNFK3hDC8mfU8IkuZvKFfFdo9KM89r8spXY7xnBK9SQBAjIuQgwUogeUw7g==", + "dev": true, + "requires": { + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "mssql": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/mssql/-/mssql-7.3.0.tgz", + "integrity": "sha512-3NGxDomH5Lci2g0EUrsejHIsvtFwlIE6A9SNFWQ2/JD4Dh0+5XVFHeyB4RXKb+nRMDosSUBAQDIVSuLXo5XFZA==", + "dev": true, + "requires": { + "@tediousjs/connection-string": "^0.3.0", + "debug": "^4.3.2", + "rfdc": "^1.3.0", + "tarn": "^3.0.1", + "tedious": "^11.4.0" + } + }, + "mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dev": true, + "requires": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "dev": true, + "optional": true + }, + "native-duplexpair": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", + "integrity": "sha1-eJkHjmS/PIo9cyYBs9QP8F21j6A=", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node-abi": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", + "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", + "dev": true, + "optional": true, + "requires": { + "semver": "^5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true + } + } + }, + "node-abort-controller": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-2.0.0.tgz", + "integrity": "sha512-L8RfEgjBTHAISTuagw51PprVAqNZoG6KSB6LQ6H1bskMVkFs5E71IyjauLBv3XbuomJlguWF/VnRHdJ1gqiAqA==", + "dev": true + }, + "node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true, + "optional": true + }, + "node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "optional": true + }, "object-inspect": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", @@ -3674,6 +6679,16 @@ "wrappy": "1" } }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -3887,24 +6902,84 @@ "xtend": "^4.0.0" } }, + "prebuild-install": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", + "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.21.0", + "npmlog": "^4.0.1", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^3.0.3", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "punycode": { "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": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", + "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + }, "randombytes": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz", @@ -3921,6 +6996,28 @@ "randombytes": "2.0.3" } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true + } + } + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -3958,6 +7055,12 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -3973,12 +7076,31 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, + "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, + "optional": true + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4005,6 +7127,32 @@ "object-inspect": "^1.9.0" } }, + "signal-exit": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", + "dev": true, + "optional": true + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "optional": true + }, + "simple-get": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", + "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", + "dev": true, + "optional": true, + "requires": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "split2": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", @@ -4014,6 +7162,24 @@ "readable-stream": "^3.0.0" } }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=", + "dev": true + }, + "stoppable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", + "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", + "dev": true + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -4023,6 +7189,37 @@ "safe-buffer": "~5.2.0" } }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "optional": 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, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "string.prototype.trimend": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", @@ -4095,6 +7292,85 @@ } } }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "optional": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "optional": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "optional": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } + } + }, + "tarn": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.1.tgz", + "integrity": "sha512-6usSlV9KyHsspvwu2duKH+FMUhqJnAh6J5J/4MITl8s94iSUQTLkJggdiewKv4RyARQccnigV48Z+khiuVZDJw==", + "dev": true + }, + "tedious": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/tedious/-/tedious-11.8.0.tgz", + "integrity": "sha512-GtFrO694x/7CRiUBt0AI4jrMtrkXV+ywifiOrDy4K0ufJLeKB4rgmPjy5Ws366fCaBaKlqQ9RnJ+sCJ1Jbd1lw==", + "dev": true, + "requires": { + "@azure/identity": "^1.3.0", + "@azure/keyvault-keys": "^4.1.0", + "@azure/ms-rest-nodeauth": "^3.0.6", + "@js-joda/core": "^3.2.0", + "adal-node": "^0.2.1", + "bl": "^5.0.0", + "depd": "^2.0.0", + "iconv-lite": "^0.6.3", + "jsbi": "^3.1.5", + "native-duplexpair": "^1.0.0", + "node-abort-controller": "^2.0.0", + "punycode": "^2.1.0", + "sprintf-js": "^1.1.2" + } + }, "temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -4107,6 +7383,23 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, "transform-file": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/transform-file/-/transform-file-1.0.1.tgz", @@ -4128,6 +7421,28 @@ "strip-bom": "^3.0.0" } }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -4160,6 +7475,18 @@ "which-boxed-primitive": "^1.0.2" } }, + "underscore": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -4175,12 +7502,34 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true + }, "v8-compile-cache": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -4203,6 +7552,16 @@ "is-symbol": "^1.0.3" } }, + "wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -4230,6 +7589,28 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true + }, + "xpath.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", + "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==", + "dev": true + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 8ef78af..da52249 100644 --- a/package.json +++ b/package.json @@ -65,14 +65,24 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.3", "mock-cwd": "^1.0.0", + "mssql": "^7.3.0", + "mysql": "^2.18.1", "p-each-series": "^3.0.0", "p-event": "^5.0.1", "pg": "^8.7.1" }, "peerDependencies": { + "mssql": "^7.3.0", + "mysql": "^2.18.1", "pg": "^8.7.1" }, "peerDependenciesMeta": { + "mssql": { + "optional": true + }, + "mysql": { + "optional": true + }, "pg": { "optional": true } diff --git a/test/mssql-config/.postgratorrc.json b/test/mssql-config/.postgratorrc.json new file mode 100644 index 0000000..df0207d --- /dev/null +++ b/test/mssql-config/.postgratorrc.json @@ -0,0 +1,10 @@ +{ + "migrationPattern": "../migrations/*", + "driver": "mssql", + "host": "127.0.0.1", + "port": 1433, + "database": "master", + "username": "sa", + "password": "Postgrator123!", + "secure": false +} diff --git a/test/mysql-config/.postgratorrc.json b/test/mysql-config/.postgratorrc.json new file mode 100644 index 0000000..44c7002 --- /dev/null +++ b/test/mysql-config/.postgratorrc.json @@ -0,0 +1,9 @@ +{ + "migrationPattern": "../migrations/*", + "driver": "mysql", + "host": "127.0.0.1", + "port": 3306, + "database": "postgrator", + "username": "postgrator", + "password": "postgrator" +} diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 1b7cad3..a6602d3 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -34,6 +34,7 @@ async function removeVersionTable(options) { database: options.database, username: options.username, password: options.password, + secure: options.secure, }; console.log(`\n----- ${config.driver} removing tables -----`); const { default: Postgrator } = await import('postgrator'); @@ -302,6 +303,42 @@ function buildTestsForOptions(options) { assert(err.message.indexOf('Two migrations found with version 2 and action do') >= 0, 'No migration conflicts were detected'); }); }); + + tests.push(() => removeVersionTable({ + ...options, + driver: 'mysql', + port: 3306, + })); + + tests.push(async () => { + console.log('\n----- testing migration to 003 using mysql -----'); + + return mockCwd(path.join(__dirname, 'mysql-config'), async () => { + const migrations = await run(options); + assert.equal(migrations.length, 3); + assert.equal(migrations[2].version, 3); + }); + }); + + tests.push(() => removeVersionTable({ + ...options, + driver: 'mssql', + port: 1433, + database: 'master', + username: 'sa', + password: 'Postgrator123!', + secure: false, + })); + + tests.push(async () => { + console.log('\n----- testing migration to 003 using mssql -----'); + + return mockCwd(path.join(__dirname, 'mssql-config'), async () => { + const migrations = await run(options); + assert.equal(migrations.length, 3); + assert.equal(migrations[2].version, 3); + }); + }); } const options = { From 9c5de993c2b249dfb6d48adf49e9bf6a7f81a6e5 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 22 Nov 2021 14:12:57 +0900 Subject: [PATCH 12/32] Attempt fix --- .github/workflows/release.yml | 7 +++++-- .github/workflows/test.yml | 7 +++++-- test/postgrator-cli-tests.js | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30c3f33..12c8307 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,9 +23,12 @@ jobs: - name: Lint run: npm run lint - - name: Start postgres + - name: Start databases run: docker-compose up -d + - name: Wait for databases to be available + run: sleep 10 + - name: Test run: npm test @@ -33,5 +36,5 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - name: Stop postgres + - name: Stop databases run: docker-compose down diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f0a2a1..66cf43a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,11 +31,14 @@ jobs: - name: Lint run: npm run lint - - name: Start postgres + - name: Start databases run: docker-compose up -d + - name: Wait for databases to be available + run: sleep 10 + - name: Test run: npm test - - name: Stop postgres + - name: Stop databases run: docker-compose down diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index a6602d3..961ce17 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -237,7 +237,7 @@ function buildTestsForOptions(options) { run(options); // this error is not thrown down the chain so it cannot be caught - const err = await fromEvent(process, 'uncaughtException'); + const err = await fromEvent(process, 'unhandledRejection'); assert(err, 'ERR_INVALID_ARG_TYPE'); restoreOptions(); }); From 9afd1a1dbb3ce37fad56e228d6109093dc3bbdd0 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 24 Nov 2021 18:16:54 +0900 Subject: [PATCH 13/32] secure option -> ssl --- README.md | 7 ++++--- index.js | 6 ++---- lib/clients/mssql.js | 4 ++-- lib/clients/mysql.js | 4 ++-- lib/clients/pg.js | 4 ++-- lib/command-line-options.js | 13 ++++++++++--- lib/postgrator-cli.js | 2 +- test/mssql-config/.postgratorrc.json | 2 +- test/postgrator-cli-tests.js | 9 ++++----- 9 files changed, 28 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 3d5a564..f0074ec 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Uses [Postgrator](https://github.com/rickbergfalk/postgrator) node.js library de ## Installation -*As of postgrator-cli 4 Node.js version 10 or greater is required* +*As of postgrator-cli 4 Node.js version 12 or greater is required* ``` npm install -g postgrator-cli @@ -27,7 +27,6 @@ And install the appropriate DB engine(s) if not installed yet: ``` npm install pg@8 npm install mysql@2 -npm install mysql2@2 npm install mssql@6 ``` @@ -131,7 +130,9 @@ postgrator [[--to=]] --database= [--driver=] [--host= -u, --username database Username -p, --password password Password -m, --migration-directory directory A directory to run migration files from. Default: 'migrations'' - -s, --secure Secure connection (Azure). Default: false + -t --schema-table Table created to track schema version. + -c --validate-checksum Validates checksum of existing SQL migration files already run prior to executing migrations. + -s, --ssl Enables ssl connections. When using the mysql driver it expects a string containing name of ssl profile. --no-config Do not load options from a configuration file. -v, --version Print version. -?, --help Print this usage guide. diff --git a/index.js b/index.js index f5825e4..e086812 100755 --- a/index.js +++ b/index.js @@ -1,11 +1,9 @@ #!/usr/bin/env node -import commandLineArgs from 'command-line-args'; - import { run } from './lib/postgrator-cli.js'; // eslint-disable-line import/extensions -import { optionList } from './lib/command-line-options.js'; // eslint-disable-line import/extensions +import { parse } from './lib/command-line-options.js'; // eslint-disable-line import/extensions -const options = commandLineArgs(optionList); +const options = parse(); run(options).catch((err) => { console.log(`Error: ${err.message}`); process.exit(1); diff --git a/lib/clients/mssql.js b/lib/clients/mssql.js index 89f0b03..460c2fc 100644 --- a/lib/clients/mssql.js +++ b/lib/clients/mssql.js @@ -4,13 +4,13 @@ import mssql from 'mssql'; const { ConnectionPool, Request } = mssql; export default ({ - username, host, secure, ...config + username, host, ssl, ...config }) => { const connection = new ConnectionPool({ ...config, ...host !== undefined ? { server: host } : {}, ...username !== undefined ? { user: username } : {}, - ...secure !== undefined ? { options: { encrypt: secure } } : {}, + ...ssl !== undefined ? { options: { encrypt: ssl } } : {}, }); return { diff --git a/lib/clients/mysql.js b/lib/clients/mysql.js index 3803d5e..b91c8fa 100644 --- a/lib/clients/mysql.js +++ b/lib/clients/mysql.js @@ -1,12 +1,12 @@ import { promisify } from 'util'; import { createConnection } from 'mysql'; -// secure does not apply here -export default ({ username, secure, ...config }) => { +export default ({ username, ssl, ...config }) => { const connection = createConnection({ multipleStatements: true, ...config, ...username !== undefined ? { user: username } : {}, + ...ssl !== undefined ? { ssl } : {}, }); return { diff --git a/lib/clients/pg.js b/lib/clients/pg.js index 87c8540..e098875 100644 --- a/lib/clients/pg.js +++ b/lib/clients/pg.js @@ -1,10 +1,10 @@ import pg from 'pg'; -// secure does not apply here -export default ({ username, secure, ...config }) => { +export default ({ username, ssl, ...config }) => { const client = new pg.Client({ ...config, ...username !== undefined ? { user: username } : {}, + ...ssl !== undefined ? { ssl } : {}, }); return { diff --git a/lib/command-line-options.js b/lib/command-line-options.js index 643a8f4..5e2edae 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -1,5 +1,6 @@ /* eslint max-len: 0 */ +import commandLineArgs from 'command-line-args'; import { readFileSync } from 'fs'; const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); @@ -50,8 +51,8 @@ const optionDefinitions = [ alias: 'c', type: Boolean, defaultValue: true, }, { - name: 'secure', description: 'Secure connection (Azure). Default: false', - alias: 's', type: Boolean, + name: 'ssl', description: 'Enables ssl connections. When using the mysql driver it expects a string containing name of ssl profile.', + alias: 's', }, { name: 'no-config', description: 'Disable config loading', @@ -67,7 +68,13 @@ const optionDefinitions = [ }, ]; -export { optionDefinitions as optionList }; +export const parse = (options) => { + const args = commandLineArgs(optionDefinitions, options); + if (args.ssl === null) { // If no value is handed, treat it as boolean + args.ssl = true; + } + return args; +}; export const sections = [ { diff --git a/lib/postgrator-cli.js b/lib/postgrator-cli.js index c4506f6..bc0bfba 100644 --- a/lib/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -78,7 +78,7 @@ function getClientConfigFromConfigFile(config) { 'database', 'username', 'password', - 'secure', + 'ssl', ], config); } diff --git a/test/mssql-config/.postgratorrc.json b/test/mssql-config/.postgratorrc.json index df0207d..49ff0f6 100644 --- a/test/mssql-config/.postgratorrc.json +++ b/test/mssql-config/.postgratorrc.json @@ -6,5 +6,5 @@ "database": "master", "username": "sa", "password": "Postgrator123!", - "secure": false + "ssl": false } diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 961ce17..c4596eb 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import commandLineArgs from 'command-line-args'; import path from 'path'; import readline from 'readline'; import eachSeries from 'p-each-series'; @@ -9,7 +8,7 @@ import { dirname } from 'dirname-filename-esm'; import { mockCwd } from 'mock-cwd'; import getClient from '../lib/clients/index.js'; // eslint-disable-line import/extensions -import { optionList } from '../lib/command-line-options.js'; // eslint-disable-line import/extensions +import { parse } from '../lib/command-line-options.js'; // eslint-disable-line import/extensions import { run } from '../lib/postgrator-cli.js'; // eslint-disable-line import/extensions const __dirname = dirname(import.meta); // eslint-disable-line no-underscore-dangle @@ -34,7 +33,7 @@ async function removeVersionTable(options) { database: options.database, username: options.username, password: options.password, - secure: options.secure, + ssl: options.ssl, }; console.log(`\n----- ${config.driver} removing tables -----`); const { default: Postgrator } = await import('postgrator'); @@ -52,7 +51,7 @@ async function removeVersionTable(options) { } function getDefaultOptions() { - return commandLineArgs(optionList, { partial: true }); + return parse({ partial: true }); } /* Build a set of tests for a given config. @@ -327,7 +326,7 @@ function buildTestsForOptions(options) { database: 'master', username: 'sa', password: 'Postgrator123!', - secure: false, + ssl: false, })); tests.push(async () => { From 49e127f1f74e8a3812ea670051e724ef74c79790 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 24 Nov 2021 18:18:44 +0900 Subject: [PATCH 14/32] v5 requires node >= 12 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0074ec..47b13e9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Uses [Postgrator](https://github.com/rickbergfalk/postgrator) node.js library de ## Installation -*As of postgrator-cli 4 Node.js version 12 or greater is required* +*As of postgrator-cli 5 Node.js version 12 or greater is required* ``` npm install -g postgrator-cli From 52792f6a1f76ae9ca939e0c2e7cb03fd5ea10ad0 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 24 Nov 2021 18:30:11 +0900 Subject: [PATCH 15/32] mssql encrypt is false by default --- lib/clients/mssql.js | 2 +- test/mssql-config/.postgratorrc.json | 3 +-- test/postgrator-cli-tests.js | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/clients/mssql.js b/lib/clients/mssql.js index 460c2fc..9c90c4b 100644 --- a/lib/clients/mssql.js +++ b/lib/clients/mssql.js @@ -10,7 +10,7 @@ export default ({ ...config, ...host !== undefined ? { server: host } : {}, ...username !== undefined ? { user: username } : {}, - ...ssl !== undefined ? { options: { encrypt: ssl } } : {}, + options: { encrypt: ssl === true }, // false by default }); return { diff --git a/test/mssql-config/.postgratorrc.json b/test/mssql-config/.postgratorrc.json index 49ff0f6..92bb656 100644 --- a/test/mssql-config/.postgratorrc.json +++ b/test/mssql-config/.postgratorrc.json @@ -5,6 +5,5 @@ "port": 1433, "database": "master", "username": "sa", - "password": "Postgrator123!", - "ssl": false + "password": "Postgrator123!" } diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index c4596eb..b863e30 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -33,7 +33,6 @@ async function removeVersionTable(options) { database: options.database, username: options.username, password: options.password, - ssl: options.ssl, }; console.log(`\n----- ${config.driver} removing tables -----`); const { default: Postgrator } = await import('postgrator'); @@ -326,7 +325,6 @@ function buildTestsForOptions(options) { database: 'master', username: 'sa', password: 'Postgrator123!', - ssl: false, })); tests.push(async () => { From ee857ae5b2732a1f0a1ba58b7580afc4e0d8c4a9 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 24 Nov 2021 19:13:20 +0900 Subject: [PATCH 16/32] Fix published files --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index da52249..89208b1 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,7 @@ "LICENSE.md", "README.md", "index.js", - "postgrator-cli.js", - "command-line-options.js" + "lib" ], "keywords": [ "cli", From a9ec34149921117d49b45f43ba50ff8c9f25da1d Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Sat, 27 Nov 2021 19:54:15 +0900 Subject: [PATCH 17/32] Add config option --- lib/clients/mysql.js | 3 +-- lib/clients/pg.js | 3 +-- lib/command-line-options.js | 6 +++++- lib/postgrator-cli.js | 12 ++++++++++- test/postgrator-cli-tests.js | 41 ++++++++++++++++++++++++++++++------ test/sample-config.json | 9 ++++++++ 6 files changed, 61 insertions(+), 13 deletions(-) create mode 100644 test/sample-config.json diff --git a/lib/clients/mysql.js b/lib/clients/mysql.js index b91c8fa..a5687c7 100644 --- a/lib/clients/mysql.js +++ b/lib/clients/mysql.js @@ -1,12 +1,11 @@ import { promisify } from 'util'; import { createConnection } from 'mysql'; -export default ({ username, ssl, ...config }) => { +export default ({ username, ...config }) => { const connection = createConnection({ multipleStatements: true, ...config, ...username !== undefined ? { user: username } : {}, - ...ssl !== undefined ? { ssl } : {}, }); return { diff --git a/lib/clients/pg.js b/lib/clients/pg.js index e098875..16ba290 100644 --- a/lib/clients/pg.js +++ b/lib/clients/pg.js @@ -1,10 +1,9 @@ import pg from 'pg'; -export default ({ username, ssl, ...config }) => { +export default ({ username, ...config }) => { const client = new pg.Client({ ...config, ...username !== undefined ? { user: username } : {}, - ...ssl !== undefined ? { ssl } : {}, }); return { diff --git a/lib/command-line-options.js b/lib/command-line-options.js index 5e2edae..255247a 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -42,13 +42,17 @@ const optionDefinitions = [ name: 'migration-pattern', description: "A pattern matching files to run migration files from. Default: 'migrations/*''", alias: 'm', type: String, typeLabel: '{underline directory}', defaultValue: DEFAULT_MIGRATION_PATTERN, }, + { + name: 'config', description: 'Select the config file explicitly.', + alias: 'c', type: String, typeLabel: '{underline file}', + }, { name: 'schema-table', description: 'Table created to track schema version.', alias: 't', type: String, defaultValue: 'schemaversion', }, { name: 'validate-checksum', description: 'Validates checksum of existing SQL migration files already run prior to executing migrations.', - alias: 'c', type: Boolean, defaultValue: true, + type: Boolean, defaultValue: true, }, { name: 'ssl', description: 'Enables ssl connections. When using the mysql driver it expects a string containing name of ssl profile.', diff --git a/lib/postgrator-cli.js b/lib/postgrator-cli.js index bc0bfba..dd078f9 100644 --- a/lib/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -187,7 +187,17 @@ export async function run(commandLineArgs) { let postgratorConfig = getPostgratorConfigFromCommandLineArgs(commandLineArgs); let clientConfig = getClientConfigFromCommandLineArgs(commandLineArgs); - if (!commandLineArgs['no-config']) { + if (commandLineArgs.config) { + const explorer = cosmiconfig('postgrator'); + const { config } = commandLineArgs; + const result = await explorer + .load(config) + .catch( + (err) => (err.code === 'ENOENT' ? Promise.reject(new Error(`Config file not found: ${config}`)) : Promise.reject(err)), + ); + postgratorConfig = (!result || result.isEmpty) ? postgratorConfig : getPostgratorConfigFromConfigFile(result.config); + clientConfig = (!result || result.isEmpty) ? clientConfig : getClientConfigFromConfigFile(result.config); + } else if (!commandLineArgs['no-config']) { const explorer = cosmiconfig('postgrator'); const result = await explorer.search(); postgratorConfig = (!result || result.isEmpty) ? postgratorConfig : getPostgratorConfigFromConfigFile(result.config); diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index b863e30..7642572 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -129,17 +129,16 @@ function buildTestsForOptions(options) { assert.equal(migrations[0].action, 'do'); }); - tests.push(() => { - console.log('\n----- testing migration from 001 to 003 using config file -----'); + tests.push(async () => { + console.log('\n----- testing migration from 001 to 003 using config file defined explicitly -----'); options.to = '0003'; options.username = ''; options.database = ''; + options.config = 'test/sample-config.json'; - return mockCwd(path.join(__dirname, 'sample-config'), async () => { - const migrations = await run(options); - restoreOptions(); - assert.equal(migrations[migrations.length - 1].version, 3); - }); + const migrations = await run(options); + restoreOptions(); + assert.equal(migrations[migrations.length - 1].version, 3); }); tests.push(() => { @@ -156,6 +155,20 @@ function buildTestsForOptions(options) { }); }); + tests.push(async () => { + console.log('\n----- testing non-existing config file-----'); + options.config = 'test/config-which-does-not-exist.json'; + options.to = '003'; + + try { + await run(options); + } catch (err) { + restoreOptions(); + assert(err); + assert(err.message.indexOf('Config file not found:') >= 0); + } + }); + tests.push(resetMigrations); tests.push(async () => { @@ -168,6 +181,20 @@ function buildTestsForOptions(options) { assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); }); + tests.push(resetMigrations); + + tests.push(async () => { + console.log('\n----- testing using latest revision with config file set by absolute path-----'); + const absolutePath = path.resolve(__dirname, './sample-config.json'); + options.config = absolutePath; + options.password = ''; + options.to = ''; + + const migrations = await run(options); + assert.equal(migrations.length, MAX_REVISION); + restoreOptions(); + }); + tests.push(() => { console.log('\n----- testing it does not re-apply same migrations -----'); options.password = ''; diff --git a/test/sample-config.json b/test/sample-config.json new file mode 100644 index 0000000..3c10d67 --- /dev/null +++ b/test/sample-config.json @@ -0,0 +1,9 @@ +{ + "migrationPattern": "test/migrations/*", + "driver": "pg", + "host": "127.0.0.1", + "port": 5432, + "database": "postgrator", + "username": "postgrator", + "password": "postgrator" +} From 2372088877cf7b79d15cb3adaff69b10e1303a29 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Sun, 28 Nov 2021 19:12:49 +0900 Subject: [PATCH 18/32] Replace assert with chai --- package-lock.json | 186 +++++++++++++++++++++++++++++++++++ package.json | 4 + test/postgrator-cli-tests.js | 162 +++++++++++++++--------------- 3 files changed, 267 insertions(+), 85 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d1f3c0..c850c6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,8 +19,12 @@ "postgrator": "index.js" }, "devDependencies": { + "chai": "^4.3.4", + "chai-as-promised": "^7.1.1", + "chai-subset": "^1.6.0", "crlf": "^1.1.1", "dirname-filename-esm": "^1.1.1", + "dirty-chai": "^2.0.1", "eslint": "^8.3.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.3", @@ -40,6 +44,9 @@ "pg": "^8.7.1" }, "peerDependenciesMeta": { + "mssql": { + "optional": true + }, "mysql": { "optional": true }, @@ -817,6 +824,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -955,6 +971,44 @@ "node": ">=6" } }, + "node_modules/chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 5" + } + }, + "node_modules/chai-subset": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/chai-subset/-/chai-subset-1.6.0.tgz", + "integrity": "sha1-pdDKFOMpp5WW7XAFi2ZGvWmIz+k=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -968,6 +1022,15 @@ "node": ">=4" } }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -1184,6 +1247,18 @@ "node": ">=8" } }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -1254,6 +1329,15 @@ "integrity": "sha512-BWBkv157Cf/z7Hjod2v2JS7vyC36Dk1QQolAtuLjpl8RBlv7Z92X7+Ufc2cjfR/B3iJUiK0QmGZkgtsmmLz0Tw==", "dev": true }, + "node_modules/dirty-chai": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/dirty-chai/-/dirty-chai-2.0.1.tgz", + "integrity": "sha512-ys79pWKvDMowIDEPC6Fig8d5THiC0DJ2gmTeGzVAoEH18J8OzLud0Jh7I9IWg3NSk8x2UocznUuFmfHCXYZx9w==", + "dev": true, + "peerDependencies": { + "chai": ">=2.2.1 <5" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1932,6 +2016,15 @@ "node": ">=0.10.0" } }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -3208,6 +3301,15 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/pg": { "version": "8.7.1", "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", @@ -4077,6 +4179,15 @@ "node": ">= 0.8.0" } }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -4956,6 +5067,12 @@ "es-abstract": "^1.19.0" } }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -5054,6 +5171,35 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, + "chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "requires": { + "check-error": "^1.0.2" + } + }, + "chai-subset": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/chai-subset/-/chai-subset-1.6.0.tgz", + "integrity": "sha1-pdDKFOMpp5WW7XAFi2ZGvWmIz+k=", + "dev": true + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -5064,6 +5210,12 @@ "supports-color": "^5.3.0" } }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -5234,6 +5386,15 @@ "mimic-response": "^2.0.0" } }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -5286,6 +5447,13 @@ "integrity": "sha512-BWBkv157Cf/z7Hjod2v2JS7vyC36Dk1QQolAtuLjpl8RBlv7Z92X7+Ufc2cjfR/B3iJUiK0QmGZkgtsmmLz0Tw==", "dev": true }, + "dirty-chai": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/dirty-chai/-/dirty-chai-2.0.1.tgz", + "integrity": "sha512-ys79pWKvDMowIDEPC6Fig8d5THiC0DJ2gmTeGzVAoEH18J8OzLud0Jh7I9IWg3NSk8x2UocznUuFmfHCXYZx9w==", + "dev": true, + "requires": {} + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -5817,6 +5985,12 @@ } } }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, "get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -6796,6 +6970,12 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, "pg": { "version": "8.7.1", "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", @@ -7452,6 +7632,12 @@ "prelude-ls": "^1.2.1" } }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", diff --git a/package.json b/package.json index 89208b1..206255e 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,12 @@ "postgrator": "^5.0.0" }, "devDependencies": { + "chai": "^4.3.4", + "chai-as-promised": "^7.1.1", + "chai-subset": "^1.6.0", "crlf": "^1.1.1", "dirname-filename-esm": "^1.1.1", + "dirty-chai": "^2.0.1", "eslint": "^8.3.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.3", diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 7642572..1c8fee1 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -1,9 +1,10 @@ -import assert from 'assert'; +import { expect, use } from 'chai'; import path from 'path'; import readline from 'readline'; import eachSeries from 'p-each-series'; import { pEvent as fromEvent } from 'p-event'; import { dirname } from 'dirname-filename-esm'; +import { createRequire } from 'module'; import { mockCwd } from 'mock-cwd'; @@ -12,6 +13,11 @@ import { parse } from '../lib/command-line-options.js'; // eslint-disable-line i import { run } from '../lib/postgrator-cli.js'; // eslint-disable-line import/extensions const __dirname = dirname(import.meta); // eslint-disable-line no-underscore-dangle +const require = createRequire(import.meta.url); + +use(require('chai-subset')); +use(require('chai-as-promised')); +use(require('dirty-chai')); const MAX_REVISION = 5; const originalConsoleLog = console.log; @@ -43,10 +49,8 @@ async function removeVersionTable(options) { execQuery: client.query, }); - return pg.runQuery('DROP TABLE IF EXISTS schemaversion, animal, person').then(() => client.end()).catch((err) => { - assert.ifError(err); - return Promise.reject(err); - }); + await pg.runQuery('DROP TABLE IF EXISTS schemaversion, animal, person'); + return client.end(); } function getDefaultOptions() { @@ -72,21 +76,17 @@ function buildTestsForOptions(options) { options.to = originalTo; } - tests.push(() => removeVersionTable(options).catch((err) => { - assert.ifError(err); - return Promise.resolve(); - })); + tests.push(() => removeVersionTable(options)); tests.push(async () => { console.log('\n----- testing show help (output suppressed)-----'); options.help = true; console.log = consoleLogCapture; - const migrations = await run(options); + await expect(run(options)).to.become(undefined); console.log = originalConsoleLog; restoreOptions(); - assert.strictEqual(migrations, undefined); - assert.ok(log.indexOf('Examples') >= 0, 'No help was displayed'); + expect(log).to.match(/Examples/, 'No help was displayed'); }); tests.push(async () => { @@ -94,39 +94,42 @@ function buildTestsForOptions(options) { options.version = true; console.log = consoleLogCapture; - const migrations = await run(options); + await expect(run(options)).to.become(undefined); console.log = originalConsoleLog; restoreOptions(); - assert.strictEqual(migrations, undefined); - assert.ok(log.indexOf('Version: ') >= 0, 'No version was displayed'); + expect(log).to.match(/Version: /, 'No version was displayed'); }); tests.push(async () => { console.log('\n----- testing migration to 003 -----'); - const migrations = await run(options); - assert.equal(migrations.length, 3); - assert.equal(migrations[2].version, 3); + return expect(run(options)) + .to.eventually.have.lengthOf(3) + .and.have.nested.property('2.version').equal(3); }); tests.push(async () => { console.log('\n----- testing migration to 000 with conflict detection-----'); options.to = 0; - const migrations = await run(options); + await expect(run(options)).to.eventually.have.lengthOf(3).and.containSubset({ + 2: { + version: 1, + action: 'undo', + }, + }); restoreOptions(); - assert.equal(migrations.length, 3); - assert.equal(migrations[2].version, 1); - assert.equal(migrations[2].action, 'undo'); }); tests.push(async () => { console.log('\n----- testing migration to 001 -----'); options.to = 1; - const migrations = await run(options); + await expect(run(options)).to.eventually.have.lengthOf(1).and.containSubset({ + 0: { + version: 1, + action: 'do', + }, + }); restoreOptions(); - assert.equal(migrations.length, 1); - assert.equal(migrations[0].version, 1); - assert.equal(migrations[0].action, 'do'); }); tests.push(async () => { @@ -137,8 +140,8 @@ function buildTestsForOptions(options) { options.config = 'test/sample-config.json'; const migrations = await run(options); + expect(migrations[migrations.length - 1].version).to.equal(3); restoreOptions(); - assert.equal(migrations[migrations.length - 1].version, 3); }); tests.push(() => { @@ -148,10 +151,13 @@ function buildTestsForOptions(options) { options.database = ''; return mockCwd(path.join(__dirname, 'sample-config'), async () => { - const migrations = await run(options); + await expect(run(options)).to.eventually.containSubset({ + 0: { + version: 3, + action: 'undo', + }, + }); restoreOptions(); - assert.equal(migrations[0].version, 3); - assert.equal(migrations[0].action, 'undo'); }); }); @@ -160,13 +166,8 @@ function buildTestsForOptions(options) { options.config = 'test/config-which-does-not-exist.json'; options.to = '003'; - try { - await run(options); - } catch (err) { - restoreOptions(); - assert(err); - assert(err.message.indexOf('Config file not found:') >= 0); - } + await expect(run(options)).to.be.rejectedWith(Error, /^Config file not found:/); + restoreOptions(); }); tests.push(resetMigrations); @@ -175,10 +176,12 @@ function buildTestsForOptions(options) { console.log('\n----- testing using latest revision without specifying to-----'); options.to = getDefaultOptions().to; // is 'max' - const migrations = await run(options); + await expect(run(options)).to.eventually.have.lengthOf(MAX_REVISION).and.containSubset({ + [MAX_REVISION - 1]: { + version: MAX_REVISION, + }, + }); restoreOptions(); - assert.equal(migrations.length, MAX_REVISION); - assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); }); tests.push(resetMigrations); @@ -190,8 +193,7 @@ function buildTestsForOptions(options) { options.password = ''; options.to = ''; - const migrations = await run(options); - assert.equal(migrations.length, MAX_REVISION); + await expect(run(options)).to.eventually.have.lengthOf(MAX_REVISION); restoreOptions(); }); @@ -201,9 +203,8 @@ function buildTestsForOptions(options) { options.to = ''; return mockCwd(path.join(__dirname, 'sample-config'), async () => { - const migrations = await run(options); + await expect(run(options)).to.eventually.have.lengthOf(0); restoreOptions(); - assert.equal(migrations.length, 0); // returns number of applied migrations }); }); @@ -213,15 +214,10 @@ function buildTestsForOptions(options) { options['migration-pattern'] = 'test/empty-migrations/*'; console.log = consoleLogCapture; - try { - await run(options); - } catch (err) { - console.log = originalConsoleLog; - restoreOptions(); - assert(err, 'No error when there should be'); - assert(err.message.indexOf('No migration files found') >= 0); - assert(log.indexOf('Examples') < 0, "Help was displayed when shouldn't"); - } + await expect(run(options)).to.be.rejectedWith(Error, /^No migration files found/); + console.log = originalConsoleLog; + expect(log).not.to.match(/Examples/, "Help was displayed when shouldn't"); + restoreOptions(); }); tests.push(resetMigrations); @@ -233,10 +229,12 @@ function buildTestsForOptions(options) { options.to = 'max'; return mockCwd(path.join(__dirname, 'config-with-non-existing-directory'), async () => { - const migrations = await run(options); + await expect(run(options)).to.eventually.have.lengthOf(MAX_REVISION).and.containSubset({ + [MAX_REVISION - 1]: { + version: MAX_REVISION, + }, + }); restoreOptions(); - assert.equal(migrations.length, MAX_REVISION); - assert.equal(migrations[migrations.length - 1].version, MAX_REVISION); }); }); @@ -249,8 +247,7 @@ function buildTestsForOptions(options) { options.database = ''; return mockCwd(path.join(__dirname, 'config-with-other-directory'), async () => { - const migrations = await run(options); - assert(migrations.length, 2); + await expect(run(options)).to.eventually.have.lengthOf(2); await resetMigrations(); restoreOptions(); }); @@ -262,8 +259,10 @@ function buildTestsForOptions(options) { run(options); // this error is not thrown down the chain so it cannot be caught - const err = await fromEvent(process, 'unhandledRejection'); - assert(err, 'ERR_INVALID_ARG_TYPE'); + await expect(fromEvent(process, 'unhandledRejection')) + .to.eventually.be.an('error') + .and.have.property('message') + .match(/password authentication failed for user/); restoreOptions(); }); @@ -283,12 +282,10 @@ function buildTestsForOptions(options) { }; }; - return run(options).catch((err) => { - restoreOptions(); - assert(passwordAsked); - assert(err.length > 0); - readline.createInterface = originalCreateInterface; - }); + await expect(run(options)).to.be.rejectedWith(Error, /password authentication failed/); + expect(passwordAsked).to.be.true(); + restoreOptions(); + readline.createInterface = originalCreateInterface; }); tests.push(() => { @@ -309,24 +306,22 @@ function buildTestsForOptions(options) { }; return mockCwd(path.join(__dirname, 'config-without-password'), async () => { - const migrations = await run(options); - assert(migrations.length); - assert(passwordAsked); + await expect(run(options)).to.eventually.have.property('length').greaterThan(0); + expect(passwordAsked).to.be.true(); await resetMigrations(); readline.createInterface = originalCreateInterface; restoreOptions(); }); }); - tests.push(() => { + tests.push(async () => { console.log('\n----- testing detecting migration files with same number-----'); options.to = 3; options['migration-pattern'] = 'test/conflicting-migrations/*'; - return run(options).catch((err) => { - restoreOptions(); - assert(err.message.indexOf('Two migrations found with version 2 and action do') >= 0, 'No migration conflicts were detected'); - }); + await expect(run(options)) + .to.be.rejectedWith(Error, /^Two migrations found with version 2 and action do/, 'No migration conflicts were detected'); + restoreOptions(); }); tests.push(() => removeVersionTable({ @@ -338,11 +333,10 @@ function buildTestsForOptions(options) { tests.push(async () => { console.log('\n----- testing migration to 003 using mysql -----'); - return mockCwd(path.join(__dirname, 'mysql-config'), async () => { - const migrations = await run(options); - assert.equal(migrations.length, 3); - assert.equal(migrations[2].version, 3); - }); + return mockCwd( + path.join(__dirname, 'mysql-config'), + async () => expect(run(options)).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3), + ); }); tests.push(() => removeVersionTable({ @@ -357,11 +351,10 @@ function buildTestsForOptions(options) { tests.push(async () => { console.log('\n----- testing migration to 003 using mssql -----'); - return mockCwd(path.join(__dirname, 'mssql-config'), async () => { - const migrations = await run(options); - assert.equal(migrations.length, 3); - assert.equal(migrations[2].version, 3); - }); + return mockCwd( + path.join(__dirname, 'mssql-config'), + async () => expect(run(options)).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3), + ); }); } @@ -393,5 +386,4 @@ eachSeries(tests, (testFunc) => { }).catch((err) => { console.log = originalConsoleLog; console.log(err); - assert.ifError(err); }); From d3bd30ac14fb849d996124b4de650a170a763007 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 29 Nov 2021 18:21:30 +0900 Subject: [PATCH 19/32] Support merging options --- index.js | 5 +- lib/command-line-options.js | 41 ++++---- lib/postgrator-cli.js | 139 ++++++++++----------------- test/postgrator-cli-tests.js | 181 +++++++++++++++++++---------------- 4 files changed, 175 insertions(+), 191 deletions(-) diff --git a/index.js b/index.js index e086812..013ba8d 100755 --- a/index.js +++ b/index.js @@ -1,10 +1,9 @@ #!/usr/bin/env node +import { argv } from 'process'; import { run } from './lib/postgrator-cli.js'; // eslint-disable-line import/extensions -import { parse } from './lib/command-line-options.js'; // eslint-disable-line import/extensions -const options = parse(); -run(options).catch((err) => { +run(argv).catch((err) => { console.log(`Error: ${err.message}`); process.exit(1); }); diff --git a/lib/command-line-options.js b/lib/command-line-options.js index 255247a..95b10ed 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -9,54 +9,59 @@ export const DEFAULT_MIGRATION_PATTERN = 'migrations/*'; /* eslint-disable object-property-newline */ -const optionDefinitions = [ +const optionDefinitions = (defaults = {}) => [ { name: 'to', description: "Version number of the file to migrate to or 'max'. Default: 'max'", - type: String, typeLabel: 'version', defaultOption: true, defaultValue: 'max', + type: String, typeLabel: 'version', defaultOption: true, defaultValue: defaults.to || 'max', }, { name: 'driver', description: "Database driver. Default: 'pg'", - alias: 'r', type: String, typeLabel: 'pg|mysql|mssql', defaultValue: 'pg', + alias: 'r', type: String, typeLabel: 'pg|mysql|mssql', defaultValue: defaults.driver || 'pg', }, { name: 'host', description: "Host. Default: '127.0.0.1'", - alias: 'h', type: String, typeLabel: '{underline hostname}', defaultValue: '127.0.0.1', + alias: 'h', type: String, typeLabel: '{underline hostname}', defaultValue: defaults.host || '127.0.0.1', }, { name: 'port', description: "Host. Default: '5432'", - alias: 'o', type: Number, typeLabel: '{underline port}', defaultValue: '5432', + alias: 'o', type: Number, typeLabel: '{underline port}', defaultValue: defaults.port || '5432', }, { name: 'database', description: 'Database name', - alias: 'd', type: String, typeLabel: '{underline database}', defaultValue: '', + alias: 'd', type: String, typeLabel: '{underline database}', defaultValue: defaults.database || '', }, { name: 'username', description: 'Username', - alias: 'u', type: String, typeLabel: '{underline database}', defaultValue: '', + alias: 'u', type: String, typeLabel: '{underline database}', defaultValue: defaults.username || '', }, { name: 'password', description: 'Password. If parameter without value is given, password will be asked.', - alias: 'p', type: String, typeLabel: '[{underline password}]', defaultValue: '', + alias: 'p', type: String, typeLabel: '[{underline password}]', defaultValue: defaults.password || null, }, { name: 'migration-pattern', description: "A pattern matching files to run migration files from. Default: 'migrations/*''", - alias: 'm', type: String, typeLabel: '{underline directory}', defaultValue: DEFAULT_MIGRATION_PATTERN, - }, - { - name: 'config', description: 'Select the config file explicitly.', - alias: 'c', type: String, typeLabel: '{underline file}', + alias: 'm', type: String, typeLabel: '{underline directory}', defaultValue: defaults.migrationPattern || DEFAULT_MIGRATION_PATTERN, }, { name: 'schema-table', description: 'Table created to track schema version.', - alias: 't', type: String, defaultValue: 'schemaversion', + alias: 't', type: String, defaultValue: defaults.schemaTable || 'schemaversion', }, { name: 'validate-checksum', description: 'Validates checksum of existing SQL migration files already run prior to executing migrations.', - type: Boolean, defaultValue: true, + type: Boolean, defaultValue: defaults.validateChecksum || true, }, { name: 'ssl', description: 'Enables ssl connections. When using the mysql driver it expects a string containing name of ssl profile.', alias: 's', + ...defaults.ssl && { ssl: defaults.ssl }, + }, + { + name: 'prompt-password', description: 'Enables password prompt if the password is empty', + type: Boolean, defaultValue: defaults.promptPassword || false, + }, + { + name: 'config', description: 'Select the config file explicitly.', + alias: 'c', type: String, typeLabel: '{underline file}', }, { name: 'no-config', description: 'Disable config loading', @@ -72,9 +77,9 @@ const optionDefinitions = [ }, ]; -export const parse = (options) => { - const args = commandLineArgs(optionDefinitions, options); - if (args.ssl === null) { // If no value is handed, treat it as boolean +export const parse = (argv, defaults) => { + const args = commandLineArgs(optionDefinitions(defaults), { argv }); + if (args.ssl === null && defaults.ssl === undefined) { // If no value is handed, treat it as boolean args.ssl = true; } return args; diff --git a/lib/postgrator-cli.js b/lib/postgrator-cli.js index dd078f9..b48712d 100644 --- a/lib/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -5,7 +5,7 @@ import Postgrator from 'postgrator'; import { cosmiconfig } from 'cosmiconfig'; import tap from 'p-tap'; import getClient from './clients/index.js'; // eslint-disable-line import/extensions -import { DEFAULT_MIGRATION_PATTERN, sections } from './command-line-options.js'; // eslint-disable-line import/extensions +import { parse, sections } from './command-line-options.js'; // eslint-disable-line import/extensions const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); @@ -33,54 +33,41 @@ function getAbsolutePath(fileOrDirectory) { : path.join(process.cwd(), fileOrDirectory); } -function getPostgratorConfigFromCommandLineArgs(commandLineArgs) { - return { - driver: commandLineArgs.driver, - database: commandLineArgs.database, - migrationPattern: commandLineArgs['migration-pattern'], - schemaTable: commandLineArgs['schema-table'], - validateChecksum: commandLineArgs['validate-checksum'], - }; -} - -function getClientConfigFromCommandLineArgs(commandLineArgs) { - return { - host: commandLineArgs.host, - port: commandLineArgs.port, - database: commandLineArgs.database, - username: commandLineArgs.username, - password: commandLineArgs.password, - secure: commandLineArgs.secure, - }; -} - -function pick(keys, obj) { - return Object.keys(obj).reduce((acc, key) => { - if (keys.some((k) => k === key)) acc[key] = obj[key]; - return acc; - }, {}); -} - -function getPostgratorConfigFromConfigFile(config) { - return pick([ - 'driver', - 'database', - 'migrationPattern', - 'schemaTable', - 'validateChecksum', - ], config); -} - -function getClientConfigFromConfigFile(config) { - return pick([ - 'host', - 'port', - 'database', - 'username', - 'password', - 'ssl', - ], config); -} +const getDefaults = (config) => { + const explorer = cosmiconfig('postgrator'); + const pResult = config + ? explorer + .load(config) + .catch( + (err) => (err.code === 'ENOENT' ? Promise.reject(new Error(`Config file not found: ${config}`)) : Promise.reject(err)), + ) + : explorer.search(); + return pResult.then((result) => result?.config ?? {}); +}; + +const getPostgratorOptions = (options) => ({ + ...(options.to ? { to: getMigrateToNumber(options.to) } : {}), + ...(options.driver ? { driver: options.driver } : {}), + ...(options.database ? { database: options.database } : {}), + ...(options['migration-pattern'] ? { migrationPattern: getAbsolutePath(options['migration-pattern']) } : {}), + ...(options['schema-table'] ? { schemaTable: options['schema-table'] } : {}), + ...(options['validate-checksum'] ? { validateChecksum: options['validate-checksum'] } : {}), +}); + +const getClientOptions = async (options) => ({ + ...(options.host ? { host: options.host } : {}), + ...(options.port ? { port: options.port } : {}), + ...(options.database ? { database: options.database } : {}), + ...(options.username ? { username: options.username } : {}), + ...(options.ssl ? { ssl: options.ssl } : {}), + ...( + options.password // eslint-disable-line no-nested-ternary + ? { password: options.password } + : options['prompt-password'] + ? { password: await promptPassword() } + : {} + ), +}); /** * Gets version to migrate to as number @@ -127,16 +114,11 @@ function migrate(postgrator, to, migrationPattern) { /** * Gets password from postgrator config or as user input - * @param {object} postgratorConfig * @returns {string} Promise */ -async function getPassword(postgratorConfig) { - if (postgratorConfig.password !== null && postgratorConfig.password !== undefined) { - return postgratorConfig.password; - } - +async function promptPassword() { // Ask password if it is not set - const readline = (await import('readline')).default; + const { default: readline } = await import('readline'); const rl = readline.createInterface({ input: process.stdin, @@ -172,56 +154,37 @@ async function getPassword(postgratorConfig) { /* -------------------------- Main ---------------------------------- */ // eslint-disable-next-line import/prefer-default-export -export async function run(commandLineArgs) { +export async function run(argv) { + const { + help, version, config, 'no-config': noConfig, + } = parse(argv); // first parse, without defaults + // Print help if requested - if (commandLineArgs.help) { + if (help) { printUsage(); return Promise.resolve(); } // Print version if requested - if (commandLineArgs.version) { + if (version) { console.log(`Version: ${pjson.version}`); return Promise.resolve(); } - let postgratorConfig = getPostgratorConfigFromCommandLineArgs(commandLineArgs); - let clientConfig = getClientConfigFromCommandLineArgs(commandLineArgs); - if (commandLineArgs.config) { - const explorer = cosmiconfig('postgrator'); - const { config } = commandLineArgs; - const result = await explorer - .load(config) - .catch( - (err) => (err.code === 'ENOENT' ? Promise.reject(new Error(`Config file not found: ${config}`)) : Promise.reject(err)), - ); - postgratorConfig = (!result || result.isEmpty) ? postgratorConfig : getPostgratorConfigFromConfigFile(result.config); - clientConfig = (!result || result.isEmpty) ? clientConfig : getClientConfigFromConfigFile(result.config); - } else if (!commandLineArgs['no-config']) { - const explorer = cosmiconfig('postgrator'); - const result = await explorer.search(); - postgratorConfig = (!result || result.isEmpty) ? postgratorConfig : getPostgratorConfigFromConfigFile(result.config); - clientConfig = (!result || result.isEmpty) ? clientConfig : getClientConfigFromConfigFile(result.config); - } - - if (!postgratorConfig.migrationPattern) { - postgratorConfig.migrationPattern = DEFAULT_MIGRATION_PATTERN; - } - postgratorConfig.migrationPattern = getAbsolutePath(postgratorConfig.migrationPattern); - - const migrateTo = getMigrateToNumber(commandLineArgs.to); + const defaults = noConfig ? {} : await getDefaults(config); + const options = parse(argv, defaults); - clientConfig.password = await getPassword(clientConfig); + const postgratorOptions = getPostgratorOptions(options); // eslint-disable-next-line import/extensions - const client = await getClient(postgratorConfig.driver, clientConfig); + const client = await getClient(postgratorOptions.driver, await getClientOptions(options)); await client.connect(); // Create postgrator let postgrator; try { postgrator = new Postgrator({ - ...postgratorConfig, + ...postgratorOptions, execQuery: client.query, }); } catch (err) { @@ -239,7 +202,7 @@ export async function run(commandLineArgs) { (migration) => logMessage(`running ${migration.filename}`), ); - return migrate(postgrator, migrateTo, postgratorConfig.migrationPattern) + return migrate(postgrator, postgratorOptions.to, postgratorOptions.migrationPattern) .then(tap(() => client.end())) .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); } diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 1c8fee1..81b2f67 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -54,7 +54,7 @@ async function removeVersionTable(options) { } function getDefaultOptions() { - return parse({ partial: true }); + return parse(); } /* Build a set of tests for a given config. @@ -62,96 +62,103 @@ function getDefaultOptions() { postgres, mysql, sql server, etc. ============================================================================= */ function buildTestsForOptions(options) { - const originalOptions = JSON.parse(JSON.stringify(options)); + const restoreOptions = () => {}; - function restoreOptions() { - options = JSON.parse(JSON.stringify(originalOptions)); + function getArgList(opts) { + return Object.entries(opts) + .map(([key, val]) => [`--${key}`].concat(typeof val === 'boolean' ? [] : [val])) + .flat(); } - async function resetMigrations() { + async function resetMigrations(opts = options) { console.log('\n----- Reset migrations-----'); - const originalTo = options.to; - options.to = 0; - await run(options); - options.to = originalTo; + await run(getArgList({ ...opts, to: 0 })); } tests.push(() => removeVersionTable(options)); tests.push(async () => { console.log('\n----- testing show help (output suppressed)-----'); - options.help = true; + const args = getArgList({ + ...options, + help: true, + }); console.log = consoleLogCapture; - await expect(run(options)).to.become(undefined); + await expect(run(args)).to.become(undefined); console.log = originalConsoleLog; - restoreOptions(); expect(log).to.match(/Examples/, 'No help was displayed'); }); tests.push(async () => { console.log('\n----- testing show version (output suppressed)-----'); - options.version = true; + const args = getArgList({ + ...options, + version: true, + }); console.log = consoleLogCapture; - await expect(run(options)).to.become(undefined); + await expect(run(args)).to.become(undefined); console.log = originalConsoleLog; - restoreOptions(); expect(log).to.match(/Version: /, 'No version was displayed'); }); tests.push(async () => { console.log('\n----- testing migration to 003 -----'); - return expect(run(options)) + return expect(run(getArgList(options))) .to.eventually.have.lengthOf(3) .and.have.nested.property('2.version').equal(3); }); tests.push(async () => { console.log('\n----- testing migration to 000 with conflict detection-----'); - options.to = 0; + const args = getArgList({ + ...options, + to: 0, + }); - await expect(run(options)).to.eventually.have.lengthOf(3).and.containSubset({ + await expect(run(args)).to.eventually.have.lengthOf(3).and.containSubset({ 2: { version: 1, action: 'undo', }, }); - restoreOptions(); }); tests.push(async () => { console.log('\n----- testing migration to 001 -----'); - options.to = 1; - await expect(run(options)).to.eventually.have.lengthOf(1).and.containSubset({ + const args = getArgList({ + ...options, + to: 1, + }); + + await expect(run(args)).to.eventually.have.lengthOf(1).and.containSubset({ 0: { version: 1, action: 'do', }, }); - restoreOptions(); }); tests.push(async () => { console.log('\n----- testing migration from 001 to 003 using config file defined explicitly -----'); - options.to = '0003'; - options.username = ''; - options.database = ''; - options.config = 'test/sample-config.json'; + const args = getArgList({ + to: '0003', + config: 'test/sample-config.json', + }); - const migrations = await run(options); + const migrations = await run(args); expect(migrations[migrations.length - 1].version).to.equal(3); - restoreOptions(); }); tests.push(() => { console.log('\n----- testing migration from 003 to 002 using config file -----'); - options.to = '02'; - options.username = ''; - options.database = ''; + const args = getArgList({ + to: '02', + }); return mockCwd(path.join(__dirname, 'sample-config'), async () => { - await expect(run(options)).to.eventually.containSubset({ + await expect(run(args)).to.eventually.containSubset({ 0: { version: 3, action: 'undo', @@ -163,78 +170,81 @@ function buildTestsForOptions(options) { tests.push(async () => { console.log('\n----- testing non-existing config file-----'); - options.config = 'test/config-which-does-not-exist.json'; - options.to = '003'; + const args = getArgList({ + to: '003', + config: 'test/config-which-does-not-exist.json', + }); - await expect(run(options)).to.be.rejectedWith(Error, /^Config file not found:/); - restoreOptions(); + await expect(run(args)).to.be.rejectedWith(Error, /^Config file not found:/); }); tests.push(resetMigrations); tests.push(async () => { console.log('\n----- testing using latest revision without specifying to-----'); - options.to = getDefaultOptions().to; // is 'max' + const args = getArgList({ + ...options, + to: getDefaultOptions().to, // is 'max', + }); - await expect(run(options)).to.eventually.have.lengthOf(MAX_REVISION).and.containSubset({ + await expect(run(args)).to.eventually.have.lengthOf(MAX_REVISION).and.containSubset({ [MAX_REVISION - 1]: { version: MAX_REVISION, }, }); - restoreOptions(); }); tests.push(resetMigrations); tests.push(async () => { console.log('\n----- testing using latest revision with config file set by absolute path-----'); - const absolutePath = path.resolve(__dirname, './sample-config.json'); - options.config = absolutePath; - options.password = ''; - options.to = ''; + const args = getArgList({ + config: path.resolve(__dirname, './sample-config.json'), + }); - await expect(run(options)).to.eventually.have.lengthOf(MAX_REVISION); - restoreOptions(); + await expect(run(args)).to.eventually.have.lengthOf(MAX_REVISION); }); tests.push(() => { console.log('\n----- testing it does not re-apply same migrations -----'); - options.password = ''; - options.to = ''; return mockCwd(path.join(__dirname, 'sample-config'), async () => { - await expect(run(options)).to.eventually.have.lengthOf(0); + await expect(run()).to.eventually.have.lengthOf(0); restoreOptions(); }); }); tests.push(async () => { console.log('\n----- testing with no migration files found-----'); - options.to = 3; - options['migration-pattern'] = 'test/empty-migrations/*'; + const args = getArgList({ + ...options, + to: 3, + 'migration-pattern': 'test/empty-migrations/*', + }); console.log = consoleLogCapture; - await expect(run(options)).to.be.rejectedWith(Error, /^No migration files found/); + await expect(run(args)).to.be.rejectedWith(Error, /^No migration files found/); console.log = originalConsoleLog; expect(log).not.to.match(/Examples/, "Help was displayed when shouldn't"); - restoreOptions(); }); tests.push(resetMigrations); tests.push(() => { console.log('\n----- testing ignoring config file -----'); - options['migration-pattern'] = '../migrations/*'; - options['no-config'] = true; - options.to = 'max'; + const args = getArgList({ + ...options, + 'migration-pattern': '../migrations/*', + 'no-config': true, + to: 'max', + }); return mockCwd(path.join(__dirname, 'config-with-non-existing-directory'), async () => { - await expect(run(options)).to.eventually.have.lengthOf(MAX_REVISION).and.containSubset({ + await expect(run(args)).to.eventually.have.lengthOf(MAX_REVISION).and.containSubset({ [MAX_REVISION - 1]: { version: MAX_REVISION, }, }); - restoreOptions(); }); }); @@ -242,35 +252,40 @@ function buildTestsForOptions(options) { tests.push(() => { console.log('\n----- testing with alternative migration directory set in config file-----'); - options.to = 'max'; - options.username = ''; - options.database = ''; + const args = getArgList({ + to: 'max', + }); return mockCwd(path.join(__dirname, 'config-with-other-directory'), async () => { - await expect(run(options)).to.eventually.have.lengthOf(2); - await resetMigrations(); - restoreOptions(); + await expect(run(args)).to.eventually.have.lengthOf(2); + await resetMigrations({}); }); }); tests.push(async () => { console.log('\n----- testing empty password-----'); - options.password = ''; + const args = getArgList({ + ...options, + password: '', + }); - run(options); + run(args); // this error is not thrown down the chain so it cannot be caught await expect(fromEvent(process, 'unhandledRejection')) .to.eventually.be.an('error') .and.have.property('message') .match(/password authentication failed for user/); - restoreOptions(); }); tests.push(async () => { - console.log('\n----- testing null password asks from user-----'); + console.log('\n----- testing null password asks from user when prompt-password is set -----'); let passwordAsked = false; - options.password = null; + const { password, ...opts } = options; + const args = getArgList({ + ...opts, + 'prompt-password': true, + }); // mock readline const originalCreateInterface = readline.createInterface; @@ -282,17 +297,17 @@ function buildTestsForOptions(options) { }; }; - await expect(run(options)).to.be.rejectedWith(Error, /password authentication failed/); + await expect(run(args)).to.be.rejectedWith(Error, /password authentication failed/); expect(passwordAsked).to.be.true(); - restoreOptions(); readline.createInterface = originalCreateInterface; }); tests.push(() => { - console.log('\n----- testing that config file without password asks from user -----'); - options.to = 'max'; - options.username = ''; - options.database = ''; + console.log('\n----- testing that config file without password asks from user when prompt-password is set -----'); + const args = getArgList({ + to: 'max', + 'prompt-password': true, + }); let passwordAsked = false; // mock readline @@ -306,20 +321,22 @@ function buildTestsForOptions(options) { }; return mockCwd(path.join(__dirname, 'config-without-password'), async () => { - await expect(run(options)).to.eventually.have.property('length').greaterThan(0); + await expect(run(args)).to.eventually.have.property('length').greaterThan(0); expect(passwordAsked).to.be.true(); - await resetMigrations(); + await resetMigrations({ 'prompt-password': true }); readline.createInterface = originalCreateInterface; - restoreOptions(); }); }); tests.push(async () => { console.log('\n----- testing detecting migration files with same number-----'); - options.to = 3; - options['migration-pattern'] = 'test/conflicting-migrations/*'; + const args = getArgList({ + ...options, + to: 3, + 'migration-pattern': 'test/conflicting-migrations/*', + }); - await expect(run(options)) + await expect(run(args)) .to.be.rejectedWith(Error, /^Two migrations found with version 2 and action do/, 'No migration conflicts were detected'); restoreOptions(); }); @@ -335,7 +352,7 @@ function buildTestsForOptions(options) { return mockCwd( path.join(__dirname, 'mysql-config'), - async () => expect(run(options)).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3), + async () => expect(run([3])).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3), ); }); @@ -353,7 +370,7 @@ function buildTestsForOptions(options) { return mockCwd( path.join(__dirname, 'mssql-config'), - async () => expect(run(options)).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3), + async () => expect(run([3])).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3), ); }); } From e7d7630b34407c4035fe939e932249fefa23f60e Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 29 Nov 2021 18:43:03 +0900 Subject: [PATCH 20/32] Fix node 12 --- lib/postgrator-cli.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/postgrator-cli.js b/lib/postgrator-cli.js index b48712d..63baf88 100644 --- a/lib/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -33,16 +33,16 @@ function getAbsolutePath(fileOrDirectory) { : path.join(process.cwd(), fileOrDirectory); } -const getDefaults = (config) => { +const getDefaults = (loadPath) => { const explorer = cosmiconfig('postgrator'); - const pResult = config + const pResult = loadPath ? explorer - .load(config) + .load(loadPath) .catch( - (err) => (err.code === 'ENOENT' ? Promise.reject(new Error(`Config file not found: ${config}`)) : Promise.reject(err)), + (err) => (err.code === 'ENOENT' ? Promise.reject(new Error(`Config file not found: ${loadPath}`)) : Promise.reject(err)), ) : explorer.search(); - return pResult.then((result) => result?.config ?? {}); + return pResult.then((res) => (res && res.config) || {}); }; const getPostgratorOptions = (options) => ({ From d0a3ee6f93ea1138d96616436c6b9ea27f926a2d Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 29 Nov 2021 18:48:04 +0900 Subject: [PATCH 21/32] Remove restoreOptions from tests --- test/postgrator-cli-tests.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 81b2f67..303c3a8 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -62,8 +62,6 @@ function getDefaultOptions() { postgres, mysql, sql server, etc. ============================================================================= */ function buildTestsForOptions(options) { - const restoreOptions = () => {}; - function getArgList(opts) { return Object.entries(opts) .map(([key, val]) => [`--${key}`].concat(typeof val === 'boolean' ? [] : [val])) @@ -164,7 +162,6 @@ function buildTestsForOptions(options) { action: 'undo', }, }); - restoreOptions(); }); }); @@ -210,7 +207,6 @@ function buildTestsForOptions(options) { return mockCwd(path.join(__dirname, 'sample-config'), async () => { await expect(run()).to.eventually.have.lengthOf(0); - restoreOptions(); }); }); @@ -328,7 +324,7 @@ function buildTestsForOptions(options) { }); }); - tests.push(async () => { + tests.push(() => { console.log('\n----- testing detecting migration files with same number-----'); const args = getArgList({ ...options, @@ -336,9 +332,8 @@ function buildTestsForOptions(options) { 'migration-pattern': 'test/conflicting-migrations/*', }); - await expect(run(args)) + return expect(run(args)) .to.be.rejectedWith(Error, /^Two migrations found with version 2 and action do/, 'No migration conflicts were detected'); - restoreOptions(); }); tests.push(() => removeVersionTable({ From f0c77a9848427fedacd2487409d229b26fe29e44 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 29 Nov 2021 19:34:16 +0900 Subject: [PATCH 22/32] Remove default values from host, user, database --- lib/command-line-options.js | 25 +++++++++++++------------ lib/postgrator-cli.js | 2 +- test/postgrator-cli-tests.js | 15 +++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/command-line-options.js b/lib/command-line-options.js index 95b10ed..eb4c325 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -19,24 +19,29 @@ const optionDefinitions = (defaults = {}) => [ alias: 'r', type: String, typeLabel: 'pg|mysql|mssql', defaultValue: defaults.driver || 'pg', }, { - name: 'host', description: "Host. Default: '127.0.0.1'", - alias: 'h', type: String, typeLabel: '{underline hostname}', defaultValue: defaults.host || '127.0.0.1', + name: 'host', description: 'Host.', + alias: 'h', type: String, typeLabel: '{underline hostname}', + ...defaults.host && { defaultValue: defaults.host }, }, { - name: 'port', description: "Host. Default: '5432'", - alias: 'o', type: Number, typeLabel: '{underline port}', defaultValue: defaults.port || '5432', + name: 'port', description: 'Port.', + alias: 'o', type: Number, typeLabel: '{underline port}', + ...defaults.port && { defaultValue: defaults.port }, }, { name: 'database', description: 'Database name', - alias: 'd', type: String, typeLabel: '{underline database}', defaultValue: defaults.database || '', + alias: 'd', type: String, typeLabel: '{underline database}', + ...defaults.database && { defaultValue: defaults.database }, }, { name: 'username', description: 'Username', - alias: 'u', type: String, typeLabel: '{underline database}', defaultValue: defaults.username || '', + alias: 'u', type: String, typeLabel: '{underline database}', + ...defaults.username && { defaultValue: defaults.username }, }, { name: 'password', description: 'Password. If parameter without value is given, password will be asked.', - alias: 'p', type: String, typeLabel: '[{underline password}]', defaultValue: defaults.password || null, + alias: 'p', type: String, typeLabel: '[{underline password}]', + ...defaults.password && { defaultValue: defaults.password }, }, { name: 'migration-pattern', description: "A pattern matching files to run migration files from. Default: 'migrations/*''", @@ -53,11 +58,7 @@ const optionDefinitions = (defaults = {}) => [ { name: 'ssl', description: 'Enables ssl connections. When using the mysql driver it expects a string containing name of ssl profile.', alias: 's', - ...defaults.ssl && { ssl: defaults.ssl }, - }, - { - name: 'prompt-password', description: 'Enables password prompt if the password is empty', - type: Boolean, defaultValue: defaults.promptPassword || false, + ...defaults.ssl && { defaultValue: defaults.ssl }, }, { name: 'config', description: 'Select the config file explicitly.', diff --git a/lib/postgrator-cli.js b/lib/postgrator-cli.js index 63baf88..7363ab6 100644 --- a/lib/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -63,7 +63,7 @@ const getClientOptions = async (options) => ({ ...( options.password // eslint-disable-line no-nested-ternary ? { password: options.password } - : options['prompt-password'] + : options.password === null ? { password: await promptPassword() } : {} ), diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 303c3a8..b47a356 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -64,7 +64,7 @@ function getDefaultOptions() { function buildTestsForOptions(options) { function getArgList(opts) { return Object.entries(opts) - .map(([key, val]) => [`--${key}`].concat(typeof val === 'boolean' ? [] : [val])) + .map(([key, val]) => [`--${key}`].concat(typeof val === 'boolean' || val === null ? [] : [val])) .flat(); } @@ -274,13 +274,12 @@ function buildTestsForOptions(options) { }); tests.push(async () => { - console.log('\n----- testing null password asks from user when prompt-password is set -----'); + console.log('\n----- testing null password asks from user when password option is empty -----'); let passwordAsked = false; - const { password, ...opts } = options; const args = getArgList({ - ...opts, - 'prompt-password': true, + ...options, + password: null, }); // mock readline @@ -299,10 +298,10 @@ function buildTestsForOptions(options) { }); tests.push(() => { - console.log('\n----- testing that config file without password asks from user when prompt-password is set -----'); + console.log('\n----- testing that config file without password asks from user when password option is empty -----'); const args = getArgList({ to: 'max', - 'prompt-password': true, + password: null, }); let passwordAsked = false; @@ -319,7 +318,7 @@ function buildTestsForOptions(options) { return mockCwd(path.join(__dirname, 'config-without-password'), async () => { await expect(run(args)).to.eventually.have.property('length').greaterThan(0); expect(passwordAsked).to.be.true(); - await resetMigrations({ 'prompt-password': true }); + await resetMigrations({ password: null }); readline.createInterface = originalCreateInterface; }); }); From c54ff633b0ed5e36a309a5bade4efce558fa3d83 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 29 Nov 2021 21:16:35 +0900 Subject: [PATCH 23/32] Add missing tests --- ...orrc.json => config-without-password.json} | 2 +- .../.postgratorrc.json => mssql-config.json} | 2 +- .../.postgratorrc.json => mysql-config.json} | 2 +- test/postgrator-cli-tests.js | 76 ++++++++++++++----- 4 files changed, 60 insertions(+), 22 deletions(-) rename test/{config-without-password/.postgratorrc.json => config-without-password.json} (73%) rename test/{mssql-config/.postgratorrc.json => mssql-config.json} (77%) rename test/{mysql-config/.postgratorrc.json => mysql-config.json} (77%) diff --git a/test/config-without-password/.postgratorrc.json b/test/config-without-password.json similarity index 73% rename from test/config-without-password/.postgratorrc.json rename to test/config-without-password.json index 769b6bd..5ed2c11 100644 --- a/test/config-without-password/.postgratorrc.json +++ b/test/config-without-password.json @@ -1,5 +1,5 @@ { - "migrationPattern": "../migrations/*", + "migrationPattern": "test/migrations/*", "driver": "pg", "host": "127.0.0.1", "port": 5432, diff --git a/test/mssql-config/.postgratorrc.json b/test/mssql-config.json similarity index 77% rename from test/mssql-config/.postgratorrc.json rename to test/mssql-config.json index 92bb656..5e8cf89 100644 --- a/test/mssql-config/.postgratorrc.json +++ b/test/mssql-config.json @@ -1,5 +1,5 @@ { - "migrationPattern": "../migrations/*", + "migrationPattern": "test/migrations/*", "driver": "mssql", "host": "127.0.0.1", "port": 1433, diff --git a/test/mysql-config/.postgratorrc.json b/test/mysql-config.json similarity index 77% rename from test/mysql-config/.postgratorrc.json rename to test/mysql-config.json index 44c7002..9007999 100644 --- a/test/mysql-config/.postgratorrc.json +++ b/test/mysql-config.json @@ -1,5 +1,5 @@ { - "migrationPattern": "../migrations/*", + "migrationPattern": "test/migrations/*", "driver": "mysql", "host": "127.0.0.1", "port": 3306, diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index b47a356..d795f40 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -68,9 +68,9 @@ function buildTestsForOptions(options) { .flat(); } - async function resetMigrations(opts = options) { + function resetMigrations(opts = options) { console.log('\n----- Reset migrations-----'); - await run(getArgList({ ...opts, to: 0 })); + return run(getArgList({ ...opts, to: 0 })); } tests.push(() => removeVersionTable(options)); @@ -177,6 +177,19 @@ function buildTestsForOptions(options) { tests.push(resetMigrations); + tests.push(() => { + console.log('\n----- testing merging cli and config options -----'); + const args = getArgList({ + to: '003', + password: options.password, + config: 'test/config-without-password.json', + }); + + return expect(run(args)).to.eventually.have.lengthOf(3); + }); + + tests.push(resetMigrations); + tests.push(async () => { console.log('\n----- testing using latest revision without specifying to-----'); const args = getArgList({ @@ -193,13 +206,13 @@ function buildTestsForOptions(options) { tests.push(resetMigrations); - tests.push(async () => { + tests.push(() => { console.log('\n----- testing using latest revision with config file set by absolute path-----'); const args = getArgList({ config: path.resolve(__dirname, './sample-config.json'), }); - await expect(run(args)).to.eventually.have.lengthOf(MAX_REVISION); + return expect(run(args)).to.eventually.have.lengthOf(MAX_REVISION); }); tests.push(() => { @@ -210,6 +223,36 @@ function buildTestsForOptions(options) { }); }); + tests.push(resetMigrations); + + tests.push(() => { + console.log('\n----- testing preferring cli arguments over config options-----'); + const args = getArgList({ + username: 'invaliduser', + config: path.resolve(__dirname, './sample-config.json'), + }); + + return expect(run(args)).to.be.rejectedWith(Error, /^password authentication failed for user "invaliduser"/); + }); + + tests.push(resetMigrations); + + tests.push(async () => { + console.log('\n----- testing using environment variables to run migrations -----'); + process.env.PGHOST = options.host; + process.env.PGPORT = options.port; + process.env.PGUSER = options.username; + process.env.PGPASSWORD = options.password; + process.env.PGDATABASE = options.database; + + await expect(run(['--migration-pattern', options['migration-pattern']])).to.eventually.have.lengthOf(MAX_REVISION); + process.env.PGHOST = undefined; + process.env.PGPORT = undefined; + process.env.PGUSER = undefined; + process.env.PGPASSWORD = undefined; + process.env.PGDATABASE = undefined; + }); + tests.push(async () => { console.log('\n----- testing with no migration files found-----'); const args = getArgList({ @@ -297,10 +340,11 @@ function buildTestsForOptions(options) { readline.createInterface = originalCreateInterface; }); - tests.push(() => { + tests.push(async () => { console.log('\n----- testing that config file without password asks from user when password option is empty -----'); const args = getArgList({ to: 'max', + config: 'test/config-without-password.json', password: null, }); let passwordAsked = false; @@ -315,12 +359,10 @@ function buildTestsForOptions(options) { }; }; - return mockCwd(path.join(__dirname, 'config-without-password'), async () => { - await expect(run(args)).to.eventually.have.property('length').greaterThan(0); - expect(passwordAsked).to.be.true(); - await resetMigrations({ password: null }); - readline.createInterface = originalCreateInterface; - }); + await expect(run(args)).to.eventually.have.property('length').greaterThan(0); + expect(passwordAsked).to.be.true(); + await resetMigrations({ config: 'test/config-without-password.json', password: null }); + readline.createInterface = originalCreateInterface; }); tests.push(() => { @@ -343,11 +385,9 @@ function buildTestsForOptions(options) { tests.push(async () => { console.log('\n----- testing migration to 003 using mysql -----'); + const args = ['3', '--config', 'test/mysql-config.json']; - return mockCwd( - path.join(__dirname, 'mysql-config'), - async () => expect(run([3])).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3), - ); + return expect(run(args)).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3); }); tests.push(() => removeVersionTable({ @@ -361,11 +401,9 @@ function buildTestsForOptions(options) { tests.push(async () => { console.log('\n----- testing migration to 003 using mssql -----'); + const args = ['3', '--config', 'test/mssql-config.json']; - return mockCwd( - path.join(__dirname, 'mssql-config'), - async () => expect(run([3])).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3), - ); + return expect(run(args)).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3); }); } From eb1225b7d8603736986ab2f4476884d45cb558bd Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 29 Nov 2021 21:42:48 +0900 Subject: [PATCH 24/32] Update README and CHANGELOG --- CHANGELOG.md | 10 ++++++++++ README.md | 24 +++++++++++------------- lib/command-line-options.js | 10 ++++++---- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de7c7c7..ff6b77d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 5.0.0 +### Unreleased +* (**Breaking**) Node.js 12 or later required +* (**Breaking**) Removed option -t, --detect-version-conflicts. Conflicts are now always detected. +* (**Breaking**) Target postgrator 5.x.x +* (**Breaking**) Migrate to using cosmiconfig for configuration file +* (**Breaking**) `secure` option is now `ssl` and it works differently for each supported driver +* Add support for node 16.x.x +* Support merging cli and config file options + ## 4.0.0 ### May, 17, 2020 * (**Breaking**) Node.js 10 or later required diff --git a/README.md b/README.md index 47b13e9..2ab2a41 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ You can specify all the parameters from command line (see below) but the easiest ``` { - "migrationDirectory": "migrations", + "migrationPattern": "migrations/*", "driver": "pg", "host": "127.0.0.1", "port": 5432, @@ -123,16 +123,17 @@ postgrator [[--to=]] --database= [--driver=] [--host= ``` --to version Version number of the file to migrate to or 'max'. Default: 'max' - -r, --driver pg|mysql|mssql Database driver. Default: 'pg' - -h, --host hostname Host. Default: '127.0.0.1' - -o, --port port Host. Default: '5432' - -d, --database database Database name - -u, --username database Username - -p, --password password Password - -m, --migration-directory directory A directory to run migration files from. Default: 'migrations'' + -r, --driver pg|mysql|mssql Database driver. Default: 'pg'. + -h, --host hostname Host. + -o, --port port Port. + -d, --database database Database name. + -u, --username database Username. + -p, --password password Password. If parameter without value is given, password will be asked. + -m, --migration-pattern pattern A pattern matching files to run migration files from. Default: 'migrations/*' -t --schema-table Table created to track schema version. - -c --validate-checksum Validates checksum of existing SQL migration files already run prior to executing migrations. + --validate-checksum Validates checksum of existing SQL migration files already run prior to executing migrations. -s, --ssl Enables ssl connections. When using the mysql driver it expects a string containing name of ssl profile. + -c, --config Explicitly set the location of the config file to load. --no-config Do not load options from a configuration file. -v, --version Print version. -?, --help Print this usage guide. @@ -148,7 +149,4 @@ Examples ``` ## Tests -To run postgrator tests locally, you'll need: -- A [postgreSQL](http://www.postgresql.org/download/) instance running on default port (5432), with a `postgrator` (password `postgrator`) account and a `postgrator` database - -then run `npm test` +To run postgrator tests locally, run `docker-compose up` and then `npm test`. diff --git a/lib/command-line-options.js b/lib/command-line-options.js index eb4c325..e2e6238 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -1,7 +1,7 @@ /* eslint max-len: 0 */ -import commandLineArgs from 'command-line-args'; import { readFileSync } from 'fs'; +import commandLineArgs from 'command-line-args'; const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); @@ -44,16 +44,18 @@ const optionDefinitions = (defaults = {}) => [ ...defaults.password && { defaultValue: defaults.password }, }, { - name: 'migration-pattern', description: "A pattern matching files to run migration files from. Default: 'migrations/*''", + name: 'migration-pattern', description: "A pattern matching files to run migration files from. Default: 'migrations/*'", alias: 'm', type: String, typeLabel: '{underline directory}', defaultValue: defaults.migrationPattern || DEFAULT_MIGRATION_PATTERN, }, { name: 'schema-table', description: 'Table created to track schema version.', - alias: 't', type: String, defaultValue: defaults.schemaTable || 'schemaversion', + alias: 't', type: String, + ...defaults.schemaTable && { defaultValue: defaults.schemaTable }, }, { name: 'validate-checksum', description: 'Validates checksum of existing SQL migration files already run prior to executing migrations.', - type: Boolean, defaultValue: defaults.validateChecksum || true, + type: Boolean, + ...defaults.validateChecksum && { defaultValue: defaults.validateChecksum }, }, { name: 'ssl', description: 'Enables ssl connections. When using the mysql driver it expects a string containing name of ssl profile.', From 7fbca076673a8d1f031ff2aa7d0c62d956f32f6d Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 29 Nov 2021 21:52:41 +0900 Subject: [PATCH 25/32] Add coverage reports --- .c8rc.json | 3 + .eslintignore | 2 + .github/workflows/test.yml | 7 +- .gitignore | 1 + README.md | 21 + package-lock.json | 835 ++++++++++++++++++++++++++++++++++++- package.json | 6 +- 7 files changed, 867 insertions(+), 8 deletions(-) create mode 100644 .c8rc.json create mode 100644 .eslintignore diff --git a/.c8rc.json b/.c8rc.json new file mode 100644 index 0000000..e43f422 --- /dev/null +++ b/.c8rc.json @@ -0,0 +1,3 @@ +{ + "reporter": "lcovonly" +} diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..25fbf5a --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +node_modules/ +coverage/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 66cf43a..d4d9819 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,12 @@ jobs: run: sleep 10 - name: Test - run: npm test + run: npm run cover - name: Stop databases run: docker-compose down + + - name: Publish to coveralls.io + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 4d9a859..c4a1cfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules .eslintcache +coverage diff --git a/README.md b/README.md index 2ab2a41..4ddde52 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # Postgrator CLI +[![Build Status][build-badge]][build] +[![npm package][npm-badge]][npm] +[![Coverage Status][coveralls-badge]][coveralls] +[![Dependency Status][dependency-status-badge]][dependency-status] +[![devDependency Status][dev-dependency-status-badge]][dev-dependency-status] + Command line SQL database migration tool using SQL scripts. For PostgreSQL, MySQL and SQL Server. Version control your SQL database using plain old SQL files. @@ -150,3 +156,18 @@ Examples ## Tests To run postgrator tests locally, run `docker-compose up` and then `npm test`. + +[build-badge]: https://img.shields.io/github/workflow/status/MattiLehtinen/postgrator-cli/test/master?style=flat-square +[build]: https://github.com/MattiLehtinen/postgrator-cli/actions + +[npm-badge]: https://img.shields.io/npm/v/postgrator-cli.svg?style=flat-square +[npm]: https://www.npmjs.org/package/postgrator-cli + +[coveralls-badge]: https://img.shields.io/coveralls/MattiLehtinen/postgrator-cli/master.svg?style=flat-square +[coveralls]: https://coveralls.io/r/MattiLehtinen/postgrator-cli + +[dependency-status-badge]: https://david-dm.org/MattiLehtinen/postgrator-cli.svg?style=flat-square +[dependency-status]: https://david-dm.org/MattiLehtinen/postgrator-cli + +[dev-dependency-status-badge]: https://david-dm.org/MattiLehtinen/postgrator-cli/dev-status.svg?style=flat-square +[dev-dependency-status]: https://david-dm.org/MattiLehtinen/postgrator-cli#info=devDependencies diff --git a/package-lock.json b/package-lock.json index c850c6c..15206aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "postgrator": "index.js" }, "devDependencies": { + "c8": "^7.10.0", "chai": "^4.3.4", "chai-as-promised": "^7.1.1", "chai-subset": "^1.6.0", @@ -430,6 +431,12 @@ "js-tokens": "^4.0.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@eslint/eslintrc": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", @@ -470,6 +477,15 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@js-joda/core": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-3.2.0.tgz", @@ -506,6 +522,12 @@ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -950,6 +972,102 @@ "node": ">=4" } }, + "node_modules/c8": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.10.0.tgz", + "integrity": "sha512-OAwfC5+emvA6R7pkYFVBTOtI5ruf9DahffGmIqUc9l6wEh0h7iAFP6dt/V9Ioqlr2zW5avX9U9/w1I4alTRHkA==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.2", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.0.1", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.0.2", + "rimraf": "^3.0.0", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^8.0.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.7" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/c8/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -1038,6 +1156,40 @@ "dev": true, "optional": true }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -1135,6 +1287,21 @@ "dev": true, "optional": true }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/convert-source-map/node_modules/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==", + "dev": true + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -1359,6 +1526,12 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/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==", + "dev": true + }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -1440,6 +1613,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1938,6 +2120,19 @@ } } }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -2016,6 +2211,15 @@ "node": ">=0.10.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", @@ -2200,6 +2404,12 @@ "dev": true, "optional": true }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "node_modules/http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -2572,6 +2782,63 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.5.tgz", + "integrity": "sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2799,6 +3066,21 @@ "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", "dev": true }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mime-db": { "version": "1.51.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", @@ -3637,6 +3919,15 @@ "url": "https://github.com/sponsors/mysticatea" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -3766,8 +4057,7 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", - "dev": true, - "optional": true + "dev": true }, "node_modules/simple-concat": { "version": "1.0.1", @@ -3802,6 +4092,15 @@ "simple-concat": "^1.0.0" } }, + "node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/split2": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", @@ -4092,6 +4391,20 @@ "node": ">=8" } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4268,6 +4581,20 @@ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "node_modules/v8-to-istanbul": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz", + "integrity": "sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -4354,6 +4681,79 @@ "node": ">=8" } }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/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==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/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==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -4399,6 +4799,15 @@ "node": ">=0.4" } }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", @@ -4406,6 +4815,68 @@ "engines": { "node": ">= 6" } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { @@ -4737,6 +5208,12 @@ "js-tokens": "^4.0.0" } }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "@eslint/eslintrc": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", @@ -4771,6 +5248,12 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, "@js-joda/core": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-3.2.0.tgz", @@ -4801,6 +5284,12 @@ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, + "@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -5156,6 +5645,71 @@ "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", "dev": true }, + "c8": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.10.0.tgz", + "integrity": "sha512-OAwfC5+emvA6R7pkYFVBTOtI5ruf9DahffGmIqUc9l6wEh0h7iAFP6dt/V9Ioqlr2zW5avX9U9/w1I4alTRHkA==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.2", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.0.1", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.0.2", + "rimraf": "^3.0.0", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^8.0.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.7" + }, + "dependencies": { + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -5223,6 +5777,36 @@ "dev": true, "optional": true }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "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==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + } + } + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -5304,6 +5888,23 @@ "dev": true, "optional": true }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "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==", + "dev": true + } + } + }, "core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -5472,6 +6073,12 @@ "safe-buffer": "^5.0.1" } }, + "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==", + "dev": true + }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -5538,6 +6145,12 @@ "is-symbol": "^1.0.2" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -5914,6 +6527,16 @@ "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==", "dev": true }, + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + } + }, "form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -5985,6 +6608,12 @@ } } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", @@ -6117,6 +6746,12 @@ "dev": true, "optional": true }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -6370,6 +7005,50 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-reports": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.5.tgz", + "integrity": "sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6579,6 +7258,15 @@ "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", "dev": true }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, "mime-db": { "version": "1.51.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", @@ -7220,6 +7908,12 @@ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "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=", + "dev": true + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -7311,8 +8005,7 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", - "dev": true, - "optional": true + "dev": true }, "simple-concat": { "version": "1.0.1", @@ -7333,6 +8026,12 @@ "simple-concat": "^1.0.0" } }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, "split2": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", @@ -7557,6 +8256,17 @@ "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", "dev": true }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -7700,6 +8410,17 @@ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "v8-to-istanbul": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz", + "integrity": "sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + } + }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -7770,6 +8491,60 @@ } } }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "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==", + "dev": true, + "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==", + "dev": true + }, + "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==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7803,10 +8578,62 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "dependencies": { + "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==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + } + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 206255e..29bf219 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,8 @@ }, "scripts": { "lint": "eslint --cache .", - "pretest": "npm run lint", - "test": "npm run tests", - "tests": "node test/postgrator-cli-tests.js", + "test": "node test/postgrator-cli-tests.js", + "cover": "c8 npm test", "prepublishOnly": "crlf --set=LF *.js", "postpublish": "echo execute 'npm run restorecrlf' if in windows and using crlf line endings.", "restorecrlf": "crlf --set=CRLF *.js" @@ -58,6 +57,7 @@ "postgrator": "^5.0.0" }, "devDependencies": { + "c8": "^7.10.0", "chai": "^4.3.4", "chai-as-promised": "^7.1.1", "chai-subset": "^1.6.0", From 2ef501470a86276a125292c5a21f3d37caf8a5f3 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Mon, 29 Nov 2021 23:02:04 +0900 Subject: [PATCH 26/32] Fix README example --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ddde52..2dc0d02 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,8 @@ $ postgrator 4 ``` postgrator [[--to=]] --database= [--driver=] [--host=] [--port=] [--username=] [--password=] [--no-config] + +postgrator [[--to=]] [--config=] ``` ### Options @@ -139,7 +141,7 @@ postgrator [[--to=]] --database= [--driver=] [--host= -t --schema-table Table created to track schema version. --validate-checksum Validates checksum of existing SQL migration files already run prior to executing migrations. -s, --ssl Enables ssl connections. When using the mysql driver it expects a string containing name of ssl profile. - -c, --config Explicitly set the location of the config file to load. + -c, --config file Explicitly set the location of the config file to load. --no-config Do not load options from a configuration file. -v, --version Print version. -?, --help Print this usage guide. From 210692ba5d4a68d79833f6fb7e4c50719266b24a Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Tue, 30 Nov 2021 22:14:18 +0900 Subject: [PATCH 27/32] Add multi command support and drop-schema command --- README.md | 5 +++ lib/command-line-options.js | 74 +++++++++++++++++++++++++++++++++--- lib/postgrator-cli.js | 42 ++++++++++++-------- test/postgrator-cli-tests.js | 40 +++++++++++++++++++ 4 files changed, 141 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 2dc0d02..d6b413a 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,10 @@ $ postgrator 4 postgrator [[--to=]] --database= [--driver=] [--host=] [--port=] [--username=] [--password=] [--no-config] postgrator [[--to=]] [--config=] + +postgrator migrate [[--to=]version] + +postgrator drop-schema [--config=] ``` ### Options @@ -154,6 +158,7 @@ Examples 3. Use default configuration file to migrate to version 5 postgrator 5 4. Migrate to latest version using default configuration postgrator file (.postgratorrc.json, etc) + 5. Drop the schema table using configuration files postgrator drop-schema ``` ## Tests diff --git a/lib/command-line-options.js b/lib/command-line-options.js index e2e6238..b0d67cd 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -5,15 +5,25 @@ import commandLineArgs from 'command-line-args'; const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); +export const COMMAND_MIGRATE = 'migrate'; +export const COMMAND_DROP_SCHEMA = 'drop-schema'; + export const DEFAULT_MIGRATION_PATTERN = 'migrations/*'; /* eslint-disable object-property-newline */ -const optionDefinitions = (defaults = {}) => [ +const commandDefinitions = [ + { name: 'command', defaultOption: true, defaultValue: null }, +]; + +const migrateDefinitions = (defaults = {}, defaultOption = false) => [ { name: 'to', description: "Version number of the file to migrate to or 'max'. Default: 'max'", - type: String, typeLabel: 'version', defaultOption: true, defaultValue: defaults.to || 'max', + type: String, typeLabel: 'version', defaultValue: defaults.to || 'max', defaultOption, }, +]; + +const optionDefinitions = (defaults = {}) => [ { name: 'driver', description: "Database driver. Default: 'pg'", alias: 'r', type: String, typeLabel: 'pg|mysql|mssql', defaultValue: defaults.driver || 'pg', @@ -81,11 +91,19 @@ const optionDefinitions = (defaults = {}) => [ ]; export const parse = (argv, defaults) => { - const args = commandLineArgs(optionDefinitions(defaults), { argv }); + const { command: tmpCommand, _unknown: unknown } = commandLineArgs(commandDefinitions, { stopAtFirstUnknown: true, argv }); + const { command, definitions, constants } = parseCommand(tmpCommand, defaults); + + const args = commandLineArgs(definitions, { argv: unknown }); if (args.ssl === null && defaults.ssl === undefined) { // If no value is handed, treat it as boolean args.ssl = true; } - return args; + + return { + command, + ...constants, + ...args, + }; }; export const sections = [ @@ -95,12 +113,15 @@ export const sections = [ options: { columns: [{ name: 'one', maxWidth: 200 }] }, data: [ { one: 'postgrator [[--to=]version] [--database=] [--driver=] [--host=] [--port=] [--username=] [--password=] [--no-config]' }, + { one: 'postgrator [[--to=]version] [--config=]' }, + { one: 'postgrator migrate [[--to=]version]' }, + { one: 'postgrator drop-schema' }, ], }, }, { header: 'Options', - optionList: optionDefinitions, + optionList: [...migrateDefinitions(), ...optionDefinitions()], }, { header: 'Examples', @@ -121,6 +142,10 @@ export const sections = [ desc: '4. Migrate to latest version using the configuration files', example: 'postgrator', }, + { + desc: '5. Drop the schema table', + example: 'postgrator drop-schema', + }, ], }, { @@ -131,3 +156,42 @@ export const sections = [ ], }, ]; + +function parseCommand(command, defaults = {}) { + if (command === 'max') { + return { + command: COMMAND_MIGRATE, + definitions: optionDefinitions(defaults), + constants: { to: 'max' }, + }; + } + + if (isPositiveInteger(command)) { + return { + command: COMMAND_MIGRATE, + definitions: [...optionDefinitions(defaults)], + constants: { to: parseInt(command, 10) }, + }; + } + + if (command === COMMAND_MIGRATE || command === null) { + return { + command: COMMAND_MIGRATE, + definitions: [...migrateDefinitions(defaults, command === null), ...optionDefinitions(defaults)], + }; + } + + if (command === COMMAND_DROP_SCHEMA) { + return { + command: COMMAND_DROP_SCHEMA, + definitions: optionDefinitions(defaults), + }; + } + + throw new Error('Invalid command'); +} + +function isPositiveInteger(val) { + const parsed = parseFloat(val); + return Number.isInteger(parsed) && parsed >= 0; +} diff --git a/lib/postgrator-cli.js b/lib/postgrator-cli.js index 7363ab6..486db96 100644 --- a/lib/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -5,7 +5,9 @@ import Postgrator from 'postgrator'; import { cosmiconfig } from 'cosmiconfig'; import tap from 'p-tap'; import getClient from './clients/index.js'; // eslint-disable-line import/extensions -import { parse, sections } from './command-line-options.js'; // eslint-disable-line import/extensions +import { + COMMAND_MIGRATE, COMMAND_DROP_SCHEMA, parse, sections, +} from './command-line-options.js'; // eslint-disable-line import/extensions const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); @@ -180,7 +182,6 @@ export async function run(argv) { const client = await getClient(postgratorOptions.driver, await getClientOptions(options)); await client.connect(); - // Create postgrator let postgrator; try { postgrator = new Postgrator({ @@ -192,17 +193,28 @@ export async function run(argv) { return Promise.reject(err); } - // Postgrator events - postgrator.on( - 'validation-started', - (migration) => logMessage(`verifying checksum of migration ${migration.filename}`), - ); - postgrator.on( - 'migration-started', - (migration) => logMessage(`running ${migration.filename}`), - ); - - return migrate(postgrator, postgratorOptions.to, postgratorOptions.migrationPattern) - .then(tap(() => client.end())) - .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); + if (options.command === COMMAND_MIGRATE) { + // Postgrator events + postgrator.on( + 'validation-started', + (migration) => logMessage(`verifying checksum of migration ${migration.filename}`), + ); + postgrator.on( + 'migration-started', + (migration) => logMessage(`running ${migration.filename}`), + ); + + return migrate(postgrator, postgratorOptions.to, postgratorOptions.migrationPattern) + .then(tap(() => client.end())) + .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); + } if (options.command === COMMAND_DROP_SCHEMA) { + const schemaTable = postgrator.commonClient.quotedSchemaTable(); + return postgrator + .runQuery(`DROP TABLE ${schemaTable}`) + .then(tap(() => client.end())) + .then(() => undefined) + .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); + } + + return Promise.reject(new Error('Invalid command')); } diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index d795f40..a93c73c 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -377,6 +377,15 @@ function buildTestsForOptions(options) { .to.be.rejectedWith(Error, /^Two migrations found with version 2 and action do/, 'No migration conflicts were detected'); }); + tests.push(async () => { + console.log('\n----- testing using migration number at the end -----'); + + const migrations = await run(['--config', 'test/sample-config.json', '0003']); + expect(migrations[migrations.length - 1].version).to.equal(3); + }); + + tests.push(resetMigrations); + tests.push(() => removeVersionTable({ ...options, driver: 'mysql', @@ -405,6 +414,37 @@ function buildTestsForOptions(options) { return expect(run(args)).to.eventually.have.lengthOf(3).and.have.nested.property('2.version').equal(3); }); + + tests.push(async () => { + console.log('\n----- testing dropping schema table-----'); + const args = getArgList({ + config: 'test/sample-config.json', + to: 0, + }); + + await expect(run(args)).to.eventually.have.lengthOf(0); + return expect(run(['drop-schema', '--config', 'test/sample-config.json'])) + .to.become(undefined); + }); + + tests.push(async () => { + console.log('\n----- testing dropping schema when the table name is specified explicitly -----'); + const args = getArgList({ + 'schema-table': 'my-schema-table', + config: 'test/sample-config.json', + to: 0, + }); + + await expect(run(args)).to.eventually.have.lengthOf(0); + return expect(run(['drop-schema', '--config', 'test/sample-config.json', '--schema-table', 'my-schema-table'])) + .to.become(undefined); + }); + + tests.push(() => { + console.log('\n----- testing dropping schema table that does not exist -----'); + return expect(run(['drop-schema', '--config', 'test/sample-config.json'])) + .to.be.rejectedWith(Error, 'table "schemaversion" does not exist'); + }); } const options = { From fcf5b70b05bec835660b7f2a457ae5d9f6f7a005 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 1 Dec 2021 01:44:16 +0900 Subject: [PATCH 28/32] Isolate commands --- lib/command-line-options.js | 63 ++++----------------------- lib/commands/drop-schema.js | 8 ++++ lib/commands/index.js | 46 ++++++++++++++++++++ lib/commands/migrate.js | 63 +++++++++++++++++++++++++++ lib/postgrator-cli.js | 82 +++--------------------------------- test/postgrator-cli-tests.js | 2 +- 6 files changed, 131 insertions(+), 133 deletions(-) create mode 100644 lib/commands/drop-schema.js create mode 100644 lib/commands/index.js create mode 100644 lib/commands/migrate.js diff --git a/lib/command-line-options.js b/lib/command-line-options.js index b0d67cd..1e9a3e2 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -3,24 +3,16 @@ import { readFileSync } from 'fs'; import commandLineArgs from 'command-line-args'; -const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); +import parse, { optionDefinitions as extraDefinitions } from './commands/index.js'; // eslint-disable-line import/extensions -export const COMMAND_MIGRATE = 'migrate'; -export const COMMAND_DROP_SCHEMA = 'drop-schema'; +const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); export const DEFAULT_MIGRATION_PATTERN = 'migrations/*'; /* eslint-disable object-property-newline */ const commandDefinitions = [ - { name: 'command', defaultOption: true, defaultValue: null }, -]; - -const migrateDefinitions = (defaults = {}, defaultOption = false) => [ - { - name: 'to', description: "Version number of the file to migrate to or 'max'. Default: 'max'", - type: String, typeLabel: 'version', defaultValue: defaults.to || 'max', defaultOption, - }, + { name: 'cmd', defaultOption: true, defaultValue: null }, ]; const optionDefinitions = (defaults = {}) => [ @@ -90,11 +82,11 @@ const optionDefinitions = (defaults = {}) => [ }, ]; -export const parse = (argv, defaults) => { - const { command: tmpCommand, _unknown: unknown } = commandLineArgs(commandDefinitions, { stopAtFirstUnknown: true, argv }); - const { command, definitions, constants } = parseCommand(tmpCommand, defaults); +export default (argv, defaults) => { + const { cmd, _unknown: unknown } = commandLineArgs(commandDefinitions, { stopAtFirstUnknown: true, argv }); + const { command, definitions, constants } = parse(cmd, defaults); - const args = commandLineArgs(definitions, { argv: unknown }); + const args = commandLineArgs([...definitions, ...optionDefinitions(defaults)], { argv: unknown }); if (args.ssl === null && defaults.ssl === undefined) { // If no value is handed, treat it as boolean args.ssl = true; } @@ -121,7 +113,7 @@ export const sections = [ }, { header: 'Options', - optionList: [...migrateDefinitions(), ...optionDefinitions()], + optionList: [...extraDefinitions(), ...optionDefinitions()], }, { header: 'Examples', @@ -156,42 +148,3 @@ export const sections = [ ], }, ]; - -function parseCommand(command, defaults = {}) { - if (command === 'max') { - return { - command: COMMAND_MIGRATE, - definitions: optionDefinitions(defaults), - constants: { to: 'max' }, - }; - } - - if (isPositiveInteger(command)) { - return { - command: COMMAND_MIGRATE, - definitions: [...optionDefinitions(defaults)], - constants: { to: parseInt(command, 10) }, - }; - } - - if (command === COMMAND_MIGRATE || command === null) { - return { - command: COMMAND_MIGRATE, - definitions: [...migrateDefinitions(defaults, command === null), ...optionDefinitions(defaults)], - }; - } - - if (command === COMMAND_DROP_SCHEMA) { - return { - command: COMMAND_DROP_SCHEMA, - definitions: optionDefinitions(defaults), - }; - } - - throw new Error('Invalid command'); -} - -function isPositiveInteger(val) { - const parsed = parseFloat(val); - return Number.isInteger(parsed) && parsed >= 0; -} diff --git a/lib/commands/drop-schema.js b/lib/commands/drop-schema.js new file mode 100644 index 0000000..a4011a7 --- /dev/null +++ b/lib/commands/drop-schema.js @@ -0,0 +1,8 @@ +export const COMMAND_DROP_SCHEMA = 'drop-schema'; + +export default (postgrator) => { + const schemaTable = postgrator.commonClient.quotedSchemaTable(); + return postgrator + .runQuery(`DROP TABLE ${schemaTable}`) + .then(() => undefined); +}; diff --git a/lib/commands/index.js b/lib/commands/index.js new file mode 100644 index 0000000..96ea930 --- /dev/null +++ b/lib/commands/index.js @@ -0,0 +1,46 @@ +import migrate, { COMMAND_MIGRATE, optionDefinitions as migrateDefinitions } from './migrate.js'; // eslint-disable-line import/extensions +import dropSchema, { COMMAND_DROP_SCHEMA } from './drop-schema.js'; // eslint-disable-line import/extensions + +export const optionDefinitions = migrateDefinitions; + +export default (command, defaults = {}) => { + if (command === 'max') { + return { + command: migrate, + definitions: [], + constants: { to: 'max' }, + }; + } + + if (isPositiveInteger(command)) { + return { + command: migrate, + definitions: [], + constants: { to: parseInt(command, 10) }, + }; + } + + if (command === COMMAND_MIGRATE || command === null) { + return { + command: migrate, + definitions: migrateDefinitions(defaults, command === null), + }; + } + + if (command === COMMAND_DROP_SCHEMA) { + return { + command: dropSchema, + definitions: [], + }; + } + + return { + command: () => Promise.reject(new Error('Invalid command.')), + definitions: [], + }; +}; + +function isPositiveInteger(val) { + const parsed = parseFloat(val); + return Number.isInteger(parsed) && parsed >= 0; +} diff --git a/lib/commands/migrate.js b/lib/commands/migrate.js new file mode 100644 index 0000000..5185481 --- /dev/null +++ b/lib/commands/migrate.js @@ -0,0 +1,63 @@ +export const COMMAND_MIGRATE = 'migrate'; + +function logMessage(message) { + // Using the system default time locale/options for now + const messagePrefix = `[${new Date().toLocaleTimeString()}]`; + console.log(`${messagePrefix} ${message}`); +} + +export const optionDefinitions = (defaults = {}, defaultOption = false) => [ + { + name: 'to', + description: "Version number of the file to migrate to or 'max'. Default: 'max'", + type: String, + typeLabel: 'version', + defaultValue: defaults.to || 'max', + defaultOption, + }, +]; + +/** + * Gets version to migrate to as number + * @param {string|number} to Version or "max" + * @param {object} postgrator + * @returns {Promise} Version to migrate to + */ +function getMigrateToVersion(to, postgrator) { + if (to === 'max') { + return postgrator.getMaxVersion(); + } + return Promise.resolve(to); +} + +function checkMigrations(migrations, migrationPattern) { + if (!migrations || !migrations.length) { + return Promise.reject(new Error(`No migration files found from "${migrationPattern}"`)); + } + return Promise.resolve(); +} + +export default async (postgrator, { to, migrationPattern }) => { + // Postgrator events + postgrator.on( + 'validation-started', + (migration) => logMessage(`verifying checksum of migration ${migration.filename}`), + ); + postgrator.on( + 'migration-started', + (migration) => logMessage(`running ${migration.filename}`), + ); + + const migrations = await postgrator.getMigrations(); + await checkMigrations(migrations, migrationPattern); + const toVersion = await getMigrateToVersion(to, postgrator); + const databaseVersion = await postgrator.getDatabaseVersion().catch(() => { + logMessage(`table ${postgrator.commonClient.quotedSchemaTable()} does not exist - creating it.`); + return 0; + }); + + logMessage(`version of database is: ${databaseVersion}`); + logMessage(`migrating ${(toVersion >= databaseVersion) ? 'up' : 'down'} to ${toVersion}`); + + return postgrator.migrate(to); +}; diff --git a/lib/postgrator-cli.js b/lib/postgrator-cli.js index 486db96..46c3d7a 100644 --- a/lib/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -5,9 +5,7 @@ import Postgrator from 'postgrator'; import { cosmiconfig } from 'cosmiconfig'; import tap from 'p-tap'; import getClient from './clients/index.js'; // eslint-disable-line import/extensions -import { - COMMAND_MIGRATE, COMMAND_DROP_SCHEMA, parse, sections, -} from './command-line-options.js'; // eslint-disable-line import/extensions +import parse, { sections } from './command-line-options.js'; // eslint-disable-line import/extensions const pjson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))); @@ -16,12 +14,6 @@ function printUsage() { console.log(usage); } -function logMessage(message) { - // Using the system default time locale/options for now - const messagePrefix = `[${new Date().toLocaleTimeString()}]`; - console.log(`${messagePrefix} ${message}`); -} - function getMigrateToNumber(toArgument) { if ((!toArgument && toArgument !== 0) || toArgument === 'max') { return 'max'; @@ -71,49 +63,6 @@ const getClientOptions = async (options) => ({ ), }); -/** - * Gets version to migrate to as number - * @param {string|number} to Version or "max" - * @param {object} postgrator - * @returns {Promise} Version to migrate to - */ -function getMigrateToVersion(to, postgrator) { - if (to === 'max') { - return postgrator.getMaxVersion(); - } - return Promise.resolve(to); -} - -function checkMigrations(migrations, migrationPattern) { - if (!migrations || !migrations.length) { - throw new Error(`No migration files found from "${migrationPattern}"`); - } -} - -function migrate(postgrator, to, migrationPattern) { - let toVersion; - - return postgrator.getMigrations() - .then((migrations) => { - checkMigrations(migrations, migrationPattern); - }) - .then(() => { - return getMigrateToVersion(to, postgrator); - }) - .then((migrateToVersion) => { - toVersion = migrateToVersion; - return postgrator.getDatabaseVersion().catch(() => { - logMessage('table schemaversion does not exist - creating it.'); - return 0; - }); - }) - .then((databaseVersion) => { - logMessage(`version of database is: ${databaseVersion}`); - logMessage(`migrating ${(toVersion >= databaseVersion) ? 'up' : 'down'} to ${toVersion}`); - return postgrator.migrate(to); - }); -} - /** * Gets password from postgrator config or as user input * @returns {string} Promise @@ -174,7 +123,7 @@ export async function run(argv) { } const defaults = noConfig ? {} : await getDefaults(config); - const options = parse(argv, defaults); + const { command, ...options } = parse(argv, defaults); const postgratorOptions = getPostgratorOptions(options); @@ -193,28 +142,7 @@ export async function run(argv) { return Promise.reject(err); } - if (options.command === COMMAND_MIGRATE) { - // Postgrator events - postgrator.on( - 'validation-started', - (migration) => logMessage(`verifying checksum of migration ${migration.filename}`), - ); - postgrator.on( - 'migration-started', - (migration) => logMessage(`running ${migration.filename}`), - ); - - return migrate(postgrator, postgratorOptions.to, postgratorOptions.migrationPattern) - .then(tap(() => client.end())) - .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); - } if (options.command === COMMAND_DROP_SCHEMA) { - const schemaTable = postgrator.commonClient.quotedSchemaTable(); - return postgrator - .runQuery(`DROP TABLE ${schemaTable}`) - .then(tap(() => client.end())) - .then(() => undefined) - .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); - } - - return Promise.reject(new Error('Invalid command')); + return command(postgrator, postgratorOptions) + .then(tap(() => client.end())) + .catch((err) => Promise.reject(err && typeof err === 'string' ? new Error(err) : err)); } diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index a93c73c..281927f 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -9,7 +9,7 @@ import { createRequire } from 'module'; import { mockCwd } from 'mock-cwd'; import getClient from '../lib/clients/index.js'; // eslint-disable-line import/extensions -import { parse } from '../lib/command-line-options.js'; // eslint-disable-line import/extensions +import parse from '../lib/command-line-options.js'; // eslint-disable-line import/extensions import { run } from '../lib/postgrator-cli.js'; // eslint-disable-line import/extensions const __dirname = dirname(import.meta); // eslint-disable-line no-underscore-dangle From da10f49d3a2e68d7ca938956e94b2643916e9857 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 1 Dec 2021 01:50:23 +0900 Subject: [PATCH 29/32] Minor refactoring --- lib/command-line-options.js | 2 +- lib/commands/index.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/command-line-options.js b/lib/command-line-options.js index 1e9a3e2..e9faccf 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -84,7 +84,7 @@ const optionDefinitions = (defaults = {}) => [ export default (argv, defaults) => { const { cmd, _unknown: unknown } = commandLineArgs(commandDefinitions, { stopAtFirstUnknown: true, argv }); - const { command, definitions, constants } = parse(cmd, defaults); + const { command, definitions = [], constants = {} } = parse(cmd, defaults); const args = commandLineArgs([...definitions, ...optionDefinitions(defaults)], { argv: unknown }); if (args.ssl === null && defaults.ssl === undefined) { // If no value is handed, treat it as boolean diff --git a/lib/commands/index.js b/lib/commands/index.js index 96ea930..e9d7f83 100644 --- a/lib/commands/index.js +++ b/lib/commands/index.js @@ -7,7 +7,6 @@ export default (command, defaults = {}) => { if (command === 'max') { return { command: migrate, - definitions: [], constants: { to: 'max' }, }; } @@ -15,7 +14,6 @@ export default (command, defaults = {}) => { if (isPositiveInteger(command)) { return { command: migrate, - definitions: [], constants: { to: parseInt(command, 10) }, }; } @@ -30,13 +28,11 @@ export default (command, defaults = {}) => { if (command === COMMAND_DROP_SCHEMA) { return { command: dropSchema, - definitions: [], }; } return { command: () => Promise.reject(new Error('Invalid command.')), - definitions: [], }; }; From 7165bd4f7344d86e5af8f714480971e56c93dd44 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 1 Dec 2021 03:01:55 +0900 Subject: [PATCH 30/32] Fix running postgrator 0 --- lib/postgrator-cli.js | 22 +++++++++++----------- package.json | 2 +- test/postgrator-cli-tests.js | 9 +++++++++ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/lib/postgrator-cli.js b/lib/postgrator-cli.js index 46c3d7a..25f3aba 100644 --- a/lib/postgrator-cli.js +++ b/lib/postgrator-cli.js @@ -40,20 +40,20 @@ const getDefaults = (loadPath) => { }; const getPostgratorOptions = (options) => ({ - ...(options.to ? { to: getMigrateToNumber(options.to) } : {}), - ...(options.driver ? { driver: options.driver } : {}), - ...(options.database ? { database: options.database } : {}), - ...(options['migration-pattern'] ? { migrationPattern: getAbsolutePath(options['migration-pattern']) } : {}), - ...(options['schema-table'] ? { schemaTable: options['schema-table'] } : {}), - ...(options['validate-checksum'] ? { validateChecksum: options['validate-checksum'] } : {}), + ...('to' in options ? { to: getMigrateToNumber(options.to) } : {}), + ...('driver' in options ? { driver: options.driver } : {}), + ...('database' in options ? { database: options.database } : {}), + ...('migration-pattern' in options ? { migrationPattern: getAbsolutePath(options['migration-pattern']) } : {}), + ...('schema-table' in options ? { schemaTable: options['schema-table'] } : {}), + ...('validate-checksum' in options ? { validateChecksum: options['validate-checksum'] } : {}), }); const getClientOptions = async (options) => ({ - ...(options.host ? { host: options.host } : {}), - ...(options.port ? { port: options.port } : {}), - ...(options.database ? { database: options.database } : {}), - ...(options.username ? { username: options.username } : {}), - ...(options.ssl ? { ssl: options.ssl } : {}), + ...('host' in options ? { host: options.host } : {}), + ...('port' in options ? { port: options.port } : {}), + ...('database' in options ? { database: options.database } : {}), + ...('username' in options ? { username: options.username } : {}), + ...('ssl' in options ? { ssl: options.ssl } : {}), ...( options.password // eslint-disable-line no-nested-ternary ? { password: options.password } diff --git a/package.json b/package.json index 29bf219..32a96f8 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "postgrator": "./index.js" }, "engines": { - "node": ">=12.2.0" + "node": ">=12.22.0" }, "scripts": { "lint": "eslint --cache .", diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 281927f..befa6ae 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -427,6 +427,15 @@ function buildTestsForOptions(options) { .to.become(undefined); }); + tests.push(async () => { + console.log('\n----- testing dropping schema table with default configuration file -----'); + + return mockCwd(path.join(__dirname, 'sample-config'), async () => { + await expect(run(['0'])).to.eventually.have.lengthOf(0); + await expect(run(['drop-schema'])).to.become(undefined); + }); + }); + tests.push(async () => { console.log('\n----- testing dropping schema when the table name is specified explicitly -----'); const args = getArgList({ From a69bde1bf4ecbb09ff4c67ccb0402aebb77d2c84 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 1 Dec 2021 03:42:43 +0900 Subject: [PATCH 31/32] Fix case where _unknown is undefined --- lib/command-line-options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/command-line-options.js b/lib/command-line-options.js index e9faccf..f9b2358 100644 --- a/lib/command-line-options.js +++ b/lib/command-line-options.js @@ -86,7 +86,7 @@ export default (argv, defaults) => { const { cmd, _unknown: unknown } = commandLineArgs(commandDefinitions, { stopAtFirstUnknown: true, argv }); const { command, definitions = [], constants = {} } = parse(cmd, defaults); - const args = commandLineArgs([...definitions, ...optionDefinitions(defaults)], { argv: unknown }); + const args = commandLineArgs([...definitions, ...optionDefinitions(defaults)], { argv: unknown || [] }); if (args.ssl === null && defaults.ssl === undefined) { // If no value is handed, treat it as boolean args.ssl = true; } From d38930728deb141d9189a29474c4aecfc228a5da Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Wed, 1 Dec 2021 16:30:26 +0900 Subject: [PATCH 32/32] Test rejecting invalid commands --- test/postgrator-cli-tests.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index befa6ae..c7f77b1 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -101,6 +101,13 @@ function buildTestsForOptions(options) { expect(log).to.match(/Version: /, 'No version was displayed'); }); + tests.push(() => { + console.log('\n----- testing an invalid command-----'); + + return expect(run(['invalid-command', '--config', 'test/sample-config.json'])) + .to.be.rejectedWith(Error, 'Invalid command.'); + }); + tests.push(async () => { console.log('\n----- testing migration to 003 -----'); return expect(run(getArgList(options)))