(pkg: PackageJson | null)
| 221 | }) |
| 222 | |
| 223 | const updatePluginCards = (pkg: PackageJson | null) => { |
| 224 | if (!pkg) return |
| 225 | |
| 226 | const currentFramework = detectFramework(pkg, FRAMEWORKS) |
| 227 | |
| 228 | // Get list of registered plugin names |
| 229 | const registeredPlugins = new Set(plugins()?.map((p) => p.id || '') || []) |
| 230 | |
| 231 | const allCards = buildPluginCards( |
| 232 | pkg, |
| 233 | currentFramework, |
| 234 | registeredPlugins, |
| 235 | pluginSections().flatMap((s) => s.cards), |
| 236 | ) |
| 237 | |
| 238 | const sections = groupIntoSections(allCards) |
| 239 | setPluginSections(sections) |
| 240 | } |
| 241 | |
| 242 | const handleAction = (card: PluginCard) => { |
| 243 | if ( |
no test coverage detected