bump version to 4.2.0

This commit is contained in:
Amruth Pillai
2024-09-02 12:31:56 +02:00
parent df63f4b8a7
commit e3f3b8b464
59 changed files with 7549 additions and 6398 deletions

View File

@ -24,14 +24,16 @@ export class ContributorsService {
);
const data = response.data as GitHubResponse;
return data.map((user) => {
return {
id: user.id,
name: user.login,
url: user.html_url,
avatar: user.avatar_url,
} satisfies ContributorDto;
});
return data
.filter((_, index) => index <= 20)
.map((user) => {
return {
id: user.id,
name: user.login,
url: user.html_url,
avatar: user.avatar_url,
} satisfies ContributorDto;
});
}
async fetchCrowdinContributors() {
@ -45,14 +47,16 @@ export class ContributorsService {
);
const { data } = response.data as CrowdinContributorsResponse;
return data.map(({ data }) => {
return {
id: data.id,
name: data.username,
url: `https://crowdin.com/profile/${data.username}`,
avatar: data.avatarUrl,
} satisfies ContributorDto;
});
return data
.filter((_, index) => index <= 20)
.map(({ data }) => {
return {
id: data.id,
name: data.username,
url: `https://crowdin.com/profile/${data.username}`,
avatar: data.avatarUrl,
} satisfies ContributorDto;
});
} catch {
return [];
}

View File

@ -35,7 +35,7 @@ export class PrinterService {
try {
return await connect({
browserWSEndpoint: this.browserURL,
ignoreHTTPSErrors: this.ignoreHTTPSErrors,
acceptInsecureCerts: this.ignoreHTTPSErrors,
});
} catch (error) {
throw new InternalServerErrorException(
@ -145,7 +145,9 @@ export class PrinterService {
return temporaryHtml_;
}, pageElement);
pagesBuffer.push(await page.pdf({ width, height, printBackground: true }));
const uint8array = await page.pdf({ width, height, printBackground: true });
const buffer = Buffer.from(uint8array);
pagesBuffer.push(buffer);
await page.evaluate((temporaryHtml_: string) => {
document.body.innerHTML = temporaryHtml_;
@ -245,7 +247,8 @@ export class PrinterService {
// Save the JPEG to storage and return the URL
// Store the URL in cache for future requests, under the previously generated hash digest
const buffer = await page.screenshot({ quality: 80, type: "jpeg" });
const uint8array = await page.screenshot({ quality: 80, type: "jpeg" });
const buffer = Buffer.from(uint8array);
// Generate a hash digest of the resume data, this hash will be used to check if the resume has been updated
const previewUrl = await this.storageService.uploadObject(