(name: string)
| 151 | }; |
| 152 | } |
| 153 | function buildMarketplaceAction(name: string): ErrorRowAction { |
| 154 | const { |
| 155 | editableSources, |
| 156 | isInPolicy |
| 157 | } = getExtraMarketplaceSourceInfo(name); |
| 158 | if (editableSources.length > 0) { |
| 159 | return { |
| 160 | kind: 'remove-extra-marketplace', |
| 161 | name, |
| 162 | sources: editableSources |
| 163 | }; |
| 164 | } |
| 165 | if (isInPolicy) { |
| 166 | return { |
| 167 | kind: 'managed-only', |
| 168 | name |
| 169 | }; |
| 170 | } |
| 171 | |
| 172 | // Marketplace is in known_marketplaces.json but not in extraKnownMarketplaces |
| 173 | // (e.g. previously installed manually) — route to ManageMarketplaces |
| 174 | return { |
| 175 | kind: 'navigate', |
| 176 | tab: 'marketplaces', |
| 177 | viewState: { |
| 178 | type: 'manage-marketplaces', |
| 179 | targetMarketplace: name, |
| 180 | action: 'remove' |
| 181 | } |
| 182 | }; |
| 183 | } |
| 184 | function buildPluginAction(pluginName: string): ErrorRowAction { |
| 185 | return { |
| 186 | kind: 'navigate', |
no test coverage detected