mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Add data directory for plugins and some helpers
This commit is contained in:
parent
3e0e8d4afd
commit
302eba0d89
8 changed files with 245 additions and 24 deletions
|
@ -1,7 +1,7 @@
|
|||
import decache from 'decache'
|
||||
import * as express from 'express'
|
||||
import { createReadStream, createWriteStream } from 'fs'
|
||||
import { outputFile, readJSON } from 'fs-extra'
|
||||
import { ensureDir, outputFile, readJSON } from 'fs-extra'
|
||||
import { basename, join } from 'path'
|
||||
import { MOAuthTokenUser, MUser } from '@server/types/models'
|
||||
import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model'
|
||||
|
@ -428,6 +428,9 @@ export class PluginManager implements ServerHook {
|
|||
}
|
||||
|
||||
const { registerOptions, registerStore } = this.getRegisterHelpers(npmName, plugin)
|
||||
|
||||
await ensureDir(registerOptions.peertubeHelpers.plugin.getDataDirectoryPath())
|
||||
|
||||
library.register(registerOptions)
|
||||
.catch(err => logger.error('Cannot register plugin %s.', npmName, { err }))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue