Skip to content

Commit 143a4e4

Browse files
authored
chore: bump NestJS and Express deps
* chore: bump NestJS and Express deps Bump @nestjs packages to 11.1.24 (and related @nestjs/* libs like swagger/platform-*) and upgrade express to 5.2.1 across multiple services. * chore: Refine Fastify options and body parsing Adjust Fastify/Nest adapter configuration and body parsing behavior: - Add MAX_PARAM_LENGTH constant (4096) and move ignoreTrailingSlash/maxParamLength into Fastify routerOptions instead of top-level adapter options. - Keep large BODY_LIMIT for payloads but set maxParamLength to a reasonable limit to avoid extremely long route params. - Pass rawBody: true in NestFactory.create options and remove bodyParser:false usage. - Register MeecoAuth listeners without awaiting to avoid blocking startup. --------- Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
1 parent 6d4a870 commit 143a4e4

24 files changed

Lines changed: 579 additions & 507 deletions

File tree

ai-service/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"@langchain/textsplitters": "1.0.1",
1414
"@mikro-orm/core": "6.4.16",
1515
"@mikro-orm/mongodb": "6.4.16",
16-
"@nestjs/common": "^11.0.11",
17-
"@nestjs/core": "^11.0.11",
16+
"@nestjs/common": "^11.1.24",
17+
"@nestjs/core": "^11.1.24",
1818
"@types/express": "^5.0.1",
1919
"@types/node": "^22.15.19",
2020
"dotenv": "^16.3.1",
21-
"express": "^5.1.0",
21+
"express": "5.2.1",
2222
"faiss-node": "0.5.1",
2323
"langchain": "1.4.2",
2424
"module-alias": "2.2.3",

analytics-service/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
"dependencies": {
1616
"@guardian/common": "3.6.0-rc",
1717
"@guardian/interfaces": "3.6.0-rc",
18-
"@nestjs/common": "^11.0.11",
19-
"@nestjs/core": "^11.0.11",
20-
"@nestjs/microservices": "^11.0.11",
21-
"@nestjs/platform-express": "^11.0.11",
22-
"@nestjs/swagger": "^11.0.6",
18+
"@nestjs/common": "^11.1.24",
19+
"@nestjs/core": "^11.1.24",
20+
"@nestjs/microservices": "^11.1.24",
21+
"@nestjs/platform-express": "^11.1.24",
22+
"@nestjs/swagger": "^11.4.4",
2323
"@types/express-fileupload": "^1.4.1",
2424
"class-transformer": "^0.5.1",
2525
"class-validator": "0.14.3",
2626
"cron": "^4.3.0",
2727
"dotenv": "^16.0.0",
2828
"excel4node": "^1.8.2",
29-
"express": "^5.1.0",
29+
"express": "5.2.1",
3030
"express-fileupload": "^1.4.0",
3131
"hpp": "^0.2.3",
3232
"jszip": "^3.7.1",

api-gateway/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
"@fastify/static": "^8.1.1",
77
"@guardian/common": "3.6.0-rc",
88
"@guardian/interfaces": "3.6.0-rc",
9-
"@nestjs/common": "^11.0.11",
10-
"@nestjs/core": "^11.0.11",
11-
"@nestjs/microservices": "^11.0.11",
12-
"@nestjs/platform-express": "^11.0.11",
13-
"@nestjs/platform-fastify": "^11.0.11",
14-
"@nestjs/swagger": "^11.0.6",
9+
"@nestjs/common": "^11.1.24",
10+
"@nestjs/core": "^11.1.24",
11+
"@nestjs/microservices": "^11.1.24",
12+
"@nestjs/platform-express": "^11.1.24",
13+
"@nestjs/platform-fastify": "^11.1.24",
14+
"@nestjs/swagger": "^11.4.4",
1515
"async-mutex": "^0.4.0",
1616
"axios": "^1.16.1",
1717
"class-transformer": "^0.5.1",
1818
"class-validator": "0.14.3",
1919
"dotenv": "^16.0.0",
20-
"express": "^5.1.0",
20+
"express": "5.2.1",
2121
"hpp": "^0.2.3",
2222
"ioredis": "^5.3.2",
2323
"jsonwebtoken": "^8.5.1",

api-gateway/src/app.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,22 @@ import fastifyMultipart from '@fastify/multipart';
2323

2424
const PORT = process.env.PORT || 3002;
2525

26-
const BODY_LIMIT = 1024 * 1024 * 1024
26+
const BODY_LIMIT = 1024 * 1024 * 1024;
27+
const MAX_PARAM_LENGTH = 4096;
2728

2829
Promise.all([
2930
NestFactory.create<NestFastifyApplication>(AppModule,
3031
new FastifyAdapter({
31-
ignoreTrailingSlash: true,
3232
bodyLimit: BODY_LIMIT,
33-
maxParamLength: BODY_LIMIT
34-
}), {
35-
rawBody: true,
36-
bodyParser: false,
37-
}),
33+
routerOptions: {
34+
ignoreTrailingSlash: true,
35+
maxParamLength: MAX_PARAM_LENGTH,
36+
},
37+
}),
38+
{
39+
rawBody: true
40+
}
41+
),
3842
MessageBrokerChannel.connect('API_GATEWAY'),
3943
]).then(async ([app, cn]) => {
4044
try {
@@ -63,7 +67,6 @@ Promise.all([
6367

6468
const logger: PinoLogger = app.get(PinoLogger);
6569

66-
app.useBodyParser('json', { bodyLimit: BODY_LIMIT });
6770
app.useBodyParser('binary/octet-stream', { bodyLimit: BODY_LIMIT });
6871

6972
await app.register(fastifyFormbody, {
@@ -82,7 +85,7 @@ Promise.all([
8285
await new ProjectService().setConnection(cn).init();
8386

8487
await new MeecoAuth().setConnection(cn).init();
85-
await new MeecoAuth().registerListeners();
88+
new MeecoAuth().registerListeners();
8689

8790
const server = app.getHttpServer();
8891
const wsService = new WebSocketsService(logger);
@@ -101,8 +104,6 @@ Promise.all([
101104
}
102105
}) as any
103106
});
104-
// Object.assign(document.paths, SwaggerPaths)
105-
// Object.assign(document.components.schemas, SwaggerModels.schemas);
106107
SwaggerModule.setup('api-docs', app, document);
107108

108109
const maxPayload = parseInt(process.env.MQ_MAX_PAYLOAD, 10);

application-events/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@types/morgan": "1.9.10",
3131
"axios": "^1.16.1",
3232
"dotenv": "^16.0.0",
33-
"express": "^5.1.0",
33+
"express": "5.2.1",
3434
"js-yaml": "^4.1.0",
3535
"morgan": "1.10.1",
3636
"swagger-ui-express": "4.6.3",

auth-service/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
"@meeco/cryppo": "^2.0.2",
1616
"@mikro-orm/core": "6.4.16",
1717
"@mikro-orm/mongodb": "6.4.16",
18-
"@nestjs/common": "^11.0.11",
19-
"@nestjs/core": "^11.0.11",
20-
"@nestjs/microservices": "^11.0.11",
18+
"@nestjs/common": "^11.1.24",
19+
"@nestjs/core": "^11.1.24",
20+
"@nestjs/microservices": "^11.1.24",
2121
"@sendgrid/mail": "^7.7.0",
2222
"axios": "^1.16.1",
2323
"base-x": "^4.0.0",
2424
"base64url": "^3.0.1",
2525
"cron": "^2.4.0",
2626
"dotenv": "^16.0.0",
27-
"express": "^5.1.0",
27+
"express": "5.2.1",
2828
"jsonwebtoken": "^8.5.1",
2929
"moment": "^2.29.4",
3030
"moment-timezone": "^0.5.45",

common/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"@mikro-orm/core": "6.4.16",
1414
"@mikro-orm/migrations-mongodb": "6.4.16",
1515
"@mikro-orm/mongodb": "6.4.16",
16-
"@nestjs/common": "^11.0.11",
17-
"@nestjs/core": "^11.0.11",
18-
"@nestjs/microservices": "^11.0.11",
16+
"@nestjs/common": "^11.1.24",
17+
"@nestjs/core": "^11.1.24",
18+
"@nestjs/microservices": "^11.1.24",
1919
"@noble/curves": "^1.3.0",
2020
"@transmute/credentials-context": "0.7.0-unstable.80",
2121
"@transmute/did-context": "0.7.0-unstable.80",
@@ -30,7 +30,7 @@
3030
"bson": "^6.5.0",
3131
"dotenv": "^16.0.0",
3232
"exceljs": "^4.4.0",
33-
"express": "^5.1.0",
33+
"express": "5.2.1",
3434
"geotiff": "^2.1.4-beta.0",
3535
"js-base64": "^3.6.1",
3636
"jsonld-signatures": "11.5.0",

guardian-service/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
"@hiero-ledger/proto": "2.30.0",
2323
"@mikro-orm/core": "6.4.16",
2424
"@mikro-orm/mongodb": "6.4.16",
25-
"@nestjs/common": "^11.0.11",
26-
"@nestjs/core": "^11.0.11",
27-
"@nestjs/microservices": "^11.0.11",
25+
"@nestjs/common": "^11.1.24",
26+
"@nestjs/core": "^11.1.24",
27+
"@nestjs/microservices": "^11.1.24",
2828
"bson": "^6.5.0",
2929
"cron": "^4.3.0",
3030
"dotenv": "^16.0.0",
3131
"ethers": "^6.7.1",
32-
"express": "^4.22.0",
32+
"express": "5.2.1",
3333
"fs-extra": "^10.0.0",
3434
"imurmurhash": "^0.1.4",
3535
"jszip": "^3.7.1",

indexer-api-gateway/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
"dependencies": {
1717
"@indexer/interfaces": "3.6.0-rc",
1818
"@indexer/common": "3.6.0-rc",
19-
"@nestjs/common": "^11.0.11",
20-
"@nestjs/core": "^11.0.11",
21-
"@nestjs/microservices": "^11.0.11",
19+
"@nestjs/common": "^11.1.24",
20+
"@nestjs/core": "^11.1.24",
21+
"@nestjs/microservices": "^11.1.24",
2222
"@nestjs/jwt": "^11.0.0",
23-
"@nestjs/platform-express": "^11.0.11",
24-
"@nestjs/swagger": "^11.0.6",
23+
"@nestjs/platform-express": "^11.1.24",
24+
"@nestjs/swagger": "^11.4.4",
2525
"@types/express-fileupload": "^1.4.1",
2626
"async-mutex": "^0.4.0",
2727
"axios": "^1.16.1",
2828
"class-transformer": "^0.5.1",
2929
"class-validator": "0.14.3",
3030
"dotenv": "^16.0.0",
31-
"express": "^5.1.0",
31+
"express": "5.2.1",
3232
"express-fileupload": "^1.4.0",
3333
"hpp": "^0.2.3",
3434
"http-errors": "^2.0.0",

indexer-common/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"author": "Envision Blockchain Solutions <info@envisionblockchain.com>",
33
"dependencies": {
4-
"@nestjs/common": "^11.0.11",
5-
"@nestjs/core": "^11.0.11",
6-
"@nestjs/microservices": "^11.0.11",
4+
"@nestjs/common": "^11.1.24",
5+
"@nestjs/core": "^11.1.24",
6+
"@nestjs/microservices": "^11.1.24",
77
"@indexer/interfaces": "3.6.0-rc",
88
"cross-blob": "^2.0.1",
99
"dotenv": "^16.0.0",

0 commit comments

Comments
 (0)