Skip to content

Commit 4427f67

Browse files
Mise à jour des dépendances et des configurations Docker
1 parent 999e5cf commit 4427f67

File tree

6 files changed

+156
-178
lines changed

6 files changed

+156
-178
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ docker/docker-compose.yml
3939

4040
documentation/*
4141
.dev-token.json
42+
*.mongodb.js

Dockerfile

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FROM node:18-bookworm-slim as builder
22

33
ENV TIMEZONE=Europe/Paris \
4-
LANGUAGE=fr_FR.UTF-8 \
5-
LANG=fr_FR.UTF-8 \
6-
TERM=xterm \
7-
DEBIAN_FRONTEND=noninteractive
4+
LANGUAGE=fr_FR.UTF-8 \
5+
LANG=fr_FR.UTF-8 \
6+
TERM=xterm \
7+
DEBIAN_FRONTEND=noninteractive
88

99
WORKDIR /data
1010

@@ -16,15 +16,18 @@ RUN yarn install \
1616
--non-interactive \
1717
--production=false
1818

19+
RUN apt-get update -y \
20+
&& apt-get install -y python3
21+
1922
RUN yarn run build
2023

2124
FROM node:18-bookworm-slim AS production
2225

2326
ENV TIMEZONE=Europe/Paris \
24-
LANGUAGE=fr_FR.UTF-8 \
25-
LANG=fr_FR.UTF-8 \
26-
TERM=xterm \
27-
DEBIAN_FRONTEND=noninteractive
27+
LANGUAGE=fr_FR.UTF-8 \
28+
LANG=fr_FR.UTF-8 \
29+
TERM=xterm \
30+
DEBIAN_FRONTEND=noninteractive
2831

2932
ARG NODE_ENV=production
3033
ENV NODE_ENV=${NODE_ENV}
@@ -35,25 +38,25 @@ ADD package.json .
3538
ADD *.lock .
3639

3740
RUN apt clean -y \
38-
&& apt update -y \
39-
&& apt upgrade -y \
40-
&& apt install -y locales \
41-
&& export LANGUAGE=${LANGUAGE} \
42-
&& export LANG=${LANG} \
43-
&& export LC_ALL=${LC_ALL} \
44-
&& locale-gen ${LANG} \
45-
&& dpkg-reconfigure --frontend ${DEBIAN_FRONTEND} locales \
46-
&& apt install --no-install-recommends -yq \
47-
git \
48-
jq \
49-
nano \
50-
openssl
41+
&& apt update -y \
42+
&& apt upgrade -y \
43+
&& apt install -y locales \
44+
&& export LANGUAGE=${LANGUAGE} \
45+
&& export LANG=${LANG} \
46+
&& export LC_ALL=${LC_ALL} \
47+
&& locale-gen ${LANG} \
48+
&& dpkg-reconfigure --frontend ${DEBIAN_FRONTEND} locales \
49+
&& apt install --no-install-recommends -yq \
50+
git \
51+
jq \
52+
nano \
53+
openssl
5154

5255
RUN yarn install \
53-
--prefer-offline \
54-
--pure-lockfile \
55-
--non-interactive \
56-
--production=true \
56+
--prefer-offline \
57+
--pure-lockfile \
58+
--non-interactive \
59+
--production=true \
5760
&& yarn cache clean \
5861
&& yarn autoclean --init \
5962
&& yarn autoclean --force

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dev: ## Start development environment
1818
-e NODE_ENV=development \
1919
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
2020
--add-host host.docker.internal:host-gateway \
21+
--platform $(PLATFORM) \
2122
--network dev \
2223
--name $(APP_NAME) \
2324
-p $(APP_PORT):4000 \

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@streamkits/nestjs_module_scrud": "^0.0.16",
6060
"ajv": "^8.12.0",
6161
"ajv-errors": "^3.0.0",
62-
"argon2": "^0.31.2",
62+
"argon2": "^0.40.1",
6363
"bullmq": "^4.14.0",
6464
"class-transformer": "^0.5.1",
6565
"class-validator": "^0.14.0",
@@ -91,8 +91,8 @@
9191
"@nestjs/schematics": "^10.0.2",
9292
"@nestjs/swagger": "^7.1.16",
9393
"@nestjs/testing": "^10.1.3",
94-
"@swc/cli": "^0.1.63",
95-
"@swc/core": "^1.3.99",
94+
"@swc/cli": "^0.3.10",
95+
"@swc/core": "^1.4.6",
9696
"@types/cookie-parser": "^1.4.6",
9797
"@types/express": "^4.17.17",
9898
"@types/jest": "^29.5.2",

src/management/identities/identities.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { additionalFieldsPartDto } from '~/management/identities/_dto/_parts/additionalFields.dto';
21
import { HttpException, Injectable, Logger } from '@nestjs/common';
32
import { InjectModel } from '@nestjs/mongoose';
43
import { Identities } from './_schemas/identities.schema';
@@ -8,7 +7,6 @@ import { AbstractSchema } from '~/_common/abstracts/schemas/abstract.schema';
87
import { IdentitiesValidationService } from './validations/identities.validation.service';
98
import { ValidationConfigException, ValidationSchemaException } from '~/_common/errors/ValidationException';
109
import { IdentityState } from './_enums/states.enum';
11-
import { merge } from 'radash';
1210

1311
@Injectable()
1412
export class IdentitiesService extends AbstractServiceSchema {
@@ -45,6 +43,7 @@ export class IdentitiesService extends AbstractServiceSchema {
4543
data = this.handleValidationError(error, data, logPrefix);
4644
}
4745

46+
//TODO: ameliorer la logique d'upsert
4847
const identity = await this._model.findOne({ 'inetOrgPerson.uid': data.inetOrgPerson.uid });
4948
if (identity) {
5049
Logger.log(`${logPrefix} Identity already exists. Updating.`);

0 commit comments

Comments
 (0)