Skip to content

Commit eb17dba

Browse files
authored
chore: merge pull request #58 from lucassm02/fix/type-errors-and-rabbit-options
Chore: release v2.4.0 – add cache request adapter, update dependencies, Node.js version bump & offline logger fix, Type erros
2 parents ac264d7 + f1af67b commit eb17dba

File tree

40 files changed

+3388
-2967
lines changed

40 files changed

+3388
-2967
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"prettier"
2222
],
2323
"rules": {
24+
"@typescript-eslint/no-unsafe-function-type": "off",
2425
"no-inner-declarations": "off",
2526
"no-plusplus": "off",
2627
"@typescript-eslint/no-explicit-any": "warn", // TODO: Remover this in the near future

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- Adds the `CacheRequestAdapter` wrapper of cache functionalities inside request adapter structure and interfaces
12+
- Add the `CacheRequestAdapter` wrapper of cache functionalities inside request adapter structure and interfaces.
13+
14+
### Changed
15+
16+
- Update dependencies.
17+
- Update Node.js version in Dockerfile.
18+
- Add type corrections to the RabbitMQ server.
19+
20+
### Fixed
21+
22+
- Correct logic to enable offline logger.
1323

1424
## [2.3.0] - 2025-05-06
1525

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20.17.0-slim AS builder
1+
FROM node:22.15.0-slim AS builder
22

33
WORKDIR /home/node/app
44

TEMPLATE-CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.4.0] - 2025-05-08
9+
10+
### Added
11+
12+
- Add the `CacheRequestAdapter` wrapper of cache functionalities inside request adapter structure and interfaces.
13+
14+
### Changed
15+
16+
- Update dependencies.
17+
- Update Node.js version in Dockerfile.
18+
- Add type corrections to the RabbitMQ server.
19+
20+
### Fixed
21+
22+
- Correct logic to enable offline logger.
23+
824
## [2.3.0] - 2025-05-06
925

1026
### Added

package.json

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "template-microservice",
3-
"version": "2.3.0",
3+
"version": "2.4.0",
44
"scripts": {
55
"helm:gen": "NODE_NO_WARNINGS=1 node script/helm/index.mjs",
66
"helm:gen:production": "NODE_NO_WARNINGS=1 node script/helm/index.mjs -e production --scan-routes",
@@ -35,94 +35,94 @@
3535
"author": "badass-team",
3636
"license": "ISC",
3737
"devDependencies": {
38-
"@babel/cli": "^7.24.8",
39-
"@babel/core": "^7.25.2",
40-
"@babel/node": "^7.25.0",
38+
"@babel/cli": "^7.27.2",
39+
"@babel/core": "^7.27.1",
40+
"@babel/node": "^7.27.1",
4141
"@babel/plugin-proposal-class-properties": "^7.18.6",
42-
"@babel/plugin-proposal-decorators": "^7.24.7",
42+
"@babel/plugin-proposal-decorators": "^7.27.1",
4343
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
44-
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
45-
"@babel/plugin-transform-typescript": "^7.25.2",
46-
"@babel/preset-env": "^7.25.4",
47-
"@babel/preset-typescript": "^7.24.7",
44+
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
45+
"@babel/plugin-transform-typescript": "^7.27.1",
46+
"@babel/preset-env": "^7.27.2",
47+
"@babel/preset-typescript": "^7.27.1",
4848
"@italog/codegen": "^1.6.0",
49-
"@types/amqplib": "^0.10.5",
50-
"@types/cors": "^2.8.17",
51-
"@types/jest": "^29.5.12",
49+
"@types/amqplib": "^0.10.7",
50+
"@types/cors": "^2.8.18",
51+
"@types/jest": "^29.5.14",
5252
"@types/knex": "^0.16.1",
5353
"@types/memjs": "^1.3.3",
5454
"@types/mongodb": "^4.0.7",
55-
"@types/node": "^20.12.12",
55+
"@types/node": "^22.15.17",
5656
"@types/string-template": "^1.0.6",
57-
"@types/supertest": "^6.0.2",
58-
"@types/uuid": "^9.0.8",
57+
"@types/supertest": "^6.0.3",
58+
"@types/uuid": "^10.0.0",
5959
"@types/yup": "^0.29.14",
60-
"@typescript-eslint/eslint-plugin": "^7.9.0",
61-
"@typescript-eslint/parser": "^7.9.0",
62-
"@typescript-eslint/typescript-estree": "^8.13.0",
60+
"@typescript-eslint/eslint-plugin": "^8.32.0",
61+
"@typescript-eslint/parser": "^8.32.0",
62+
"@typescript-eslint/typescript-estree": "^8.32.0",
6363
"babel-plugin-module-resolver": "^5.0.2",
64-
"dotenv-cli": "^7.4.2",
64+
"dotenv-cli": "^8.0.0",
6565
"eslint": "^8.57.0",
6666
"eslint-config-airbnb-base": "^15.0.0",
6767
"eslint-config-prettier": "^9.1.0",
6868
"eslint-import-resolver-typescript": "^3.6.1",
69-
"eslint-plugin-import": "^2.29.1",
69+
"eslint-plugin-import": "^2.31.0",
7070
"eslint-plugin-import-helpers": "^1.3.1",
71-
"eslint-plugin-prettier": "^5.2.1",
71+
"eslint-plugin-prettier": "^5.4.0",
7272
"git-commit-msg-linter": "^5.0.8",
73-
"husky": "^9.1.5",
73+
"husky": "^9.1.7",
7474
"jest": "^29.7.0",
75-
"lint-staged": "^15.2.9",
76-
"mongodb-memory-server": "^10.0.0",
77-
"prettier": "^3.3.3",
75+
"lint-staged": "^15.5.2",
76+
"mongodb-memory-server": "^10.1.4",
77+
"prettier": "^3.5.3",
7878
"rimraf": "^6.0.1",
79-
"supertest": "^7.0.0",
80-
"ts-jest": "^29.2.5",
79+
"supertest": "^7.1.0",
80+
"ts-jest": "^29.3.2",
8181
"ts-node-dev": "^2.0.0",
8282
"tsconfig-paths": "^4.2.0",
83-
"tsx": "^4.19.2",
84-
"typescript": "5.5.4",
85-
"yaml": "^2.5.0"
83+
"tsx": "^4.19.4",
84+
"typescript": "5.8.3",
85+
"yaml": "^2.7.1"
8686
},
8787
"dependencies": {
8888
"@badass-team-code/formatted-cases-words": "^1.0.0",
8989
"@elastic/ecs-winston-format": "^1.5.3",
90-
"@elastic/elasticsearch": "^8.15.0",
91-
"@fastify/cors": "^9.0.1",
92-
"@fastify/helmet": "^11.1.1",
93-
"@fastify/static": "^7.0.4",
90+
"@elastic/elasticsearch": "^9.0.1",
91+
"@fastify/cors": "^11.0.1",
92+
"@fastify/helmet": "^13.0.1",
93+
"@fastify/static": "^8.1.1",
9494
"@hokify/agenda": "^6.3.0",
9595
"agenda": "^5.0.0",
9696
"agendash": "^4.0.0",
97-
"agentkeepalive": "^4.5.0",
98-
"amqplib": "^0.10.4",
99-
"axios": "^1.7.5",
97+
"agentkeepalive": "^4.6.0",
98+
"amqplib": "^0.10.8",
99+
"axios": "^1.9.0",
100100
"cors": "^2.8.5",
101101
"cpf-cnpj-validator": "^1.0.3",
102-
"date-fns": "^3.6.0",
103-
"dotenv": "^16.4.5",
104-
"elastic-apm-node": "^4.7.3",
105-
"fastify": "^4.28.1",
106-
"fastify-plugin": "^4.5.1",
107-
"form-data": "^4.0.0",
108-
"helmet": "^7.1.0",
102+
"date-fns": "^4.1.0",
103+
"dotenv": "^16.5.0",
104+
"elastic-apm-node": "^4.13.0",
105+
"fastify": "^5.3.2",
106+
"fastify-plugin": "^5.0.1",
107+
"form-data": "^4.0.2",
108+
"helmet": "^8.1.0",
109109
"knex": "^3.1.0",
110110
"memjs": "^1.3.2",
111-
"mongodb": "^6.8.0",
112-
"mongoose": "^8.5.4",
111+
"mongodb": "^6.16.0",
112+
"mongoose": "^8.14.1",
113113
"node-cache": "^5.1.2",
114114
"reflect-metadata": "^0.2.2",
115-
"socket.io": "^4.8.0",
115+
"socket.io": "^4.8.1",
116116
"sqlite3": "^5.1.7",
117117
"string-template": "^1.0.0",
118118
"tedious": "19.0.0",
119-
"uuid": "^9.0.1",
120-
"winston": "^3.14.2",
119+
"uuid": "^11.1.0",
120+
"winston": "^3.17.0",
121121
"winston-daily-rotate-file": "^5.0.0",
122122
"winston-elasticsearch": "^0.19.0",
123-
"winston-transport": "^4.7.1",
123+
"winston-transport": "^4.9.0",
124124
"yargs": "13.2",
125-
"yup": "^1.4.0"
125+
"yup": "^1.6.1"
126126
},
127127
"resolutions": {
128128
"wrap-ansi": "7.0.0",

src/data/protocols/http/adapters/web-service-rest-adapter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export type Data = {
1616
};
1717

1818
export interface HttpClient<
19-
B extends Object = GenericObject,
20-
H extends Object = GenericObject
19+
B extends object = GenericObject,
20+
H extends object = GenericObject
2121
> {
2222
request: (data: Data) => Promise<HttpResponse<B, H>>;
2323
}
@@ -34,8 +34,8 @@ export enum HttpStatusCode {
3434
}
3535

3636
export type HttpResponse<
37-
B extends Object = GenericObject,
38-
H extends Object = GenericObject
37+
B extends object = GenericObject,
38+
H extends object = GenericObject
3939
> = {
4040
statusCode: HttpStatusCode;
4141
body: B;

src/data/protocols/util/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type LogParams = {
77
| 'verbose'
88
| 'debug'
99
| 'silly'
10-
| String;
10+
| string;
1111
message: string;
1212
payload?: object;
1313
};

src/data/protocols/util/object/filter-keys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ type Options<T> = {
33
deniedKeys?: (keyof T)[];
44
};
55

6-
export type FilterKeys = <T extends Object>(
6+
export type FilterKeys = <T extends object>(
77
object: T,
88
options: Options<T>
99
) => T;

src/infra/cache/cache-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class CacheServer {
134134
try {
135135
const string = response.value.toString();
136136
return JSON.parse(string);
137-
} catch (error) {
137+
} catch (_error) {
138138
throw new Error(this.Error.UNABLE_TO_CONVERT_VALUE_TO_JSON);
139139
}
140140
}

src/infra/db/mongodb/input-and-output-log/input-and-output-log-model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import mongoose from 'mongoose';
22

33
export interface InputAndOutputLogModel extends mongoose.Document {
44
type: string;
5-
payload: Object;
5+
payload: object;
66
created_at: Date;
77
}
88

0 commit comments

Comments
 (0)