* Check if a plugin is from a local source and cannot be remotely updated * @returns Error message if local, null if remote/updatable
(pluginName: string, marketplaceName: string)
| 374 | * @returns Error message if local, null if remote/updatable |
| 375 | */ |
| 376 | async function checkIfLocalPlugin(pluginName: string, marketplaceName: string): Promise<string | null> { |
| 377 | const marketplace = await getMarketplace(marketplaceName); |
| 378 | const entry = marketplace?.plugins.find(p => p.name === pluginName); |
| 379 | if (entry && typeof entry.source === 'string') { |
| 380 | return `Local plugins cannot be updated remotely. To update, modify the source at: ${entry.source}`; |
| 381 | } |
| 382 | return null; |
| 383 | } |
| 384 | |
| 385 | /** |
| 386 | * Filter out plugins that are force-disabled by org policy (policySettings). |