diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-09 09:57:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-09 09:57:32 +0200 |
commit | bc0d801bb7a0cc503c1637f4a07bb51d68d85608 (patch) | |
tree | 6eb486085fb5b536309315b4db06c790acf98ed0 /server/lib/plugins/plugin-helpers.ts | |
parent | 00c228363f0db1d181d546eebb0c7ec3eb487976 (diff) | |
download | PeerTube-bc0d801bb7a0cc503c1637f4a07bb51d68d85608.tar.gz PeerTube-bc0d801bb7a0cc503c1637f4a07bb51d68d85608.tar.zst PeerTube-bc0d801bb7a0cc503c1637f4a07bb51d68d85608.zip |
Refactor plugin helpers factory
Diffstat (limited to 'server/lib/plugins/plugin-helpers.ts')
-rw-r--r-- | server/lib/plugins/plugin-helpers.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/lib/plugins/plugin-helpers.ts b/server/lib/plugins/plugin-helpers.ts new file mode 100644 index 000000000..36d08d84a --- /dev/null +++ b/server/lib/plugins/plugin-helpers.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { PluginModel } from '@server/models/server/plugin' | ||
2 | import { PeerTubeHelpers } from '@server/typings/plugins' | ||
3 | |||
4 | function buildPluginHelpers (npmName: string, plugin: PluginModel): PeerTubeHelpers { | ||
5 | const logger = buildLogger(npmName) | ||
6 | |||
7 | return { | ||
8 | logger | ||
9 | } | ||
10 | } | ||
11 | |||
12 | export { | ||
13 | buildPluginHelpers | ||
14 | } | ||
15 | |||
16 | // --------------------------------------------------------------------------- | ||
17 | |||
18 | function buildLogger (npmName: string) { | ||
19 | return buildLogger(npmName) | ||
20 | } | ||