Skip to content

Commit 195c506

Browse files
authored
Merge branch 'master' into feat/baseline-branch-name
2 parents 144ad70 + bab7d58 commit 195c506

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/static/hdd/hdd.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import { Logger } from '@nestjs/common';
22
import path from 'path';
33
import { writeFileSync, readFileSync, unlink, mkdirSync, existsSync } from 'fs';
44
import { PNG, PNGWithMetadata } from 'pngjs';
5+
import uuidAPIKey from 'uuid-apikey';
56
import { Static } from '../static.interface';
67
import { HDD_IMAGE_PATH } from './constants';
78

89
export class HddService implements Static {
910
private readonly logger: Logger = new Logger(HddService.name);
1011

1112
generateNewImage(type: 'screenshot' | 'diff' | 'baseline'): { imageName: string; imagePath: string } {
12-
const imageName = `${Date.now()}.${type}.png`;
13+
const imageName = `${uuidAPIKey.create({ noDashes: true }).apiKey}.${type}.png`;
1314
return {
1415
imageName,
1516
imagePath: this.getImagePath(imageName),

0 commit comments

Comments
 (0)