diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-23 14:10:17 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-23 16:00:49 +0200 |
commit | 67ed6552b831df66713bac9e672738796128d33f (patch) | |
tree | 59c97d41e0b49d75a90aa3de987968ab9b1ff447 /server/lib | |
parent | 0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff) | |
download | PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.gz PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.zst PeerTube-67ed6552b831df66713bac9e672738796128d33f.zip |
Reorganize client shared modules
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/auth.ts | 2 | ||||
-rw-r--r-- | server/lib/plugins/plugin-helpers.ts | 2 | ||||
-rw-r--r-- | server/lib/plugins/plugin-manager.ts | 28 | ||||
-rw-r--r-- | server/lib/plugins/register-helpers-store.ts | 26 |
4 files changed, 29 insertions, 29 deletions
diff --git a/server/lib/auth.ts b/server/lib/auth.ts index 8579bdbb4..3f8e18633 100644 --- a/server/lib/auth.ts +++ b/server/lib/auth.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | RegisterServerAuthenticatedResult, | 10 | RegisterServerAuthenticatedResult, |
11 | RegisterServerAuthPassOptions, | 11 | RegisterServerAuthPassOptions, |
12 | RegisterServerExternalAuthenticatedResult | 12 | RegisterServerExternalAuthenticatedResult |
13 | } from '@shared/models/plugins/register-server-auth.model' | 13 | } from '@server/types/plugins/register-server-auth.model' |
14 | import * as express from 'express' | 14 | import * as express from 'express' |
15 | import * as OAuthServer from 'express-oauth-server' | 15 | import * as OAuthServer from 'express-oauth-server' |
16 | 16 | ||
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 @@ | |||
1 | import { PeerTubeHelpers } from '@server/typings/plugins' | 1 | import { PeerTubeHelpers } from '@server/types/plugins' |
2 | import { sequelizeTypescript } from '@server/initializers/database' | 2 | import { sequelizeTypescript } from '@server/initializers/database' |
3 | import { buildLogger } from '@server/helpers/logger' | 3 | import { buildLogger } from '@server/helpers/logger' |
4 | import { VideoModel } from '@server/models/video/video' | 4 | import { 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 @@ | |||
1 | import { PluginModel } from '../../models/server/plugin' | 1 | import { createReadStream, createWriteStream } from 'fs' |
2 | import { logger } from '../../helpers/logger' | 2 | import { outputFile, readJSON } from 'fs-extra' |
3 | import { basename, join } from 'path' | 3 | import { basename, join } from 'path' |
4 | import { CONFIG } from '../../initializers/config' | 4 | import { MOAuthTokenUser, MUser } from '@server/types/models' |
5 | import { isLibraryCodeValid, isPackageJSONValid } from '../../helpers/custom-validators/plugins' | 5 | import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' |
6 | import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks' | ||
6 | import { | 7 | import { |
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' |
11 | import { createReadStream, createWriteStream } from 'fs' | 12 | import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model' |
12 | import { PLUGIN_GLOBAL_CSS_PATH } from '../../initializers/constants' | ||
13 | import { PluginType } from '../../../shared/models/plugins/plugin.type' | 13 | import { PluginType } from '../../../shared/models/plugins/plugin.type' |
14 | import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn' | ||
15 | import { outputFile, readJSON } from 'fs-extra' | ||
16 | import { ServerHook, ServerHookName } from '../../../shared/models/plugins/server-hook.model' | 14 | import { ServerHook, ServerHookName } from '../../../shared/models/plugins/server-hook.model' |
17 | import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks' | 15 | import { isLibraryCodeValid, isPackageJSONValid } from '../../helpers/custom-validators/plugins' |
18 | import { RegisterServerOptions } from '../../typings/plugins/register-server-option.model' | 16 | import { logger } from '../../helpers/logger' |
19 | import { PluginLibrary } from '../../typings/plugins' | 17 | import { CONFIG } from '../../initializers/config' |
18 | import { PLUGIN_GLOBAL_CSS_PATH } from '../../initializers/constants' | ||
19 | import { PluginModel } from '../../models/server/plugin' | ||
20 | import { PluginLibrary, RegisterServerAuthExternalOptions, RegisterServerAuthPassOptions, RegisterServerOptions } from '../../types/plugins' | ||
20 | import { ClientHtml } from '../client-html' | 21 | import { ClientHtml } from '../client-html' |
21 | import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model' | ||
22 | import { RegisterHelpersStore } from './register-helpers-store' | 22 | import { RegisterHelpersStore } from './register-helpers-store' |
23 | import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' | 23 | import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn' |
24 | import { MOAuthTokenUser, MUser } from '@server/types/models' | ||
25 | import { RegisterServerAuthPassOptions, RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' | ||
26 | 24 | ||
27 | export interface RegisteredPlugin { | 25 | export 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' |
10 | import { onExternalUserAuthenticated } from '@server/lib/auth' | 10 | import { onExternalUserAuthenticated } from '@server/lib/auth' |
11 | import { PluginModel } from '@server/models/server/plugin' | 11 | import { PluginModel } from '@server/models/server/plugin' |
12 | import { RegisterServerOptions } from '@server/typings/plugins' | ||
13 | import { PluginPlaylistPrivacyManager } from '@shared/models/plugins/plugin-playlist-privacy-manager.model' | ||
14 | import { PluginSettingsManager } from '@shared/models/plugins/plugin-settings-manager.model' | ||
15 | import { PluginStorageManager } from '@shared/models/plugins/plugin-storage-manager.model' | ||
16 | import { PluginVideoCategoryManager } from '@shared/models/plugins/plugin-video-category-manager.model' | ||
17 | import { PluginVideoLanguageManager } from '@shared/models/plugins/plugin-video-language-manager.model' | ||
18 | import { PluginVideoLicenceManager } from '@shared/models/plugins/plugin-video-licence-manager.model' | ||
19 | import { PluginVideoPrivacyManager } from '@shared/models/plugins/plugin-video-privacy-manager.model' | ||
20 | import { | 12 | import { |
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 |
26 | import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' | 18 | } from '@server/types/plugins' |
27 | import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model' | 19 | import { |
20 | PluginPlaylistPrivacyManager, | ||
21 | PluginSettingsManager, | ||
22 | PluginStorageManager, | ||
23 | PluginVideoCategoryManager, | ||
24 | PluginVideoLanguageManager, | ||
25 | PluginVideoLicenceManager, | ||
26 | PluginVideoPrivacyManager, | ||
27 | RegisterServerHookOptions, | ||
28 | RegisterServerSettingOptions | ||
29 | } from '@shared/models' | ||
28 | import { serverHookObject } from '@shared/models/plugins/server-hook.model' | 30 | import { serverHookObject } from '@shared/models/plugins/server-hook.model' |
29 | import { buildPluginHelpers } from './plugin-helpers' | 31 | import { buildPluginHelpers } from './plugin-helpers' |
30 | 32 | ||