(url: string)
| 65 | |
| 66 | /** Fetches an upstream binary with asset-specific cache policy. */ |
| 67 | const fetchBinaryBytes = async (url: string): Promise<Uint8Array> => |
| 68 | ( |
| 69 | await fetchWithCache(url, { |
| 70 | cacheEverything: true, |
| 71 | cacheTtlByStatus: { |
| 72 | '200-299': 86400, |
| 73 | 404: 60, |
| 74 | '500-599': 0, |
| 75 | }, |
| 76 | }) |
| 77 | ).bytes(); |
| 78 | |
| 79 | const packageScope = (isVariable: boolean): string => |
| 80 | isVariable ? '@fontsource-variable' : '@fontsource'; |
no test coverage detected