(frameworkId: string, addOnId: string)
| 149 | } |
| 150 | |
| 151 | async function loadAddOnChunk(frameworkId: string, addOnId: string) { |
| 152 | const key = `${frameworkId}:${addOnId}` |
| 153 | let promise = addOnChunks.get(key) |
| 154 | if (!promise) { |
| 155 | promise = manifestLoader |
| 156 | .loadAddOn(frameworkId, addOnId) |
| 157 | .then((chunk) => { |
| 158 | registerRendererChunk(frameworkId, chunk) |
| 159 | return chunk |
| 160 | }) |
| 161 | .catch((error: unknown) => { |
| 162 | addOnChunks.delete(key) |
| 163 | throw error |
| 164 | }) |
| 165 | addOnChunks.set(key, promise) |
| 166 | } |
| 167 | |
| 168 | return promise |
| 169 | } |
| 170 | |
| 171 | function createAddOnFromChunk( |
| 172 | frameworkId: string, |
no test coverage detected