Skip to content

Commit ffd3e6d

Browse files
committed
fix
1 parent 64ebfea commit ffd3e6d

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

src/compare/compare.service.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Test, TestingModule } from '@nestjs/testing';
22
import { PrismaService } from '../prisma/prisma.service';
3-
import { StaticService } from '../static/static.service';
43
import { CompareService } from './compare.service';
54
import { LookSameService } from './libs/looks-same/looks-same.service';
65
import { OdiffService } from './libs/odiff/odiff.service';

src/shared/shared.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { EventsGateway } from '../shared/events/events.gateway';
33
import { PrismaService } from '../prisma/prisma.service';
44
import { TasksService } from './tasks/tasks.service';
55
import { TestVariationsModule } from '../test-variations/test-variations.module';
6-
import { StaticModule } from '../static/static.module';
76

87
@Global()
98
@Module({

src/static/aws/s3.service.ts

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
1-
import { PNGWithMetadata, PNG } from 'pngjs';
1+
import { PNGWithMetadata } from 'pngjs';
22
import { Logger } from '@nestjs/common';
33
import { Static } from '../static.interface';
4-
import { S3Client } from '@aws-sdk/client-s3';
4+
// import { S3Client } from '@aws-sdk/client-s3';
55

66

77
export class AWSS3Service implements Static {
88
private readonly logger: Logger = new Logger(AWSS3Service.name);
9-
private readonly AWS_ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID;
10-
private readonly AWS_SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY;
11-
private readonly AWS_REGION = process.env.AWS_REGION;
12-
private readonly AWS_S3_BUCKET_NAME = process.env.AWS_S3_BUCKET_NAME;
9+
// private readonly AWS_ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID;
10+
// private readonly AWS_SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY;
11+
// private readonly AWS_REGION = process.env.AWS_REGION;
12+
// private readonly AWS_S3_BUCKET_NAME = process.env.AWS_S3_BUCKET_NAME;
1313

14-
private s3Client: S3Client;
14+
// private s3Client: S3Client;
1515

1616
constructor() {
17-
this.s3Client = new S3Client({
18-
credentials: {
19-
accessKeyId: this.AWS_ACCESS_KEY_ID,
20-
secretAccessKey: this.AWS_SECRET_ACCESS_KEY,
21-
},
22-
region: this.AWS_REGION,
23-
});
17+
// this.s3Client = new S3Client({
18+
// credentials: {
19+
// accessKeyId: this.AWS_ACCESS_KEY_ID,
20+
// secretAccessKey: this.AWS_SECRET_ACCESS_KEY,
21+
// },
22+
// region: this.AWS_REGION,
23+
// });
2424
this.logger.log('AWS S3 service is being used for file storage.');
2525
}
26-
27-
async saveImage(type: 'screenshot' | 'diff' | 'baseline', imageBuffer: Buffer): Promise<string> {
28-
// Implement your logic to save the image and return the file URL or path
29-
return 'image-url-or-path';
26+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
27+
saveImage(type: 'screenshot' | 'diff' | 'baseline', imageBuffer: Buffer): Promise<string> {
28+
throw new Error('Method not implemented.');
3029
}
3130

32-
async getImage(fileName: string): Promise<PNGWithMetadata> {
33-
// Implement your logic to retrieve the image from S3 and return it as PNGWithMetadata
34-
return PNG.sync.read(Buffer.from([]));
31+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
32+
getImage(fileName: string): Promise<PNGWithMetadata> {
33+
throw new Error('Method not implemented.');
3534
}
3635

37-
async deleteImage(imageName: string): Promise<boolean> {
38-
// default
39-
return false
36+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
37+
deleteImage(imageName: string): Promise<boolean> {
38+
throw new Error('Method not implemented.');
4039
}
40+
41+
4142
}

0 commit comments

Comments
 (0)