diff --git a/eslint.config.mjs b/eslint.config.mjs index 7719a957..a8897699 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -2,6 +2,9 @@ import rubiin from "@rubiin/eslint-config"; export default rubiin({ stylistic: true, // enable stylistic rules + yaml: true, // enable yaml rules, + jsonc : true, // enable jsonc rules + markdown: true, // enable markdown rules typescript: { tsconfigPath: "tsconfig.json", // path to tsconfig.json }, diff --git a/justfile b/justfile index 16cecf12..4336f3a7 100644 --- a/justfile +++ b/justfile @@ -15,6 +15,9 @@ migrate env="dev": unmigrate env="dev": NODE_ENV={{env}} npm run orm migration:down +# one stop command to make migration and migrate it +quick-migrate: makemigration migrate + # run seeders to populate database seed env="dev": USER_PASSWORD=Test@1234 NODE_ENV={{env}} npm run orm seeder:run @@ -25,7 +28,7 @@ test-e2e env="dev": # clean all auto generated files and generate initial migration file -init: clean-files makemigration +init: clean-files build makemigration # clean all auto generated files and run migration clean-db: unmigrate migrate seed @@ -49,18 +52,10 @@ build: encryption: sh scripts/encryption.sh -# run in shell mode -shell env="dev": - REPL=true npm run start:dev +# run in repl mode +repl env="dev": + REPL=true npm run start:repl # run deploy script deploy: sh scripts/deploy.sh - -# stop deployed containers -stop env="dev": - ENV=dev docker compose -f docker-compose.{{env}}.yml stop - -# remove deployed containers -remove env="dev": - ENV=dev docker compose -f docker-compose.{{env}}.yml down diff --git a/package.json b/package.json index ebcfb3ef..1069fc25 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "scripts": { "build": "nest build", "lint": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs '{src,test}/**/*.ts' --cache", - "lint:fix": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs '{src,test}/**/*.ts' --cache --fix", + "lint:fix": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs '{src,test}/**/*.ts' --cache --fix --debug", "orm": "npx mikro-orm", "prebuild": "rimraf dist", "sample": "cd env; npx sample-env --env .env.dev", @@ -58,11 +58,11 @@ "@golevelup/nestjs-rabbitmq": "^4.0.0", "@golevelup/nestjs-stripe": "^0.6.3", "@golevelup/nestjs-webhooks": "^0.2.16", - "@mikro-orm/core": "^5.8.4", - "@mikro-orm/migrations": "^5.8.4", + "@mikro-orm/core": "^5.8.5", + "@mikro-orm/migrations": "^5.8.5", "@mikro-orm/nestjs": "^5.2.2", - "@mikro-orm/postgresql": "^5.8.4", - "@mikro-orm/reflection": "^5.8.4", + "@mikro-orm/postgresql": "^5.8.5", + "@mikro-orm/reflection": "^5.8.5", "@mikro-orm/sql-highlighter": "^1.0.1", "@nestjs/axios": "^3.0.0", "@nestjs/cache-manager": "^2.1.0", @@ -141,12 +141,12 @@ "@firebase/app-compat": "^0.2.19", "@firebase/app-types": "^0.9.0", "@golevelup/ts-jest": "^0.4.0", - "@mikro-orm/cli": "^5.8.4", - "@mikro-orm/seeder": "^5.8.4", + "@mikro-orm/cli": "^5.8.5", + "@mikro-orm/seeder": "^5.8.5", "@nestjs/cli": "10.1.18", "@nestjs/schematics": "10.0.2", "@nestjs/testing": "10.2.6", - "@rubiin/eslint-config": "^1.8.4", + "@rubiin/eslint-config": "^1.8.6-beta.4", "@rubiin/tsconfig": "^1.1.0", "@sentry/types": "^7.72.0", "@side/jest-runtime": "^1.1.0", @@ -159,7 +159,7 @@ "@types/jest": "^29.5.5", "@types/mime-types": "^2.1.2", "@types/multer": "^1.4.8", - "@types/node": "^20.7.1", + "@types/node": "^20.8.0", "@types/nodemailer": "^6.4.11", "@types/passport": "^1.0.13", "@types/passport-facebook": "^3.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c66c06bc..4fe642a6 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.6)(body-parser@1.20.2)(rxjs@7.8.1) '@mikro-orm/core': - specifier: ^5.8.4 - version: 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) + specifier: ^5.8.5 + version: 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) '@mikro-orm/migrations': - specifier: ^5.8.4 - version: 5.8.4(@mikro-orm/core@5.8.4)(pg@8.11.3) + specifier: ^5.8.5 + version: 5.8.5(@mikro-orm/core@5.8.5)(pg@8.11.3) '@mikro-orm/nestjs': specifier: ^5.2.2 - version: 5.2.2(@mikro-orm/core@5.8.4)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6) + version: 5.2.2(@mikro-orm/core@5.8.5)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6) '@mikro-orm/postgresql': - specifier: ^5.8.4 - version: 5.8.4(@mikro-orm/core@5.8.4)(@mikro-orm/migrations@5.8.4)(@mikro-orm/seeder@5.8.4) + specifier: ^5.8.5 + version: 5.8.5(@mikro-orm/core@5.8.5)(@mikro-orm/migrations@5.8.5)(@mikro-orm/seeder@5.8.5) '@mikro-orm/reflection': - specifier: ^5.8.4 - version: 5.8.4(@mikro-orm/core@5.8.4) + specifier: ^5.8.5 + version: 5.8.5(@mikro-orm/core@5.8.5) '@mikro-orm/sql-highlighter': specifier: ^1.0.1 version: 1.0.1 @@ -82,7 +82,7 @@ dependencies: version: 7.1.12(@nestjs/common@10.2.6)(@nestjs/core@10.2.6)(class-transformer@0.5.1)(class-validator@0.14.0)(reflect-metadata@0.1.13) '@nestjs/terminus': specifier: ^10.1.1 - version: 10.1.1(@mikro-orm/core@5.8.4)(@mikro-orm/nestjs@5.2.2)(@nestjs/axios@3.0.0)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6)(reflect-metadata@0.1.13)(rxjs@7.8.1) + version: 10.1.1(@mikro-orm/core@5.8.5)(@mikro-orm/nestjs@5.2.2)(@nestjs/axios@3.0.0)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6)(reflect-metadata@0.1.13)(rxjs@7.8.1) '@nestjs/throttler': specifier: ^5.0.0 version: 5.0.0(@nestjs/common@10.2.6)(@nestjs/core@10.2.6)(reflect-metadata@0.1.13) @@ -269,11 +269,11 @@ devDependencies: specifier: ^0.4.0 version: 0.4.0 '@mikro-orm/cli': - specifier: ^5.8.4 - version: 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4)(pg@8.11.3) + specifier: ^5.8.5 + version: 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5)(pg@8.11.3) '@mikro-orm/seeder': - specifier: ^5.8.4 - version: 5.8.4(@mikro-orm/core@5.8.4) + specifier: ^5.8.5 + version: 5.8.5(@mikro-orm/core@5.8.5) '@nestjs/cli': specifier: 10.1.18 version: 10.1.18(@swc/core@1.3.90) @@ -284,8 +284,8 @@ devDependencies: specifier: 10.2.6 version: 10.2.6(@nestjs/common@10.2.6)(@nestjs/core@10.2.6)(@nestjs/platform-express@10.2.6) '@rubiin/eslint-config': - specifier: ^1.8.4 - version: 1.8.4(eslint@8.50.0)(typescript@5.2.2)(vitest@0.34.6) + specifier: ^1.8.6-beta.4 + version: 1.8.6-beta.4(eslint@8.50.0)(typescript@5.2.2)(vitest@0.34.6) '@rubiin/tsconfig': specifier: ^1.1.0 version: 1.1.0 @@ -323,8 +323,8 @@ devDependencies: specifier: ^1.4.8 version: 1.4.8 '@types/node': - specifier: ^20.7.1 - version: 20.7.1 + specifier: ^20.8.0 + version: 20.8.0 '@types/nodemailer': specifier: ^6.4.11 version: 6.4.11 @@ -378,7 +378,7 @@ devDependencies: version: 8.0.3 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@20.7.1)(ts-node@10.9.1) + version: 29.7.0(@types/node@20.8.0)(ts-node@10.9.1) lint-staged: specifier: ^14.0.1 version: 14.0.1 @@ -396,7 +396,7 @@ devDependencies: version: 9.4.4(typescript@5.2.2)(webpack@5.88.2) ts-node: specifier: 10.9.1 - version: 10.9.1(@swc/core@1.3.90)(@types/node@20.7.1)(typescript@5.2.2) + version: 10.9.1(@swc/core@1.3.90)(@types/node@20.8.0)(typescript@5.2.2) tsconfig-paths: specifier: 4.2.0 version: 4.2.0 @@ -501,6 +501,10 @@ packages: - chokidar dev: true + /@arthurgeron/eslint-plugin-react-usememo@2.0.1: + resolution: {integrity: sha512-cv1S9f3PBRfysxEpQjHcLlDGVnuQCJNu2tvAaWd4nf9HoXFCK2aSCCHf53ZCXxpHj20lq8PCMHd1tG+Sy2iuuQ==} + dev: true + /@aws-crypto/crc32@3.0.0: resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} dependencies: @@ -2073,7 +2077,7 @@ packages: requiresBuild: true dependencies: '@grpc/proto-loader': 0.7.10 - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: false optional: true @@ -2380,7 +2384,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2401,14 +2405,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.7.1)(ts-node@10.9.1) + jest-config: 29.7.0(@types/node@20.8.0)(ts-node@10.9.1) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2443,7 +2447,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 jest-mock: 29.7.0 dev: true @@ -2470,7 +2474,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.7.1 + '@types/node': 20.8.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2503,7 +2507,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.19 - '@types/node': 20.7.1 + '@types/node': 20.8.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2590,7 +2594,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.2 - '@types/node': 20.7.1 + '@types/node': 20.8.0 '@types/yargs': 16.0.6 chalk: 4.1.2 dev: true @@ -2602,7 +2606,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.2 - '@types/node': 20.7.1 + '@types/node': 20.8.0 '@types/yargs': 17.0.26 chalk: 4.1.2 dev: true @@ -2687,8 +2691,8 @@ packages: - supports-color dev: false - /@mikro-orm/cli@5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4)(pg@8.11.3): - resolution: {integrity: sha512-NK+xtLAJW78DaH8UDS9ef0roe72sJCEJF5cFByKGyfdFMrDWES3nhWZSkCLXErcsUeByoSYg8ZnkTtyxwjN2Ig==} + /@mikro-orm/cli@5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5)(pg@8.11.3): + resolution: {integrity: sha512-8vw6tsxz2JGzXyPipTCyjWB0Z69DKwbXz904o2Y9/OcdUR9oeuK96VSp5NaoNDOCBZaimGc0BoCXglEknpgcBA==} engines: {node: '>= 14.0.0'} hasBin: true peerDependencies: @@ -2725,11 +2729,11 @@ packages: optional: true dependencies: '@jercle/yargonaut': 1.1.5 - '@mikro-orm/core': 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) - '@mikro-orm/knex': 5.8.4(@mikro-orm/core@5.8.4)(@mikro-orm/migrations@5.8.4)(pg@8.11.3) - '@mikro-orm/migrations': 5.8.4(@mikro-orm/core@5.8.4)(pg@8.11.3) - '@mikro-orm/postgresql': 5.8.4(@mikro-orm/core@5.8.4)(@mikro-orm/migrations@5.8.4)(@mikro-orm/seeder@5.8.4) - '@mikro-orm/seeder': 5.8.4(@mikro-orm/core@5.8.4) + '@mikro-orm/core': 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) + '@mikro-orm/knex': 5.8.5(@mikro-orm/core@5.8.5)(@mikro-orm/migrations@5.8.5)(pg@8.11.3) + '@mikro-orm/migrations': 5.8.5(@mikro-orm/core@5.8.5)(pg@8.11.3) + '@mikro-orm/postgresql': 5.8.5(@mikro-orm/core@5.8.5)(@mikro-orm/migrations@5.8.5)(@mikro-orm/seeder@5.8.5) + '@mikro-orm/seeder': 5.8.5(@mikro-orm/core@5.8.5) fs-extra: 11.1.1 tsconfig-paths: 4.2.0 yargs: 17.7.2 @@ -2745,8 +2749,8 @@ packages: - tedious dev: true - /@mikro-orm/core@5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4): - resolution: {integrity: sha512-yRrqnF5nKy3ymeY9jq9AxnzZHnfqVNIQmXwhoeMzCZmYpV2WrVtYw3EEZwpN5ANe1qvlQakgJ/qdGjyqB19Dyg==} + /@mikro-orm/core@5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5): + resolution: {integrity: sha512-d2xKEBH7JHB5/2Vg/cX0um3P/KW2xj/YAv9fcymuukiLJlL1jFf8BN6YSk08eIXOs4Y95LjQMrhc/mDAdWuy7A==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/better-sqlite': ^5.0.0 @@ -2781,19 +2785,19 @@ packages: '@mikro-orm/sqlite': optional: true dependencies: - '@mikro-orm/migrations': 5.8.4(@mikro-orm/core@5.8.4)(pg@8.11.3) - '@mikro-orm/postgresql': 5.8.4(@mikro-orm/core@5.8.4)(@mikro-orm/migrations@5.8.4)(@mikro-orm/seeder@5.8.4) - '@mikro-orm/seeder': 5.8.4(@mikro-orm/core@5.8.4) + '@mikro-orm/migrations': 5.8.5(@mikro-orm/core@5.8.5)(pg@8.11.3) + '@mikro-orm/postgresql': 5.8.5(@mikro-orm/core@5.8.5)(@mikro-orm/migrations@5.8.5)(@mikro-orm/seeder@5.8.5) + '@mikro-orm/seeder': 5.8.5(@mikro-orm/core@5.8.5) 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.8.4 + mikro-orm: 5.8.5 reflect-metadata: 0.1.13 - /@mikro-orm/knex@5.8.4(@mikro-orm/core@5.8.4)(@mikro-orm/migrations@5.8.4)(pg@8.11.3): - resolution: {integrity: sha512-D0J0ZPLMFQWu/5dCOjtFDVABqv7cEfnGfNT0PH2Q/Qwv0FETV7jjLS1GQk/ixDmgXZ5YBFbx95/6HJ3NuLMW0Q==} + /@mikro-orm/knex@5.8.5(@mikro-orm/core@5.8.5)(@mikro-orm/migrations@5.8.5)(pg@8.11.3): + resolution: {integrity: sha512-s7A5NVm1BCvrfD0OCuRrjlnTmjU4gPIyObXqc48Dy2a2DU5PeShbb3gZYQPlMqSP552kr3FyHwd/iWpCWJQT8A==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 @@ -2823,8 +2827,8 @@ packages: sqlite3: optional: true dependencies: - '@mikro-orm/core': 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) - '@mikro-orm/migrations': 5.8.4(@mikro-orm/core@5.8.4)(pg@8.11.3) + '@mikro-orm/core': 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) + '@mikro-orm/migrations': 5.8.5(@mikro-orm/core@5.8.5)(pg@8.11.3) fs-extra: 11.1.1 knex: 2.5.1(pg@8.11.3) pg: 8.11.3 @@ -2834,14 +2838,14 @@ packages: - supports-color - tedious - /@mikro-orm/migrations@5.8.4(@mikro-orm/core@5.8.4)(pg@8.11.3): - resolution: {integrity: sha512-UptGzSMFPf3xXl1BNQJWaaZcGCUoNT2gGIqc/dvkFOjwVHOFwbczeeEg5bDUq28Wj/OyvHREOqZy0gei076O5w==} + /@mikro-orm/migrations@5.8.5(@mikro-orm/core@5.8.5)(pg@8.11.3): + resolution: {integrity: sha512-fANRLqLsEj38vS9XJD7ROPG9OmZ36od6Q3j5usrEGdVWJnbgCiBhDfkyf3az3/tsKI78n/xykLjJVMx/mNtMvQ==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 dependencies: - '@mikro-orm/core': 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) - '@mikro-orm/knex': 5.8.4(@mikro-orm/core@5.8.4)(@mikro-orm/migrations@5.8.4)(pg@8.11.3) + '@mikro-orm/core': 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) + '@mikro-orm/knex': 5.8.5(@mikro-orm/core@5.8.5)(@mikro-orm/migrations@5.8.5)(pg@8.11.3) fs-extra: 11.1.1 knex: 2.5.1(pg@8.11.3) umzug: 3.3.1 @@ -2857,7 +2861,7 @@ packages: - supports-color - tedious - /@mikro-orm/nestjs@5.2.2(@mikro-orm/core@5.8.4)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6): + /@mikro-orm/nestjs@5.2.2(@mikro-orm/core@5.8.5)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6): resolution: {integrity: sha512-NwPTmpmwf4/aX7FjKk/CTncYS7Mbr4fMvSOfbo9rOElySjpniTnk2cCGABgj2kaX9NSFHzWCUy5tAMIkoedd4A==} engines: {node: '>= 14.0.0'} peerDependencies: @@ -2865,13 +2869,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.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) + '@mikro-orm/core': 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) '@nestjs/common': 10.2.6(class-transformer@0.5.1)(class-validator@0.14.0)(reflect-metadata@0.1.13)(rxjs@7.8.1) '@nestjs/core': 10.2.6(@nestjs/common@10.2.6)(@nestjs/platform-express@10.2.6)(@nestjs/websockets@10.2.6)(reflect-metadata@0.1.13)(rxjs@7.8.1) dev: false - /@mikro-orm/postgresql@5.8.4(@mikro-orm/core@5.8.4)(@mikro-orm/migrations@5.8.4)(@mikro-orm/seeder@5.8.4): - resolution: {integrity: sha512-3uaBT9QfbGE/W8tHRVXi6p4pKONvBE6D3ldFq9cQKcnNmOwjor414/mazLwsWwQdUujS5vyr1ZdAxf0jd4W5bQ==} + /@mikro-orm/postgresql@5.8.5(@mikro-orm/core@5.8.5)(@mikro-orm/migrations@5.8.5)(@mikro-orm/seeder@5.8.5): + resolution: {integrity: sha512-8bXcU3e0mkUY23PHmcufgNvt8lEGJjTMBb4RwAQ98XRWIApYQ4THo1n8fvEqQmHHsZT8ktkjv4OAN0TmDEpbWw==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 @@ -2886,10 +2890,10 @@ packages: '@mikro-orm/seeder': optional: true dependencies: - '@mikro-orm/core': 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) - '@mikro-orm/knex': 5.8.4(@mikro-orm/core@5.8.4)(@mikro-orm/migrations@5.8.4)(pg@8.11.3) - '@mikro-orm/migrations': 5.8.4(@mikro-orm/core@5.8.4)(pg@8.11.3) - '@mikro-orm/seeder': 5.8.4(@mikro-orm/core@5.8.4) + '@mikro-orm/core': 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) + '@mikro-orm/knex': 5.8.5(@mikro-orm/core@5.8.5)(@mikro-orm/migrations@5.8.5)(pg@8.11.3) + '@mikro-orm/migrations': 5.8.5(@mikro-orm/core@5.8.5)(pg@8.11.3) + '@mikro-orm/seeder': 5.8.5(@mikro-orm/core@5.8.5) pg: 8.11.3 transitivePeerDependencies: - better-sqlite3 @@ -2901,25 +2905,25 @@ packages: - supports-color - tedious - /@mikro-orm/reflection@5.8.4(@mikro-orm/core@5.8.4): - resolution: {integrity: sha512-c4N+Nhube7ylorOrqFnvDHPd8fyC8xQq2NF/OVpqDr8dNghiPdiEaf4fdzJdR15Vutz9e9ITLMT6Mr2KlVuuSA==} + /@mikro-orm/reflection@5.8.5(@mikro-orm/core@5.8.5): + resolution: {integrity: sha512-49OPwZS8jOo6sJAJGJwgziXXvwDPd5NI4BSKvOCz9zfyvZFb6ebF8qLRPcCzT1yfQo5g2mXADvjpCANQPc9pNA==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 dependencies: - '@mikro-orm/core': 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) + '@mikro-orm/core': 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) globby: 11.1.0 ts-morph: 20.0.0 dev: false - /@mikro-orm/seeder@5.8.4(@mikro-orm/core@5.8.4): - resolution: {integrity: sha512-YTHNL47qUqgc+SBoMuAvSj872qTIY0FqXP7S7a6Hbh3wqTZMA20zIZdaJ5iXZN+q7EPJYbbJstp/ldoybGpg+Q==} + /@mikro-orm/seeder@5.8.5(@mikro-orm/core@5.8.5): + resolution: {integrity: sha512-EHINO2zbtJUJpq46kTT5ElYI8QsBdBQb6OPhJxb2EKJaqaCq0BikunRlwlFqpiUymSaSjuC3pwIwMtf93dpF7Q==} engines: {node: '>= 14.0.0'} peerDependencies: '@mikro-orm/core': ^5.0.0 dependencies: '@faker-js/faker': 7.6.0 - '@mikro-orm/core': 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) + '@mikro-orm/core': 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) fs-extra: 11.1.1 globby: 11.1.0 @@ -3289,7 +3293,7 @@ packages: swagger-ui-dist: 5.7.2 dev: false - /@nestjs/terminus@10.1.1(@mikro-orm/core@5.8.4)(@mikro-orm/nestjs@5.2.2)(@nestjs/axios@3.0.0)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6)(reflect-metadata@0.1.13)(rxjs@7.8.1): + /@nestjs/terminus@10.1.1(@mikro-orm/core@5.8.5)(@mikro-orm/nestjs@5.2.2)(@nestjs/axios@3.0.0)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6)(reflect-metadata@0.1.13)(rxjs@7.8.1): resolution: {integrity: sha512-aDoPK/uaR9PHn56xzand6zqpp+S3Ibm+y/OrG3M01F1WnScLfo29hbS6MdnIMqmVRAS11r/8X3xWTSo8TT/Lig==} peerDependencies: '@grpc/grpc-js': '*' @@ -3337,8 +3341,8 @@ packages: typeorm: optional: true dependencies: - '@mikro-orm/core': 5.8.4(@mikro-orm/migrations@5.8.4)(@mikro-orm/postgresql@5.8.4)(@mikro-orm/seeder@5.8.4) - '@mikro-orm/nestjs': 5.2.2(@mikro-orm/core@5.8.4)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6) + '@mikro-orm/core': 5.8.5(@mikro-orm/migrations@5.8.5)(@mikro-orm/postgresql@5.8.5)(@mikro-orm/seeder@5.8.5) + '@mikro-orm/nestjs': 5.2.2(@mikro-orm/core@5.8.5)(@nestjs/common@10.2.6)(@nestjs/core@10.2.6) '@nestjs/axios': 3.0.0(@nestjs/common@10.2.6)(axios@1.5.1)(reflect-metadata@0.1.13)(rxjs@7.8.1) '@nestjs/common': 10.2.6(class-transformer@0.5.1)(class-validator@0.14.0)(reflect-metadata@0.1.13)(rxjs@7.8.1) '@nestjs/core': 10.2.6(@nestjs/common@10.2.6)(@nestjs/platform-express@10.2.6)(@nestjs/websockets@10.2.6)(reflect-metadata@0.1.13)(rxjs@7.8.1) @@ -3621,18 +3625,19 @@ packages: '@redis/client': 1.5.11 dev: false - /@rubiin/eslint-config@1.8.4(eslint@8.50.0)(typescript@5.2.2)(vitest@0.34.6): - resolution: {integrity: sha512-dd9zJUW4aMWFNKeujPgyGMNukq3G8rZaaW1nSTo857DmUIxVRHcG7/u+CRgDNr6SDV7EQLqL4VPwi4twvMviAA==} + /@rubiin/eslint-config@1.8.6-beta.4(eslint@8.50.0)(typescript@5.2.2)(vitest@0.34.6): + resolution: {integrity: sha512-D0QUpaNNETPHSshT0r/FeYFQIKg7ZceYl14JjJ93Kii5l4YcdC4zxINvSXRvlWGEurIsvApE6IOqhRHhSz291A==} peerDependencies: eslint: '>=8.0.0' dependencies: - '@stylistic/eslint-plugin': 0.0.5(eslint@8.50.0)(typescript@5.2.2) + '@arthurgeron/eslint-plugin-react-usememo': 2.0.1 + '@stylistic/eslint-plugin': 0.0.6(eslint@8.50.0)(typescript@5.2.2) '@typescript-eslint/eslint-plugin': 6.7.3(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2) eslint: 8.50.0 eslint-config-flat-gitignore: 0.1.0 eslint-define-config: 1.23.0 - eslint-plugin-deprecation: 2.0.0(eslint@8.50.0)(typescript@5.2.2) + eslint-plugin-antfu: 1.0.0-beta.8(eslint@8.50.0)(typescript@5.2.2) eslint-plugin-eslint-comments: 3.2.0(eslint@8.50.0) eslint-plugin-i: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0) eslint-plugin-jsdoc: 46.8.2(eslint@8.50.0) @@ -3745,7 +3750,7 @@ packages: jest-runtime: '>=28' dependencies: '@jest/transform': 29.7.0 - jest: 29.7.0(@types/node@20.7.1)(ts-node@10.9.1) + jest: 29.7.0(@types/node@20.8.0)(ts-node@10.9.1) jest-runtime: 29.7.0 dev: true @@ -4220,23 +4225,26 @@ packages: - supports-color dev: false - /@stylistic/eslint-plugin-js@0.0.5: - resolution: {integrity: sha512-Ca3DAk4lHGELPHnHIOUc/SF3Pg58xd/AATqNMSTSoxjoadRk6MGDblriURXjEg7gif4ygiB3+EcIuphAceFYvQ==} + /@stylistic/eslint-plugin-js@0.0.6(eslint@8.50.0): + resolution: {integrity: sha512-TAwD0mCMtXRUErqHrxsGKE/m5UtQWUZOg+HuNNeZXtHoGsp/A3KNfCJkhf5yRiPxwjOUuxQH1f4ANQqKd6rzmQ==} dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0) acorn: 8.10.0 escape-string-regexp: 4.0.0 eslint-visitor-keys: 3.4.3 espree: 9.6.1 esutils: 2.0.3 graphemer: 1.4.0 + transitivePeerDependencies: + - eslint dev: true - /@stylistic/eslint-plugin-ts@0.0.5(eslint@8.50.0)(typescript@5.2.2): - resolution: {integrity: sha512-Ei/arToTJEF2nxxJLsXqK9qMxPgZi8IyM2X+1q8HRA11Q3zRMut8u1B1zwE8q9EhorBwZsgnmphgzmDG0Mot+w==} + /@stylistic/eslint-plugin-ts@0.0.6(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-eI8K4I9G1AwzsEAykNFv85KHpuHEB0pB4dmbt3lHHfPAVHxvKn+vvRQSNW/wB7giGrzn5uCVBNA7DON6mWhqqg==} peerDependencies: eslint: '*' dependencies: - '@stylistic/eslint-plugin-js': 0.0.5 + '@stylistic/eslint-plugin-js': 0.0.6(eslint@8.50.0) '@typescript-eslint/scope-manager': 6.7.3 '@typescript-eslint/type-utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) '@typescript-eslint/utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) @@ -4247,13 +4255,13 @@ packages: - typescript dev: true - /@stylistic/eslint-plugin@0.0.5(eslint@8.50.0)(typescript@5.2.2): - resolution: {integrity: sha512-8InMNsdJrQqdKxCxd7Zc8HCYg2p5a4XXkqxRzjG7Soy+RWQdj7bAGfTmaDWB0i28CffYabOfOsAgRlfG9oe3Wg==} + /@stylistic/eslint-plugin@0.0.6(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-biU1+SgcnebsnVAXju0+szDW24Aaom0KesyUlOiqS2tuja7kzDxrgz2CJ6pTdj1fsF7Fu+pn0hgSMOnNf46qyw==} peerDependencies: eslint: '*' dependencies: - '@stylistic/eslint-plugin-js': 0.0.5 - '@stylistic/eslint-plugin-ts': 0.0.5(eslint@8.50.0)(typescript@5.2.2) + '@stylistic/eslint-plugin-js': 0.0.6(eslint@8.50.0) + '@stylistic/eslint-plugin-ts': 0.0.6(eslint@8.50.0)(typescript@5.2.2) eslint: 8.50.0 transitivePeerDependencies: - supports-color @@ -4364,7 +4372,7 @@ packages: '@swc/helpers': optional: true dependencies: - '@swc/counter': 0.1.1 + '@swc/counter': 0.1.2 '@swc/types': 0.1.5 optionalDependencies: '@swc/core-darwin-arm64': 1.3.90 @@ -4379,8 +4387,8 @@ packages: '@swc/core-win32-x64-msvc': 1.3.90 dev: true - /@swc/counter@0.1.1: - resolution: {integrity: sha512-xVRaR4u9hcYjFvcSg71Lz5Bo4//CyjAAfMxa7UsaDSYxAshflUkVJWiyVWrfxC59z2kP1IzI4/1BEpnhI9o3Mw==} + /@swc/counter@0.1.2: + resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} dev: true /@swc/jest@0.2.29(@swc/core@1.3.90): @@ -4468,7 +4476,7 @@ packages: resolution: {integrity: sha512-oyl4jvAfTGX9Bt6Or4H9ni1Z447/tQuxnZsytsCaExKlmJiU8sFgnIBRzJUpKwB5eWn9HuBYlUlVA74q/yN0eQ==} dependencies: '@types/connect': 3.4.36 - '@types/node': 20.7.1 + '@types/node': 20.8.0 /@types/cache-manager-redis-store@2.0.2: resolution: {integrity: sha512-Y9AkjU/y3If0nlJI/8k3mMmr/1FIuZ8U7biI5vQH0uP5mOb1Xycru6NcOiVKyUe/adHYUoY/EpnvWZ8NoBqRKQ==} @@ -4500,7 +4508,7 @@ packages: /@types/connect@3.4.36: resolution: {integrity: sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 /@types/cookie@0.4.1: resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} @@ -4512,7 +4520,7 @@ packages: /@types/cors@2.8.14: resolution: {integrity: sha512-RXHUvNWYICtbP6s18PnOCaqToK8y14DnLd75c6HfyKf228dxy7pHNOQkxPtvXKp/hINFMDjbYzsj63nnpPMSRQ==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 /@types/dompurify@3.0.3: resolution: {integrity: sha512-odiGr/9/qMqjcBOe5UhcNLOFHSYmKFOyr+bJ/Xu3Qp4k1pNPAlNLUVNNLcLfjQI7+W7ObX58EdD3H+3p3voOvA==} @@ -4541,7 +4549,7 @@ packages: /@types/express-serve-static-core@4.17.37: resolution: {integrity: sha512-ZohaCYTgGFcOP7u6aJOhY9uIZQgZ2vxC2yWoArY+FeDXlqeH66ZVBjgvg+RLVAS/DWNq4Ap9ZXu1+SUQiiWYMg==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 '@types/qs': 6.9.8 '@types/range-parser': 1.2.5 '@types/send': 0.17.2 @@ -4559,14 +4567,14 @@ packages: requiresBuild: true dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: false optional: true /@types/graceful-fs@4.1.7: resolution: {integrity: sha512-MhzcwU8aUygZroVwL2jeYk6JisJrPl/oov/gsgGCue9mkgl9wjGbzReYQClxiUgFDnib9FuHqTndccKeZKxTRw==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: true /@types/http-errors@2.0.2: @@ -4602,13 +4610,13 @@ packages: /@types/jsonwebtoken@9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: false /@types/jsonwebtoken@9.0.3: resolution: {integrity: sha512-b0jGiOgHtZ2jqdPgPnP6WLCXZk1T8p06A/vPGzUvxpFGgKMbjXJDjC5m52ErqBnIuWZFgGoIJyRdeG5AyreJjA==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 /@types/linkify-it@3.0.3: resolution: {integrity: sha512-pTjcqY9E4nOI55Wgpz7eiI8+LzdYnw3qxXCfHyBDdPbYvbyLgWLJGh8EdPvqawwMK1Uo1794AUkkR38Fr0g+2g==} @@ -4629,7 +4637,7 @@ packages: /@types/mailparser@3.4.1: resolution: {integrity: sha512-ZEF3ElxrEY/7cmo6YCOZVIwJRyUae3ioic4llB7qjmwHZdaElvsnefnvkS8Jakc4U9vBvQJvfTlK5Q/67DyAqQ==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 iconv-lite: 0.6.3 dev: true @@ -4686,13 +4694,13 @@ packages: dev: true optional: true - /@types/node@20.7.1: - resolution: {integrity: sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==} + /@types/node@20.8.0: + resolution: {integrity: sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==} /@types/nodemailer@6.4.11: resolution: {integrity: sha512-Ld2c0frwpGT4VseuoeboCXQ7UJIkK3X7Lx/4YsZEiUHtHsthWAOCYtf6PAiLhMtfwV0cWJRabLBS3+LD8x6Nrw==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: true /@types/normalize-package-data@2.4.2: @@ -4701,7 +4709,7 @@ packages: /@types/oauth@0.9.2: resolution: {integrity: sha512-Nu3/abQ6yR9VlsCdX3aiGsWFkj6OJvJqDvg/36t8Gwf2mFXdBZXPDN3K+2yfeA6Lo2m1Q12F8Qil9TZ48nWhOQ==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: true /@types/parse-json@4.0.0: @@ -4757,7 +4765,7 @@ packages: resolution: {integrity: sha512-bb/oorXPzl16jDK9APG+5rZoLxFD1msong4GxWQr02b8kMdrED2GzcYUig3uk6bkulYECkHR+CXrBqohj/bhsQ==} dependencies: '@types/mailparser': 3.4.1 - '@types/node': 20.7.1 + '@types/node': 20.8.0 '@types/nodemailer': 6.4.11 dev: true @@ -4768,7 +4776,7 @@ packages: /@types/qrcode@1.5.2: resolution: {integrity: sha512-W4KDz75m7rJjFbyCctzCtRzZUj+PrUHV+YjqDp50sSRezTbrtEAIq2iTzC6lISARl3qw+8IlcCyljdcVJE0Wug==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: true /@types/qs@6.9.8: @@ -4786,7 +4794,7 @@ packages: /@types/redis@2.8.32: resolution: {integrity: sha512-7jkMKxcGq9p242exlbsVzuJb57KqHRhNl4dHoQu2Y5v9bCAbtIXXH0R3HleSQW4CTOqpHIYUW3t6tpUj4BVQ+w==} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: true /@types/rimraf@3.0.2: @@ -4794,7 +4802,7 @@ packages: requiresBuild: true dependencies: '@types/glob': 8.1.0 - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: false optional: true @@ -4806,14 +4814,14 @@ packages: resolution: {integrity: sha512-aAG6yRf6r0wQ29bkS+x97BIs64ZLxeE/ARwyS6wrldMm3C1MdKwCcnnEwMC1slI8wuxJOpiUH9MioC0A0i+GJw==} dependencies: '@types/mime': 1.3.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 /@types/serve-static@1.15.3: resolution: {integrity: sha512-yVRvFsEMrv7s0lGhzrggJjNOSmZCdgCjw9xWrPr/kNNLp6FaDfMC1KaYl3TSJ0c58bECwNBMoQrZJ8hA8E1eFg==} dependencies: '@types/http-errors': 2.0.2 '@types/mime': 3.0.2 - '@types/node': 20.7.1 + '@types/node': 20.8.0 /@types/stack-utils@2.0.1: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} @@ -4823,7 +4831,7 @@ packages: resolution: {integrity: sha512-McM1mlc7PBZpCaw0fw/36uFqo0YeA6m8JqoyE4OfqXsZCIg0hPP2xdE6FM7r6fdprDZHlJwDpydUj1R++93hCA==} dependencies: '@types/cookiejar': 2.1.2 - '@types/node': 20.7.1 + '@types/node': 20.8.0 dev: true /@types/supertest@2.0.13: @@ -4837,7 +4845,7 @@ packages: dependencies: '@hapi/hapi': 21.1.0 '@types/express': 4.17.18 - '@types/node': 20.7.1 + '@types/node': 20.8.0 fastify: 3.29.5 joi: 17.10.2 prom-client: 14.2.0 @@ -5865,7 +5873,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001541 - electron-to-chromium: 1.4.536 + electron-to-chromium: 1.4.537 node-releases: 2.0.13 update-browserslist-db: 1.0.13(browserslist@4.22.1) dev: true @@ -6529,7 +6537,7 @@ packages: dev: true optional: true - /create-jest@29.7.0(@types/node@20.7.1)(ts-node@10.9.1): + /create-jest@29.7.0(@types/node@20.8.0)(ts-node@10.9.1): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6538,7 +6546,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.7.1)(ts-node@10.9.1) + jest-config: 29.7.0(@types/node@20.8.0)(ts-node@10.9.1) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -6939,8 +6947,8 @@ packages: /ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - /electron-to-chromium@1.4.536: - resolution: {integrity: sha512-L4VgC/76m6y8WVCgnw5kJy/xs7hXrViCFdNKVG8Y7B2isfwrFryFyJzumh3ugxhd/oB1uEaEEvRdmeLrnd7OFA==} + /electron-to-chromium@1.4.537: + resolution: {integrity: sha512-W1+g9qs9hviII0HAwOdehGYkr+zt7KKdmCcJcjH0mYg6oL8+ioT3Skjmt7BLoAQqXhjf40AXd+HlR4oAWMlXjA==} dev: true /emittery@0.13.1: @@ -6982,7 +6990,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.14 - '@types/node': 20.7.1 + '@types/node': 20.8.0 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -7237,19 +7245,14 @@ packages: - supports-color dev: true - /eslint-plugin-deprecation@2.0.0(eslint@8.50.0)(typescript@5.2.2): - resolution: {integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: ^4.2.4 || ^5.0.0 + /eslint-plugin-antfu@1.0.0-beta.8(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-RUUG+kE3kWU02L32iIUSbZPHTb6bgUUA7h97GQPfkqlodOz2Yj9HDe/DDCRB01WGBIYWPEAZMEWI7T4TVutfTQ==} dependencies: '@typescript-eslint/utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) - eslint: 8.50.0 - tslib: 2.6.2 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 transitivePeerDependencies: + - eslint - supports-color + - typescript dev: true /eslint-plugin-es-x@7.2.0(eslint@8.50.0): @@ -7639,7 +7642,6 @@ packages: /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} - requiresBuild: true dev: false /eventemitter3@3.1.2: @@ -8044,7 +8046,7 @@ packages: '@fastify/busboy': 1.2.1 '@firebase/database-compat': 0.3.4 '@firebase/database-types': 0.10.4 - '@types/node': 20.7.1 + '@types/node': 20.8.0 jsonwebtoken: 9.0.2 jwks-rsa: 3.0.1 node-forge: 1.3.1 @@ -9331,7 +9333,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -9352,7 +9354,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@20.7.1)(ts-node@10.9.1): + /jest-cli@29.7.0(@types/node@20.8.0)(ts-node@10.9.1): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -9366,10 +9368,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.7.1)(ts-node@10.9.1) + create-jest: 29.7.0(@types/node@20.8.0)(ts-node@10.9.1) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.7.1)(ts-node@10.9.1) + jest-config: 29.7.0(@types/node@20.8.0)(ts-node@10.9.1) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -9380,7 +9382,7 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@20.7.1)(ts-node@10.9.1): + /jest-config@29.7.0(@types/node@20.8.0)(ts-node@10.9.1): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -9395,7 +9397,7 @@ packages: '@babel/core': 7.23.0 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 babel-jest: 29.7.0(@babel/core@7.23.0) chalk: 4.1.2 ci-info: 3.8.0 @@ -9415,7 +9417,7 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1(@swc/core@1.3.90)(@types/node@20.7.1)(typescript@5.2.2) + ts-node: 10.9.1(@swc/core@1.3.90)(@types/node@20.8.0)(typescript@5.2.2) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -9456,7 +9458,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -9472,7 +9474,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.7 - '@types/node': 20.7.1 + '@types/node': 20.8.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -9523,7 +9525,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 jest-util: 29.7.0 dev: true @@ -9578,7 +9580,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -9609,7 +9611,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -9661,7 +9663,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -9686,7 +9688,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -9698,7 +9700,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -9707,13 +9709,13 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@20.7.1)(ts-node@10.9.1): + /jest@29.7.0(@types/node@20.8.0)(ts-node@10.9.1): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -9726,7 +9728,7 @@ packages: '@jest/core': 29.7.0(ts-node@10.9.1) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.7.1)(ts-node@10.9.1) + jest-cli: 29.7.0(@types/node@20.8.0)(ts-node@10.9.1) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -10599,8 +10601,8 @@ packages: braces: 3.0.2 picomatch: 2.3.1 - /mikro-orm@5.8.4: - resolution: {integrity: sha512-iIwDS0Fz7FqO8JUz8CVJBFCg9bhV31LpQPIiODcPK6vWeM+Uh8G5aZz5yEXJhrYFjYMVxCJZbLnbsVLMNKCG0g==} + /mikro-orm@5.8.5: + resolution: {integrity: sha512-t/Xy+Nnn6vwzI7yCILJmwsPqJRCMyfwhkn41nvjaDr3C9hUlHbk4iUZV3Er4mjjQM1Lb+1wixL6iYajdlUipHA==} engines: {node: '>= 14.0.0'} /mime-db@1.52.0: @@ -11866,7 +11868,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 20.7.1 + '@types/node': 20.8.0 long: 5.2.3 dev: false optional: true @@ -11886,7 +11888,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 20.7.1 + '@types/node': 20.8.0 long: 5.2.3 dev: false optional: true @@ -13068,7 +13070,7 @@ packages: resolution: {integrity: sha512-QFOOeaEwNOAj4k/T9OtSb9sKx9oLVI5y9HrJJn3XN9RJYKGAuE+fMD+rHA5u9ILmf3FDx99jaEvVvykftJtBGA==} engines: {node: '>=12.*'} dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 qs: 6.11.2 dev: false @@ -13513,7 +13515,7 @@ packages: dev: true optional: true - /ts-node@10.9.1(@swc/core@1.3.90)(@types/node@20.7.1)(typescript@5.2.2): + /ts-node@10.9.1(@swc/core@1.3.90)(@types/node@20.8.0)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -13533,7 +13535,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.7.1 + '@types/node': 20.8.0 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -13565,6 +13567,7 @@ packages: /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: false /tslib@2.5.0: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} @@ -13580,16 +13583,6 @@ packages: engines: {node: '>=0.6.x'} dev: false - /tsutils@3.21.0(typescript@5.2.2): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.2.2 - dev: true - /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: @@ -13906,7 +13899,7 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - /vite-node@0.34.6(@types/node@20.7.1): + /vite-node@0.34.6(@types/node@20.8.0): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -13916,7 +13909,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.9(@types/node@20.7.1) + vite: 4.4.9(@types/node@20.8.0) transitivePeerDependencies: - '@types/node' - less @@ -13928,7 +13921,7 @@ packages: - terser dev: true - /vite@4.4.9(@types/node@20.7.1): + /vite@4.4.9(@types/node@20.8.0): resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -13956,7 +13949,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.7.1 + '@types/node': 20.8.0 esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.29.4 @@ -13997,7 +13990,7 @@ packages: dependencies: '@types/chai': 4.3.6 '@types/chai-subset': 1.3.3 - '@types/node': 20.7.1 + '@types/node': 20.8.0 '@vitest/expect': 0.34.6 '@vitest/runner': 0.34.6 '@vitest/snapshot': 0.34.6 @@ -14016,8 +14009,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 4.4.9(@types/node@20.7.1) - vite-node: 0.34.6(@types/node@20.7.1) + vite: 4.4.9(@types/node@20.8.0) + vite-node: 0.34.6(@types/node@20.8.0) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/src/common/@types/enums/misc.enum.ts b/src/common/@types/enums/misc.enum.ts index 04f03345..927f2126 100644 --- a/src/common/@types/enums/misc.enum.ts +++ b/src/common/@types/enums/misc.enum.ts @@ -1,5 +1,7 @@ import type { TEmailSubject } from "../interfaces"; +export const BYTE_TO_MB = 1024 * 1024; + export enum EmailTemplate { RESET_PASSWORD_TEMPLATE = "reset", WELCOME_TEMPLATE = "welcome", @@ -15,8 +17,8 @@ export const EmailSubject: Record = { }; export const FileSize = { - IMAGE: 5 * 1024 * 1024, // 5MB - DOC: 10 * 1024 * 1024, // 10MB + IMAGE: 5 * BYTE_TO_MB, // 5MB + DOC: 10 * BYTE_TO_MB, // 10MB }; export enum PostStateEnum { @@ -24,12 +26,12 @@ export enum PostStateEnum { PUBLISHED = "PUBLISHED", } -export const enum Server { +export enum Server { SES = "SES", SMTP = "SMTP", } -export const enum TemplateEngine { +export enum TemplateEngine { ETA = "ETA", PUG = "PUG", HBS = "HBS", @@ -42,13 +44,13 @@ export const FileType: Record = { // database enums -export const enum CursorType { +export enum CursorType { DATE = "DATE", STRING = "STRING", NUMBER = "NUMBER", } -export const enum QueryCursor { +export enum QueryCursor { DATE = "DATE", ALPHA = "ALPHA", } @@ -63,12 +65,12 @@ export enum ReferralStatus { COMPLETED = "COMPLETED", } -export const enum RoutingKey { +export enum RoutingKey { SEND_MAIL = "send-mail", SEND_NEWSLETTER = "send-newsletter", } -export const enum PaginationType { +export enum PaginationType { OFFSET = "OFFSET", CURSOR = "CURSOR", } diff --git a/src/common/@types/interfaces/pagination.interface.ts b/src/common/@types/interfaces/pagination.interface.ts index 5f0bf4eb..97b5c692 100644 --- a/src/common/@types/interfaces/pagination.interface.ts +++ b/src/common/@types/interfaces/pagination.interface.ts @@ -37,14 +37,17 @@ export interface PaginationAbstractResponse { export type Order = "$gt" | "$lt"; export type OppositeOrder = "$gte" | "$lte"; -export const getCursorType = (cursor: QueryCursor): CursorType => - cursor === QueryCursor.DATE ? CursorType.NUMBER : CursorType.STRING; +export function getCursorType(cursor: QueryCursor): CursorType { + return cursor === QueryCursor.DATE ? CursorType.NUMBER : CursorType.STRING; +} -export const getQueryOrder = (order: QueryOrder): Order => - order === QueryOrder.ASC ? "$gt" : "$lt"; +export function getQueryOrder(order: QueryOrder): Order { + return order === QueryOrder.ASC ? "$gt" : "$lt"; +} -export const getOppositeOrder = (order: QueryOrder): OppositeOrder => - order === QueryOrder.ASC ? "$lte" : "$gte"; +export function getOppositeOrder(order: QueryOrder): OppositeOrder { + return order === QueryOrder.ASC ? "$lte" : "$gte"; +} export type PaginationRequest = CursorPaginationDto | OffsetPaginationDto; export type PaginationResponse = CursorPaginationResponse | OffsetPaginationResponse; diff --git a/src/common/database/mikro-orm-cli.config.ts b/src/common/database/mikro-orm-cli.config.ts index c01936c2..1f239b40 100644 --- a/src/common/database/mikro-orm-cli.config.ts +++ b/src/common/database/mikro-orm-cli.config.ts @@ -35,7 +35,8 @@ export const baseOptions = { migrations: { migrations: { fileName: (timestamp: string, name?: string) => { - if (!name) return `Migration${timestamp}`; + if (!name) + return `Migration${timestamp}`; return `Migration${timestamp}_${name}`; }, diff --git a/src/common/decorators/api-file.decorator.ts b/src/common/decorators/api-file.decorator.ts index f44af66d..db5a9d63 100644 --- a/src/common/decorators/api-file.decorator.ts +++ b/src/common/decorators/api-file.decorator.ts @@ -26,7 +26,7 @@ interface ApiFilesOptions extends ApiFileOptions { * @param options_ - IApiFileOptions - The options for the decorator. * @returns A function that returns a decorator. */ -export const ApiFile = (options_?: ApiFileOptions) => { +export function ApiFile(options_?: ApiFileOptions) { const options: ApiFileOptions = { fieldName: "file", required: false, ...options_ }; return applyDecorators( @@ -45,7 +45,7 @@ export const ApiFile = (options_?: ApiFileOptions) => { }, }), ); -}; +} /** * It adds the `@UseInterceptors(FilesInterceptor(...))` decorator to the route handler, and adds the @@ -53,7 +53,7 @@ export const ApiFile = (options_?: ApiFileOptions) => { * @param options_ - The options for the decorator. * @returns A function that returns a decorator. */ -export const ApiFiles = (options_?: ApiFilesOptions) => { +export function ApiFiles(options_?: ApiFilesOptions) { const options: ApiFilesOptions = { fieldName: "files", required: false, @@ -82,7 +82,7 @@ export const ApiFiles = (options_?: ApiFilesOptions) => { }, }), ); -}; +} /** * It takes an array of MulterFields and returns a decorator that will add the appropriate OpenAPI @@ -92,10 +92,7 @@ export const ApiFiles = (options_?: ApiFilesOptions) => { * multer. */ -export const ApiFileFields = ( - options: (MulterField & { required?: boolean })[], - localOptions?: MulterOptions, -) => { +export function ApiFileFields(options: (MulterField & { required?: boolean })[], localOptions?: MulterOptions) { const bodyProperties: Record = Object.assign( {}, ...options.map((field) => { @@ -114,4 +111,4 @@ export const ApiFileFields = ( }, }), ); -}; +} diff --git a/src/common/decorators/api-paginated.decorator.ts b/src/common/decorators/api-paginated.decorator.ts index d2acd834..25d9dbf9 100644 --- a/src/common/decorators/api-paginated.decorator.ts +++ b/src/common/decorators/api-paginated.decorator.ts @@ -13,7 +13,7 @@ import { CursorPaginationResponse, OffsetPaginationResponse } from "@common/@typ * includes information about the pagination type (cursor or offset) and the data items returned. */ -export const ApiPaginatedResponse = (model: TModel) => { +export function ApiPaginatedResponse(model: TModel) { return applyDecorators( ApiOperation({ summary: `${model.name.toLowerCase()} list` }), ApiExtraModels(CursorPaginationResponse, OffsetPaginationResponse, model), @@ -49,4 +49,4 @@ export const ApiPaginatedResponse = (model: TModel) => { }, }), ); -}; +} diff --git a/src/common/decorators/auth.decorator.ts b/src/common/decorators/auth.decorator.ts index 03f3dfc0..4e959046 100644 --- a/src/common/decorators/auth.decorator.ts +++ b/src/common/decorators/auth.decorator.ts @@ -16,7 +16,7 @@ interface AuthGuard { * @returns A function that returns a function */ -export const Auth = (options_?: AuthGuard) => { +export function Auth(options_?: AuthGuard) { const options: AuthGuard = { guards: [JwtAuthGuard, PoliciesGuard], unauthorizedResponse: API_UNAUTHORISED_RESPONSE, @@ -28,4 +28,4 @@ export const Auth = (options_?: AuthGuard) => { ApiBearerAuth(), ApiUnauthorizedResponse({ description: options.unauthorizedResponse }), ); -}; +} diff --git a/src/common/decorators/controller.decorator.ts b/src/common/decorators/controller.decorator.ts index 366b138a..c19b5b0b 100644 --- a/src/common/decorators/controller.decorator.ts +++ b/src/common/decorators/controller.decorator.ts @@ -10,7 +10,7 @@ import { Auth } from "./auth.decorator"; * @param secured - whether or not the controller should be secured * @returns A function that takes in a class and returns a class. */ -export const GenericController = (name: string, secured = true) => { +export function GenericController(name: string, secured = true) { const decsToApply: (ClassDecorator | MethodDecorator | PropertyDecorator)[] = [ ApiTags(capitalize(name)), Controller(name), @@ -20,4 +20,4 @@ export const GenericController = (name: string, secured = true) => { decsToApply.push(Auth()); return applyDecorators(...decsToApply); -}; +} diff --git a/src/common/decorators/custom-cache.decorator.ts b/src/common/decorators/custom-cache.decorator.ts index a15fe80f..b455ec2c 100644 --- a/src/common/decorators/custom-cache.decorator.ts +++ b/src/common/decorators/custom-cache.decorator.ts @@ -11,6 +11,6 @@ import { NoCache } from "./nocache.decorator"; * (e.g. Authorization to properly identify profile endpoints). * @returns A function that returns a decorator. */ -export const ApplyCustomCache = () => { +export function ApplyCustomCache() { return applyDecorators(NoCache, UseInterceptors(CacheKeyInterceptor)); -}; +} diff --git a/src/common/decorators/swagger-api.decorator.ts b/src/common/decorators/swagger-api.decorator.ts index c3303f99..979af9d4 100644 --- a/src/common/decorators/swagger-api.decorator.ts +++ b/src/common/decorators/swagger-api.decorator.ts @@ -11,14 +11,14 @@ interface SwaggerResponseOptions { response?: Type } -export const SwaggerResponse = ({ +export function SwaggerResponse({ operation, notFound, badRequest, params, body, response, -}: SwaggerResponseOptions) => { +}: SwaggerResponseOptions) { const decsToApply = [ApiOperation({ summary: operation })]; if (params) { @@ -39,4 +39,4 @@ export const SwaggerResponse = ({ decsToApply.push(ApiResponse({ type: response })); return applyDecorators(...decsToApply); -}; +} diff --git a/src/common/decorators/uuid-param.decorator.ts b/src/common/decorators/uuid-param.decorator.ts index 009dbb25..52b3014d 100644 --- a/src/common/decorators/uuid-param.decorator.ts +++ b/src/common/decorators/uuid-param.decorator.ts @@ -16,9 +16,6 @@ class CustomException extends Error { const exceptionFactory = () => new CustomException(); -export const UUIDParam = ( - property: string, - ...pipes: (Type | PipeTransform)[] -): ParameterDecorator => { +export function UUIDParam(property: string, ...pipes: (Type | PipeTransform)[]): ParameterDecorator { return Param(property, new ParseUUIDPipe({ version: "4", exceptionFactory }), ...pipes); -}; +} diff --git a/src/common/decorators/validation/is-after.validator.ts b/src/common/decorators/validation/is-after.validator.ts index 9eb15726..d93ff0df 100644 --- a/src/common/decorators/validation/is-after.validator.ts +++ b/src/common/decorators/validation/is-after.validator.ts @@ -26,10 +26,7 @@ class IsAfterConstraint implements ValidatorConstraintInterface { } } -export const IsAfterField = ( - property: keyof T, - validationOptions?: ValidationOptions, -): PropertyDecorator => { +export function IsAfterField(property: keyof T, validationOptions?: ValidationOptions): PropertyDecorator { return function (object: Record, propertyName: string | symbol) { registerDecorator({ target: object.constructor, @@ -39,4 +36,4 @@ export const IsAfterField = ( validator: IsAfterConstraint, }); }; -}; +} diff --git a/src/common/decorators/validation/is-date-field.validator.ts b/src/common/decorators/validation/is-date-field.validator.ts index 8386f1f0..7339c18f 100644 --- a/src/common/decorators/validation/is-date-field.validator.ts +++ b/src/common/decorators/validation/is-date-field.validator.ts @@ -9,7 +9,7 @@ import { validationI18nMessage } from "@lib/i18n"; * @returns A decorator function that takes in a target, propertyKey, and descriptor. */ -export const IsDateField = (options_?: DateFieldOptions) => { +export function IsDateField(options_?: DateFieldOptions) { const options: DateFieldOptions = { each: false, required: true, @@ -60,4 +60,4 @@ export const IsDateField = (options_?: DateFieldOptions) => { } return applyDecorators(...decoratorsToApply); -}; +} diff --git a/src/common/decorators/validation/is-date-format.validator.ts b/src/common/decorators/validation/is-date-format.validator.ts index d6a86bea..1c8713e7 100644 --- a/src/common/decorators/validation/is-date-format.validator.ts +++ b/src/common/decorators/validation/is-date-format.validator.ts @@ -44,10 +44,7 @@ class IsDateInFormatConstraint implements ValidatorConstraintInterface { } } -export const IsDateInFormat = ( - format: DateFormats, - validationOptions?: ValidationOptions, -): PropertyDecorator => { +export function IsDateInFormat(format: DateFormats, validationOptions?: ValidationOptions): PropertyDecorator { return function (object: Record, propertyName: string | symbol) { registerDecorator({ target: object.constructor, @@ -57,4 +54,4 @@ export const IsDateInFormat = ( validator: IsDateInFormatConstraint, }); }; -}; +} diff --git a/src/common/decorators/validation/is-email.validator.ts b/src/common/decorators/validation/is-email.validator.ts index 8468b613..4e144c7a 100644 --- a/src/common/decorators/validation/is-email.validator.ts +++ b/src/common/decorators/validation/is-email.validator.ts @@ -4,7 +4,7 @@ import { Transform } from "class-transformer"; import type { EmailFieldOptions } from "@common/@types"; import { validationI18nMessage } from "@lib/i18n"; -export const IsEmailField = (options_?: EmailFieldOptions) => { +export function IsEmailField(options_?: EmailFieldOptions) { const options: EmailFieldOptions = { each: false, required: true, @@ -54,4 +54,4 @@ export const IsEmailField = (options_?: EmailFieldOptions) => { } return applyDecorators(...decoratorsToApply); -}; +} diff --git a/src/common/decorators/validation/is-enum-field.decorator.ts b/src/common/decorators/validation/is-enum-field.decorator.ts index b48ab33e..662d3a20 100644 --- a/src/common/decorators/validation/is-enum-field.decorator.ts +++ b/src/common/decorators/validation/is-enum-field.decorator.ts @@ -10,7 +10,7 @@ import type { EnumFieldOptions } from "@common/@types"; * @param options_ - EnumFieldOptions * @returns A decorator function that takes in a target, propertyKey, and descriptor. */ -export const IsEnumField = (entity: Record, options_?: EnumFieldOptions) => { +export function IsEnumField(entity: Record, options_?: EnumFieldOptions) { const options: EnumFieldOptions = { each: false, required: true, @@ -56,4 +56,4 @@ export const IsEnumField = (entity: Record, options_?: EnumField } return applyDecorators(...decoratorsToApply); -}; +} diff --git a/src/common/decorators/validation/is-equal-to.validator.ts b/src/common/decorators/validation/is-equal-to.validator.ts index 570b594b..c7cbf27c 100644 --- a/src/common/decorators/validation/is-equal-to.validator.ts +++ b/src/common/decorators/validation/is-equal-to.validator.ts @@ -25,10 +25,7 @@ class IsEqualToConstraint implements ValidatorConstraintInterface { } } -export const IsEqualToField = ( - property: keyof T, - validationOptions?: ValidationOptions, -): PropertyDecorator => { +export function IsEqualToField(property: keyof T, validationOptions?: ValidationOptions): PropertyDecorator { return function (object: Record, propertyName: string | symbol) { registerDecorator({ target: object.constructor, @@ -38,4 +35,4 @@ export const IsEqualToField = ( validator: IsEqualToConstraint, }); }; -}; +} diff --git a/src/common/decorators/validation/is-greater-than.validator.ts b/src/common/decorators/validation/is-greater-than.validator.ts index 6f4ae8a0..88825282 100644 --- a/src/common/decorators/validation/is-greater-than.validator.ts +++ b/src/common/decorators/validation/is-greater-than.validator.ts @@ -25,10 +25,7 @@ class IsGreaterThanConstraint implements ValidatorConstraintInterface { } } -export const IsGreaterThan = ( - property: keyof T, - validationOptions?: ValidationOptions, -): PropertyDecorator => { +export function IsGreaterThan(property: keyof T, validationOptions?: ValidationOptions): PropertyDecorator { return function (object: Record, propertyName: string | symbol) { registerDecorator({ target: object.constructor, @@ -38,4 +35,4 @@ export const IsGreaterThan = ( validator: IsGreaterThanConstraint, }); }; -}; +} diff --git a/src/common/decorators/validation/is-number-field.decorator.ts b/src/common/decorators/validation/is-number-field.decorator.ts index d4d2c804..ff03307f 100644 --- a/src/common/decorators/validation/is-number-field.decorator.ts +++ b/src/common/decorators/validation/is-number-field.decorator.ts @@ -20,7 +20,7 @@ import type { NumberFieldOptions } from "@common/@types"; * @returns A function that returns a decorator. */ -export const IsNumberField = (options_?: NumberFieldOptions) => { +export function IsNumberField(options_?: NumberFieldOptions) { const options: NumberFieldOptions = { min: 1, required: true, @@ -110,4 +110,4 @@ export const IsNumberField = (options_?: NumberFieldOptions) => { } return applyDecorators(...decoratorsToApply); -}; +} diff --git a/src/common/decorators/validation/is-password.validator.ts b/src/common/decorators/validation/is-password.validator.ts index 5d705650..d6054e98 100644 --- a/src/common/decorators/validation/is-password.validator.ts +++ b/src/common/decorators/validation/is-password.validator.ts @@ -36,7 +36,7 @@ class IsPasswordConstraint implements ValidatorConstraintInterface { } } -export const IsPassword = (validationOptions?: ValidationOptions): PropertyDecorator => { +export function IsPassword(validationOptions?: ValidationOptions): PropertyDecorator { return function (object: Record, propertyName: string | symbol) { registerDecorator({ target: object.constructor, @@ -46,9 +46,9 @@ export const IsPassword = (validationOptions?: ValidationOptions): PropertyDecor validator: IsPasswordConstraint, }); }; -}; +} -export const IsPasswordField = (validationOptions?: ValidationOptions & { minLength?: number; maxLength?: number }) => { +export function IsPasswordField(validationOptions?: ValidationOptions & { minLength?: number; maxLength?: number }) { return applyDecorators( IsNotEmpty({ message: validationI18nMessage("validation.isNotEmpty"), @@ -59,4 +59,4 @@ export const IsPasswordField = (validationOptions?: ValidationOptions & { minLen }), IsPassword(validationOptions), ); -}; +} diff --git a/src/common/decorators/validation/is-profane.validator.ts b/src/common/decorators/validation/is-profane.validator.ts index b33cc2f1..d803532e 100644 --- a/src/common/decorators/validation/is-profane.validator.ts +++ b/src/common/decorators/validation/is-profane.validator.ts @@ -28,7 +28,7 @@ class IsProfaneConstraint implements ValidatorConstraintInterface { } } -export const IsProfane = (validationOptions?: ValidationOptions): PropertyDecorator => { +export function IsProfane(validationOptions?: ValidationOptions): PropertyDecorator { return function (object: Record, propertyName: string | symbol) { registerDecorator({ target: object.constructor, @@ -37,4 +37,4 @@ export const IsProfane = (validationOptions?: ValidationOptions): PropertyDecora validator: IsProfaneConstraint, }); }; -}; +} diff --git a/src/common/decorators/validation/is-string-field.decorator.ts b/src/common/decorators/validation/is-string-field.decorator.ts index 6df35208..154ee4e2 100644 --- a/src/common/decorators/validation/is-string-field.decorator.ts +++ b/src/common/decorators/validation/is-string-field.decorator.ts @@ -20,7 +20,7 @@ import { Sanitize, Trim } from "./transform.decorator"; * @returns A function that returns a decorator. */ -export const IsStringField = (options_?: StringFieldOptions) => { +export function IsStringField(options_?: StringFieldOptions) { const options: StringFieldOptions = { required: true, each: false, @@ -88,4 +88,4 @@ export const IsStringField = (options_?: StringFieldOptions) => { } return applyDecorators(...decoratorsToApply); -}; +} diff --git a/src/common/decorators/validation/is-unique.validator.ts b/src/common/decorators/validation/is-unique.validator.ts index de46a60c..f2bfd834 100644 --- a/src/common/decorators/validation/is-unique.validator.ts +++ b/src/common/decorators/validation/is-unique.validator.ts @@ -39,13 +39,12 @@ export class IsUniqueConstraint implements ValidatorConstraintInterface { } } -export const IsUnique - = (entityType: () => Type, field: keyof Entity, options?: ValidationOptions) => - ({ constructor: target }: object, propertyName: string) => - registerDecorator({ - constraints: [entityType, field], - target, - options, - propertyName, - validator: IsUniqueConstraint, - }); +export function IsUnique(entityType: () => Type, field: keyof Entity, options?: ValidationOptions) { + return ({ constructor: target }: object, propertyName: string) => registerDecorator({ + constraints: [entityType, field], + target, + options, + propertyName, + validator: IsUniqueConstraint, + }); +} diff --git a/src/common/decorators/validation/is-username.validator.ts b/src/common/decorators/validation/is-username.validator.ts index 46321f74..3f16664f 100644 --- a/src/common/decorators/validation/is-username.validator.ts +++ b/src/common/decorators/validation/is-username.validator.ts @@ -38,7 +38,7 @@ class IsUsernameConstraint implements ValidatorConstraintInterface { } } -export const IsUsername = (validationOptions?: ValidationOptions): PropertyDecorator => { +export function IsUsername(validationOptions?: ValidationOptions): PropertyDecorator { return function (object: Record, propertyName: string | symbol) { registerDecorator({ target: object.constructor, @@ -48,9 +48,9 @@ export const IsUsername = (validationOptions?: ValidationOptions): PropertyDecor validator: IsUsernameConstraint, }); }; -}; +} -export const IsUsernameField = (validationOptions?: ValidationOptions & { minLength?: number; maxLength?: number }) => { +export function IsUsernameField(validationOptions?: ValidationOptions & { minLength?: number; maxLength?: number }) { return applyDecorators( IsNotEmpty({ message: validationI18nMessage("validation.isNotEmpty"), @@ -61,4 +61,4 @@ export const IsUsernameField = (validationOptions?: ValidationOptions & { minLen }), IsUsername(validationOptions), ); -}; +} diff --git a/src/common/decorators/validation/is-uuid.validator.ts b/src/common/decorators/validation/is-uuid.validator.ts index 471fc557..000df438 100644 --- a/src/common/decorators/validation/is-uuid.validator.ts +++ b/src/common/decorators/validation/is-uuid.validator.ts @@ -8,7 +8,7 @@ import { validationI18nMessage } from "@lib/i18n"; * @param options_ - UUIDFieldOptions * @returns A decorator function that takes in a target, propertyKey, and descriptor. */ -export const IsUUIDField = (options_?: UUIDFieldOptions) => { +export function IsUUIDField(options_?: UUIDFieldOptions) { const options: UUIDFieldOptions = { each: false, required: true, @@ -54,4 +54,4 @@ export const IsUUIDField = (options_?: UUIDFieldOptions) => { } return applyDecorators(...decoratorsToApply); -}; +} diff --git a/src/common/decorators/validation/min-max-length.decorator.ts b/src/common/decorators/validation/min-max-length.decorator.ts index 844a9c57..83fd9e3e 100644 --- a/src/common/decorators/validation/min-max-length.decorator.ts +++ b/src/common/decorators/validation/min-max-length.decorator.ts @@ -8,7 +8,7 @@ import { validationI18nMessage } from "@lib/i18n"; * @param options_ - MinMaxLengthOptions * @returns A function that takes in a target, propertyKey, and descriptor */ -export const MinMaxLength = (options_?: MinMaxLengthOptions) => { +export function MinMaxLength(options_?: MinMaxLengthOptions) { const options: MinMaxLengthOptions = { minLength: 2, maxLength: 500, each: false, ...options_ }; return applyDecorators( @@ -21,4 +21,4 @@ export const MinMaxLength = (options_?: MinMaxLengthOptions) => { each: options.each, }), ); -}; +} diff --git a/src/common/decorators/validation/transform.decorator.ts b/src/common/decorators/validation/transform.decorator.ts index 1dd40ca7..a1308903 100644 --- a/src/common/decorators/validation/transform.decorator.ts +++ b/src/common/decorators/validation/transform.decorator.ts @@ -6,7 +6,7 @@ import { isArray } from "helper-fns"; * It trims the value of a property and replaces multiple spaces with a single space * @returns A function that takes a parameter and returns a value. */ -export const Trim = () => { +export function Trim() { return Transform((parameters) => { const value = parameters.value as string[] | string; @@ -15,14 +15,14 @@ export const Trim = () => { return value.trim().replaceAll(/\s\s+/g, " "); }); -}; +} /** * It converts a string to a boolean * @returns A function that returns a PropertyDecorator */ -export const ToBoolean = () => { +export function ToBoolean() { return Transform( (parameters) => { switch (parameters.value) { @@ -39,28 +39,30 @@ export const ToBoolean = () => { }, { toClassOnly: true }, ); -}; +} /** * It takes a string, sanitizes it, and returns the sanitized string * @returns A decorator function that will be applied to the class. */ -export const Sanitize = (): PropertyDecorator => { +export function Sanitize(): PropertyDecorator { return Transform( ({ value }) => { if (isArray(value)) { return value.map((v) => { - if (typeof v === "string") return DOMPurify.sanitize(v); + if (typeof v === "string") + return DOMPurify.sanitize(v); return v; }) as string[]; } - if (typeof value === "string") return DOMPurify.sanitize(value); + if (typeof value === "string") + return DOMPurify.sanitize(value); return value as string; }, { toClassOnly: true }, ); -}; +} diff --git a/src/common/middlewares/request-id.middleware.ts b/src/common/middlewares/request-id.middleware.ts index e9d3a69e..0c490336 100644 --- a/src/common/middlewares/request-id.middleware.ts +++ b/src/common/middlewares/request-id.middleware.ts @@ -2,11 +2,7 @@ import { createId, isCuid } from "@paralleldrive/cuid2"; import type { NextFunction, Request, Response } from "express"; import { REQUEST_ID_TOKEN_HEADER } from "@common/constant"; -export const RequestIdMiddleware = ( - request: Request, - response: Response, - next: NextFunction, -): void => { +export function RequestIdMiddleware(request: Request, response: Response, next: NextFunction): void { const requestId = request.header(REQUEST_ID_TOKEN_HEADER); if (!request.headers[REQUEST_ID_TOKEN_HEADER] || (requestId && !isCuid(requestId))) @@ -14,4 +10,4 @@ export const RequestIdMiddleware = ( response.set(REQUEST_ID_TOKEN_HEADER, request.headers[REQUEST_ID_TOKEN_HEADER]); next(); -}; +} diff --git a/src/common/misc/file.ts b/src/common/misc/file.ts index 33e91d1d..5e116f0a 100644 --- a/src/common/misc/file.ts +++ b/src/common/misc/file.ts @@ -29,11 +29,11 @@ export const ImageMulterOption: MulterOptions = { * @param param.required - whether the file is required or not * @returns A function that returns a ParseFilePipeBuilder */ -export const fileValidatorPipe = ({ +export function fileValidatorPipe({ fileType = FileType.IMAGE, fileSize = FileSize.IMAGE, required = true, -}: FileValidator) => { +}: FileValidator) { return new ParseFilePipeBuilder() .addFileTypeValidator({ fileType, @@ -45,4 +45,4 @@ export const fileValidatorPipe = ({ errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY, fileIsRequired: required, }); -}; +} diff --git a/src/common/misc/workers.ts b/src/common/misc/workers.ts index 2b78d4d0..7890bc6d 100644 --- a/src/common/misc/workers.ts +++ b/src/common/misc/workers.ts @@ -1,12 +1,12 @@ import { ThreadWorker } from "poolifier"; import { HelperService } from "@common/helpers"; -const enum ThreadFunctions { +enum ThreadFunctions { HashString = "hashString", } // all expensive process goes here to avoid blocking the main thread -const workerFunction = (data: { functionName: string; input: string }) => { +function workerFunction(data: { functionName: string; input: string }) { switch (data.functionName) { case ThreadFunctions.HashString: { return HelperService.hashString(data.input); @@ -16,7 +16,7 @@ const workerFunction = (data: { functionName: string; input: string }) => { throw new Error("Invalid function name"); } } -}; +} const threadWorker = new ThreadWorker(workerFunction); diff --git a/src/common/swagger/swagger.plugin.ts b/src/common/swagger/swagger.plugin.ts index aac7177f..45ca01f9 100644 --- a/src/common/swagger/swagger.plugin.ts +++ b/src/common/swagger/swagger.plugin.ts @@ -3,7 +3,7 @@ * `opsFilter` method, which filters an array of tagged operations based on a case-insensitive phrase. * @returns An object with a `fn` property that contains an `opsFilter` method. */ -const CaseInsensitiveFilterPlugin = () => { +function CaseInsensitiveFilterPlugin() { return { fn: { opsFilter: ( @@ -16,7 +16,7 @@ const CaseInsensitiveFilterPlugin = () => { }, }, }; -}; +} /* The `swaggerOptions` object is being exported as a constant. It contains various configuration options for a Swagger API documentation. */ diff --git a/src/lib/aws/aws.s3.service.ts b/src/lib/aws/aws.s3.service.ts index c0f4f2f1..2e17f733 100644 --- a/src/lib/aws/aws.s3.service.ts +++ b/src/lib/aws/aws.s3.service.ts @@ -248,14 +248,12 @@ export class AwsS3Service { Objects: listItems, }, }), - ), - this.s3Client.send( + ), this.s3Client.send( new DeleteObjectCommand({ Bucket: this.bucket, Key: directory, }), - ), - ]); + )]); } /** @@ -306,7 +304,8 @@ export class AwsS3Service { let path = options?.path ?? undefined; const acl = options?.acl ?? "public-read"; - if (path) path = path.startsWith("/") ? path.replace("/", "") : `${path}`; + if (path) + path = path.startsWith("/") ? path.replace("/", "") : `${path}`; const key = path ? `${path}/${filename}` : filename; const mime = this.getMime(filename); @@ -341,7 +340,8 @@ export class AwsS3Service { ): Promise { let path = options?.path ?? undefined; - if (path) path = path.startsWith("/") ? path.replace("/", "") : `${path}`; + if (path) + path = path.startsWith("/") ? path.replace("/", "") : `${path}`; const key = path ? `${path}/${filename}` : filename; diff --git a/src/lib/casl/policies.decorator.ts b/src/lib/casl/policies.decorator.ts index f71891b0..ea116f50 100644 --- a/src/lib/casl/policies.decorator.ts +++ b/src/lib/casl/policies.decorator.ts @@ -2,5 +2,6 @@ import { SetMetadata } from "@nestjs/common"; import { CHECK_POLICIES_KEY_META } from "@common/constant"; import type { PolicyHandler } from "./policy.interface"; -export const CheckPolicies = (...handlers: PolicyHandler[]) => - SetMetadata(CHECK_POLICIES_KEY_META, handlers); +export function CheckPolicies(...handlers: PolicyHandler[]) { + return SetMetadata(CHECK_POLICIES_KEY_META, handlers); +} diff --git a/src/lib/firebase-admin/firebase.service.ts b/src/lib/firebase-admin/firebase.service.ts index 042e3eff..28396d71 100644 --- a/src/lib/firebase-admin/firebase.service.ts +++ b/src/lib/firebase-admin/firebase.service.ts @@ -20,7 +20,8 @@ export class NestFirebaseService implements NestFirebase { getFirebaseAdmin(): admin.app.App { const filePath = path.resolve(".", this._NestFirebaseOptions.FIREBASE_CREDENTIAL_PATH); - if (!existsSync(filePath)) throw new Error(`Unknown file ${filePath}`); + if (!existsSync(filePath)) + throw new Error(`Unknown file ${filePath}`); if (!this._firebaseConnection) { try { diff --git a/src/lib/i18n/translate.ts b/src/lib/i18n/translate.ts index 7340afbe..d213a1f5 100644 --- a/src/lib/i18n/translate.ts +++ b/src/lib/i18n/translate.ts @@ -1,8 +1,10 @@ import type { Path, TranslateOptions } from "nestjs-i18n"; import { I18nContext, i18nValidationMessage } from "nestjs-i18n"; -export const translate = (key: Path, options: TranslateOptions = {}) => - I18nContext.current().t(key, options); +export function translate(key: Path, options: TranslateOptions = {}) { + return I18nContext.current().t(key, options); +} -export const validationI18nMessage = (key: Path, arguments_?: any) => - i18nValidationMessage(key, arguments_); +export function validationI18nMessage(key: Path, arguments_?: any) { + return i18nValidationMessage(key, arguments_); +} diff --git a/src/main.ts b/src/main.ts index d872aeec..f1ad899b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,7 +21,7 @@ declare const module: { hot: { accept: () => void; dispose: (argument: () => Pro const logger = new Logger("Bootstrap"); -const bootstrap = async () => { +async function bootstrap() { const app = await NestFactory.create(AppModule, new ExpressAdapter(), { logger: await createLogger(), snapshot: true, @@ -112,7 +112,7 @@ const bootstrap = async () => { !HelperService.isProd() && logger.log(`📑 Swagger is running on: ${chalk.green(`http://localhost:${port}/doc`)}`); logger.log(`Server is up. ${chalk.yellow(`+${Math.trunc(performance.now())}ms`)}`); -}; +} (async () => await bootstrap())().catch((error) => { logger.error(error); diff --git a/src/modules/category/category.controller.ts b/src/modules/category/category.controller.ts index 4adfc4f0..64b76b07 100644 --- a/src/modules/category/category.controller.ts +++ b/src/modules/category/category.controller.ts @@ -11,7 +11,10 @@ export class CategoryController extends ControllerFactory< OffsetPaginationDto, CreateCategoryDto, EditCategoryDto ->(OffsetPaginationDto, CreateCategoryDto, EditCategoryDto) { +>(OffsetPaginationDto, + CreateCategoryDto, + EditCategoryDto, +) { constructor(protected service: CategoryService) { super(); } diff --git a/src/modules/newsletter/newsletter.controller.ts b/src/modules/newsletter/newsletter.controller.ts index d1cb47c3..bbc579b5 100644 --- a/src/modules/newsletter/newsletter.controller.ts +++ b/src/modules/newsletter/newsletter.controller.ts @@ -13,7 +13,10 @@ export class NewsLetterController extends ControllerFactory< CursorPaginationDto, CreateNewsletterDto, EditNewsletterDto ->(CursorPaginationDto, CreateNewsletterDto, EditNewsletterDto) { +>(CursorPaginationDto, + CreateNewsletterDto, + EditNewsletterDto, +) { constructor(protected service: NewsLetterService) { super(); } diff --git a/src/modules/tags/tags.controller.ts b/src/modules/tags/tags.controller.ts index 8774446b..b9cd0be6 100644 --- a/src/modules/tags/tags.controller.ts +++ b/src/modules/tags/tags.controller.ts @@ -11,7 +11,10 @@ export class TagsController extends ControllerFactory< CursorPaginationDto, CreateTagDto, EditTagDto ->(CursorPaginationDto, CreateTagDto, EditTagDto) { +>(CursorPaginationDto, + CreateTagDto, + EditTagDto, +) { constructor(protected service: TagsService) { super(); } diff --git a/src/repl.ts b/src/repl.ts index 25590ea9..effd8ace 100644 --- a/src/repl.ts +++ b/src/repl.ts @@ -16,10 +16,12 @@ async function bootstrap() { // sets up history file for repl const cacheDirectory = join("node_modules", ".cache"); - if (!existsSync(cacheDirectory)) mkdirSync(cacheDirectory); + if (!existsSync(cacheDirectory)) + mkdirSync(cacheDirectory); replServer.setupHistory(join(cacheDirectory, ".nestjs_repl_history"), (error) => { - if (error) logger.error(error); + if (error) + logger.error(error); }); }