(stream)
| 86 | }, |
| 87 | }); |
| 88 | const streamToBuffer = async (stream) => { |
| 89 | const reader = stream.getReader(); |
| 90 | const data = []; |
| 91 | while (true) { |
| 92 | const { done, value } = await reader.read(); |
| 93 | if (done) return new Uint8Array(data); |
| 94 | if (result.value) { |
| 95 | data.push(...value); |
| 96 | } |
| 97 | } |
| 98 | }; |
| 99 | |
| 100 | class CodeStorage { |
| 101 | constructor(store) { |