mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 00:03:27 +10:00
bump version to 4.2.0
This commit is contained in:
@ -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 [];
|
||||
}
|
||||
|
||||
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user