diff --git a/.vscode/settings.json b/.vscode/settings.json index 8c632b5d..7c49ca90 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,6 +22,7 @@ "jspdf", "jwtid", "jwttoken", + "KHTML", "lukeed", "Mercurius", "mikro", diff --git a/docs/config.md b/docs/config.md index b62bec49..48879455 100644 --- a/docs/config.md +++ b/docs/config.md @@ -119,10 +119,10 @@ import { ConfigService } from "@nestjs/config"; @Injectable() export class DatabaseService { - constructor(private configService: ConfigService) {} + constructor(private configService: ConfigService) {} getDatabaseUrl(): string { - return this.configService.get("database.url"); + return this.configService.get("database.url"); } // ... other methods to access configuration settings related to database diff --git a/package.json b/package.json index 4fcdb011..5e57d81b 100644 --- a/package.json +++ b/package.json @@ -57,11 +57,11 @@ "@golevelup/nestjs-rabbitmq": "^4.0.0", "@golevelup/nestjs-stripe": "^0.6.3", "@golevelup/nestjs-webhooks": "^0.2.16", - "@mikro-orm/core": "^5.7.14", - "@mikro-orm/migrations": "^5.7.14", + "@mikro-orm/core": "^5.8.0", + "@mikro-orm/migrations": "^5.8.0", "@mikro-orm/nestjs": "^5.2.1", - "@mikro-orm/postgresql": "^5.7.14", - "@mikro-orm/reflection": "^5.7.14", + "@mikro-orm/postgresql": "^5.8.0", + "@mikro-orm/reflection": "^5.8.0", "@mikro-orm/sql-highlighter": "^1.0.1", "@nestjs/axios": "^3.0.0", "@nestjs/cache-manager": "^2.1.0", @@ -138,8 +138,8 @@ "@firebase/app-compat": "^0.2.18", "@firebase/app-types": "^0.9.0", "@golevelup/ts-jest": "^0.4.0", - "@mikro-orm/cli": "^5.7.14", - "@mikro-orm/seeder": "^5.7.14", + "@mikro-orm/cli": "^5.8.0", + "@mikro-orm/seeder": "^5.8.0", "@nestjs/cli": "10.1.17", "@nestjs/schematics": "10.0.2", "@nestjs/testing": "10.2.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 878f26d8..58e74c55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,20 +24,20 @@ dependencies: specifier: ^0.2.16 version: 0.2.16(@nestjs/common@10.2.4)(body-parser@1.20.2)(rxjs@7.8.1) '@mikro-orm/core': - specifier: ^5.7.14 - version: 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) + specifier: ^5.8.0 + version: 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) '@mikro-orm/migrations': - specifier: ^5.7.14 - version: 5.7.14(@mikro-orm/core@5.7.14)(pg@8.11.1) + specifier: ^5.8.0 + version: 5.8.0(@mikro-orm/core@5.8.0)(pg@8.11.3) '@mikro-orm/nestjs': specifier: ^5.2.1 - version: 5.2.1(@mikro-orm/core@5.7.14)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4) + version: 5.2.1(@mikro-orm/core@5.8.0)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4) '@mikro-orm/postgresql': - specifier: ^5.7.14 - version: 5.7.14(@mikro-orm/core@5.7.14)(@mikro-orm/migrations@5.7.14)(@mikro-orm/seeder@5.7.14) + specifier: ^5.8.0 + version: 5.8.0(@mikro-orm/core@5.8.0)(@mikro-orm/migrations@5.8.0)(@mikro-orm/seeder@5.8.0) '@mikro-orm/reflection': - specifier: ^5.7.14 - version: 5.7.14(@mikro-orm/core@5.7.14) + specifier: ^5.8.0 + version: 5.8.0(@mikro-orm/core@5.8.0) '@mikro-orm/sql-highlighter': specifier: ^1.0.1 version: 1.0.1 @@ -82,7 +82,7 @@ dependencies: version: 7.1.10(@nestjs/common@10.2.4)(@nestjs/core@10.2.4)(class-transformer@0.5.1)(class-validator@0.14.0)(reflect-metadata@0.1.13) '@nestjs/terminus': specifier: ^10.0.1 - version: 10.0.1(@mikro-orm/core@5.7.14)(@mikro-orm/nestjs@5.2.1)(@nestjs/axios@3.0.0)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4)(reflect-metadata@0.1.13)(rxjs@7.8.1) + version: 10.0.1(@mikro-orm/core@5.8.0)(@mikro-orm/nestjs@5.2.1)(@nestjs/axios@3.0.0)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4)(reflect-metadata@0.1.13)(rxjs@7.8.1) '@nestjs/throttler': specifier: ^5.0.0 version: 5.0.0(@nestjs/common@10.2.4)(@nestjs/core@10.2.4)(reflect-metadata@0.1.13) @@ -263,11 +263,11 @@ devDependencies: specifier: ^0.4.0 version: 0.4.0 '@mikro-orm/cli': - specifier: ^5.7.14 - version: 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14)(pg@8.11.1) + specifier: ^5.8.0 + version: 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0)(pg@8.11.3) '@mikro-orm/seeder': - specifier: ^5.7.14 - version: 5.7.14(@mikro-orm/core@5.7.14) + specifier: ^5.8.0 + version: 5.8.0(@mikro-orm/core@5.8.0) '@nestjs/cli': specifier: 10.1.17 version: 10.1.17(@swc/core@1.3.83) @@ -2499,8 +2499,8 @@ packages: - supports-color dev: false - /@mikro-orm/cli@5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14)(pg@8.11.1): - resolution: {integrity: sha512-+Npl7TGQvJBli8rVmFpBOJ/5ivWL8Ui2YxszMAK2n2hwFXxPomk3ySccG4E9KTsvEdph4KGA08UONlNB1VIquQ==} + /@mikro-orm/cli@5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0)(pg@8.11.3): + resolution: {integrity: sha512-4KLaesc+1Nm4nS8mQATcKmfDXP6yAIwBeB+EvtQLSZbjF2jQliPLwJ878yUJbQdXUTeEeKU4SoJBGOwvCgReow==} engines: {node: '>= 14.0.0'} hasBin: true peerDependencies: @@ -2537,11 +2537,11 @@ packages: optional: true dependencies: '@jercle/yargonaut': 1.1.5 - '@mikro-orm/core': 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) - '@mikro-orm/knex': 5.7.14(@mikro-orm/core@5.7.14)(@mikro-orm/migrations@5.7.14)(pg@8.11.1) - '@mikro-orm/migrations': 5.7.14(@mikro-orm/core@5.7.14)(pg@8.11.1) - '@mikro-orm/postgresql': 5.7.14(@mikro-orm/core@5.7.14)(@mikro-orm/migrations@5.7.14)(@mikro-orm/seeder@5.7.14) - '@mikro-orm/seeder': 5.7.14(@mikro-orm/core@5.7.14) + '@mikro-orm/core': 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) + '@mikro-orm/knex': 5.8.0(@mikro-orm/core@5.8.0)(@mikro-orm/migrations@5.8.0)(pg@8.11.3) + '@mikro-orm/migrations': 5.8.0(@mikro-orm/core@5.8.0)(pg@8.11.3) + '@mikro-orm/postgresql': 5.8.0(@mikro-orm/core@5.8.0)(@mikro-orm/migrations@5.8.0)(@mikro-orm/seeder@5.8.0) + '@mikro-orm/seeder': 5.8.0(@mikro-orm/core@5.8.0) fs-extra: 11.1.1 tsconfig-paths: 4.2.0 yargs: 17.7.2 @@ -2557,8 +2557,8 @@ packages: - tedious dev: true - /@mikro-orm/core@5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14): - resolution: {integrity: sha512-og2TJ4mRdGKF8ok/xSdGNbznm+WFF6VJosJnneulmY4VirRNfDfp7uNPBOinewigS4Q8Ntdirmponx4KrOoMBg==} + /@mikro-orm/core@5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0): + resolution: {integrity: sha512-udopm27yWHE6Xkz7ikFfMx02/RXbsoi407JUp4pOa5pJpGKGpaKZMA1VbkpgHi3G4gV8gu/k5MguECud1yNvwQ==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/better-sqlite': ^5.0.0 @@ -2593,19 +2593,19 @@ packages: '@mikro-orm/sqlite': optional: true dependencies: - '@mikro-orm/migrations': 5.7.14(@mikro-orm/core@5.7.14)(pg@8.11.1) - '@mikro-orm/postgresql': 5.7.14(@mikro-orm/core@5.7.14)(@mikro-orm/migrations@5.7.14)(@mikro-orm/seeder@5.7.14) - '@mikro-orm/seeder': 5.7.14(@mikro-orm/core@5.7.14) + '@mikro-orm/migrations': 5.8.0(@mikro-orm/core@5.8.0)(pg@8.11.3) + '@mikro-orm/postgresql': 5.8.0(@mikro-orm/core@5.8.0)(@mikro-orm/migrations@5.8.0)(@mikro-orm/seeder@5.8.0) + '@mikro-orm/seeder': 5.8.0(@mikro-orm/core@5.8.0) acorn-loose: 8.3.0 acorn-walk: 8.2.0 dotenv: 16.3.1 fs-extra: 11.1.1 globby: 11.1.0 - mikro-orm: 5.7.14 + mikro-orm: 5.8.0 reflect-metadata: 0.1.13 - /@mikro-orm/knex@5.7.14(@mikro-orm/core@5.7.14)(@mikro-orm/migrations@5.7.14)(pg@8.11.1): - resolution: {integrity: sha512-dLw80JiOfQ6YBtKXI3j0C31lYfbWlytZUpXFM4tEKlMbAMmSbPqDgZpiF3luxBKTg3JpsnGSK0urBOxL1c/m+g==} + /@mikro-orm/knex@5.8.0(@mikro-orm/core@5.8.0)(@mikro-orm/migrations@5.8.0)(pg@8.11.3): + resolution: {integrity: sha512-hglyqCpVmlb6yhTAJ329pc7hZ4bZMui9cBJ8/FaEXIdkNa4SNqZ71CrQ8NM3PxA479W6EuMMOL+6yTFFR6dAkw==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 @@ -2635,28 +2635,28 @@ packages: sqlite3: optional: true dependencies: - '@mikro-orm/core': 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) - '@mikro-orm/migrations': 5.7.14(@mikro-orm/core@5.7.14)(pg@8.11.1) + '@mikro-orm/core': 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) + '@mikro-orm/migrations': 5.8.0(@mikro-orm/core@5.8.0)(pg@8.11.3) fs-extra: 11.1.1 - knex: 2.5.1(pg@8.11.1) - pg: 8.11.1 + knex: 2.5.1(pg@8.11.3) + pg: 8.11.3 sqlstring: 2.3.3 transitivePeerDependencies: - pg-native - supports-color - tedious - /@mikro-orm/migrations@5.7.14(@mikro-orm/core@5.7.14)(pg@8.11.1): - resolution: {integrity: sha512-CwNcvY8Zj6Ah1Y9bA2fpgaJVX+QNXR6E9mpytRS74+grcEBRSF/cpXdrIons6e5LzPRxPFrMgghXHm4Fb1OMWg==} + /@mikro-orm/migrations@5.8.0(@mikro-orm/core@5.8.0)(pg@8.11.3): + resolution: {integrity: sha512-gopN1IhJ1yP7TLaG8aFYfmq9AR+8wEKFElZ6Wlk5ARRLqlOvIGBrFgzwiIW2+6m15Fpy7edlHf44Oe1SgtN6JQ==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 dependencies: - '@mikro-orm/core': 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) - '@mikro-orm/knex': 5.7.14(@mikro-orm/core@5.7.14)(@mikro-orm/migrations@5.7.14)(pg@8.11.1) + '@mikro-orm/core': 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) + '@mikro-orm/knex': 5.8.0(@mikro-orm/core@5.8.0)(@mikro-orm/migrations@5.8.0)(pg@8.11.3) fs-extra: 11.1.1 - knex: 2.5.1(pg@8.11.1) - umzug: 3.2.1 + knex: 2.5.1(pg@8.11.3) + umzug: 3.3.1 transitivePeerDependencies: - '@mikro-orm/entity-generator' - better-sqlite3 @@ -2669,7 +2669,7 @@ packages: - supports-color - tedious - /@mikro-orm/nestjs@5.2.1(@mikro-orm/core@5.7.14)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4): + /@mikro-orm/nestjs@5.2.1(@mikro-orm/core@5.8.0)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4): resolution: {integrity: sha512-TrCdPsM7DApxrK3avBbijT6/6Er4TZhtiQ+qlMqtqva13vMCG4HiF2vIWGrKJbFukkLRuhOfZlES+KZ9Y1Lx2A==} engines: {node: '>= 14.0.0'} peerDependencies: @@ -2677,13 +2677,13 @@ packages: '@nestjs/common': ^8.0.0 || ^9.0.0 || ^10.0.0 '@nestjs/core': ^8.0.0 || ^9.0.0 || ^10.0.0 dependencies: - '@mikro-orm/core': 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) + '@mikro-orm/core': 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) '@nestjs/common': 10.2.4(class-transformer@0.5.1)(class-validator@0.14.0)(reflect-metadata@0.1.13)(rxjs@7.8.1) '@nestjs/core': 10.2.4(@nestjs/common@10.2.4)(@nestjs/platform-express@10.2.4)(@nestjs/websockets@10.2.4)(reflect-metadata@0.1.13)(rxjs@7.8.1) dev: false - /@mikro-orm/postgresql@5.7.14(@mikro-orm/core@5.7.14)(@mikro-orm/migrations@5.7.14)(@mikro-orm/seeder@5.7.14): - resolution: {integrity: sha512-3nF/UtUZ9a8jj0bD7ONeLRLg5MIHNKJngl7yR3c8sRz9yTAX6bT0lttbCxCeL4Q6/5XdcDtjgAQMUrYx1QVPhQ==} + /@mikro-orm/postgresql@5.8.0(@mikro-orm/core@5.8.0)(@mikro-orm/migrations@5.8.0)(@mikro-orm/seeder@5.8.0): + resolution: {integrity: sha512-U25QztCOJMZrug7ILPzakgUEipURJFK1t8dm+xZFtT4jTpqJ83ZEyVMf5wbYQwEomQTuKrt3ka99bjJGcSNrag==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 @@ -2698,11 +2698,11 @@ packages: '@mikro-orm/seeder': optional: true dependencies: - '@mikro-orm/core': 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) - '@mikro-orm/knex': 5.7.14(@mikro-orm/core@5.7.14)(@mikro-orm/migrations@5.7.14)(pg@8.11.1) - '@mikro-orm/migrations': 5.7.14(@mikro-orm/core@5.7.14)(pg@8.11.1) - '@mikro-orm/seeder': 5.7.14(@mikro-orm/core@5.7.14) - pg: 8.11.1 + '@mikro-orm/core': 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) + '@mikro-orm/knex': 5.8.0(@mikro-orm/core@5.8.0)(@mikro-orm/migrations@5.8.0)(pg@8.11.3) + '@mikro-orm/migrations': 5.8.0(@mikro-orm/core@5.8.0)(pg@8.11.3) + '@mikro-orm/seeder': 5.8.0(@mikro-orm/core@5.8.0) + pg: 8.11.3 transitivePeerDependencies: - better-sqlite3 - mssql @@ -2713,25 +2713,25 @@ packages: - supports-color - tedious - /@mikro-orm/reflection@5.7.14(@mikro-orm/core@5.7.14): - resolution: {integrity: sha512-3GgRyDSz6wms/SqWLTEg0+5NPqCpKy4OfhtT+X1jXNT4Ch9Sb/Cvhz+jNdbDAfvlmKRBDMdKAbZtBqsNApf5Zg==} + /@mikro-orm/reflection@5.8.0(@mikro-orm/core@5.8.0): + resolution: {integrity: sha512-gQ3w6nWGHGzPh4J+TEMpZS/PeEbB/97CW48KJuKJOwq5bU+2PbqkDIaDiSVkVTr+7jmaVrZ3UXNzbcpip97VQA==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 dependencies: - '@mikro-orm/core': 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) + '@mikro-orm/core': 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) globby: 11.1.0 ts-morph: 19.0.0 dev: false - /@mikro-orm/seeder@5.7.14(@mikro-orm/core@5.7.14): - resolution: {integrity: sha512-X4QCpvHCSU7+WdJpHgAzyWw+aGhd5mqvTI3UtJbuq/bxXKKDMX5pY96TPYr4QhoDm3/l2tDeF7hX/V6E3UwA0g==} + /@mikro-orm/seeder@5.8.0(@mikro-orm/core@5.8.0): + resolution: {integrity: sha512-wAHSvI7IRnxRafhche6VPlb916FlQV6OBMIg9tvBL8tn342SyM17upv+cg7slJ+1EiPs1qo7gGw5H6mB06BLmw==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 dependencies: '@faker-js/faker': 7.6.0 - '@mikro-orm/core': 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) + '@mikro-orm/core': 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) fs-extra: 11.1.1 globby: 11.1.0 @@ -3116,7 +3116,7 @@ packages: swagger-ui-dist: 5.4.2 dev: false - /@nestjs/terminus@10.0.1(@mikro-orm/core@5.7.14)(@mikro-orm/nestjs@5.2.1)(@nestjs/axios@3.0.0)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4)(reflect-metadata@0.1.13)(rxjs@7.8.1): + /@nestjs/terminus@10.0.1(@mikro-orm/core@5.8.0)(@mikro-orm/nestjs@5.2.1)(@nestjs/axios@3.0.0)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4)(reflect-metadata@0.1.13)(rxjs@7.8.1): resolution: {integrity: sha512-orQmQFdwN4QC2Oo30BrxEKzKAVeVluWQElgIe16NGvm597VqRH4b1GbKldVg6H8adehd/nR6RdCUyFozRdl2rA==} peerDependencies: '@grpc/grpc-js': '*' @@ -3164,8 +3164,8 @@ packages: typeorm: optional: true dependencies: - '@mikro-orm/core': 5.7.14(@mikro-orm/migrations@5.7.14)(@mikro-orm/postgresql@5.7.14)(@mikro-orm/seeder@5.7.14) - '@mikro-orm/nestjs': 5.2.1(@mikro-orm/core@5.7.14)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4) + '@mikro-orm/core': 5.8.0(@mikro-orm/migrations@5.8.0)(@mikro-orm/postgresql@5.8.0)(@mikro-orm/seeder@5.8.0) + '@mikro-orm/nestjs': 5.2.1(@mikro-orm/core@5.8.0)(@nestjs/common@10.2.4)(@nestjs/core@10.2.4) '@nestjs/axios': 3.0.0(@nestjs/common@10.2.4)(axios@1.5.0)(reflect-metadata@0.1.13)(rxjs@7.8.1) '@nestjs/common': 10.2.4(class-transformer@0.5.1)(class-validator@0.14.0)(reflect-metadata@0.1.13)(rxjs@7.8.1) '@nestjs/core': 10.2.4(@nestjs/common@10.2.4)(@nestjs/platform-express@10.2.4)(@nestjs/websockets@10.2.4)(reflect-metadata@0.1.13)(rxjs@7.8.1) @@ -6592,14 +6592,9 @@ packages: resolution: {integrity: sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==} dev: true - /emittery@0.12.1: - resolution: {integrity: sha512-pYyW59MIZo0HxPFf+Vb3+gacUu0gxVS3TZwB2ClwkEZywgF9f9OJDoVmNLojTn0vKX3tO9LC+pdQEcLP4Oz/bQ==} - engines: {node: '>=12'} - /emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} engines: {node: '>=12'} - dev: true /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -7659,12 +7654,6 @@ packages: universalify: 2.0.0 dev: true - /fs-jetpack@4.3.1: - resolution: {integrity: sha512-dbeOK84F6BiQzk2yqqCVwCPWTxAvVGJ3fMQc6E2wuEohS28mR6yHngbrKuVCK1KHRx/ccByDylqu4H5PCP2urQ==} - dependencies: - minimatch: 3.1.2 - rimraf: 2.7.1 - /fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} @@ -9467,7 +9456,7 @@ packages: engines: {node: '>=6'} dev: true - /knex@2.5.1(pg@8.11.1): + /knex@2.5.1(pg@8.11.3): resolution: {integrity: sha512-z78DgGKUr4SE/6cm7ku+jHvFT0X97aERh/f0MUKAKgFnwCYBEW4TFBqtHWFYiJFid7fMrtpZ/gxJthvz5mEByA==} engines: {node: '>=12'} hasBin: true @@ -9504,7 +9493,7 @@ packages: getopts: 2.3.0 interpret: 2.2.0 lodash: 4.17.21 - pg: 8.11.1 + pg: 8.11.3 pg-connection-string: 2.6.1 rechoir: 0.8.0 resolve-from: 5.0.0 @@ -9589,6 +9578,7 @@ packages: /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + requiresBuild: true dev: true /lines-and-columns@2.0.3: @@ -9956,8 +9946,8 @@ packages: braces: 3.0.2 picomatch: 2.3.1 - /mikro-orm@5.7.14: - resolution: {integrity: sha512-izfG8Cz5aYGYhxaNNv1Ozc1LAC/ifIsniwDrTWbxHVJkMlWLKAM8FzJhoZpXZzBissZqeRN9tPdzvBCxwV4G0w==} + /mikro-orm@5.8.0: + resolution: {integrity: sha512-tNRSJ7SK4uPdPNpK+vHa/c20b5TnSfF8bG4vbEPj1J35wMToRhNgORLEg3aJ9vfLOLkJPGoCKjMzJSRDuz2mfw==} engines: {node: '>= 14.0.0'} /mime-db@1.52.0: @@ -10613,6 +10603,7 @@ packages: /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + requiresBuild: true dependencies: callsites: 3.1.0 dev: true @@ -10804,12 +10795,12 @@ packages: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} engines: {node: '>=4.0.0'} - /pg-pool@3.6.1(pg@8.11.1): + /pg-pool@3.6.1(pg@8.11.3): resolution: {integrity: sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==} peerDependencies: pg: '>=8.0' dependencies: - pg: 8.11.1 + pg: 8.11.3 /pg-protocol@1.6.0: resolution: {integrity: sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==} @@ -10824,8 +10815,8 @@ packages: postgres-date: 1.0.7 postgres-interval: 1.2.0 - /pg@8.11.1: - resolution: {integrity: sha512-utdq2obft07MxaDg0zBJI+l/M3mBRfIpEN3iSemsz0G5F2/VXx+XzqF4oxrbIZXQxt2AZzIUzyVg/YM6xOP/WQ==} + /pg@8.11.3: + resolution: {integrity: sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==} engines: {node: '>= 8.0.0'} peerDependencies: pg-native: '>=3.0.1' @@ -10836,7 +10827,7 @@ packages: buffer-writer: 2.0.0 packet-reader: 1.0.0 pg-connection-string: 2.6.2 - pg-pool: 3.6.1(pg@8.11.1) + pg-pool: 3.6.1(pg@8.11.3) pg-protocol: 1.6.0 pg-types: 2.2.0 pgpass: 1.0.5 @@ -11573,6 +11564,7 @@ packages: /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} + requiresBuild: true dev: true /resolve-from@5.0.0: @@ -11660,12 +11652,6 @@ packages: dev: false optional: true - /rimraf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true - dependencies: - glob: 7.2.3 - /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -12801,14 +12787,9 @@ packages: engines: {node: '>=10'} dev: true - /type-fest@2.19.0: - resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} - engines: {node: '>=12.20'} - /type-fest@3.13.1: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'} - dev: false /type-fest@4.3.1: resolution: {integrity: sha512-pphNW/msgOUSkJbH58x8sqpq8uQj6b0ZKGxEsLKMUnGorRcDjrUaLS+39+/ub41JNTwrrMyJcUB8+YZs3mbwqw==} @@ -12902,16 +12883,15 @@ packages: dependencies: '@lukeed/csprng': 1.1.0 - /umzug@3.2.1: - resolution: {integrity: sha512-XyWQowvP9CKZycKc/Zg9SYWrAWX/gJCE799AUTFqk8yC3tp44K1xWr3LoFF0MNEjClKOo1suCr5ASnoy+KltdA==} + /umzug@3.3.1: + resolution: {integrity: sha512-jG3C35jti1YnCuH/k3fJEfHbnIG9c3Q9ITZ0B9eWwnXngh/AUd0mRHv8OdpE2Q9VoK7tB6xL990JrMCr0LtfNA==} engines: {node: '>=12'} dependencies: '@rushstack/ts-command-line': 4.15.2 - emittery: 0.12.1 - fs-jetpack: 4.3.1 + emittery: 0.13.1 glob: 8.1.0 pony-cause: 2.1.10 - type-fest: 2.19.0 + type-fest: 3.13.1 /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} diff --git a/src/common/decorators/validation/is-unique.validator.spec.ts b/src/common/decorators/validation/is-unique.validator.spec.ts index 17cb66f8..ffd70c39 100644 --- a/src/common/decorators/validation/is-unique.validator.spec.ts +++ b/src/common/decorators/validation/is-unique.validator.spec.ts @@ -24,7 +24,7 @@ describe('IsUnique', () => { providers: [IsUniqueConstraint, { provide: EntityManager, useValue: mockEm }], }).compile(); - isUnique = await module.get(IsUniqueConstraint); + isUnique = module.get(IsUniqueConstraint); }); it('should pass if there are no duplicates', async () => { diff --git a/src/lib/cloudinary.module.ts b/src/lib/cloudinary.module.ts index 7e5e829d..6b6bbcf4 100644 --- a/src/lib/cloudinary.module.ts +++ b/src/lib/cloudinary.module.ts @@ -1,7 +1,8 @@ -import { Module } from "@nestjs/common"; +import { Global, Module } from "@nestjs/common"; import { ConfigModule, ConfigService } from "@nestjs/config"; import { CloudinaryModule } from "nestjs-cloudinary"; +@Global() @Module({ imports: [ CloudinaryModule.forRootAsync({ @@ -9,9 +10,9 @@ import { CloudinaryModule } from "nestjs-cloudinary"; inject: [ConfigService], useFactory: (configService: ConfigService) => ({ isGlobal: true, - cloud_name: configService.get("cloudinary.cloud_name", { infer: true }), - api_key: configService.get("cloudinary.api_key", { infer: true }), - api_secret: configService.get("cloudinary.api_secret", { infer: true }), + cloud_name: configService.get("cloudinary.cloudName", { infer: true }), + api_key: configService.get("cloudinary.apiKey", { infer: true }), + api_secret: configService.get("cloudinary.apiSecret", { infer: true }), }), }), ], diff --git a/src/lib/config/config.interface.ts b/src/lib/config/config.interface.ts index ca812860..19d623ef 100644 --- a/src/lib/config/config.interface.ts +++ b/src/lib/config/config.interface.ts @@ -9,6 +9,7 @@ import type { mail, rabbitmq, redis, + sentry, stripe, throttle, twilio, @@ -27,4 +28,5 @@ export interface Config { stripe: ConfigType; facebookOauth: ConfigType; googleOauth: ConfigType; + sentry: ConfigType; } diff --git a/src/lib/config/config.module.ts b/src/lib/config/config.module.ts index e735b5d0..9fd6ef16 100644 --- a/src/lib/config/config.module.ts +++ b/src/lib/config/config.module.ts @@ -19,6 +19,8 @@ import { rabbitmqConfigValidationSchema, redis, redisConfigValidationSchema, + sentry, + sentryConfigurationValidationSchema, throttle, throttleConfigValidationSchema, } from "./configs"; @@ -40,6 +42,7 @@ import { HelperService } from "@common/helpers"; googleOauth, facebookOauth, throttle, + sentry, ], cache: true, isGlobal: true, @@ -54,6 +57,7 @@ import { HelperService } from "@common/helpers"; ...googleOauthConfigValidationSchema, ...facebookOauthConfigValidationSchema, ...throttleConfigValidationSchema, + ...sentryConfigurationValidationSchema, }), validationOptions: { abortEarly: true, diff --git a/src/lib/config/configs/app.config.ts b/src/lib/config/configs/app.config.ts index ef52ea80..092a2f0f 100644 --- a/src/lib/config/configs/app.config.ts +++ b/src/lib/config/configs/app.config.ts @@ -1,6 +1,6 @@ import { registerAs } from "@nestjs/config"; import Joi from "joi"; -import { APP_ENVIRONMENTS, SENTRY_DSN_REGEX, VERSION_VALIDATION_MESSAGE } from "@common/constant"; +import { APP_ENVIRONMENTS, VERSION_VALIDATION_MESSAGE } from "@common/constant"; // validation schema @@ -18,7 +18,7 @@ export const appConfigValidationSchema = { ALLOWED_HOSTS: Joi.string().optional(), SWAGGER_USER: Joi.string().required(), SWAGGER_PASSWORD: Joi.string().required(), - SENTRY_DSN: Joi.string().pattern(SENTRY_DSN_REGEX).required(), + }; // config diff --git a/src/lib/config/configs/cloudinary.config.ts b/src/lib/config/configs/cloudinary.config.ts index e84b696c..de1f9e99 100644 --- a/src/lib/config/configs/cloudinary.config.ts +++ b/src/lib/config/configs/cloudinary.config.ts @@ -8,7 +8,7 @@ export const cloudinaryConfigValidationSchema = { }; export const cloudinary = registerAs("cloudinary", () => ({ - cloud_name: process.env.CLOUDINARY_CLOUD_NAME, - api_key: process.env.CLOUDINARY_API_KEY, - api_secret: process.env.CLOUDINARY_API_SECRET, + cloudName: process.env.CLOUDINARY_CLOUD_NAME, + apiKey: process.env.CLOUDINARY_API_KEY, + apiSecret: process.env.CLOUDINARY_API_SECRET, })); diff --git a/src/lib/config/configs/index.ts b/src/lib/config/configs/index.ts index 77438dea..8fad57ec 100644 --- a/src/lib/config/configs/index.ts +++ b/src/lib/config/configs/index.ts @@ -1,3 +1,5 @@ +// This is autogenerated file , edit if only you are sure + export * from "./app.config"; export * from "./cloudinary.config"; export * from "./database.config"; @@ -7,6 +9,7 @@ export * from "./minio.config"; export * from "./oauth2.config"; export * from "./rabbitmq.config"; export * from "./redis.config"; +export * from "./sentry.config"; export * from "./stripe.config"; export * from "./throttle.config"; export * from "./twilio.config"; diff --git a/src/lib/config/configs/sentry.config.ts b/src/lib/config/configs/sentry.config.ts new file mode 100644 index 00000000..6fdf5486 --- /dev/null +++ b/src/lib/config/configs/sentry.config.ts @@ -0,0 +1,13 @@ +import { registerAs } from "@nestjs/config"; +import Joi from "joi"; +import { SENTRY_DSN_REGEX } from "@common/constant"; + +export const sentryConfigurationValidationSchema = { + SENTRY_DSN: Joi.string().pattern(SENTRY_DSN_REGEX).required(), + SENTRY_ENVIRONMENT: Joi.string().required(), +}; + +export const sentry = registerAs("sentry", () => ({ + sentryDsn: process.env.SENTRY_DSN, + environment: process.env.SENTRY_ENVIRONMENT, +})); diff --git a/src/lib/http.module.ts b/src/lib/http.module.ts index 90dfab9b..0f7166f1 100644 --- a/src/lib/http.module.ts +++ b/src/lib/http.module.ts @@ -11,7 +11,7 @@ import { Module } from "@nestjs/common"; "Accept": "application/json", "Content-Type": "application/json", "user-agent": -"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36", + "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36", }, }), ], diff --git a/src/lib/minio.module.ts b/src/lib/minio.module.ts index d0cca25a..cc2f1700 100644 --- a/src/lib/minio.module.ts +++ b/src/lib/minio.module.ts @@ -13,7 +13,7 @@ import { NestMinioModule } from "nestjs-minio"; port: configService.get("minio.port"), accessKey: configService.get("minio.accessKey"), secretKey: configService.get("minio.secretKey"), - useSSL: configService.get("minio.ssl"), + useSSL: configService.get("minio.ssl"), }), }), ], diff --git a/src/lib/orm.module.ts b/src/lib/orm.module.ts index 50a78e85..cbc6216d 100644 --- a/src/lib/orm.module.ts +++ b/src/lib/orm.module.ts @@ -16,9 +16,9 @@ import { baseOptions } from "@common/database/mikro-orm-cli.config"; ...baseOptions, host: configService.get("database.host", { infer: true }), port: configService.get("database.port", { infer: true }), - password: configService.get("database.password", { infer: true }), - user: configService.get("database.user", { infer: true }), dbName: configService.get("database.dbName", { infer: true }), + user: configService.get("database.user", { infer: true }), + password: configService.get("database.password", { infer: true }), }), }), MikroOrmModule.forFeature({ diff --git a/src/lib/sentry.module.ts b/src/lib/sentry.module.ts index 7ca483bd..514c6ea8 100644 --- a/src/lib/sentry.module.ts +++ b/src/lib/sentry.module.ts @@ -8,9 +8,9 @@ import { SentryModule } from "@ntegral/nestjs-sentry"; imports: [ConfigModule], inject: [ConfigService], useFactory: async (configService: ConfigService) => ({ - dsn: configService.get("app.sentryDsn", { infer: true }), + dsn: configService.get("sentry.sentryDsn", { infer: true }), + environment: configService.get("sentry.sentryDsn", { infer: true }), debug: true, - environment: "development", tracesSampleRate: 1, }), }), diff --git a/src/modules/auth/strategies/magic-login.strategy.ts b/src/modules/auth/strategies/magic-login.strategy.ts index a7d0d4c4..794106ad 100644 --- a/src/modules/auth/strategies/magic-login.strategy.ts +++ b/src/modules/auth/strategies/magic-login.strategy.ts @@ -51,7 +51,7 @@ export class MagicLoginStrategy extends PassportStrategy(Strategy, "magicLogin") template: EmailTemplate.MAGIC_LOGIN_TEMPLATE, replacements: { link: `${this.configService.get("app.url", { infer: true })}/v1/${href}`, - expiry: this.configService.get("jwt.magicLinkExpiry", { infer: true }), + expiry: this.configService.get("jwt.magicLinkExpiry", { infer: true }), }, to: destination, subject: EmailSubject.MAGIC_LOGIN, diff --git a/src/socket-io.adapter.ts b/src/socket-io.adapter.ts index d83e8c5e..cab39458 100644 --- a/src/socket-io.adapter.ts +++ b/src/socket-io.adapter.ts @@ -16,6 +16,10 @@ export class SocketIOAdapter extends IoAdapter { super(app); } + /** + * The function connects to a Redis server and creates a Redis adapter. + * @returns a promise that resolves to void. + */ async connectToRedis(): Promise { const pubClient = createClient({ url: this.configService.get("redis.url", { infer: true }), @@ -27,6 +31,14 @@ export class SocketIOAdapter extends IoAdapter { this.adapterConstructor = createAdapter(pubClient, subClient); } + /** + * The function creates an IO server with CORS options and an adapter constructor. + * @param port - The `port` parameter is the port number on which the server will listen for + * incoming connections. It is a number that specifies the port, such as 3000 or 8080. + * @param [options] - The `options` parameter is an optional object that can contain + * additional configuration options for the server. It is of type `ServerOptions`. + * @returns a server object. + */ createIOServer(port: number, options?: ServerOptions): any { const cors = { origin: this.configService.get("app.allowedOrigins", { infer: true }),