MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / resolveRelativeImport

Function resolveRelativeImport

scripts/check-codex-gateway-boundary.mjs:51–57  ·  view source on GitHub ↗
(fromFile, specifier)

Source from the content-addressed store, hash-verified

49}
50
51function resolveRelativeImport(fromFile, specifier) {
52 const resolved = path.resolve(path.dirname(fromFile), specifier);
53 if (path.extname(resolved)) {
54 return resolved;
55 }
56 return `${resolved}.ts`;
57}
58
59function normalizeText(text) {
60 return text.replace(/\r\n/g, '\n').trim();

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected