(target: string, options: SyncOptions = {})
| 371 | } |
| 372 | |
| 373 | export 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 | |
| 391 | export function syncProviderMatrix() { |
| 392 | return { |
no test coverage detected