(framework: Framework, mode: string)
| 3 | import type { AddOn, Framework } from './types.js' |
| 4 | |
| 5 | export function getAllAddOns(framework: Framework, mode: string): Array<AddOn> { |
| 6 | return framework |
| 7 | .getAddOns() |
| 8 | .filter((a) => a.modes.includes(mode)) |
| 9 | .sort((a, b) => { |
| 10 | const aPriority = a.priority ?? 0 |
| 11 | const bPriority = b.priority ?? 0 |
| 12 | return bPriority - aPriority // Higher priority first |
| 13 | }) |
| 14 | } |
| 15 | |
| 16 | // Turn the list of chosen add-on IDs into a final list of add-ons by resolving dependencies |
| 17 | export async function finalizeAddOns( |
no outgoing calls
no test coverage detected