(query)
| 367 | } |
| 368 | |
| 369 | async function searchRemotely(query) { |
| 370 | if (!query) return []; |
| 371 | try { |
| 372 | const response = await fetch( |
| 373 | withSupportedEditor(`${config.API_BASE}/plugins?name=${query}`), |
| 374 | ); |
| 375 | const plugins = await response.json(); |
| 376 | // Map the plugins to Item elements and return |
| 377 | return plugins.map((plugin) => <Item {...plugin} />); |
| 378 | } catch (error) { |
| 379 | $list.all.setAttribute("empty-msg", strings["error"]); |
| 380 | window.log("error", "Failed to search remotely:"); |
| 381 | window.log("error", error); |
| 382 | return []; |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | async function getFilteredPlugins(filterState, isInitial = false) { |
| 387 | if (!filterState) return; |
nothing calls this directly
no test coverage detected