265
return new Map<string, string[]>();
266
}
268
>
const collections = registry.collections.read(reader);
269
>
// label → list of server definition IDs, in priority order
270
>
const labelToIds = new Map<string, string[]>();
271
>
for (const collection of collections) {
272
>
for (const server of collection.serverDefinitions.read(reader)) {
273
>
const key = server.label.toLowerCase();
274
>
let ids = labelToIds.get(key);
275
>
if (!ids) {
276
>
ids = [];
277
>
labelToIds.set(key, ids);
278
>
}
279
>
ids.push(server.id);
280
>
}
281
>
}
282
>
283
>
const groups = new Map<string, string[]>();
284
>
for (const ids of labelToIds.values()) {
285
>
if (ids.length < 2) {
286
continue;
287
}