aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins/plugin-manager.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-23 14:10:17 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-06-23 16:00:49 +0200
commit67ed6552b831df66713bac9e672738796128d33f (patch)
tree59c97d41e0b49d75a90aa3de987968ab9b1ff447 /server/lib/plugins/plugin-manager.ts
parent0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff)
downloadPeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.gz
PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.zst
PeerTube-67ed6552b831df66713bac9e672738796128d33f.zip
Reorganize client shared modules
Diffstat (limited to 'server/lib/plugins/plugin-manager.ts')
-rw-r--r--server/lib/plugins/plugin-manager.ts28
1 files changed, 13 insertions, 15 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts
index 7fda5d9a4..94b5ecc41 100644
--- a/server/lib/plugins/plugin-manager.ts
+++ b/server/lib/plugins/plugin-manager.ts
@@ -1,28 +1,26 @@
1import { PluginModel } from '../../models/server/plugin' 1import { createReadStream, createWriteStream } from 'fs'
2import { logger } from '../../helpers/logger' 2import { outputFile, readJSON } from 'fs-extra'
3import { basename, join } from 'path' 3import { basename, join } from 'path'
4import { CONFIG } from '../../initializers/config' 4import { MOAuthTokenUser, MUser } from '@server/types/models'
5import { isLibraryCodeValid, isPackageJSONValid } from '../../helpers/custom-validators/plugins' 5import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model'
6import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks'
6import { 7import {
7 ClientScript, 8 ClientScript,
8 PluginPackageJson, 9 PluginPackageJson,
9 PluginTranslationPaths as PackagePluginTranslations 10 PluginTranslationPaths as PackagePluginTranslations
10} from '../../../shared/models/plugins/plugin-package-json.model' 11} from '../../../shared/models/plugins/plugin-package-json.model'
11import { createReadStream, createWriteStream } from 'fs' 12import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model'
12import { PLUGIN_GLOBAL_CSS_PATH } from '../../initializers/constants'
13import { PluginType } from '../../../shared/models/plugins/plugin.type' 13import { PluginType } from '../../../shared/models/plugins/plugin.type'
14import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn'
15import { outputFile, readJSON } from 'fs-extra'
16import { ServerHook, ServerHookName } from '../../../shared/models/plugins/server-hook.model' 14import { ServerHook, ServerHookName } from '../../../shared/models/plugins/server-hook.model'
17import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks' 15import { isLibraryCodeValid, isPackageJSONValid } from '../../helpers/custom-validators/plugins'
18import { RegisterServerOptions } from '../../typings/plugins/register-server-option.model' 16import { logger } from '../../helpers/logger'
19import { PluginLibrary } from '../../typings/plugins' 17import { CONFIG } from '../../initializers/config'
18import { PLUGIN_GLOBAL_CSS_PATH } from '../../initializers/constants'
19import { PluginModel } from '../../models/server/plugin'
20import { PluginLibrary, RegisterServerAuthExternalOptions, RegisterServerAuthPassOptions, RegisterServerOptions } from '../../types/plugins'
20import { ClientHtml } from '../client-html' 21import { ClientHtml } from '../client-html'
21import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model'
22import { RegisterHelpersStore } from './register-helpers-store' 22import { RegisterHelpersStore } from './register-helpers-store'
23import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' 23import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn'
24import { MOAuthTokenUser, MUser } from '@server/types/models'
25import { RegisterServerAuthPassOptions, RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model'
26 24
27export interface RegisteredPlugin { 25export interface RegisteredPlugin {
28 npmName: string 26 npmName: string