mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
WIP plugins: plugin settings on server side
This commit is contained in:
parent
ffb321bedc
commit
ad91e7006e
20 changed files with 419 additions and 61 deletions
|
@ -5,12 +5,14 @@ import { CONFIG } from '../../initializers/config'
|
|||
import { outputJSON, pathExists } from 'fs-extra'
|
||||
import { join } from 'path'
|
||||
|
||||
async function installNpmPlugin (name: string, version: string) {
|
||||
async function installNpmPlugin (name: string, version?: string) {
|
||||
// Security check
|
||||
checkNpmPluginNameOrThrow(name)
|
||||
checkPluginVersionOrThrow(version)
|
||||
if (version) checkPluginVersionOrThrow(version)
|
||||
|
||||
let toInstall = name
|
||||
if (version) toInstall += `@${version}`
|
||||
|
||||
const toInstall = `${name}@${version}`
|
||||
await execYarn('add ' + toInstall)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue