]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/plugins/yarn.ts
Add ability to install alpha/beta/rc plugin
[github/Chocobozzz/PeerTube.git] / server / lib / plugins / yarn.ts
index d105b95e07d3ce0ecd0bbd888f97127556b1409f..9cf6ec9e90e53be6f281c312130f1ab7654109bb 100644 (file)
@@ -1,7 +1,7 @@
 import { outputJSON, pathExists } from 'fs-extra'
 import { join } from 'path'
 import { execShell } from '../../helpers/core-utils'
-import { isNpmPluginNameValid, isPluginVersionValid } from '../../helpers/custom-validators/plugins'
+import { isNpmPluginNameValid, isPluginStableOrUnstableVersionValid } from '../../helpers/custom-validators/plugins'
 import { logger } from '../../helpers/logger'
 import { CONFIG } from '../../initializers/config'
 import { getLatestPluginVersion } from './plugin-index'
@@ -69,5 +69,5 @@ function checkNpmPluginNameOrThrow (name: string) {
 }
 
 function checkPluginVersionOrThrow (name: string) {
-  if (!isPluginVersionValid(name)) throw new Error('Invalid NPM plugin version to install')
+  if (!isPluginStableOrUnstableVersionValid(name)) throw new Error('Invalid NPM plugin version to install')
 }