(
tag: string,
options: ResolveOptions = {},
)
| 183 | * fail to load are silently skipped. |
| 184 | */ |
| 185 | export async function resolveItemsByTag( |
| 186 | tag: string, |
| 187 | options: ResolveOptions = {}, |
| 188 | ): Promise<RegistryItem[]> { |
| 189 | const entries = await listRegistryItems(undefined, options); |
| 190 | const allItems = await loadAllItems(entries, { ...options, onWarn: () => {} }); |
| 191 | return allItems.filter( |
| 192 | (item) => "tags" in item && Array.isArray(item.tags) && item.tags.includes(tag), |
| 193 | ); |
| 194 | } |
no test coverage detected