aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins
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
parent0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff)
downloadPeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.gz
PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.zst
PeerTube-67ed6552b831df66713bac9e672738796128d33f.zip
Reorganize client shared modules
Diffstat (limited to 'server/lib/plugins')
-rw-r--r--server/lib/plugins/plugin-helpers.ts2
-rw-r--r--server/lib/plugins/plugin-manager.ts28
-rw-r--r--server/lib/plugins/register-helpers-store.ts26
3 files changed, 28 insertions, 28 deletions
diff --git a/server/lib/plugins/plugin-helpers.ts b/server/lib/plugins/plugin-helpers.ts
index de82b4918..39773f693 100644
--- a/server/lib/plugins/plugin-helpers.ts
+++ b/server/lib/plugins/plugin-helpers.ts
@@ -1,4 +1,4 @@
1import { PeerTubeHelpers } from '@server/typings/plugins' 1import { PeerTubeHelpers } from '@server/types/plugins'
2import { sequelizeTypescript } from '@server/initializers/database' 2import { sequelizeTypescript } from '@server/initializers/database'
3import { buildLogger } from '@server/helpers/logger' 3import { buildLogger } from '@server/helpers/logger'
4import { VideoModel } from '@server/models/video/video' 4import { VideoModel } from '@server/models/video/video'
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
diff --git a/server/lib/plugins/register-helpers-store.ts b/server/lib/plugins/register-helpers-store.ts
index e337b1cb0..c73079302 100644
--- a/server/lib/plugins/register-helpers-store.ts
+++ b/server/lib/plugins/register-helpers-store.ts
@@ -9,22 +9,24 @@ import {
9} from '@server/initializers/constants' 9} from '@server/initializers/constants'
10import { onExternalUserAuthenticated } from '@server/lib/auth' 10import { onExternalUserAuthenticated } from '@server/lib/auth'
11import { PluginModel } from '@server/models/server/plugin' 11import { PluginModel } from '@server/models/server/plugin'
12import { RegisterServerOptions } from '@server/typings/plugins'
13import { PluginPlaylistPrivacyManager } from '@shared/models/plugins/plugin-playlist-privacy-manager.model'
14import { PluginSettingsManager } from '@shared/models/plugins/plugin-settings-manager.model'
15import { PluginStorageManager } from '@shared/models/plugins/plugin-storage-manager.model'
16import { PluginVideoCategoryManager } from '@shared/models/plugins/plugin-video-category-manager.model'
17import { PluginVideoLanguageManager } from '@shared/models/plugins/plugin-video-language-manager.model'
18import { PluginVideoLicenceManager } from '@shared/models/plugins/plugin-video-licence-manager.model'
19import { PluginVideoPrivacyManager } from '@shared/models/plugins/plugin-video-privacy-manager.model'
20import { 12import {
21 RegisterServerAuthExternalOptions, 13 RegisterServerAuthExternalOptions,
22 RegisterServerAuthExternalResult, 14 RegisterServerAuthExternalResult,
23 RegisterServerAuthPassOptions, 15 RegisterServerAuthPassOptions,
24 RegisterServerExternalAuthenticatedResult 16 RegisterServerExternalAuthenticatedResult,
25} from '@shared/models/plugins/register-server-auth.model' 17 RegisterServerOptions
26import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' 18} from '@server/types/plugins'
27import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model' 19import {
20 PluginPlaylistPrivacyManager,
21 PluginSettingsManager,
22 PluginStorageManager,
23 PluginVideoCategoryManager,
24 PluginVideoLanguageManager,
25 PluginVideoLicenceManager,
26 PluginVideoPrivacyManager,
27 RegisterServerHookOptions,
28 RegisterServerSettingOptions
29} from '@shared/models'
28import { serverHookObject } from '@shared/models/plugins/server-hook.model' 30import { serverHookObject } from '@shared/models/plugins/server-hook.model'
29import { buildPluginHelpers } from './plugin-helpers' 31import { buildPluginHelpers } from './plugin-helpers'
30 32