From 3e39888d5628cd0c3bbb46b2a057e164c6194b75 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 06:36:44 +0000 Subject: [PATCH 1/4] fix(deps): update dependency fastify to ^5.6.1 --- apps/api/package.json | 2 +- pnpm-lock.yaml | 25 +++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/apps/api/package.json b/apps/api/package.json index ebf26d82f..3be47e3c5 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -57,7 +57,7 @@ "dotenv": "^17.2.2", "exceljs": "^4.4.0", "fast-csv": "^5.0.5", - "fastify": "^5.4.0", + "fastify": "^5.6.1", "joi": "^18.0.1", "luxon": "^3.7.2", "magic-bytes.js": "^1.12.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5527e8d7b..e71c4c4a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -132,8 +132,8 @@ importers: specifier: ^5.0.5 version: 5.0.5 fastify: - specifier: ^5.4.0 - version: 5.4.0 + specifier: ^5.6.1 + version: 5.6.1 joi: specifier: ^18.0.1 version: 18.0.1 @@ -6706,6 +6706,9 @@ packages: fastify@5.4.0: resolution: {integrity: sha512-I4dVlUe+WNQAhKSyv15w+dwUh2EPiEl4X2lGYMmNSgF83WzTMAPKGdWEv5tPsCQOb+SOZwz8Vlta2vF+OeDgRw==} + fastify@5.6.1: + resolution: {integrity: sha512-WjjlOciBF0K8pDUPZoGPhqhKrQJ02I8DKaDIfO51EL0kbSMwQFl85cRwhOvmSDWoukNOdTo27gLN549pLCcH7Q==} + fastq@1.19.1: resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} @@ -17516,6 +17519,24 @@ snapshots: semver: 7.7.2 toad-cache: 3.7.0 + fastify@5.6.1: + dependencies: + '@fastify/ajv-compiler': 4.0.2 + '@fastify/error': 4.1.0 + '@fastify/fast-json-stringify-compiler': 5.0.2 + '@fastify/proxy-addr': 5.0.0 + abstract-logging: 2.0.1 + avvio: 9.1.0 + fast-json-stringify: 6.0.1 + find-my-way: 9.3.0 + light-my-request: 6.6.0 + pino: 9.11.0 + process-warning: 5.0.0 + rfdc: 1.4.1 + secure-json-parse: 4.0.0 + semver: 7.7.2 + toad-cache: 3.7.0 + fastq@1.19.1: dependencies: reusify: 1.1.0 From b0a1c8b712b1c033ff04aa889b37d5131b3e9703 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 06:54:02 +0000 Subject: [PATCH 2/4] fix(deps): update dependency fastify to ^5.6.1 --- apps/api/package.json | 2 +- pnpm-lock.yaml | 25 +++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/apps/api/package.json b/apps/api/package.json index ebf26d82f..3be47e3c5 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -57,7 +57,7 @@ "dotenv": "^17.2.2", "exceljs": "^4.4.0", "fast-csv": "^5.0.5", - "fastify": "^5.4.0", + "fastify": "^5.6.1", "joi": "^18.0.1", "luxon": "^3.7.2", "magic-bytes.js": "^1.12.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 247ba0f0b..6486b6dcc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -132,8 +132,8 @@ importers: specifier: ^5.0.5 version: 5.0.5 fastify: - specifier: ^5.4.0 - version: 5.4.0 + specifier: ^5.6.1 + version: 5.6.1 joi: specifier: ^18.0.1 version: 18.0.1 @@ -6672,6 +6672,9 @@ packages: fastify@5.4.0: resolution: {integrity: sha512-I4dVlUe+WNQAhKSyv15w+dwUh2EPiEl4X2lGYMmNSgF83WzTMAPKGdWEv5tPsCQOb+SOZwz8Vlta2vF+OeDgRw==} + fastify@5.6.1: + resolution: {integrity: sha512-WjjlOciBF0K8pDUPZoGPhqhKrQJ02I8DKaDIfO51EL0kbSMwQFl85cRwhOvmSDWoukNOdTo27gLN549pLCcH7Q==} + fastq@1.19.1: resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} @@ -17474,6 +17477,24 @@ snapshots: semver: 7.7.2 toad-cache: 3.7.0 + fastify@5.6.1: + dependencies: + '@fastify/ajv-compiler': 4.0.2 + '@fastify/error': 4.1.0 + '@fastify/fast-json-stringify-compiler': 5.0.2 + '@fastify/proxy-addr': 5.0.0 + abstract-logging: 2.0.1 + avvio: 9.1.0 + fast-json-stringify: 6.0.1 + find-my-way: 9.3.0 + light-my-request: 6.6.0 + pino: 9.11.0 + process-warning: 5.0.0 + rfdc: 1.4.1 + secure-json-parse: 4.0.0 + semver: 7.7.2 + toad-cache: 3.7.0 + fastq@1.19.1: dependencies: reusify: 1.1.0 From b74bf5aaae3c8c25ee618c7e6950da497250a5eb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 01:03:48 +0000 Subject: [PATCH 3/4] fix(deps): update dependency fastify to ^5.6.1 --- apps/api/package.json | 2 +- pnpm-lock.yaml | 25 +++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/apps/api/package.json b/apps/api/package.json index db4573847..3c34ffd09 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -57,7 +57,7 @@ "dotenv": "^17.2.2", "exceljs": "^4.4.0", "fast-csv": "^5.0.5", - "fastify": "^5.4.0", + "fastify": "^5.6.1", "joi": "^18.0.1", "luxon": "^3.7.2", "magic-bytes.js": "^1.12.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 877cacc59..07595efd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -132,8 +132,8 @@ importers: specifier: ^5.0.5 version: 5.0.5 fastify: - specifier: ^5.4.0 - version: 5.4.0 + specifier: ^5.6.1 + version: 5.6.1 joi: specifier: ^18.0.1 version: 18.0.1 @@ -6672,6 +6672,9 @@ packages: fastify@5.4.0: resolution: {integrity: sha512-I4dVlUe+WNQAhKSyv15w+dwUh2EPiEl4X2lGYMmNSgF83WzTMAPKGdWEv5tPsCQOb+SOZwz8Vlta2vF+OeDgRw==} + fastify@5.6.1: + resolution: {integrity: sha512-WjjlOciBF0K8pDUPZoGPhqhKrQJ02I8DKaDIfO51EL0kbSMwQFl85cRwhOvmSDWoukNOdTo27gLN549pLCcH7Q==} + fastq@1.19.1: resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} @@ -17474,6 +17477,24 @@ snapshots: semver: 7.7.2 toad-cache: 3.7.0 + fastify@5.6.1: + dependencies: + '@fastify/ajv-compiler': 4.0.2 + '@fastify/error': 4.1.0 + '@fastify/fast-json-stringify-compiler': 5.0.2 + '@fastify/proxy-addr': 5.0.0 + abstract-logging: 2.0.1 + avvio: 9.1.0 + fast-json-stringify: 6.0.1 + find-my-way: 9.3.0 + light-my-request: 6.6.0 + pino: 9.11.0 + process-warning: 5.0.0 + rfdc: 1.4.1 + secure-json-parse: 4.0.0 + semver: 7.7.2 + toad-cache: 3.7.0 + fastq@1.19.1: dependencies: reusify: 1.1.0 From c624628c760f15f66290f2c235f0ff736ae6cd5f Mon Sep 17 00:00:00 2001 From: "jeehoon.choi" Date: Thu, 25 Sep 2025 11:59:13 +0900 Subject: [PATCH 4/4] fix typecheck error --- apps/api/src/main.ts | 83 ++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 84b3bbfe0..cb0e41a87 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -21,7 +21,6 @@ import type { NestFastifyApplication } from '@nestjs/platform-fastify'; import { FastifyAdapter } from '@nestjs/platform-fastify'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import type { Request } from 'express'; -import fastify from 'fastify'; import { Logger } from 'nestjs-pino'; import pinoHttp from 'pino-http'; import { initializeTransactionalContext } from 'typeorm-transactional'; @@ -37,7 +36,14 @@ const globalPrefix = 'api'; async function bootstrap() { initializeTransactionalContext(); - const server = fastify(); + + const app = await NestFactory.create( + AppModule, + new FastifyAdapter(), + { bufferLogs: true }, + ); + + await app.register(multiPart); const pino = pinoHttp({ transport: { target: 'pino-pretty', options: { singleLine: true } }, @@ -66,48 +72,43 @@ async function bootstrap() { }, }); - server.addHook('onSend', (request, reply, payload, done) => { - if (request.body) { - interface RequestBody { - password?: string; - [key: string]: any; - } - - const sanitizedBody: RequestBody = { ...request.body }; - if (sanitizedBody.password) { - sanitizedBody.password = '****'; - } - - const sanitizedHeaders = { ...request.headers }; - if (sanitizedHeaders.authorization) { - sanitizedHeaders.authorization = '****'; - } + app + .getHttpAdapter() + .getInstance() + .addHook('onSend', (request, reply, payload, done) => { + if (request.body) { + interface RequestBody { + password?: string; + [key: string]: any; + } - pino.logger.info({ - req: { - id: request.id, - method: request.method, - url: request.url, - headers: sanitizedHeaders, - body: sanitizedBody, - params: request.params, - query: request.query, - }, - res: { - statusCode: reply.statusCode, - }, - }); - } - done(); - }); + const sanitizedBody: RequestBody = { ...request.body }; + if (sanitizedBody.password) { + sanitizedBody.password = '****'; + } - const app = await NestFactory.create( - AppModule, - new FastifyAdapter(server), - { bufferLogs: true }, - ); + const sanitizedHeaders = { ...request.headers }; + if (sanitizedHeaders.authorization) { + sanitizedHeaders.authorization = '****'; + } - await app.register(multiPart); + pino.logger.info({ + req: { + id: request.id, + method: request.method, + url: request.url, + headers: sanitizedHeaders, + body: sanitizedBody, + params: request.params, + query: request.query, + }, + res: { + statusCode: reply.statusCode, + }, + }); + } + done(); + }); app.enableCors({ origin: '*',