MCPcopy
hub / github.com/anomalyco/models.dev / syncTargets

Function syncTargets

packages/core/src/sync/index.ts:373–389  ·  view source on GitHub ↗
(target: string, options: SyncOptions = {})

Source from the content-addressed store, hash-verified

371}
372
373export async function syncTargets(target: string, options: SyncOptions = {}) {
374 const ids = target in groups
375 ? groups[target as keyof typeof groups]
376 : target in providers
377 ? [target as ProviderID]
378 : undefined;
379
380 if (ids === undefined) {
381 throw new Error(`Unknown sync target: ${target}`);
382 }
383
384 const results: SyncResult[] = [];
385 for (const id of ids) {
386 results.push(await syncProviderByID(id as ProviderID, options));
387 }
388 return results;
389}
390
391export function syncProviderMatrix() {
392 return {

Callers 1

mainFunction · 0.85

Calls 1

syncProviderByIDFunction · 0.85

Tested by

no test coverage detected