MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / enqueueImport

Function enqueueImport

runtime/src/prefetch.js:67–72  ·  view source on GitHub ↗
(imp, dir)

Source from the content-addressed store, hash-verified

65
66 /* A scanned import contributes at most one fetch target: quoted is direct, bare resolves via the table. */
67 const enqueueImport = (imp, dir) => {
68 if (!imp.bare) { queue.push(joinRel(dir, imp.spec)); return; }
69 const target = table[imp.spec];
70 if (target !== undefined) queue.push(joinRel(dir, target));
71 else { const ds = pendingBare.get(imp.spec); ds ? ds.push(dir) : pendingBare.set(imp.spec, [dir]); } // a later manifest may declare it
72 };
73 const retryPending = () => {
74 for (const [name, dirs] of [...pendingBare]) {
75 const target = table[name];

Callers 1

bfsPrefetchFunction · 0.85

Calls 4

joinRelFunction · 0.90
pushMethod · 0.80
setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected