From 9ae88819c202a6ce4a36b56506f508a5603e8eab Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Jul 2019 11:17:42 +0200 Subject: Change plugin models names --- server/typings/plugins/index.d.ts | 2 +- server/typings/plugins/plugin-library.model.ts | 4 ++-- server/typings/plugins/register-options.model.ts | 19 ------------------- .../typings/plugins/register-server-option.model.ts | 19 +++++++++++++++++++ 4 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 server/typings/plugins/register-options.model.ts create mode 100644 server/typings/plugins/register-server-option.model.ts (limited to 'server/typings') diff --git a/server/typings/plugins/index.d.ts b/server/typings/plugins/index.d.ts index bddb3089e..9570579ef 100644 --- a/server/typings/plugins/index.d.ts +++ b/server/typings/plugins/index.d.ts @@ -1,2 +1,2 @@ -export * from './register-options.model' +export * from './register-server-option.model' export * from './plugin-library.model' diff --git a/server/typings/plugins/plugin-library.model.ts b/server/typings/plugins/plugin-library.model.ts index fd90a3b46..5b517ee9f 100644 --- a/server/typings/plugins/plugin-library.model.ts +++ b/server/typings/plugins/plugin-library.model.ts @@ -1,7 +1,7 @@ -import { RegisterOptions } from './register-options.model' +import { RegisterServerOptions } from './register-server-option.model' export interface PluginLibrary { - register: (options: RegisterOptions) => Promise + register: (options: RegisterServerOptions) => Promise unregister: () => Promise } diff --git a/server/typings/plugins/register-options.model.ts b/server/typings/plugins/register-options.model.ts deleted file mode 100644 index 007ef5e1b..000000000 --- a/server/typings/plugins/register-options.model.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { logger } from '../../helpers/logger' -import { RegisterHookOptions } from '../../../shared/models/plugins/register-hook.model' -import { RegisterSettingOptions } from '../../../shared/models/plugins/register-setting.model' -import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model' -import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model' - -export type RegisterOptions = { - registerHook: (options: RegisterHookOptions) => void - - registerSetting: (options: RegisterSettingOptions) => void - - settingsManager: PluginSettingsManager - - storageManager: PluginStorageManager - - peertubeHelpers: { - logger: typeof logger - } -} diff --git a/server/typings/plugins/register-server-option.model.ts b/server/typings/plugins/register-server-option.model.ts new file mode 100644 index 000000000..91a06a7c5 --- /dev/null +++ b/server/typings/plugins/register-server-option.model.ts @@ -0,0 +1,19 @@ +import { logger } from '../../helpers/logger' +import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model' +import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model' +import { RegisterServerHookOptions } from '../../../shared/models/plugins/register-server-hook.model' +import { RegisterServerSettingOptions } from '../../../shared/models/plugins/register-server-setting.model' + +export type RegisterServerOptions = { + registerHook: (options: RegisterServerHookOptions) => void + + registerSetting: (options: RegisterServerSettingOptions) => void + + settingsManager: PluginSettingsManager + + storageManager: PluginStorageManager + + peertubeHelpers: { + logger: typeof logger + } +} -- cgit v1.2.3