MCPcopy Create free account
hub / github.com/dailydotdev/apps / flush

Function flush

packages/world-cli/src/dev.js:330–343  ·  view source on GitHub ↗
(files, why)

Source from the content-addressed store, hash-verified

328 };
329
330 const flush = async (files, why) => {
331 const upserts = [];
332 const removals = [];
333 const reports = [];
334 for (const file of files) {
335 const result = await rebuildFile(file, why);
336 upserts.push(...result.upserts);
337 removals.push(...result.removals);
338 reports.push(...result.reports);
339 }
340 if (!upserts.length && !removals.length && !reports.length) return;
341 version += 1;
342 broadcast({ type: "patch", version, upserts, removals, reports });
343 };
344
345 const initial = await readdir(directory, { withFileTypes: true });
346 for (const entry of initial) {

Callers 1

startDevFunction · 0.85

Calls 3

rebuildFileFunction · 0.85
broadcastFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected