mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Relax plugin package.json validation
This commit is contained in:
parent
14cc552b79
commit
485b2fb2cc
@ -41,7 +41,11 @@ function isPluginEngineValid (engine: any) {
|
||||
}
|
||||
|
||||
function isPluginHomepage (value: string) {
|
||||
return isUrlValid(value)
|
||||
return exists(value) && (!value || isUrlValid(value))
|
||||
}
|
||||
|
||||
function isPluginBugs (value: string) {
|
||||
return exists(value) && (!value || isUrlValid(value))
|
||||
}
|
||||
|
||||
function areStaticDirectoriesValid (staticDirs: any) {
|
||||
@ -85,7 +89,7 @@ function isPackageJSONValid (packageJSON: PluginPackageJson, pluginType: PluginT
|
||||
isPluginEngineValid(packageJSON.engine) &&
|
||||
isPluginHomepage(packageJSON.homepage) &&
|
||||
exists(packageJSON.author) &&
|
||||
isUrlValid(packageJSON.bugs) &&
|
||||
isPluginBugs(packageJSON.bugs) &&
|
||||
(pluginType === PluginType.THEME || isSafePath(packageJSON.library)) &&
|
||||
areStaticDirectoriesValid(packageJSON.staticDirs) &&
|
||||
areCSSPathsValid(packageJSON.css) &&
|
||||
|
Loading…
Reference in New Issue
Block a user