MCPcopy Create free account
hub / github.com/fontsource/fontsource / getBucket

Function getBucket

api/download/src/bucket.ts:272–288  ·  view source on GitHub ↗
(bucketPath: string)

Source from the content-addressed store, hash-verified

270};
271
272export const getBucket = async (bucketPath: string) => {
273 keepAwake(SLEEP_MINUTES);
274
275 const resp = await fetch(`https://upload.fontsource.org/get/${bucketPath}`, {
276 headers: {
277 Authorization: `Bearer ${
278 // biome-ignore lint/style/noNonNullAssertion: <explanation>
279 process.env.UPLOAD_KEY!
280 }`,
281 },
282 });
283 if (!resp.ok) {
284 handleBucketError(resp, `Unable to fetch ${bucketPath}.`);
285 }
286
287 return resp;
288};

Callers 1

generateZipFunction · 0.90

Calls 3

keepAwakeFunction · 0.90
handleBucketErrorFunction · 0.85
fetchFunction · 0.50

Tested by

no test coverage detected