diff --git a/package-lock.json b/package-lock.json index 8bddb04..4f5a03a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nest-user-auth", - "version": "0.0.0", + "version": "1.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -25,16 +25,16 @@ }, "dependencies": { "@types/node": { - "version": "10.17.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.5.tgz", - "integrity": "sha512-RElZIr/7JreF1eY6oD5RF3kpmdcreuQPjg5ri4oQ5g9sq7YWU8HkfB3eH8GwAwxf5OaCh0VPi7r4N/yoTGelrA==" + "version": "10.17.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.9.tgz", + "integrity": "sha512-+6VygF9LbG7Gaqeog2G7u1+RUcmo0q1rI+2ZxdIg2fAUngk5Vz9fOCHXdloNUOHEPd1EuuOpL5O0CdgN9Fx5UQ==" } } }, "@apollographql/apollo-tools": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.4.1.tgz", - "integrity": "sha512-9NaTBPX+YYCsio6AqnLHlLiqYBszgTBul2qzG2+YNZ/1RQ2owhO/7xB5XJyQz76NGOefORaZt5idwvTJXpg/Sg==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.4.2.tgz", + "integrity": "sha512-/kTaguTNSowXR/zWU4hjeL41yAdEbQO05f882c6cRIrVE7xIgJcBNEcYz2kzi94eaUbE2YY3SSxDJ6vPeV07OQ==", "requires": { "apollo-env": "^0.6.0" } @@ -743,9 +743,9 @@ } }, "@nestjs/common": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.10.1.tgz", - "integrity": "sha512-eLKKFQqrQFxE3ipbmdXJHQV24ngkbq1ZFjDjvK+0qDbU/90OsYIU4a0U476Hi23QSgo9qGggMIJeLoadLRIxig==", + "version": "6.10.11", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.10.11.tgz", + "integrity": "sha512-XVdf7sChWY1Gt+q253W7P+wqiuyKU4MayoMKZOFCgZwDXNrpNdi85OaYG3Vte6RiWpJ94Q78rGNU91OGNBlplw==", "requires": { "axios": "0.19.0", "cli-color": "2.0.0", @@ -753,14 +753,14 @@ } }, "@nestjs/core": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.10.1.tgz", - "integrity": "sha512-X6W+pgzShSuUXEd+jSLYYgZywt0GvTlWF46zXf5CWJMJesc7+TP/FeKqa11gIz9h1GFUMPs0tbXzIpgKVXSmcA==", + "version": "6.10.11", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.10.11.tgz", + "integrity": "sha512-OQ4y050ieaF2bSFWAnYnN5uib8YnIqzvCNeOodCXQwRa0SDkWxP7+AYxMuRdMry+5yHiCTEhb0F6nEsvvmIqig==", "requires": { "@nuxtjs/opencollective": "0.2.2", "fast-safe-stringify": "2.0.7", "iterare": "1.2.0", - "object-hash": "2.0.0", + "object-hash": "2.0.1", "uuid": "3.3.3" } }, @@ -815,14 +815,14 @@ "integrity": "sha512-BkbkguvaPPGbL/41lK6P22DaQodBC9Yv9rUAmNlQVShChtwss7/cGj68AKC3jEoidrx75wCyDO3P8Tp6pggE4w==" }, "@nestjs/passport": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@nestjs/passport/-/passport-6.1.0.tgz", - "integrity": "sha512-V4KdtFFLsdZQ/HlIECpiK6byzGz57Y12TAc+Iatykk8jWuVFE1jq8RJbpTfB0zG0PTfcGm9crQ6Ut2Rwdmis4Q==" + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@nestjs/passport/-/passport-6.1.1.tgz", + "integrity": "sha512-wMhvi3Ru965nftCLUhFUqWNwyzSxVDmGgTEYVyWbOOmHFjNg5US47jzV2NresuUP2vjgg8J8S6DviKTVuLfkRw==" }, "@nestjs/platform-express": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.10.1.tgz", - "integrity": "sha512-Tm5jRoPKhWj2VloM9fGkgR9S/yLQnDDfgPE9dvJX89hVQHS8RA7ub9kKfXF1iJjV+nAjk4XpPj8yGoUpYrC31g==", + "version": "6.10.11", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.10.11.tgz", + "integrity": "sha512-J4Y1A3DVWW6WukummhMK6ER03H7S3m12a938tmJjDqGBAuDInFS4a6t0lFe0ivJLfvlTU9xjZ0PU7Z+VhDt6aQ==", "requires": { "body-parser": "1.19.0", "cors": "2.8.5", @@ -831,9 +831,9 @@ } }, "@nestjs/testing": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.10.1.tgz", - "integrity": "sha512-voEyayvSjlz3SIV0bLfsEJG9DBmTZsEWgqAeQ/zuaIVLfAclHovtGMyxf+nEbfFAuylHGiHy3H5e8Hv58uX0Ow==", + "version": "6.10.11", + "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.10.11.tgz", + "integrity": "sha512-M9ZfneIRzTGxg+BZWzxN+GsVWxTXeQCF78zbqOpsxHzDhRmBHWbNCDIbDpESAvj32Ul/olhaMJhqwobCsNcNpg==", "dev": true, "requires": { "optional": "0.1.4" @@ -1159,9 +1159,9 @@ "integrity": "sha1-/1QEYtL7TQqIRBzq8n0oewHD2Hg=" }, "@types/koa": { - "version": "2.0.52", - "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.0.52.tgz", - "integrity": "sha512-cp/GTOhOYwomlSKqEoG0kaVEVJEzP4ojYmfa7EKaGkmkkRwJ4B/1VBLbQZ49Z+WJNvzXejQB/9GIKqMo9XLgFQ==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.11.0.tgz", + "integrity": "sha512-Hgx/1/rVlJvqYBrdeCsS7PDiR2qbxlMt1RnmNWD4Uxi5FF9nwkYqIldo7urjc+dfNpk+2NRGcnAYd4L5xEhCcQ==", "requires": { "@types/accepts": "*", "@types/cookies": "*", @@ -1195,9 +1195,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/mongodb": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.3.11.tgz", - "integrity": "sha512-i8mUMYzFYzUpH4a7IBbdOD/87/kyQHvOVAL8J8hvX+E6SQbPd83d+xkpPtRZlRELtjZFqyQMlEcxW+zfMw32vQ==", + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.3.12.tgz", + "integrity": "sha512-gWIdrA8YKC4OetBk4eT5Zsp4p3oy/BJQKt80tXfgPnfBuLigumcmwNZseVSkLQJ3XkN/1OR0/kIunGWlew3rmQ==", "dev": true, "requires": { "@types/bson": "*", @@ -1205,9 +1205,9 @@ } }, "@types/mongoose": { - "version": "5.5.32", - "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.32.tgz", - "integrity": "sha512-2BemWy7SynT87deweqc2eCzg6pRyTVlnnMat2JxsTNoyeSFKC27b19qBTeKRfBVt+SjtaWd/ud4faUaObONwBA==", + "version": "5.5.34", + "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.34.tgz", + "integrity": "sha512-XSXKMIZimxx8q17RGQArawrTVI8021PPbP21WEq71YTUMpVuaJaN9yFQll5KtEif5Jw1cphxEFkNwrDmuG+NFA==", "dev": true, "requires": { "@types/mongodb": "*", @@ -1215,9 +1215,9 @@ } }, "@types/node": { - "version": "12.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.11.tgz", - "integrity": "sha512-O+x6uIpa6oMNTkPuHDa9MhMMehlxLAd5QcOvKRjAFsBVpeFWTOPnXbDvILvFgFFZfQ1xh1EZi1FbXxUix+zpsQ==" + "version": "12.12.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz", + "integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==" }, "@types/nodemailer": { "version": "6.2.2", @@ -1310,9 +1310,9 @@ "optional": true }, "@types/ws": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.3.tgz", - "integrity": "sha512-yBTM0P05Tx9iXGq00BbJPo37ox68R5vaGTXivs6RGh/BQ6QP5zqZDGWdAO6JbRE/iR1l80xeGAwCQS2nMV9S/w==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.4.tgz", + "integrity": "sha512-PpPrX7SZW9re6+Ha8ojZG4Se8AZXgf0GK6zmfqEuCsY49LFDNXO3SByp44X3dFEqtB73lkCDAdUazhAjVPiNwg==", "requires": { "@types/node": "*" } @@ -1500,9 +1500,9 @@ } }, "apollo-engine-reporting": { - "version": "1.4.10", - "resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-1.4.10.tgz", - "integrity": "sha512-0nEawO9cudbXHCxRvnDUWKqCxPAGEstghUFd5sB67lIGuh91MYeLuwN1iTfqUdwF1feEGHn636zVVUYlXGOlvQ==", + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-1.4.11.tgz", + "integrity": "sha512-7ZkbOGvPfWppN8+1KHzyHPrJTMOmrMUy38unao2c9TTToOAnEvx2MtUTo6mr3aw/g8UQYUf0x2Cq+K2YSlUTPw==", "requires": { "apollo-engine-reporting-protobuf": "^0.4.4", "apollo-graphql": "^0.3.4", @@ -1532,9 +1532,9 @@ } }, "apollo-graphql": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.3.5.tgz", - "integrity": "sha512-X2N/LREJSAkI0RhMEJ6d0kGjdJSI4SFyf6soLvLLTQn0Bhi/52hMLf8k4kO5t0SCKuWc1+Pw/tdCniK4Gc1IdA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.3.6.tgz", + "integrity": "sha512-PUBfW6t20U4CgPODTZB+3Z1Z+qhca8SNEHMPreiw+qEjXwEJF7SZItOIAs93HO0mA2K7eiZjCtZQZknaaQRZNA==", "requires": { "apollo-env": "^0.6.0", "lodash.sortby": "^4.7.0" @@ -1560,9 +1560,9 @@ } }, "apollo-server-core": { - "version": "2.9.12", - "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.9.12.tgz", - "integrity": "sha512-jhGr2R655PSwUUBweXDl+0F3oa74Elu5xXF+88ymUUej34EwBUCqz97wPqR07BEuyxaAlRfZwPMvKaHhMUKg5g==", + "version": "2.9.13", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.9.13.tgz", + "integrity": "sha512-iXTGNCtouB0Xe37ySovuZO69NBYOByJlZfUc87gj0pdcz0WbdfUp7qUtNzy3onp63Zo60TFkHWhGNcBJYFluzw==", "requires": { "@apollographql/apollo-tools": "^0.4.0", "@apollographql/graphql-playground-html": "1.6.24", @@ -1570,7 +1570,7 @@ "@types/ws": "^6.0.0", "apollo-cache-control": "^0.8.8", "apollo-datasource": "^0.6.3", - "apollo-engine-reporting": "^1.4.10", + "apollo-engine-reporting": "^1.4.11", "apollo-server-caching": "^0.5.0", "apollo-server-env": "^2.4.3", "apollo-server-errors": "^2.3.4", @@ -1602,9 +1602,9 @@ "integrity": "sha512-Y0PKQvkrb2Kd18d1NPlHdSqmlr8TgqJ7JQcNIfhNDgdb45CnqZlxL1abuIRhr8tiw8OhVOcFxz2KyglBi8TKdA==" }, "apollo-server-express": { - "version": "2.9.12", - "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.9.12.tgz", - "integrity": "sha512-4Ev8MY7m23mSzwO/BvLTy97a/68IP/wZoCRBn2R81OoZt9/GxlvvYZGvozJCXYsQt1qAbIT4Sn05LmqawsI98w==", + "version": "2.9.13", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.9.13.tgz", + "integrity": "sha512-M306e07dpZ8YpZx4VBYa0FWlt+wopj4Bwn0Iy1iJ6VjaRyGx2HCUJvLpHZ+D0TIXtQ2nX3DTYeOouVaDDwJeqQ==", "requires": { "@apollographql/graphql-playground-html": "1.6.24", "@types/accepts": "^1.3.5", @@ -1612,7 +1612,7 @@ "@types/cors": "^2.8.4", "@types/express": "4.17.1", "accepts": "^1.3.5", - "apollo-server-core": "^2.9.12", + "apollo-server-core": "^2.9.13", "apollo-server-types": "^0.2.8", "body-parser": "^1.18.3", "cors": "^2.8.4", @@ -1728,9 +1728,9 @@ } }, "arg": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz", - "integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.2.tgz", + "integrity": "sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg==", "dev": true }, "argparse": { @@ -2627,9 +2627,9 @@ "dev": true }, "core-js": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.4.1.tgz", - "integrity": "sha512-KX/dnuY/J8FtEwbnrzmAjUYgLqtk+cxM86hfG60LGiW3MmltIc2yAmDgBgEkfm0blZhUrdr1Zd84J2Y14mLxzg==" + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.5.0.tgz", + "integrity": "sha512-Ifh3kj78gzQ7NAoJXeTu+XwzDld0QRIwjBLRqAMhuLhP3d2Av5wmgE9ycfnvK6NAEjTkQ1sDPeoEZAWO3Hx1Uw==" }, "core-util-is": { "version": "1.0.2", @@ -3291,9 +3291,9 @@ } }, "ext": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.2.0.tgz", - "integrity": "sha512-0ccUQK/9e3NreLFg6K6np8aPyRgwycx+oFGtfx1dSp7Wj00Ozw9r05FgBRlzjf2XBM7LAzwgLyDscRrtSU91hA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", "requires": { "type": "^2.0.0" }, @@ -6515,9 +6515,9 @@ } }, "mongodb": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.4.tgz", - "integrity": "sha512-6fmHu3FJTpeZxacJcfjUGIP3BSteG0l2cxLkSrf1nnnS1OrlnVGiP9P/wAC4aB6dM6H4vQ2io8YDjkuPkje7AA==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.5.tgz", + "integrity": "sha512-6NAv5gTFdwRyVfCz+O+KDszvjpyxmZw+VlmqmqKR2GmpkeKrKFRv/ZslgTtZba2dc9JYixIf99T5Gih7TIWv7Q==", "requires": { "bson": "^1.1.1", "require_optional": "^1.0.1", @@ -6526,13 +6526,13 @@ } }, "mongoose": { - "version": "5.7.12", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.7.12.tgz", - "integrity": "sha512-TqRiJPUeHN1u7Xs/zQmiMHcrzEb1/uKjK3uGzZhyqw25RKQiMV2vSBeBTMt5HXoYlUuDEWXE75FMjpK9X9kD0w==", + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.8.1.tgz", + "integrity": "sha512-8Cffl52cMK2iBlpLipoRKW/RdrhkxvVzXsy+xVsfbKHQBCWkFiS0T0jU4smYzomTMP4gW0sReJoRA7Gu/7VVgQ==", "requires": { "bson": "~1.1.1", "kareem": "2.3.1", - "mongodb": "3.3.4", + "mongodb": "3.3.5", "mongoose-legacy-pluralize": "1.0.2", "mpath": "0.6.0", "mquery": "3.2.2", @@ -6775,14 +6775,14 @@ } }, "nodemailer": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.3.1.tgz", - "integrity": "sha512-j0BsSyaMlyadEDEypK/F+xlne2K5m6wzPYMXS/yxKI0s7jmT1kBx6GEKRVbZmyYfKOsjkeC/TiMVDJBI/w5gMQ==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.2.tgz", + "integrity": "sha512-g0n4nH1ONGvqYo1v72uSWvF/MRNnnq1LzmSzXb/6EPF3LFb51akOhgG3K2+aETAsJx90/Q5eFNTntu4vBCwyQQ==" }, "nodemon": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.0.tgz", - "integrity": "sha512-hs+lNmZc6pIamxCTDrOhMccqSsGjZENGZ/40etM/Zc3aoR4UTvwMH38XOnhD5pmU+Jn2u1OGOC5hZF2tjCHJMA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.2.tgz", + "integrity": "sha512-GWhYPMfde2+M0FsHnggIHXTqPDHXia32HRhh6H0d75Mt9FKUoCBvumNHr7LdrpPBTKxsWmIEOjoN+P4IU6Hcaw==", "dev": true, "requires": { "chokidar": "^3.2.2", @@ -6871,9 +6871,9 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, "npm": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/npm/-/npm-6.13.1.tgz", - "integrity": "sha512-2awiDZ9JuV/UoF4oXGhekCURC2X+eLLRz9/e58AGrPDlpzyn7e4oCaZmkzyEaisxM7jSoFKNnZhzB4xbmbM0Yw==", + "version": "6.13.4", + "resolved": "https://registry.npmjs.org/npm/-/npm-6.13.4.tgz", + "integrity": "sha512-vTcUL4SCg3AzwInWTbqg1OIaOXlzKSS8Mb8kc5avwrJpcvevDA5J9BhYSuei+fNs3pwOp4lzA5x2FVDXACvoXA==", "requires": { "JSONStream": "^1.3.5", "abbrev": "~1.1.1", @@ -6881,7 +6881,7 @@ "ansistyles": "~0.1.3", "aproba": "^2.0.0", "archy": "~1.0.0", - "bin-links": "^1.1.3", + "bin-links": "^1.1.6", "bluebird": "^3.5.5", "byte-size": "^5.0.1", "cacache": "^12.0.3", @@ -6902,7 +6902,7 @@ "find-npm-prefix": "^1.0.2", "fs-vacuum": "~1.2.10", "fs-write-stream-atomic": "~1.0.10", - "gentle-fs": "^2.2.1", + "gentle-fs": "^2.3.0", "glob": "^7.1.4", "graceful-fs": "^4.2.3", "has-unicode": "~2.0.1", @@ -6951,7 +6951,7 @@ "npm-install-checks": "^3.0.2", "npm-lifecycle": "^3.1.4", "npm-package-arg": "^6.1.1", - "npm-packlist": "^1.4.6", + "npm-packlist": "^1.4.7", "npm-pick-manifest": "^3.0.2", "npm-profile": "^4.0.2", "npm-registry-fetch": "^4.0.2", @@ -6960,7 +6960,7 @@ "once": "~1.4.0", "opener": "^1.5.1", "osenv": "^0.1.5", - "pacote": "^9.5.9", + "pacote": "^9.5.11", "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "qrcode-terminal": "^0.12.0", @@ -6969,7 +6969,7 @@ "read": "~1.0.7", "read-cmd-shim": "^1.0.5", "read-installed": "~4.0.3", - "read-package-json": "^2.1.0", + "read-package-json": "^2.1.1", "read-package-tree": "^5.3.1", "readable-stream": "^3.4.0", "readdir-scoped-modules": "^1.1.0", @@ -7140,13 +7140,14 @@ } }, "bin-links": { - "version": "1.1.3", + "version": "1.1.6", "bundled": true, "requires": { "bluebird": "^3.5.3", "cmd-shim": "^3.0.0", - "gentle-fs": "^2.0.1", + "gentle-fs": "^2.3.0", "graceful-fs": "^4.1.15", + "npm-normalize-package-bin": "^1.0.0", "write-file-atomic": "^2.3.0" } }, @@ -7895,11 +7896,12 @@ "bundled": true }, "gentle-fs": { - "version": "2.2.1", + "version": "2.3.0", "bundled": true, "requires": { "aproba": "^1.1.2", "chownr": "^1.1.2", + "cmd-shim": "^3.0.3", "fs-vacuum": "^1.2.10", "graceful-fs": "^4.1.11", "iferr": "^0.1.5", @@ -8744,8 +8746,11 @@ } }, "npm-bundled": { - "version": "1.0.6", - "bundled": true + "version": "1.1.1", + "bundled": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } }, "npm-cache-filename": { "version": "1.0.2", @@ -8776,6 +8781,10 @@ "version": "1.2.1", "bundled": true }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true + }, "npm-package-arg": { "version": "6.1.1", "bundled": true, @@ -8787,7 +8796,7 @@ } }, "npm-packlist": { - "version": "1.4.6", + "version": "1.4.7", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -8945,7 +8954,7 @@ } }, "pacote": { - "version": "9.5.9", + "version": "9.5.11", "bundled": true, "requires": { "bluebird": "^3.5.3", @@ -8962,6 +8971,7 @@ "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "normalize-package-data": "^2.4.0", + "npm-normalize-package-bin": "^1.0.0", "npm-package-arg": "^6.1.0", "npm-packlist": "^1.1.12", "npm-pick-manifest": "^3.0.0", @@ -9200,14 +9210,14 @@ } }, "read-package-json": { - "version": "2.1.0", + "version": "2.1.1", "bundled": true, "requires": { "glob": "^7.1.1", "graceful-fs": "^4.1.2", "json-parse-better-errors": "^1.0.1", "normalize-package-data": "^2.0.0", - "slash": "^1.0.0" + "npm-normalize-package-bin": "^1.0.0" } }, "read-package-tree": { @@ -9360,10 +9370,6 @@ "version": "3.0.2", "bundled": true }, - "slash": { - "version": "1.0.0", - "bundled": true - }, "slide": { "version": "1.1.6", "bundled": true @@ -10019,9 +10025,9 @@ } }, "object-hash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz", - "integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.1.tgz", + "integrity": "sha512-HgcGMooY4JC2PBt9sdUdJ6PMzpin+YtY3r/7wg0uTifP+HJWW8rammseSEHuyt0UeShI183UGssCJqm1bJR7QA==" }, "object-inspect": { "version": "1.6.0", @@ -10231,9 +10237,9 @@ "dev": true }, "passport": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.0.tgz", - "integrity": "sha1-xQlWkTR71a07XhgCOMORTRbwWBE=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.1.tgz", + "integrity": "sha512-IxXgZZs8d7uFSt3eqNjM9NQ3g3uQCW5avD8mRNoXV99Yig50vjuaez6dQK2qC0kVWPRTujxY0dWgGfT09adjYg==", "requires": { "passport-strategy": "1.x.x", "pause": "0.0.1" @@ -11850,9 +11856,9 @@ } }, "ts-jest": { - "version": "24.1.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.1.0.tgz", - "integrity": "sha512-HEGfrIEAZKfu1pkaxB9au17b1d9b56YZSqz5eCVE8mX68+5reOvlM93xGOzzCREIov9mdH7JBG+s0UyNAqr0tQ==", + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.2.0.tgz", + "integrity": "sha512-Yc+HLyldlIC9iIK8xEN7tV960Or56N49MDP7hubCZUeI7EbIOTsas6rXCMB4kQjLACJ7eDOF4xWEO5qumpKsag==", "dev": true, "requires": { "bs-logger": "0.x", @@ -11919,9 +11925,9 @@ } }, "ts-node": { - "version": "8.5.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.2.tgz", - "integrity": "sha512-W1DK/a6BGoV/D4x/SXXm6TSQx6q3blECUzd5TN+j56YEMX3yPVMpHsICLedUw3DvGF3aTQ8hfdR9AKMaHjIi+A==", + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.4.tgz", + "integrity": "sha512-izbVCRV68EasEPQ8MSIGBNK9dc/4sYJJKYA+IarMQct1RtEot6Xp0bXuClsbUSnKpg50ho+aOAx8en5c+y4OFw==", "dev": true, "requires": { "arg": "^4.1.0", @@ -12064,9 +12070,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typescript": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", - "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==" + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz", + "integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==" }, "uglify-js": { "version": "3.6.4", diff --git a/package.json b/package.json index c5aff07..0456cad 100644 --- a/package.json +++ b/package.json @@ -20,50 +20,50 @@ "test:e2e": "NODE_ENV=test jest --config ./test/jest-e2e.json" }, "dependencies": { - "@nestjs/common": "^6.10.1", - "@nestjs/core": "^6.10.1", + "@nestjs/common": "^6.10.11", + "@nestjs/core": "^6.10.11", "@nestjs/graphql": "^6.5.3", "@nestjs/jwt": "^6.1.1", "@nestjs/mongoose": "^6.1.2", - "@nestjs/passport": "^6.1.0", - "@nestjs/platform-express": "^6.10.1", - "apollo-server-express": "^2.9.12", + "@nestjs/passport": "^6.1.1", + "@nestjs/platform-express": "^6.10.11", + "apollo-server-express": "^2.9.13", "axios": ">=0.19.0", "bcrypt": "^3.0.7", "dotenv": "^8.2.0", "graphql": "^14.5.8", "graphql-tools": "^4.0.6", "joi": "^14.3.1", - "mongoose": "^5.7.12", - "nodemailer": "^6.3.1", - "npm": "^6.13.1", - "passport": "^0.4.0", + "mongoose": "^5.8.1", + "nodemailer": "^6.4.2", + "npm": "^6.13.4", + "passport": "^0.4.1", "passport-jwt": "^4.0.0", "reflect-metadata": "^0.1.13", "rimraf": "^3.0.0", "rxjs": "^6.5.3", - "typescript": "^3.7.2" + "typescript": "^3.7.3" }, "devDependencies": { - "@nestjs/testing": "^6.10.1", + "@nestjs/testing": "^6.10.11", "@types/bcrypt": "^3.0.0", "@types/express": "^4.17.2", "@types/graphql": "^14.5.0", "@types/jest": "^24.0.23", "@types/joi": "^14.3.4", - "@types/mongodb": "^3.3.11", - "@types/mongoose": "^5.5.32", - "@types/node": "^12.12.11", + "@types/mongodb": "^3.3.12", + "@types/mongoose": "^5.5.34", + "@types/node": "^12.12.17", "@types/nodemailer": "^6.2.2", "@types/passport-jwt": "^3.0.3", "@types/supertest": "^2.0.8", "jest": "^24.9.0", - "nodemon": "^2.0.0", + "nodemon": "^2.0.2", "prettier": "^1.19.1", "supertest": "^4.0.2", - "ts-jest": "^24.1.0", + "ts-jest": "^24.2.0", "ts-loader": "^6.2.1", - "ts-node": "^8.5.2", + "ts-node": "^8.5.4", "tsconfig-paths": "^3.9.0", "tslint": "^5.20.1" }, diff --git a/src/users/users.service.ts b/src/users/users.service.ts index a505549..7c43403 100644 --- a/src/users/users.service.ts +++ b/src/users/users.service.ts @@ -119,13 +119,17 @@ export class UsersService { } } - let user: UserDocument | null = null; + let user: UserDocument | undefined | null = null; - user = await this.userModel.findOneAndUpdate( - { lowercaseUsername: username.toLowerCase() }, - fields, - { new: true, runValidators: true }, - ); + if (Object.entries(fieldsToUpdate).length > 0) { + user = await this.userModel.findOneAndUpdate( + { lowercaseUsername: username.toLowerCase() }, + fields, + { new: true, runValidators: true }, + ); + } else { + user = await this.findOneByUsername(username); + } if (!user) return undefined; @@ -181,7 +185,10 @@ export class UsersService { expiration, }; - user.save().then(() => resolve(true), () => resolve(false)); + user.save().then( + () => resolve(true), + () => resolve(false), + ); }); }); }