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/plugins/plugin-manager.ts | |
parent | 0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff) | |
download | PeerTube-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.ts | 28 |
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 @@ | |||
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 |