* chore(release): v5.1.0

* feat: implement resume thumbnails

* fix: remove unused mcp tools

* docs: fix formatting of docs
This commit is contained in:
Amruth Pillai
2026-05-07 15:12:33 +02:00
committed by GitHub
parent 51c366310e
commit 50ba37a27f
1015 changed files with 106087 additions and 141872 deletions
@@ -0,0 +1,26 @@
type PageSize = {
height: number;
width: number;
};
export const RESUME_THUMBNAIL_TARGET_WIDTH = 420;
const MAX_THUMBNAIL_PIXEL_RATIO = 2;
export const getResumeThumbnailCacheKey = (resumeId: string, updatedAt: Date) => {
return `${resumeId}:${updatedAt.getTime()}`;
};
export const getResumeThumbnailRenderSize = (
pageSize: PageSize,
targetWidth = RESUME_THUMBNAIL_TARGET_WIDTH,
pixelRatio = 1,
) => {
const outputScale = Math.min(Math.max(pixelRatio, 1), MAX_THUMBNAIL_PIXEL_RATIO);
const pageScale = targetWidth / pageSize.width;
return {
height: Math.round(pageSize.height * pageScale * outputScale),
scale: pageScale * outputScale,
width: Math.round(targetWidth * outputScale),
};
};