MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / resolveModule

Function resolveModule

vmm/ui/build.mjs:24–28  ·  view source on GitHub ↗
(parentId, request)

Source from the content-addressed store, hash-verified

22}
23
24function resolveModule(parentId, request) {
25 const base = parentId ? path.dirname(path.resolve(ROOT, parentId)) : MODULE_DIR;
26 const absPath = nodeRequire.resolve(request, { paths: [base] });
27 return canonicalId(absPath);
28}
29
30async function readFileCached(filePath) {
31 return fs.readFile(filePath, 'utf-8');

Callers 1

processModuleFunction · 0.85

Calls 2

canonicalIdFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected