Skip to content

Commit da40e3d

Browse files
update
2 parents 35c4b45 + 02b0b92 commit da40e3d

File tree

7 files changed

+1304
-1273
lines changed

7 files changed

+1304
-1273
lines changed

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ack-nestjs-boilerplate-kafka",
3-
"version": "3.5.2",
3+
"version": "3.5.3",
44
"description": "Ack NestJs Boilerplate Kafka",
55
"repository": {
66
"type": "git",
@@ -48,18 +48,18 @@
4848
"rollback": "yarn rollback:setting && yarn rollback:apikey"
4949
},
5050
"dependencies": {
51-
"@aws-sdk/client-s3": "^3.282.0",
51+
"@aws-sdk/client-s3": "^3.292.0",
5252
"@faker-js/faker": "^7.6.0",
5353
"@joi/date": "^2.1.0",
5454
"@nestjs/axios": "^2.0.0",
55-
"@nestjs/common": "^9.3.9",
55+
"@nestjs/common": "^9.3.10",
5656
"@nestjs/config": "^2.3.1",
57-
"@nestjs/core": "^9.3.9",
57+
"@nestjs/core": "^9.3.10",
5858
"@nestjs/jwt": "^10.0.2",
5959
"@nestjs/mongoose": "^9.2.1",
60-
"@nestjs/microservices": "^9.3.9",
60+
"@nestjs/microservices": "^9.3.10",
6161
"@nestjs/passport": "^9.0.3",
62-
"@nestjs/platform-express": "^9.3.9",
62+
"@nestjs/platform-express": "^9.3.10",
6363
"@nestjs/schedule": "^2.2.0",
6464
"@nestjs/swagger": "^6.2.1",
6565
"@nestjs/terminus": "^9.2.1",
@@ -71,23 +71,23 @@
7171
"crypto-js": "^4.1.1",
7272
"geolib": "^3.3.3",
7373
"helmet": "^6.0.1",
74-
"joi": "^17.8.3",
74+
"joi": "^17.8.4",
7575
"kafkajs": "^2.2.4",
7676
"moment": "^2.29.4",
77-
"mongoose": "^7.0.0",
77+
"mongoose": "^7.0.2",
7878
"morgan": "^1.10.0",
79-
"nest-winston": "^1.9.0",
79+
"nest-winston": "^1.9.1",
8080
"nestjs-command": "^3.1.3",
8181
"nestjs-i18n": "^10.2.6",
8282
"passport": "^0.6.0",
8383
"passport-headerapikey": "^1.2.2",
8484
"passport-jwt": "^4.0.1",
8585
"reflect-metadata": "^0.1.13",
8686
"response-time": "^2.3.2",
87-
"rimraf": "^4.2.0",
87+
"rimraf": "^4.4.0",
8888
"rotating-file-stream": "^3.1.0",
8989
"rxjs": "^7.8.0",
90-
"ua-parser-js": "^1.0.33",
90+
"ua-parser-js": "^1.0.34",
9191
"winston": "^3.8.2",
9292
"winston-daily-rotate-file": "^4.7.1",
9393
"xlsx": "^0.18.5",
@@ -97,31 +97,31 @@
9797
"devDependencies": {
9898
"@nestjs/cli": "^9.2.0",
9999
"@nestjs/schematics": "^9.0.4",
100-
"@nestjs/testing": "^9.3.9",
100+
"@nestjs/testing": "^9.3.10",
101101
"@types/bcryptjs": "^2.4.2",
102102
"@types/bytes": "^3.1.1",
103103
"@types/cors": "^2.8.13",
104104
"@types/cron": "^2.0.0",
105105
"@types/crypto-js": "^4.1.1",
106106
"@types/express": "^4.17.17",
107-
"@types/jest": "^29.4.0",
107+
"@types/jest": "^29.4.4",
108108
"@types/lodash": "^4.14.191",
109109
"@types/morgan": "^1.9.4",
110110
"@types/ms": "^0.7.31",
111111
"@types/multer": "^1.4.7",
112-
"@types/node": "^18.14.5",
112+
"@types/node": "^18.15.3",
113113
"@types/passport-jwt": "^3.0.8",
114114
"@types/supertest": "^2.0.12",
115115
"@types/ua-parser-js": "^0.7.36",
116116
"@types/uuid": "^9.0.1",
117-
"@typescript-eslint/eslint-plugin": "^5.54.0",
118-
"@typescript-eslint/parser": "^5.54.0",
119-
"cspell": "^6.27.0",
120-
"eslint": "^8.35.0",
121-
"eslint-config-prettier": "^8.6.0",
117+
"@typescript-eslint/eslint-plugin": "^5.55.0",
118+
"@typescript-eslint/parser": "^5.55.0",
119+
"cspell": "^6.30.0",
120+
"eslint": "^8.36.0",
121+
"eslint-config-prettier": "^8.7.0",
122122
"eslint-plugin-import": "^2.27.5",
123123
"husky": "^8.0.3",
124-
"jest": "^29.4.3",
124+
"jest": "^29.5.0",
125125
"prettier": "^2.8.4",
126126
"supertest": "^6.3.3",
127127
"ts-jest": "^29.0.5",

src/common/database/abstracts/mongo/entities/database.mongo.object-id.entity.abstract.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ export abstract class DatabaseMongoObjectIdEntityAbstract
2828

2929
@Prop({
3030
required: false,
31-
index: true,
31+
index: 'asc',
3232
type: Date,
3333
})
3434
[DATABASE_CREATED_AT_FIELD_NAME]?: Date;
3535

3636
@Prop({
3737
required: false,
38-
index: true,
38+
index: 'desc',
3939
type: Date,
4040
})
4141
[DATABASE_UPDATED_AT_FIELD_NAME]?: Date;

src/common/database/abstracts/mongo/entities/database.mongo.uuid.entity.abstract.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export abstract class DatabaseMongoUUIDEntityAbstract
2727

2828
@Prop({
2929
required: false,
30-
index: true,
30+
index: 'asc',
3131
type: Date,
3232
})
3333
[DATABASE_CREATED_AT_FIELD_NAME]?: Date;
3434

3535
@Prop({
3636
required: false,
37-
index: true,
37+
index: 'desc',
3838
type: Date,
3939
})
4040
[DATABASE_UPDATED_AT_FIELD_NAME]?: Date;

src/common/database/abstracts/mongo/repositories/database.mongo.object-id.repository.abstract.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
IDatabaseRawOptions,
2626
} from 'src/common/database/interfaces/database.interface';
2727
import { IDatabaseRepository } from 'src/common/database/interfaces/database.repository.interface';
28-
import { ENUM_PAGINATION_SORT_TYPE } from 'src/common/pagination/constants/pagination.enum.constant';
2928
import { IPaginationSort } from 'src/common/pagination/interfaces/pagination.interface';
3029

3130
export abstract class DatabaseMongoObjectIdRepositoryAbstract<T>
@@ -45,10 +44,10 @@ export abstract class DatabaseMongoObjectIdRepositoryAbstract<T>
4544
this._joinOnFind = options;
4645
}
4746

48-
private _convertSort(sort: IPaginationSort): Record<string, number> {
49-
const data: Record<string, number> = {};
47+
private _convertSort(sort: IPaginationSort): Record<string, string> {
48+
const data: Record<string, string> = {};
5049
Object.keys(sort).forEach((val) => {
51-
data[val] = sort[val] === ENUM_PAGINATION_SORT_TYPE.ASC ? 1 : -1;
50+
data[val] = sort[val].toLowerCase();
5251
});
5352

5453
return data;

src/common/database/abstracts/mongo/repositories/database.mongo.uuid.repository.abstract.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
IDatabaseRawOptions,
2525
} from 'src/common/database/interfaces/database.interface';
2626
import { IDatabaseRepository } from 'src/common/database/interfaces/database.repository.interface';
27-
import { ENUM_PAGINATION_SORT_TYPE } from 'src/common/pagination/constants/pagination.enum.constant';
2827
import { IPaginationSort } from 'src/common/pagination/interfaces/pagination.interface';
2928

3029
export abstract class DatabaseMongoUUIDRepositoryAbstract<T>
@@ -44,10 +43,10 @@ export abstract class DatabaseMongoUUIDRepositoryAbstract<T>
4443
this._joinOnFind = options;
4544
}
4645

47-
private _convertSort(sort: IPaginationSort): Record<string, number> {
48-
const data: Record<string, number> = {};
46+
private _convertSort(sort: IPaginationSort): Record<string, string> {
47+
const data: Record<string, string> = {};
4948
Object.keys(sort).forEach((val) => {
50-
data[val] = sort[val] === ENUM_PAGINATION_SORT_TYPE.ASC ? 1 : -1;
49+
data[val] = sort[val].toLowerCase();
5150
});
5251

5352
return data;

src/common/database/interfaces/database.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IPaginationOptions } from 'src/common/pagination/interfaces/pagination.
44
// find one
55
export interface IDatabaseFindOneOptions<T = any>
66
extends Pick<IPaginationOptions, 'sort'> {
7-
select?: Record<string, number | string>;
7+
select?: Record<string, boolean | number>;
88
join?: boolean | PopulateOptions | PopulateOptions[];
99
session?: T;
1010
withDeleted?: boolean;

0 commit comments

Comments
 (0)