MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resolveJsoncPath

Function resolveJsoncPath

packages/core/vite-plugin/src/index.ts:102–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 };
101
102 const resolveJsoncPath = (): string | null => {
103 if (resolvedJsoncPath) return resolvedJsoncPath;
104 const candidates = options.jsoncPath ? [options.jsoncPath] : DEFAULT_JSONC_CANDIDATES;
105 for (const candidate of candidates) {
106 const abs = isAbsolute(candidate) ? candidate : resolvePath(projectRoot, candidate);
107 if (existsSync(abs)) {
108 resolvedJsoncPath = abs;
109 return abs;
110 }
111 }
112 return null;
113 };
114
115 const loadVirtualSource = async (): Promise<string> => {
116 if (cachedSource !== null) return cachedSource;

Callers 2

loadVirtualSourceFunction · 0.85
handleHotUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected