mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Ensure to install supported plugins
This commit is contained in:
parent
90aa0a74e9
commit
8280d0c227
5 changed files with 30 additions and 10 deletions
|
@ -67,7 +67,19 @@ async function getLatestPluginsVersion (npmNames: string[]): Promise<PeertubePlu
|
|||
return body
|
||||
}
|
||||
|
||||
async function getLatestPluginVersion (npmName: string) {
|
||||
const results = await getLatestPluginsVersion([ npmName ])
|
||||
|
||||
if (Array.isArray(results) === false || results.length !== 1) {
|
||||
logger.warn('Cannot get latest supported plugin version of %s.', npmName)
|
||||
return undefined
|
||||
}
|
||||
|
||||
return results[0].latestVersion
|
||||
}
|
||||
|
||||
export {
|
||||
listAvailablePluginsFromIndex,
|
||||
getLatestPluginVersion,
|
||||
getLatestPluginsVersion
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue