diff --git a/config/config.dev.json b/config/config.dev.json index 30cbae5d2..ab3fe6e93 100644 --- a/config/config.dev.json +++ b/config/config.dev.json @@ -9,9 +9,9 @@ "SESSION_SECRET": "SessionSecretForDevelopment", "SESSION_TTL_MS": 3600000, "BACKEND_ADDRESS": "http://127.0.0.1:9090", - "OIDC_CALLBACK_URL": "http://localhost:8099/api/frontend/login", - "DEFAULT_LOGIN_REDIRECT": "http://localhost:8099/", - "LOGOUT_REDIRECT": "http://localhost:8099/" + "OIDC_CALLBACK_URL": "https://localhost:8099/api/frontend/login", + "DEFAULT_LOGIN_REDIRECT": "https://localhost:8099/", + "LOGOUT_REDIRECT": "https://localhost:8099/" }, "DB": { "CLIENT_URL": "postgres://admin:password@127.0.0.1:5432", diff --git a/dev-realm-spsh.json b/dev-realm-spsh.json index f5df18333..6009673b4 100644 --- a/dev-realm-spsh.json +++ b/dev-realm-spsh.json @@ -829,7 +829,7 @@ "secret": "YDp6fYkbUcj4ZkyAOnbAHGQ9O72htc5M", "redirectUris": [ "http://localhost:9091/*", - "http://localhost:8099/*", + "https://localhost:8099/*", "/*" ], "webOrigins": [ @@ -2364,4 +2364,4 @@ "clientPolicies": { "policies": [] } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index a7f17dcbd..0eed3b34e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@automapper/classes": "^8.7.7", "@automapper/core": "^8.7.7", "@automapper/nestjs": "^8.7.7", - "@faker-js/faker": "^8.2.0", + "@faker-js/faker": "^8.3.0", "@mikro-orm/core": "^5.9.3", "@mikro-orm/nestjs": "^5.2.2", "@mikro-orm/postgresql": "^5.9.3", @@ -25,7 +25,7 @@ "@nestjs/swagger": "^7.1.15", "@nestjs/terminus": "^10.1.1", "@s3pweb/keycloak-admin-client-cjs": "^22.0.1", - "axios": "^1.5.0", + "axios": "^1.6.2", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "connect-redis": "^7.1.0", @@ -47,6 +47,7 @@ "@nestjs/cli": "^10.2.1", "@nestjs/schematics": "^10.0.3", "@nestjs/testing": "^9.4.2", + "@testcontainers/postgresql": "^10.2.2", "@types/express": "^4.17.21", "@types/express-session": "^1.17.10", "@types/jest": "^29.2.4", @@ -65,7 +66,7 @@ "prettier": "^3.1.0", "source-map-support": "^0.5.20", "supertest": "^6.1.3", - "testcontainers": "^9.9.0", + "testcontainers": "^10.2.2", "ts-jest": "^29.1.0", "ts-loader": "^9.5.0", "ts-node": "^10.0.0", @@ -972,9 +973,9 @@ } }, "node_modules/@faker-js/faker": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.2.0.tgz", - "integrity": "sha512-VacmzZqVxdWdf9y64lDOMZNDMM/FQdtM9IsaOPKOm2suYwEatb8VkdHqOzXcDnZbk7YDE2BmsJmy/2Hmkn563g==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.3.0.tgz", + "integrity": "sha512-1Ibx6hdxIvJB6fT56daVJND/8uw5G3hi2Fw2Bjm8EW7jsUNI4wV3D1dvyqHYR2RIRU6mWIroZmoGvl76mlnFrg==", "funding": [ { "type": "opencollective", @@ -986,6 +987,101 @@ "npm": ">=6.14.13" } }, + "node_modules/@fastify/accept-negotiator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@fastify/accept-negotiator/-/accept-negotiator-1.1.0.tgz", + "integrity": "sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==", + "optional": true, + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@fastify/send": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/send/-/send-2.1.0.tgz", + "integrity": "sha512-yNYiY6sDkexoJR0D8IDy3aRP3+L4wdqCpvx5WP+VtEU58sn7USmKynBzDQex5X42Zzvw2gNzzYgP90UfWShLFA==", + "optional": true, + "peer": true, + "dependencies": { + "@lukeed/ms": "^2.0.1", + "escape-html": "~1.0.3", + "fast-decode-uri-component": "^1.0.1", + "http-errors": "2.0.0", + "mime": "^3.0.0" + } + }, + "node_modules/@fastify/send/node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "optional": true, + "peer": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@fastify/static": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/@fastify/static/-/static-6.11.2.tgz", + "integrity": "sha512-EH7mh7q4MfNdT7N07ZVlwsX/ObngMvQ7KBP0FXAuPov99Fjn80KSJMdxQhhYKAKWW1jXiFdrk8X7d6uGWdZFxg==", + "optional": true, + "peer": true, + "dependencies": { + "@fastify/accept-negotiator": "^1.0.0", + "@fastify/send": "^2.0.0", + "content-disposition": "^0.5.3", + "fastify-plugin": "^4.0.0", + "glob": "^8.0.1", + "p-limit": "^3.1.0" + } + }, + "node_modules/@fastify/static/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "optional": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@fastify/static/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "optional": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@fastify/static/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "optional": true, + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@golevelup/ts-jest": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@golevelup/ts-jest/-/ts-jest-0.4.0.tgz", @@ -1627,6 +1723,16 @@ "node": ">=8" } }, + "node_modules/@lukeed/ms": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@lukeed/ms/-/ms-2.0.1.tgz", + "integrity": "sha512-Xs/4RZltsAL7pkvaNStUQt7netTkyxrS0K+RILcVr3TRMS/ToOg4I6uNfhB9SlGsnWBym4U+EaXq0f0cEMNkHA==", + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@mikro-orm/cli": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.9.3.tgz", @@ -2358,6 +2464,15 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@testcontainers/postgresql": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@testcontainers/postgresql/-/postgresql-10.2.2.tgz", + "integrity": "sha512-G1xJKe8omeNzngK0dj4R2cSYxWyOUdTXD/oBA03AqIwdReq/gi4WjT6CJqGbkqQy9opXZV6ug3gHMja+wM5BCA==", + "dev": true, + "dependencies": { + "testcontainers": "^10.2.2" + } + }, "node_modules/@testim/chrome-version": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", @@ -2389,15 +2504,6 @@ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true }, - "node_modules/@types/archiver": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-5.3.4.tgz", - "integrity": "sha512-Lj7fLBIMwYFgViVVZHEdExZC3lVYsl+QL0VmdNdIzGZH544jHveYWij6qdnBgJQDnR7pMKliN9z2cPZFEbhyPw==", - "dev": true, - "dependencies": { - "@types/readdir-glob": "*" - } - }, "node_modules/@types/babel__core": { "version": "7.20.4", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.4.tgz", @@ -2464,26 +2570,6 @@ "integrity": "sha512-b698BLJ6kPVd6uhHsY7wlebZdrWPXYied883PDSzpJZYOP97EOn/oGdLCH3jJf157srkFReIZY5v0H1s8Dozrg==", "dev": true }, - "node_modules/@types/docker-modem": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz", - "integrity": "sha512-yKpAGEuKRSS8wwx0joknWxsmLha78wNMe9R2S3UNsVOkZded8UqOrV8KoeDXoXsjndxwyF3eIhyClGbO1SEhEg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/ssh2": "*" - } - }, - "node_modules/@types/dockerode": { - "version": "3.3.23", - "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.23.tgz", - "integrity": "sha512-Lz5J+NFgZS4cEVhquwjIGH4oQwlVn2h7LXD3boitujBnzOE5o7s9H8hchEjoDK2SlRsJTogdKnQeiJgPPKLIEw==", - "dev": true, - "dependencies": { - "@types/docker-modem": "*", - "@types/node": "*" - } - }, "node_modules/@types/eslint": { "version": "8.44.7", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.7.tgz", @@ -2665,15 +2751,6 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, - "node_modules/@types/readdir-glob": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@types/readdir-glob/-/readdir-glob-1.1.4.tgz", - "integrity": "sha512-uEJsErL2wFCTcbbmJpIuD8OWYNabgv1oaYP2bOkzZXKtk3c6LCYQEKngIqBj2VR2NMv9DOAXSkxSYOWtHxh2gQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/semver": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", @@ -2701,15 +2778,6 @@ "@types/node": "*" } }, - "node_modules/@types/ssh2": { - "version": "1.11.16", - "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.11.16.tgz", - "integrity": "sha512-Y1WuSL16TSlfsqTVyOkfnUsxHrdZsQQGq0AG6XFqs0hU3jO++cc6PdU+UCyG/0AVg9ez5qRNR8xfkouJv+gdgw==", - "dev": true, - "dependencies": { - "@types/node": "^18.11.18" - } - }, "node_modules/@types/ssh2-streams": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/@types/ssh2-streams/-/ssh2-streams-0.1.12.tgz", @@ -2719,15 +2787,6 @@ "@types/node": "*" } }, - "node_modules/@types/ssh2/node_modules/@types/node": { - "version": "18.18.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.9.tgz", - "integrity": "sha512-0f5klcuImLnG4Qreu9hPj/rEfFq6YRc5n2mAjSsH+ec/mJL+3voBH0+8T7o8RpFjH7ovc+TRsL/c7OYIQsPTfQ==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -3878,15 +3937,21 @@ } }, "node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, + "node_modules/b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==", + "dev": true + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -4007,7 +4072,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "devOptional": true }, "node_modules/base64-js": { "version": "1.5.1", @@ -6337,6 +6402,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/fast-decode-uri-component": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", + "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", + "optional": true, + "peer": true + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -6349,6 +6421,12 @@ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "dev": true }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", @@ -6381,6 +6459,13 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, + "node_modules/fastify-plugin": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-4.5.1.tgz", + "integrity": "sha512-stRHYGeuqpEZTL1Ef0Ovr2ltazUT9g844X5z/zEBFLG8RYlpDiOCIG+ATvYEp+/zmc7sN29mcIMp8gvYplYPIQ==", + "optional": true, + "peer": true + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -6725,7 +6810,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "devOptional": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -7247,7 +7332,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, + "devOptional": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -8658,9 +8743,9 @@ } }, "node_modules/libphonenumber-js": { - "version": "1.10.49", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.49.tgz", - "integrity": "sha512-gvLtyC3tIuqfPzjvYLH9BmVdqzGDiSi4VjtWe2fAgSdBf0yt8yPmbNnRIHNbR5IdtVkm0ayGuzwQKTWmU0hdjQ==" + "version": "1.10.46", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.46.tgz", + "integrity": "sha512-xJqWqMV5hM/6vWj68yqUejkzM9KkYjWFfqimVL4QG4dS5Rij2EXWus/s248x4zUpXeX2gwbLBzQW+aPqUitxIg==" }, "node_modules/lines-and-columns": { "version": "1.2.4", @@ -9462,7 +9547,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, + "devOptional": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -10032,9 +10117,9 @@ } }, "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, "engines": { "node": ">=6" @@ -10089,6 +10174,12 @@ } ] }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", + "dev": true + }, "node_modules/random-bytes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", @@ -10969,6 +11060,16 @@ "node": ">=10.0.0" } }, + "node_modules/streamx": { + "version": "2.15.2", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.2.tgz", + "integrity": "sha512-b62pAV/aeMjUoRN2C/9F0n+G8AfcJjNC0zw/ZmOHeFsIe4m4GzjVW9m6VHXVjk536NbdU9JRwKMJRfkc+zUFTg==", + "dev": true, + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -11230,15 +11331,25 @@ } }, "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", "dev": true, "dependencies": { - "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", - "tar-stream": "^2.1.4" + "tar-stream": "^3.1.5" + } + }, + "node_modules/tar-fs/node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" } }, "node_modules/tar-stream": { @@ -11430,30 +11541,25 @@ } }, "node_modules/testcontainers": { - "version": "9.12.0", - "resolved": "https://registry.npmjs.org/testcontainers/-/testcontainers-9.12.0.tgz", - "integrity": "sha512-zmjLTAUqCiDvhDq7TCwcyhI3m/cXXKGnhyLLJ9pgh53VgG9O+P+opX1pIx28aYTUQ7Yu6b5sJf0xoIuxoiclWg==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/testcontainers/-/testcontainers-10.2.2.tgz", + "integrity": "sha512-5GZ93rtoVXMx/s3xZjydftrKLnv1Yf+ETzGkXYRCm16LB60W48SGodxuiouYvNlVy0y0ogoQhdOw3DqsPActEA==", "dev": true, "dependencies": { "@balena/dockerignore": "^1.0.2", - "@types/archiver": "^5.3.2", - "@types/dockerode": "^3.3.19", - "archiver": "^5.3.1", + "archiver": "^5.3.2", "async-lock": "^1.4.0", "byline": "^5.0.0", "debug": "^4.3.4", - "docker-compose": "^0.24.1", + "docker-compose": "^0.24.2", "dockerode": "^3.3.5", "get-port": "^5.1.1", - "node-fetch": "^2.6.12", + "node-fetch": "^2.7.0", "proper-lockfile": "^4.1.2", - "properties-reader": "^2.2.0", + "properties-reader": "^2.3.0", "ssh-remote-port-forward": "^1.0.4", - "tar-fs": "^2.1.1", + "tar-fs": "^3.0.4", "tmp": "^0.2.1" - }, - "engines": { - "node": ">= 10.16" } }, "node_modules/testcontainers/node_modules/glob": { @@ -12466,7 +12572,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, + "devOptional": true, "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index 24d8f2acc..44f3b8a56 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@automapper/classes": "^8.7.7", "@automapper/core": "^8.7.7", "@automapper/nestjs": "^8.7.7", - "@faker-js/faker": "^8.2.0", + "@faker-js/faker": "^8.3.0", "@mikro-orm/core": "^5.9.3", "@mikro-orm/nestjs": "^5.2.2", "@mikro-orm/postgresql": "^5.9.3", @@ -47,7 +47,7 @@ "@nestjs/swagger": "^7.1.15", "@nestjs/terminus": "^10.1.1", "@s3pweb/keycloak-admin-client-cjs": "^22.0.1", - "axios": "^1.5.0", + "axios": "^1.6.2", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "connect-redis": "^7.1.0", @@ -69,6 +69,7 @@ "@nestjs/cli": "^10.2.1", "@nestjs/schematics": "^10.0.3", "@nestjs/testing": "^9.4.2", + "@testcontainers/postgresql": "^10.2.2", "@types/express": "^4.17.21", "@types/express-session": "^1.17.10", "@types/jest": "^29.2.4", @@ -87,7 +88,7 @@ "prettier": "^3.1.0", "source-map-support": "^0.5.20", "supertest": "^6.1.3", - "testcontainers": "^9.9.0", + "testcontainers": "^10.2.2", "ts-jest": "^29.1.0", "ts-loader": "^9.5.0", "ts-node": "^10.0.0", diff --git a/src/modules/rolle/api/provider.controller.ts b/src/modules/rolle/api/provider.controller.ts index f8fc1bb1c..5d9d9e346 100644 --- a/src/modules/rolle/api/provider.controller.ts +++ b/src/modules/rolle/api/provider.controller.ts @@ -4,7 +4,7 @@ import { ApiTags, ApiUnauthorizedResponse } from '@nestjs/swagger'; import { AuthenticatedUser } from 'nest-keycloak-connect'; import { GetServiceProviderInfoDo } from '../domain/get-service-provider-info.do.js'; -@ApiTags('rolle') +@ApiTags('provider') @Controller({ path: 'provider' }) export class ProviderController { public constructor(private readonly rolleService: RolleService) {} diff --git a/test/utils/database-test.module.ts b/test/utils/database-test.module.ts index 0e9b5ade3..71508fea6 100644 --- a/test/utils/database-test.module.ts +++ b/test/utils/database-test.module.ts @@ -1,10 +1,11 @@ -import { randomUUID } from 'crypto'; -import { DefaultPullPolicy, PostgreSqlContainer, StartedPostgreSqlContainer } from 'testcontainers'; -import { DynamicModule, OnModuleDestroy } from '@nestjs/common'; -import { ConfigService } from '@nestjs/config'; import { MikroORM } from '@mikro-orm/core'; import { MikroOrmModule } from '@mikro-orm/nestjs'; import { defineConfig } from '@mikro-orm/postgresql'; +import { DynamicModule, OnModuleDestroy } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { PostgreSqlContainer, StartedPostgreSqlContainer } from '@testcontainers/postgresql'; +import { randomUUID } from 'crypto'; +import { PullPolicy } from 'testcontainers'; import { DbConfig, ServerConfig } from '../../src/shared/config/index.js'; type DatabaseTestModuleOptions = { isDatabaseRequired: boolean; databaseName?: string }; @@ -21,13 +22,15 @@ export class DatabaseTestModule implements OnModuleDestroy { const dbName: string = options?.databaseName || `${configService.getOrThrow('DB').DB_NAME}-${randomUUID()}`; + if (options?.isDatabaseRequired) { this.postgres = await new PostgreSqlContainer('docker.io/postgres:15.3-alpine') .withDatabase(dbName) - .withPullPolicy(new DefaultPullPolicy()) + .withPullPolicy(PullPolicy.defaultPolicy()) .withReuse() .start(); } + return defineConfig({ clientUrl: this.postgres?.getConnectionUri() ||