MCPcopy Index your code
hub / github.com/VPSDance/ai-proxy-rules / loadSourceProvider

Function loadSourceProvider

scripts/sync.ts:112–119  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

110}
111
112async function loadSourceProvider(filePath: string): Promise<SourceProvider> {
113 const raw = await readFile(filePath, "utf8");
114 const result = sourceProviderSchema.safeParse(parse(raw));
115 if (!result.success) {
116 throw new Error(`Invalid source config in ${filePath}:\n${z.prettifyError(result.error)}`);
117 }
118 return result.data;
119}
120
121function stringifyProviderData(provider: SourceProviderData): string {
122 return stringify(provider, {

Callers 1

syncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected