From 564e12f0758467d0ada2c8a54ce50d9d5280b47a Mon Sep 17 00:00:00 2001 From: hasezoey Date: Sun, 2 Feb 2020 05:42:56 +0100 Subject: [PATCH] WIP --- angular.json | 5 +- apps/mm-n-api/src/app/app.module.ts | 8 +- .../app/modules/sso.module/sso.module.spec.ts | 3 + apps/mm-n-api/src/tests/test-modules.ts | 8 +- package-lock.json | 79 +++++++++---------- package.json | 6 +- 6 files changed, 47 insertions(+), 62 deletions(-) diff --git a/angular.json b/angular.json index 8554873..b05fb45 100644 --- a/angular.json +++ b/angular.json @@ -16,8 +16,7 @@ "outputPath": "dist/apps/mm-n-api", "main": "apps/mm-n-api/src/main.ts", "tsConfig": "apps/mm-n-api/tsconfig.app.json", - "assets": [ - ] + "assets": [] }, "configurations": { "production": { @@ -79,4 +78,4 @@ } }, "defaultProject": "mm-api" -} +} \ No newline at end of file diff --git a/apps/mm-n-api/src/app/app.module.ts b/apps/mm-n-api/src/app/app.module.ts index 20db452..f97592f 100644 --- a/apps/mm-n-api/src/app/app.module.ts +++ b/apps/mm-n-api/src/app/app.module.ts @@ -5,17 +5,11 @@ import { SSOModule } from './modules/sso.module'; @Module({ imports: [ - TypegooseModule.forRoot("put uri here", + TypegooseModule.forRoot("mongodb://localhost:27017/verifyNEST61NORMAL", { - keepAlive: true, useNewUrlParser: true, useFindAndModify: false, - autoReconnect: true, - reconnectInterval: 2000, - reconnectTries: Number.MAX_VALUE, - connectTimeoutMS: 30000, useCreateIndex: true, - // @ts-ignore useUnifiedTopology: true, }), SSOModule, diff --git a/apps/mm-n-api/src/app/modules/sso.module/sso.module.spec.ts b/apps/mm-n-api/src/app/modules/sso.module/sso.module.spec.ts index 1165a4f..9d61eb8 100644 --- a/apps/mm-n-api/src/app/modules/sso.module/sso.module.spec.ts +++ b/apps/mm-n-api/src/app/modules/sso.module/sso.module.spec.ts @@ -1,3 +1,6 @@ +import { setLogLevel } from "@typegoose/typegoose"; +setLogLevel("DEBUG"); + import { PasswordToken } from '@mm-mono/api/models/password-token.model'; import { User, } from '@mm-mono/api/models/user.model'; import { IUser } from '@mm-mono/api/objects/IUser'; diff --git a/apps/mm-n-api/src/tests/test-modules.ts b/apps/mm-n-api/src/tests/test-modules.ts index a57f685..f8c1fd9 100644 --- a/apps/mm-n-api/src/tests/test-modules.ts +++ b/apps/mm-n-api/src/tests/test-modules.ts @@ -5,17 +5,11 @@ import { TypegooseModule } from 'nestjs-typegoose'; @Module({ imports: [ - TypegooseModule.forRoot("url", + TypegooseModule.forRoot(`mongodb://localhost:27017/verifyNEST61TEST`, { - keepAlive: true, useNewUrlParser: true, useFindAndModify: false, - autoReconnect: true, - reconnectInterval: 2000, - reconnectTries: Number.MAX_VALUE, - connectTimeoutMS: 30000, useCreateIndex: true, - // @ts-ignore useUnifiedTopology: true, }), PassportModule, diff --git a/package-lock.json b/package-lock.json index 6dd8290..8e1de31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3468,14 +3468,14 @@ } }, "@typegoose/typegoose": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@typegoose/typegoose/-/typegoose-6.1.5.tgz", - "integrity": "sha512-edebWDdETS1nv95I//87fJMGXjPFnFYEwQWSz7xgqZ0sk1dUhahStKAxbsiwDw2LgrbMN6299cZJjx/HaU4iHg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@typegoose/typegoose/-/typegoose-6.2.2.tgz", + "integrity": "sha512-tiBpxKV+M4eAQ4zDygP/mJtnJF2HgCIDdhoKlIEPRn4RWiNpD1Q8qQXK5aJ8c8Jhr59SExcQYmDRQOmwau2IDg==", "requires": { "lodash": "^4.17.15", "loglevel": "^1.6.6", "reflect-metadata": "^0.1.13", - "semver": "^6.3.0", + "semver": "^7.1.1", "tslib": "^1.10.0" }, "dependencies": { @@ -3485,9 +3485,9 @@ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.2.tgz", + "integrity": "sha512-BJs9T/H8sEVHbeigqzIEo57Iu/3DG6c4QoqTfbQB3BPA4zgzAomh/Fk9E7QtjWQ8mx2dgA9YCfSF4y9k9bHNpQ==" } } }, @@ -3562,9 +3562,9 @@ } }, "@types/bson": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.0.tgz", - "integrity": "sha512-pq/rqJwJWkbS10crsG5bgnrisL8pML79KlMKQMoQwLUjlPAkrUHMvHJ3oGwE7WHR61Lv/nadMwXVAD2b+fpD8Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.1.tgz", + "integrity": "sha512-K6VAEdLVJFBxKp8m5cRTbUfeZpuSvOuLKJLrgw9ANIXo00RiyGzgH4BKWWR4F520gV4tWmxG7q9sKQRVDuzrBw==", "dev": true, "requires": { "@types/node": "*" @@ -3761,9 +3761,9 @@ "dev": true }, "@types/mongodb": { - "version": "3.1.28", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.1.28.tgz", - "integrity": "sha512-tG+QqJ/hir2p0069ee28t2O9tlGRJKDq1WFZC2QYMlU47LGdldLL8tepfTq6aFLvP58OpwSoxaJ/qjW93ob1NQ==", + "version": "3.3.15", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.3.15.tgz", + "integrity": "sha512-q2dL0VEdFdE9iS0xrTP0NSgJJBFH4hBvt3beglCwU3qMWrz7dCuu/CrRjPB4+R8jLjCi/Gik2Mkd+lU0sYsZgQ==", "dev": true, "requires": { "@types/bson": "*", @@ -3771,9 +3771,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.7.0", + "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.7.0.tgz", + "integrity": "sha512-x58vO/LCmLd3AD1jeRrsiXkQUl2Ob8JvFpz4GiDgu3Gss8n+r9xSow+j6sbp9JdS2tS5Zk8HajeySEldbdQe0g==", "dev": true, "requires": { "@types/mongodb": "*", @@ -5282,9 +5282,9 @@ } }, "bson": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.1.tgz", - "integrity": "sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg==" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.3.tgz", + "integrity": "sha512-TdiJxMVnodVS7r0BdL42y/pqC9cL2iKynVwA0Ho3qbsQYr428veL3l7BQyuqiw+Q5SqqoT0m4srSY/BlZ9AxXg==" }, "buffer": { "version": "4.9.1", @@ -12276,14 +12276,25 @@ "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, + "mongodb": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.4.1.tgz", + "integrity": "sha512-juqt5/Z42J4DcE7tG7UdVaTKmUC6zinF4yioPfpeOSNBieWSK6qCY+0tfGQcHLKrauWPDdMZVROHJOa8q2pWsA==", + "requires": { + "bson": "^1.1.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, "mongoose": { - "version": "5.7.11", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.7.11.tgz", - "integrity": "sha512-KpXGBTXQTKfTlePpZMY+FBsk9wiyp2gzfph9AsLPfWleK1x2GJY+6xpKx2kKIgLustgNq16OOrqwlAOGUbv3kg==", + "version": "5.8.11", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.8.11.tgz", + "integrity": "sha512-Yz0leNEJsAtNtMTxTDEadacLWt58gaVeBVL3c1Z3vaBoc159aJqlf+T8jaL9mAdBxKndF5YWhh6Q719xac7cjA==", "requires": { "bson": "~1.1.1", "kareem": "2.3.1", - "mongodb": "3.3.4", + "mongodb": "3.4.1", "mongoose-legacy-pluralize": "1.0.2", "mpath": "0.6.0", "mquery": "3.2.2", @@ -12294,17 +12305,6 @@ "sliced": "1.0.1" }, "dependencies": { - "mongodb": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.4.tgz", - "integrity": "sha512-6fmHu3FJTpeZxacJcfjUGIP3BSteG0l2cxLkSrf1nnnS1OrlnVGiP9P/wAC4aB6dM6H4vQ2io8YDjkuPkje7AA==", - "requires": { - "bson": "^1.1.1", - "require_optional": "^1.0.1", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -14946,9 +14946,9 @@ "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" } } }, @@ -18152,11 +18152,6 @@ "string-width": "^1.0.2 || 2" } }, - "winax": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/winax/-/winax-1.12.0.tgz", - "integrity": "sha512-ST97mlHzBe/Czx8y0irapWMopMa+OgNySnbmKnT2glmPJVAZXfSZT0m6iiqykyNYeVHPMCsocaWzb2uauLH9Mw==" - }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", diff --git a/package.json b/package.json index 555d97c..181f26e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@sentry/integrations": "^5.11.0", "@sentry/node": "^5.9.0", "@sweetalert2/ngx-sweetalert2": "^5.1.0", - "@typegoose/typegoose": "^6.1.5", + "@typegoose/typegoose": "^6.2.2", "@types/jquery": "^3.3.30", "angular-font-awesome": "^3.1.2", "angular-froala-wysiwyg": "^3.0.6", @@ -64,7 +64,7 @@ "lusca": "^1.6.1", "method-override": "^3.0.0", "moment": "^2.24.0", - "mongoose": "^5.7.11", + "mongoose": "^5.8.11", "mssql": "^5.1.0", "multer": "^1.4.2", "multer-s3": "^2.9.0", @@ -129,7 +129,7 @@ "@types/jsonwebtoken": "^8.3.2", "@types/lusca": "^1.6.0", "@types/method-override": "0.0.31", - "@types/mongoose": "^5.5.32", + "@types/mongoose": "^5.7.0", "@types/mssql": "^4.0.15", "@types/multer": "^1.3.10", "@types/multer-s3": "^2.7.7", -- 2.25.0