551
return undefined;
552
}
554
>
const entries: IExtraKnownMarketplaceEntry[] = [];
555
>
for (const [name, entry] of Object.entries(value)) {
556
>
if (!isObject(entry) || !isObject((entry as Record<string, unknown>).source)) {
557
onWarn?.(`Skipping malformed extraKnownMarketplaces entry "${name}": expected { source: { source, repo|url } }`);
558
continue;
559
}
560
>
const src = (entry as Record<string, unknown>).source as { source?: string; repo?: string; url?: string; ref?: string };
copilotManagedSettings.ts
561
>
let normalized: IExtraKnownMarketplaceEntry | undefined;
562
>
if (src.source === 'github' && isString(src.repo)) {
563
>
normalized = { name, source: { source: 'github', repo: src.repo, ...(src.ref ? { ref: src.ref } : {}) } };
564
>
} else if (src.source === 'git' && isString(src.url)) {
565
normalized = { name, source: { source: 'git', url: src.url, ...(src.ref ? { ref: src.ref } : {}) } };
566
} else if (src.source === 'github' || src.source === 'git') {