Ajout du script pour créer l'environnement + changements du dockerfile et du package.json pour enlever les paquets inutiles.
This commit is contained in:
19
Makefile
19
Makefile
@@ -1,30 +1,19 @@
|
|||||||
DOCKERCOMPOSEPATH=./srcs/docker-compose.yml
|
DOCKERCOMPOSEPATH=./srcs/docker-compose.yml
|
||||||
|
|
||||||
#dev allow hot reload.
|
#dev allow hot reload.
|
||||||
dev:
|
up:
|
||||||
|
@bash ./make_env.sh
|
||||||
docker compose -f ${DOCKERCOMPOSEPATH} up -d --build
|
docker compose -f ${DOCKERCOMPOSEPATH} up -d --build
|
||||||
@make start
|
@make start
|
||||||
@docker ps
|
@docker ps
|
||||||
|
|
||||||
|
|
||||||
#prod only the needed files ares presents inside the container
|
|
||||||
prod:
|
|
||||||
docker compose -f ${DOCKERCOMPOSEPATH} up -d --build prod
|
|
||||||
@make start_prod
|
|
||||||
@docker ps
|
|
||||||
|
|
||||||
start:
|
start:
|
||||||
docker compose -f ${DOCKERCOMPOSEPATH} start
|
docker compose -f ${DOCKERCOMPOSEPATH} start
|
||||||
docker logs --follow nestjs
|
docker logs --follow nestjs
|
||||||
|
|
||||||
start_dev:
|
all : up
|
||||||
docker compose -f ${DOCKERCOMPOSEPATH} start dev
|
|
||||||
docker logs --follow nestjs
|
|
||||||
|
|
||||||
start_prod:
|
re: down up
|
||||||
docker compose -f ${DOCKERCOMPOSEPATH} start prod
|
|
||||||
|
|
||||||
re: down dev
|
|
||||||
|
|
||||||
down:
|
down:
|
||||||
docker compose -f ${DOCKERCOMPOSEPATH} -v down
|
docker compose -f ${DOCKERCOMPOSEPATH} -v down
|
||||||
|
|||||||
80
make_env.sh
80
make_env.sh
@@ -3,4 +3,84 @@
|
|||||||
# This script is used to create a new environment for the project.
|
# This script is used to create a new environment for the project.
|
||||||
|
|
||||||
# Create a new environment for docker
|
# Create a new environment for docker
|
||||||
|
ENV_FILE_DOCKER=./srcs/.env
|
||||||
|
ENV_FILE_NESTJS=./srcs/requirements/nestjs/api_back/.env
|
||||||
|
|
||||||
|
# Create a new environment for docker
|
||||||
|
if [ -f "$ENV_FILE_DOCKER" ] && [ -f "$ENV_FILE_NESTJS" ]; then
|
||||||
|
echo "The file $ENV_FILE_DOCKER and $ENV_FILE_NESTJS already exists. Do you want to overwrite them ? (y/n)"
|
||||||
|
read -p "Enter your choice : " OVERWRITE
|
||||||
|
if [ "$OVERWRITE" = "y" ]; then
|
||||||
|
rm "$ENV_FILE_DOCKER" && rm "$ENV_FILE_NESTJS"
|
||||||
|
else
|
||||||
|
echo "The file $ENV_FILE_DOCKER and $ENV_FILE_NESTJS will not be overwritten. The script will exit."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Creating a new environment for docker"
|
||||||
|
read -p "Enter the env configuration for nestjs : \"1\" for development OR \"2\" for production : " NODE_ENV
|
||||||
|
|
||||||
|
if [ "$NODE_ENV" = "1" ]; then
|
||||||
|
echo "NODE_ENV=development" > "$ENV_FILE_DOCKER"
|
||||||
|
elif [ "$NODE_ENV" = "2" ]; then
|
||||||
|
echo "NODE_ENV=production" > "$ENV_FILE_DOCKER"
|
||||||
|
else
|
||||||
|
echo "You entered a wrong value. The default value will be used (development)."
|
||||||
|
echo "NODE_ENV=development" > "$ENV_FILE_DOCKER"
|
||||||
|
fi
|
||||||
|
read -p "Enter the name of the host like \"localhost\" : " PROJECT_HOST
|
||||||
|
echo "WEBSITE_HOST=$PROJECT_HOST" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "WEBSITE_PORT=8080" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "POSTGRES_USER=postgres" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "POSTGRES_PASSWORD=$(openssl rand -base64 32)" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "POSTGRES_DB=transcendance_db" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "POSTGRES_HOST=postgresql" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "POSTGRES_PORT=5432" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "REDIS_HOST=redis" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "REDIS_PORT=6379" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "REDIS_PASSWORD=$(openssl rand -base64 32)" >> "$ENV_FILE_DOCKER"
|
||||||
|
|
||||||
|
# Create a new environment for nestjs
|
||||||
|
echo "Creating a new environment for nestjs"
|
||||||
|
|
||||||
|
if [ "$NODE_ENV" = "1" ]; then
|
||||||
|
echo "NODE_ENV=development" > "$ENV_FILE_NESTJS"
|
||||||
|
elif [ "$NODE_ENV" = "2" ]; then
|
||||||
|
echo "NODE_ENV=production" > "$ENV_FILE_NESTJS"
|
||||||
|
else
|
||||||
|
echo "NODE_ENV=development" > "$ENV_FILE_NESTJS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "WEBSITE_HOST=$PROJECT_HOST" >> "$ENV_FILE_NESTJS"
|
||||||
|
echo "WEBSITE_PORT=8080" >> "$ENV_FILE_NESTJS"
|
||||||
|
echo "POSTGRES_USER=postgres" >> "$ENV_FILE_NESTJS"
|
||||||
|
echo "POSTGRES_PASSWORD=$POSTGRES_PASSSWORD" >> "$ENV_FILE_NESTJS"
|
||||||
|
echo "POSTGRES_DB=transcendance_db" >> "$ENV_FILE_NESTJS"
|
||||||
|
echo "POSTGRES_HOST=postgresql" >> "$ENV_FILE_NESTJS"
|
||||||
|
echo "POSTGRES_PORT=5432" >> "$ENV_FILE_NESTJS"
|
||||||
|
|
||||||
|
echo "In the next steps, we'll need to enter the client secret and client id of the 42 api"
|
||||||
|
|
||||||
|
read -p "Enter the client id of the 42 api : " CLIENT_ID
|
||||||
|
echo "FORTYTWO_CLIENT_ID=$CLIENT_ID" >> "$ENV_FILE_NESTJS"
|
||||||
|
|
||||||
|
|
||||||
|
read -p "Enter the client secret of the 42 api : " CLIENT_SECRET
|
||||||
|
echo "FORTYTWO_CLIENT_SECRET=$CLIENT_SECRET" >> "$ENV_FILE_NESTJS"
|
||||||
|
echo "FORTYTWO_CALLBACK_URL=http://$PROJECT_HOST:8080/api/v2/auth/redirect" >> "$ENV_FILE_NESTJS"
|
||||||
|
|
||||||
|
echo "COOKIE_SECRET=$(openssl rand -base64 32)" >> "$ENV_FILE_NESTJS"
|
||||||
|
|
||||||
|
echo "PORT=3000" >> "$ENV_FILE_NESTJS"
|
||||||
|
|
||||||
|
echo "REDIS_HOST=redis" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "REDIS_PORT=6379" >> "$ENV_FILE_DOCKER"
|
||||||
|
echo "REDIS_PASSWORD=$REDIS_PASSWORD" >> "$ENV_FILE_DOCKER"
|
||||||
|
|
||||||
|
echo "TWO_FACTOR_AUTHENTICATION_APP_NAME=Transcendance" >> "$ENV_FILE_NESTJS"
|
||||||
|
|
||||||
|
echo "TICKET_FOR_PLAYING_GAME_SECRET=$(openssl rand -base64 32)" >> "$ENV_FILE_NESTJS"
|
||||||
|
|
||||||
|
echo "The environment has been created successfully. You can now wait for the docker to build the project."
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
WEBSITE_HOST=transcendance
|
WEBSITE_HOST=transcendance
|
||||||
POSTGRES_USER=postgres
|
POSTGRES_USER=postgres
|
||||||
POSTGRES_PASSWORD=9pKpKEgiamxwk5P7Ggsz
|
POSTGRES_PASSWORD=unPCFsMxZwwCguGFMTmKgCySt6o5uX76QsKyabKS89I=
|
||||||
POSTGRES_DB=transcendance_db
|
POSTGRES_DB=transcendance_db
|
||||||
POSTGRES_HOST=postgresql
|
POSTGRES_HOST=postgresql
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
REDIS_HOST=redis
|
REDIS_HOST=redis
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
REDIS_PASSWORD=1a5e04138b91b3d683c708e4689454c2
|
REDIS_PASSWORD=yiCFcBSrFv7DXVBmydtwL9unzNA2MjbB70XspflHHPc=
|
||||||
|
REDIS_HOST=redis
|
||||||
|
REDIS_PORT=6379
|
||||||
|
REDIS_PASSWORD=
|
||||||
|
|||||||
10
srcs/.env.bak
Normal file
10
srcs/.env.bak
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
NODE_ENV=development
|
||||||
|
WEBSITE_HOST=transcendance
|
||||||
|
POSTGRES_USER=postgres
|
||||||
|
POSTGRES_PASSWORD=9pKpKEgiamxwk5P7Ggsz
|
||||||
|
POSTGRES_DB=transcendance_db
|
||||||
|
POSTGRES_HOST=postgresql
|
||||||
|
POSTGRES_PORT=5432
|
||||||
|
REDIS_HOST=redis
|
||||||
|
REDIS_PORT=6379
|
||||||
|
REDIS_PASSWORD=1a5e04138b91b3d683c708e4689454c2
|
||||||
@@ -5,7 +5,7 @@ WORKDIR /usr/app
|
|||||||
COPY ./api_back ./
|
COPY ./api_back ./
|
||||||
COPY ./api_back/.env ./.env
|
COPY ./api_back/.env ./.env
|
||||||
COPY ./api_back/src/uploads/avatars/default.png ./uploads/avatars/default.png
|
COPY ./api_back/src/uploads/avatars/default.png ./uploads/avatars/default.png
|
||||||
|
RUN npm install
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,13 @@
|
|||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
|
POSTGRES_USER=postgres
|
||||||
|
POSTGRES_PASSWORD=
|
||||||
|
POSTGRES_DB=transcendance_db
|
||||||
POSTGRES_HOST=postgresql
|
POSTGRES_HOST=postgresql
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
POSTGRES_USERNAME=postgres
|
|
||||||
POSTGRES_PASSWORD=9pKpKEgiamxwk5P7Ggsz
|
|
||||||
POSTGRES_DATABASE=transcendance_db
|
|
||||||
|
|
||||||
# OAUTH2 42 API
|
|
||||||
FORTYTWO_CLIENT_ID=u-s4t2ud-49dc7b539bcfe1acb48b928b2b281671c99fc5bfab1faca57a536ab7e0075500
|
FORTYTWO_CLIENT_ID=u-s4t2ud-49dc7b539bcfe1acb48b928b2b281671c99fc5bfab1faca57a536ab7e0075500
|
||||||
FORTYTWO_CLIENT_SECRET=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
|
FORTYTWO_CLIENT_SECRET=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
|
||||||
FORTYTWO_CALLBACK_URL=http://transcendance:8080/api/v2/auth/redirect
|
FORTYTWO_CALLBACK_URL=http://transcendance:8080/api/v2/auth/redirect
|
||||||
COOKIE_SECRET=248cdc831110eec8796d7c1edbf79835
|
COOKIE_SECRET=JsqrZopdOb3zuAkZd+8xDkPHOhEMmbz4eAlJ+liEo0U=
|
||||||
# JWT
|
|
||||||
JWT_SECRET=442d774798979fcc14a4a2b6b7535902
|
|
||||||
# Misc
|
|
||||||
PORT=3000
|
PORT=3000
|
||||||
#Redis
|
|
||||||
REDIS_HOST=redis
|
|
||||||
REDIS_PORT=6379
|
|
||||||
REDIS_PASSWORD=1a5e04138b91b3d683c708e4689454c2
|
|
||||||
#2fa
|
|
||||||
TWO_FACTOR_AUTHENTICATION_APP_NAME=Transcendance
|
TWO_FACTOR_AUTHENTICATION_APP_NAME=Transcendance
|
||||||
|
TICKET_FOR_PLAYING_GAME_SECRET=5MkACVi80PE+7XGrG3Tij3+BE3RJk0h0v7NI0uFJswg=
|
||||||
NAME_OF_REDIS_DB = tokenGameDatabase
|
|
||||||
TICKET_FOR_PLAYING_GAME_SECRET = a2aef785c388497f5fca18f9ccff37ed
|
|
||||||
|
|||||||
22
srcs/requirements/nestjs/api_back/.env.bak
Normal file
22
srcs/requirements/nestjs/api_back/.env.bak
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
NODE_ENV=development
|
||||||
|
POSTGRES_HOST=postgresql
|
||||||
|
POSTGRES_PORT=5432
|
||||||
|
POSTGRES_USERNAME=postgres
|
||||||
|
POSTGRES_PASSWORD=9pKpKEgiamxwk5P7Ggsz
|
||||||
|
POSTGRES_DATABASE=transcendance_db
|
||||||
|
|
||||||
|
# OAUTH2 42 API
|
||||||
|
FORTYTWO_CLIENT_ID=u-s4t2ud-49dc7b539bcfe1acb48b928b2b281671c99fc5bfab1faca57a536ab7e0075500
|
||||||
|
FORTYTWO_CLIENT_SECRET=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
|
||||||
|
FORTYTWO_CALLBACK_URL=http://transcendance:8080/api/v2/auth/redirect
|
||||||
|
COOKIE_SECRET=248cdc831110eec8796d7c1edbf79835
|
||||||
|
# Misc
|
||||||
|
PORT=3000
|
||||||
|
#Redis
|
||||||
|
REDIS_HOST=redis
|
||||||
|
REDIS_PORT=6379
|
||||||
|
REDIS_PASSWORD=1a5e04138b91b3d683c708e4689454c2
|
||||||
|
#2fa
|
||||||
|
TWO_FACTOR_AUTHENTICATION_APP_NAME=Transcendance
|
||||||
|
|
||||||
|
TICKET_FOR_PLAYING_GAME_SECRET = a2aef785c388497f5fca18f9ccff37ed
|
||||||
137
srcs/requirements/nestjs/api_back/package-lock.json
generated
137
srcs/requirements/nestjs/api_back/package-lock.json
generated
@@ -12,7 +12,6 @@
|
|||||||
"@nestjs/common": "^9.0.0",
|
"@nestjs/common": "^9.0.0",
|
||||||
"@nestjs/config": "^2.2.0",
|
"@nestjs/config": "^2.2.0",
|
||||||
"@nestjs/core": "^9.0.0",
|
"@nestjs/core": "^9.0.0",
|
||||||
"@nestjs/jwt": "^9.0.0",
|
|
||||||
"@nestjs/mapped-types": "^1.2.0",
|
"@nestjs/mapped-types": "^1.2.0",
|
||||||
"@nestjs/passport": "^9.0.0",
|
"@nestjs/passport": "^9.0.0",
|
||||||
"@nestjs/platform-express": "^9.0.0",
|
"@nestjs/platform-express": "^9.0.0",
|
||||||
@@ -29,7 +28,6 @@
|
|||||||
"otplib": "^12.0.1",
|
"otplib": "^12.0.1",
|
||||||
"passport": "^0.6.0",
|
"passport": "^0.6.0",
|
||||||
"passport-42": "^1.2.6",
|
"passport-42": "^1.2.6",
|
||||||
"passport-jwt": "^4.0.0",
|
|
||||||
"passport-local": "^1.0.0",
|
"passport-local": "^1.0.0",
|
||||||
"pg": "^8.8.0",
|
"pg": "^8.8.0",
|
||||||
"qrcode": "^1.5.1",
|
"qrcode": "^1.5.1",
|
||||||
@@ -48,7 +46,6 @@
|
|||||||
"@types/jest": "28.1.8",
|
"@types/jest": "28.1.8",
|
||||||
"@types/multer": "^1.4.7",
|
"@types/multer": "^1.4.7",
|
||||||
"@types/node": "^16.0.0",
|
"@types/node": "^16.0.0",
|
||||||
"@types/passport-jwt": "^3.0.7",
|
|
||||||
"@types/passport-local": "^1.0.34",
|
"@types/passport-local": "^1.0.34",
|
||||||
"@types/supertest": "^2.0.11",
|
"@types/supertest": "^2.0.11",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||||
@@ -1646,18 +1643,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nestjs/jwt": {
|
|
||||||
"version": "9.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nestjs/jwt/-/jwt-9.0.0.tgz",
|
|
||||||
"integrity": "sha512-ZsXGY/wMYKzEhymw2+dxiwrHTRKIKrGszx6r2EjQqNLypdXMQu0QrujwZJ8k3+XQV4snmuJwwNakQoA2ILfq8w==",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/jsonwebtoken": "8.5.8",
|
|
||||||
"jsonwebtoken": "8.5.1"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@nestjs/common": "^8.0.0 || ^9.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nestjs/mapped-types": {
|
"node_modules/@nestjs/mapped-types": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@nestjs/mapped-types/-/mapped-types-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@nestjs/mapped-types/-/mapped-types-1.2.0.tgz",
|
||||||
@@ -2235,14 +2220,6 @@
|
|||||||
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
|
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/jsonwebtoken": {
|
|
||||||
"version": "8.5.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.8.tgz",
|
|
||||||
"integrity": "sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/mime": {
|
"node_modules/@types/mime": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz",
|
||||||
@@ -2277,17 +2254,6 @@
|
|||||||
"@types/express": "*"
|
"@types/express": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/passport-jwt": {
|
|
||||||
"version": "3.0.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/passport-jwt/-/passport-jwt-3.0.8.tgz",
|
|
||||||
"integrity": "sha512-VKJZDJUAHFhPHHYvxdqFcc5vlDht8Q2pL1/ePvKAgqRThDaCc84lSYOTQmnx3+JIkDlN+2KfhFhXIzlcVT+Pcw==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@types/express": "*",
|
|
||||||
"@types/jsonwebtoken": "*",
|
|
||||||
"@types/passport-strategy": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/passport-local": {
|
"node_modules/@types/passport-local": {
|
||||||
"version": "1.0.34",
|
"version": "1.0.34",
|
||||||
"resolved": "https://registry.npmjs.org/@types/passport-local/-/passport-local-1.0.34.tgz",
|
"resolved": "https://registry.npmjs.org/@types/passport-local/-/passport-local-1.0.34.tgz",
|
||||||
@@ -6377,35 +6343,6 @@
|
|||||||
"graceful-fs": "^4.1.6"
|
"graceful-fs": "^4.1.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jsonwebtoken": {
|
|
||||||
"version": "8.5.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
|
|
||||||
"integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
|
|
||||||
"dependencies": {
|
|
||||||
"jws": "^3.2.2",
|
|
||||||
"lodash.includes": "^4.3.0",
|
|
||||||
"lodash.isboolean": "^3.0.3",
|
|
||||||
"lodash.isinteger": "^4.0.4",
|
|
||||||
"lodash.isnumber": "^3.0.3",
|
|
||||||
"lodash.isplainobject": "^4.0.6",
|
|
||||||
"lodash.isstring": "^4.0.1",
|
|
||||||
"lodash.once": "^4.0.0",
|
|
||||||
"ms": "^2.1.1",
|
|
||||||
"semver": "^5.6.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4",
|
|
||||||
"npm": ">=1.4.28"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jsonwebtoken/node_modules/semver": {
|
|
||||||
"version": "5.7.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
|
||||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
|
||||||
"bin": {
|
|
||||||
"semver": "bin/semver"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jwa": {
|
"node_modules/jwa": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
|
||||||
@@ -6593,7 +6530,6 @@
|
|||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"yallist": "^4.0.0"
|
"yallist": "^4.0.0"
|
||||||
},
|
},
|
||||||
@@ -7219,15 +7155,6 @@
|
|||||||
"node": ">= 6.0.0"
|
"node": ">= 6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/passport-jwt": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/passport-jwt/-/passport-jwt-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-BwC0n2GP/1hMVjR4QpnvqA61TxenUMlmfNjYNgK0ZAs0HK4SOQkHcSv4L328blNTLtHq7DbmvyNJiH+bn6C5Mg==",
|
|
||||||
"dependencies": {
|
|
||||||
"jsonwebtoken": "^8.2.0",
|
|
||||||
"passport-strategy": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/passport-local": {
|
"node_modules/passport-local": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/passport-local/-/passport-local-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/passport-local/-/passport-local-1.0.0.tgz",
|
||||||
@@ -8183,7 +8110,6 @@
|
|||||||
"version": "7.3.8",
|
"version": "7.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
},
|
},
|
||||||
@@ -10918,15 +10844,6 @@
|
|||||||
"uuid": "9.0.0"
|
"uuid": "9.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@nestjs/jwt": {
|
|
||||||
"version": "9.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nestjs/jwt/-/jwt-9.0.0.tgz",
|
|
||||||
"integrity": "sha512-ZsXGY/wMYKzEhymw2+dxiwrHTRKIKrGszx6r2EjQqNLypdXMQu0QrujwZJ8k3+XQV4snmuJwwNakQoA2ILfq8w==",
|
|
||||||
"requires": {
|
|
||||||
"@types/jsonwebtoken": "8.5.8",
|
|
||||||
"jsonwebtoken": "8.5.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@nestjs/mapped-types": {
|
"@nestjs/mapped-types": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@nestjs/mapped-types/-/mapped-types-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@nestjs/mapped-types/-/mapped-types-1.2.0.tgz",
|
||||||
@@ -11403,14 +11320,6 @@
|
|||||||
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
|
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/jsonwebtoken": {
|
|
||||||
"version": "8.5.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.8.tgz",
|
|
||||||
"integrity": "sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==",
|
|
||||||
"requires": {
|
|
||||||
"@types/node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@types/mime": {
|
"@types/mime": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz",
|
||||||
@@ -11445,17 +11354,6 @@
|
|||||||
"@types/express": "*"
|
"@types/express": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/passport-jwt": {
|
|
||||||
"version": "3.0.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/passport-jwt/-/passport-jwt-3.0.8.tgz",
|
|
||||||
"integrity": "sha512-VKJZDJUAHFhPHHYvxdqFcc5vlDht8Q2pL1/ePvKAgqRThDaCc84lSYOTQmnx3+JIkDlN+2KfhFhXIzlcVT+Pcw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@types/express": "*",
|
|
||||||
"@types/jsonwebtoken": "*",
|
|
||||||
"@types/passport-strategy": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@types/passport-local": {
|
"@types/passport-local": {
|
||||||
"version": "1.0.34",
|
"version": "1.0.34",
|
||||||
"resolved": "https://registry.npmjs.org/@types/passport-local/-/passport-local-1.0.34.tgz",
|
"resolved": "https://registry.npmjs.org/@types/passport-local/-/passport-local-1.0.34.tgz",
|
||||||
@@ -14527,30 +14425,6 @@
|
|||||||
"universalify": "^2.0.0"
|
"universalify": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jsonwebtoken": {
|
|
||||||
"version": "8.5.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
|
|
||||||
"integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
|
|
||||||
"requires": {
|
|
||||||
"jws": "^3.2.2",
|
|
||||||
"lodash.includes": "^4.3.0",
|
|
||||||
"lodash.isboolean": "^3.0.3",
|
|
||||||
"lodash.isinteger": "^4.0.4",
|
|
||||||
"lodash.isnumber": "^3.0.3",
|
|
||||||
"lodash.isplainobject": "^4.0.6",
|
|
||||||
"lodash.isstring": "^4.0.1",
|
|
||||||
"lodash.once": "^4.0.0",
|
|
||||||
"ms": "^2.1.1",
|
|
||||||
"semver": "^5.6.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"semver": {
|
|
||||||
"version": "5.7.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
|
||||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"jwa": {
|
"jwa": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
|
||||||
@@ -14710,7 +14584,6 @@
|
|||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"yallist": "^4.0.0"
|
"yallist": "^4.0.0"
|
||||||
}
|
}
|
||||||
@@ -15177,15 +15050,6 @@
|
|||||||
"passport-oauth2": "^1.4.0"
|
"passport-oauth2": "^1.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"passport-jwt": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/passport-jwt/-/passport-jwt-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-BwC0n2GP/1hMVjR4QpnvqA61TxenUMlmfNjYNgK0ZAs0HK4SOQkHcSv4L328blNTLtHq7DbmvyNJiH+bn6C5Mg==",
|
|
||||||
"requires": {
|
|
||||||
"jsonwebtoken": "^8.2.0",
|
|
||||||
"passport-strategy": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"passport-local": {
|
"passport-local": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/passport-local/-/passport-local-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/passport-local/-/passport-local-1.0.0.tgz",
|
||||||
@@ -15873,7 +15737,6 @@
|
|||||||
"version": "7.3.8",
|
"version": "7.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,13 +24,11 @@
|
|||||||
"@nestjs/common": "^9.0.0",
|
"@nestjs/common": "^9.0.0",
|
||||||
"@nestjs/config": "^2.2.0",
|
"@nestjs/config": "^2.2.0",
|
||||||
"@nestjs/core": "^9.0.0",
|
"@nestjs/core": "^9.0.0",
|
||||||
"@nestjs/jwt": "^9.0.0",
|
|
||||||
"@nestjs/mapped-types": "^1.2.0",
|
"@nestjs/mapped-types": "^1.2.0",
|
||||||
"@nestjs/passport": "^9.0.0",
|
"@nestjs/passport": "^9.0.0",
|
||||||
"@nestjs/platform-express": "^9.0.0",
|
"@nestjs/platform-express": "^9.0.0",
|
||||||
"@nestjs/typeorm": "^9.0.1",
|
"@nestjs/typeorm": "^9.0.1",
|
||||||
"@types/express-session": "^1.17.5",
|
"@types/express-session": "^1.17.5",
|
||||||
"@types/redis": "^4.0.11",
|
|
||||||
"@types/validator": "^13.7.9",
|
"@types/validator": "^13.7.9",
|
||||||
"class-transformer": "^0.5.1",
|
"class-transformer": "^0.5.1",
|
||||||
"class-validator": "^0.13.2",
|
"class-validator": "^0.13.2",
|
||||||
@@ -41,7 +39,6 @@
|
|||||||
"otplib": "^12.0.1",
|
"otplib": "^12.0.1",
|
||||||
"passport": "^0.6.0",
|
"passport": "^0.6.0",
|
||||||
"passport-42": "^1.2.6",
|
"passport-42": "^1.2.6",
|
||||||
"passport-jwt": "^4.0.0",
|
|
||||||
"passport-local": "^1.0.0",
|
"passport-local": "^1.0.0",
|
||||||
"pg": "^8.8.0",
|
"pg": "^8.8.0",
|
||||||
"qrcode": "^1.5.1",
|
"qrcode": "^1.5.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user