(t0)
| 29 | import { ValidatePlugin } from './ValidatePlugin.js'; |
| 30 | type TabId = 'discover' | 'installed' | 'marketplaces' | 'errors'; |
| 31 | function MarketplaceList(t0) { |
| 32 | const $ = _c(4); |
| 33 | const { |
| 34 | onComplete |
| 35 | } = t0; |
| 36 | let t1; |
| 37 | let t2; |
| 38 | if ($[0] !== onComplete) { |
| 39 | t1 = () => { |
| 40 | const loadList = async function loadList() { |
| 41 | ; |
| 42 | try { |
| 43 | const config = await loadKnownMarketplacesConfig(); |
| 44 | const names = Object.keys(config); |
| 45 | if (names.length === 0) { |
| 46 | onComplete("No marketplaces configured"); |
| 47 | } else { |
| 48 | onComplete(`Configured marketplaces:\n${names.map(_temp).join("\n")}`); |
| 49 | } |
| 50 | } catch (t3) { |
| 51 | const err = t3; |
| 52 | onComplete(`Error loading marketplaces: ${errorMessage(err)}`); |
| 53 | } |
| 54 | }; |
| 55 | loadList(); |
| 56 | }; |
| 57 | t2 = [onComplete]; |
| 58 | $[0] = onComplete; |
| 59 | $[1] = t1; |
| 60 | $[2] = t2; |
| 61 | } else { |
| 62 | t1 = $[1]; |
| 63 | t2 = $[2]; |
| 64 | } |
| 65 | useEffect(t1, t2); |
| 66 | let t3; |
| 67 | if ($[3] === Symbol.for("react.memo_cache_sentinel")) { |
| 68 | t3 = <Text>Loading marketplaces...</Text>; |
| 69 | $[3] = t3; |
| 70 | } else { |
| 71 | t3 = $[3]; |
| 72 | } |
| 73 | return t3; |
| 74 | } |
| 75 | function _temp(n) { |
| 76 | return ` • ${n}`; |
| 77 | } |
nothing calls this directly
no test coverage detected