(skills: SkillEntry[])
| 31 | } |
| 32 | |
| 33 | function groupSkillsBySource(skills: SkillEntry[]): InstallGroup[] { |
| 34 | const groups = new Map<string, string[]>(); |
| 35 | |
| 36 | for (const skill of skills) { |
| 37 | const source = skill.source.trim(); |
| 38 | const name = skill.name.trim(); |
| 39 | const names = groups.get(source) ?? []; |
| 40 | |
| 41 | if (!names.some((entry) => normalizeName(entry) === normalizeName(name))) { |
| 42 | names.push(name); |
| 43 | } |
| 44 | |
| 45 | groups.set(source, names); |
| 46 | } |
| 47 | |
| 48 | return Array.from(groups, ([source, names]) => ({ source, names })); |
| 49 | } |
| 50 | |
| 51 | function buildInstallArgs(group: InstallGroup): string[] { |
| 52 | const args = [ |
no test coverage detected