aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/plugins/plugin-manager.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts
index a87d02c56..381a89473 100644
--- a/server/lib/plugins/plugin-manager.ts
+++ b/server/lib/plugins/plugin-manager.ts
@@ -9,15 +9,15 @@ import { PLUGIN_GLOBAL_CSS_PATH } from '../../initializers/constants'
9import { PluginType } from '../../../shared/models/plugins/plugin.type' 9import { PluginType } from '../../../shared/models/plugins/plugin.type'
10import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn' 10import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn'
11import { outputFile, readJSON } from 'fs-extra' 11import { outputFile, readJSON } from 'fs-extra'
12import { RegisterSettingOptions } from '../../../shared/models/plugins/register-setting.model'
13import { RegisterHookOptions } from '../../../shared/models/plugins/register-hook.model'
14import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model' 12import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model'
15import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model' 13import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model'
16import { ServerHook, ServerHookName, serverHookObject } from '../../../shared/models/plugins/server-hook.model' 14import { ServerHook, ServerHookName, serverHookObject } from '../../../shared/models/plugins/server-hook.model'
17import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks' 15import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks'
18import { RegisterOptions } from '../../typings/plugins/register-options.model' 16import { RegisterServerOptions } from '../../typings/plugins/register-server-option.model'
19import { PluginLibrary } from '../../typings/plugins' 17import { PluginLibrary } from '../../typings/plugins'
20import { ClientHtml } from '../client-html' 18import { ClientHtml } from '../client-html'
19import { RegisterServerHookOptions } from '../../../shared/models/plugins/register-server-hook.model'
20import { RegisterServerSettingOptions } from '../../../shared/models/plugins/register-server-setting.model'
21 21
22export interface RegisteredPlugin { 22export interface RegisteredPlugin {
23 npmName: string 23 npmName: string
@@ -51,7 +51,7 @@ export class PluginManager implements ServerHook {
51 private static instance: PluginManager 51 private static instance: PluginManager
52 52
53 private registeredPlugins: { [ name: string ]: RegisteredPlugin } = {} 53 private registeredPlugins: { [ name: string ]: RegisteredPlugin } = {}
54 private settings: { [ name: string ]: RegisterSettingOptions[] } = {} 54 private settings: { [ name: string ]: RegisterServerSettingOptions[] } = {}
55 private hooks: { [ name: string ]: HookInformationValue[] } = {} 55 private hooks: { [ name: string ]: HookInformationValue[] } = {}
56 56
57 private constructor () { 57 private constructor () {
@@ -391,8 +391,8 @@ export class PluginManager implements ServerHook {
391 391
392 // ###################### Generate register helpers ###################### 392 // ###################### Generate register helpers ######################
393 393
394 private getRegisterHelpers (npmName: string, plugin: PluginModel): RegisterOptions { 394 private getRegisterHelpers (npmName: string, plugin: PluginModel): RegisterServerOptions {
395 const registerHook = (options: RegisterHookOptions) => { 395 const registerHook = (options: RegisterServerHookOptions) => {
396 if (serverHookObject[options.target] !== true) { 396 if (serverHookObject[options.target] !== true) {
397 logger.warn('Unknown hook %s of plugin %s. Skipping.', options.target, npmName) 397 logger.warn('Unknown hook %s of plugin %s. Skipping.', options.target, npmName)
398 return 398 return
@@ -408,7 +408,7 @@ export class PluginManager implements ServerHook {
408 }) 408 })
409 } 409 }
410 410
411 const registerSetting = (options: RegisterSettingOptions) => { 411 const registerSetting = (options: RegisterServerSettingOptions) => {
412 if (!this.settings[npmName]) this.settings[npmName] = [] 412 if (!this.settings[npmName]) this.settings[npmName] = []
413 413
414 this.settings[npmName].push(options) 414 this.settings[npmName].push(options)