(manifest: ManifestVariable)
| 64 | }; |
| 65 | |
| 66 | export const downloadVariableFile = async (manifest: ManifestVariable) => { |
| 67 | const { url } = manifest; |
| 68 | const res = await fetch(url); |
| 69 | |
| 70 | if (!res.ok) { |
| 71 | throw new StatusError(500, `Could not fetch ${url}`); |
| 72 | } |
| 73 | |
| 74 | const buffer = await res.arrayBuffer(); |
| 75 | |
| 76 | // Add to bucket |
| 77 | await putBucket(bucketPathVariable(manifest), buffer); |
| 78 | }; |
| 79 | |
| 80 | export const downloadManifest = async (manifest: Manifest[]) => { |
| 81 | // Create a queue |
no test coverage detected