MCPcopy
hub / github.com/freshframework/fresh / flush

Method flush

packages/fresh/src/dev/dev_build_cache.ts:207–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205 }
206
207 async flush(): Promise<void> {
208 const preparer = new IslandPreparer();
209
210 // Load islands
211 await Promise.all(
212 Array.from(this.islandModNameToChunk.entries()).map(
213 async ([name, chunk]) => {
214 const fileUrl = maybeToFileUrl(chunk.server);
215 const mod = await import(fileUrl);
216
217 if (chunk.browser === null) {
218 throw new Error(`Unexpected missing browser chunk`);
219 }
220
221 preparer.prepare(this.islandRegistry, mod, chunk.browser, name, []);
222 },
223 ),
224 );
225 }
226
227 async prepare(): Promise<void> {
228 // Load FS routes

Callers

nothing calls this directly

Calls 3

prepareMethod · 0.95
maybeToFileUrlFunction · 0.85
allMethod · 0.80

Tested by

no test coverage detected