MCPcopy Create free account
hub / github.com/VPSDance/ai-proxy-rules / read

Method read

scripts/sync/cache.ts:161–172  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

159 }
160
161 private async read(url: string): Promise<{ text: string; cachedAt?: string } | null> {
162 const file = this.cacheFile(url);
163 try {
164 const [text, stats] = await Promise.all([
165 readFile(file, "utf8"),
166 stat(file)
167 ]);
168 return { text, cachedAt: stats.mtime.toISOString() };
169 } catch {
170 return null;
171 }
172 }
173}
174
175function sortKeys(record: Record<string, string>): Record<string, string> {

Callers 1

cachedMethod · 0.95

Calls 1

cacheFileMethod · 0.95

Tested by

no test coverage detected