fix: exercise production evidence asset lookup

This commit is contained in:
DongHyeonka
2026-08-15 17:55:37 +09:00
parent 034b702e8e
commit 5479101c8c
2 changed files with 32 additions and 21 deletions
@@ -0,0 +1,25 @@
export const evidenceAssets = {
"fetch-strategy-boundary": {
src: "/media/fetch-strategy-boundary.svg",
width: 1080,
height: 420,
triggerLabel: "Fetch Join과 Batch Fetch 비교 다이어그램 크게 보기",
dialogLabel: "Fetch Join과 Batch Fetch의 페이징 경계 확대",
},
} as const;
export type SupportedEvidenceKey = keyof typeof evidenceAssets;
export function isSupportedEvidenceKey(
key: string,
): key is SupportedEvidenceKey {
return Object.hasOwn(evidenceAssets, key);
}
export function getEvidenceAsset(key: string) {
if (!isSupportedEvidenceKey(key)) {
throw new Error(`Unknown local evidence asset: ${key}`);
}
return evidenceAssets[key];
}