Skip to content

Commit

Permalink
Merge pull request #505 from andrechristikan/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
andrechristikan authored Feb 6, 2024
2 parents 3dd7a99 + 499564c commit d006a7c
Show file tree
Hide file tree
Showing 31 changed files with 844 additions and 1,165 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ AWS_SES_CREDENTIAL_KEY=
AWS_SES_CREDENTIAL_SECRET=
AWS_SES_REGION=ap-southeast-3


SSO_GOOGLE_CLIENT_ID=
SSO_GOOGLE_CLIENT_SECRET=

Expand Down
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ack-nestjs-boilerplate",
"version": "5.6.5",
"version": "5.6.6",
"description": "Ack NestJs Boilerplate",
"repository": {
"type": "git",
Expand Down Expand Up @@ -47,10 +47,10 @@
"rollback": "yarn rollback:email && yarn rollback:apikey && yarn rollback:user && yarn rollback:role"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.498.0",
"@aws-sdk/client-ses": "^3.498.0",
"@aws-sdk/client-s3": "^3.507.0",
"@aws-sdk/client-ses": "^3.507.0",
"@casl/ability": "^6.5.0",
"@faker-js/faker": "^8.3.1",
"@faker-js/faker": "^8.4.0",
"@joi/date": "^2.1.0",
"@nestjs/axios": "^3.0.1",
"@nestjs/common": "^10.3.1",
Expand All @@ -62,23 +62,23 @@
"@nestjs/platform-express": "^10.3.1",
"@nestjs/schedule": "^4.0.0",
"@nestjs/swagger": "^7.2.0",
"@nestjs/terminus": "^10.2.0",
"@nestjs/terminus": "^10.2.1",
"@nestjs/throttler": "^5.1.1",
"@ntegral/nestjs-sentry": "^4.0.1",
"@sentry/node": "^7.95.0",
"@sentry/node": "^7.99.0",
"@types/response-time": "^2.3.8",
"axios": "^1.6.5",
"axios": "^1.6.7",
"bcryptjs": "^2.4.3",
"case": "^1.6.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"crypto-js": "^4.2.0",
"google-auth-library": "^9.4.2",
"google-auth-library": "^9.6.2",
"helmet": "^7.1.0",
"joi": "^17.12.0",
"joi": "^17.12.1",
"moment": "^2.30.1",
"moment-timezone": "^0.5.44",
"mongoose": "^8.1.0",
"moment-timezone": "^0.5.45",
"mongoose": "^8.1.1",
"nest-winston": "^1.9.4",
"nestjs-command": "^3.1.4",
"nestjs-i18n": "^10.4.0",
Expand All @@ -97,7 +97,7 @@
"yarn": "^1.22.21"
},
"devDependencies": {
"@nestjs/cli": "^10.3.0",
"@nestjs/cli": "^10.3.1",
"@nestjs/schematics": "^10.1.0",
"@nestjs/testing": "^10.3.1",
"@types/bcryptjs": "^2.4.6",
Expand All @@ -106,24 +106,24 @@
"@types/cron": "^2.0.1",
"@types/crypto-js": "^4.2.2",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.11",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.14.202",
"@types/ms": "^0.7.34",
"@types/multer": "^1.4.11",
"@types/node": "^20.11.6",
"@types/passport-jwt": "^4.0.0",
"@types/node": "^20.11.16",
"@types/passport-jwt": "^4.0.1",
"@types/supertest": "^6.0.2",
"@types/ua-parser-js": "^0.7.39",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"cspell": "^8.3.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"husky": "^8.0.3",
"husky": "^9.0.10",
"jest": "^29.7.0",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"supertest": "^6.3.4",
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
Expand Down
138 changes: 0 additions & 138 deletions src/common/api-key/docs/api-key.user.doc.ts

This file was deleted.

6 changes: 6 additions & 0 deletions src/common/aws/interfaces/aws.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ export interface IAwsS3RandomFilename {
path: string;
customFilename: string;
}

export interface IAwsS3PutItem {
buffer: string | Uint8Array | Buffer;
originalname: string;
size: number;
}
10 changes: 6 additions & 4 deletions src/common/aws/interfaces/aws.s3-service.interface.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { HeadBucketCommandOutput, UploadPartRequest } from '@aws-sdk/client-s3';
import { IAwsS3PutItemOptions } from 'src/common/aws/interfaces/aws.interface';
import {
IAwsS3PutItem,
IAwsS3PutItemOptions,
} from 'src/common/aws/interfaces/aws.interface';
import {
AwsS3MultipartPartsSerialization,
AwsS3MultipartSerialization,
} from 'src/common/aws/serializations/aws.s3-multipart.serialization';
import { AwsS3Serialization } from 'src/common/aws/serializations/aws.s3.serialization';
import { IFile } from 'src/common/file/interfaces/file.interface';
import { Readable } from 'stream';

export interface IAwsS3Service {
Expand All @@ -16,14 +18,14 @@ export interface IAwsS3Service {
pathWithFilename: string
): Promise<Readable | ReadableStream<any> | Blob>;
putItemInBucket(
file: IFile,
file: IAwsS3PutItem,
options?: IAwsS3PutItemOptions
): Promise<AwsS3Serialization>;
deleteItemInBucket(pathWithFilename: string): Promise<void>;
deleteItemsInBucket(pathWithFilename: string[]): Promise<void>;
deleteFolder(dir: string): Promise<void>;
createMultiPart(
file: IFile,
file: IAwsS3PutItem,
maxPartNumber: number,
options?: IAwsS3PutItemOptions
): Promise<AwsS3MultipartSerialization>;
Expand Down
6 changes: 3 additions & 3 deletions src/common/aws/services/aws.s3.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import {
IAwsS3PutItem,
IAwsS3PutItemOptions,
IAwsS3RandomFilename,
} from 'src/common/aws/interfaces/aws.interface';
Expand Down Expand Up @@ -55,7 +56,6 @@ import {
ObjectCannedACL,
CompletedPart,
} from '@aws-sdk/client-s3';
import { IFile } from 'src/common/file/interfaces/file.interface';
import { HelperStringService } from 'src/common/helper/services/helper.string.service';

@Injectable()
Expand Down Expand Up @@ -179,7 +179,7 @@ export class AwsS3Service implements IAwsS3Service {
}

async putItemInBucket(
file: IFile,
file: IAwsS3PutItem,
options?: IAwsS3PutItemOptions
): Promise<AwsS3Serialization> {
let path: string = options?.path;
Expand Down Expand Up @@ -309,7 +309,7 @@ export class AwsS3Service implements IAwsS3Service {
}

async createMultiPart(
file: IFile,
file: IAwsS3PutItem,
maxPartNumber: number,
options?: IAwsS3PutItemOptions
): Promise<AwsS3MultipartSerialization> {
Expand Down
6 changes: 4 additions & 2 deletions src/common/common.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ import { PolicyModule } from 'src/common/policy/policy.module';
.max(50)
.optional(),

AWS_CREDENTIAL_KEY: Joi.string().allow(null, '').optional(),
AWS_CREDENTIAL_SECRET: Joi.string().allow(null, '').optional(),
AWS_S3_CREDENTIAL_KEY: Joi.string().allow(null, '').optional(),
AWS_S3_CREDENTIAL_SECRET: Joi.string()
.allow(null, '')
.optional(),
AWS_S3_REGION: Joi.string().allow(null, '').optional(),
AWS_S3_BUCKET: Joi.string().allow(null, '').optional(),
AWS_SES_CREDENTIAL_KEY: Joi.string().allow(null, '').optional(),
Expand Down
10 changes: 0 additions & 10 deletions src/common/dashboard/interfaces/dashboard.interface.ts

This file was deleted.

This file was deleted.

40 changes: 0 additions & 40 deletions src/common/dashboard/serializations/dashboard.serialization.ts

This file was deleted.

Loading

0 comments on commit d006a7c

Please sign in to comment.