aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins/plugin-helpers.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-09 09:57:32 +0200
committerChocobozzz <me@florianbigard.com>2020-04-09 09:57:32 +0200
commitbc0d801bb7a0cc503c1637f4a07bb51d68d85608 (patch)
tree6eb486085fb5b536309315b4db06c790acf98ed0 /server/lib/plugins/plugin-helpers.ts
parent00c228363f0db1d181d546eebb0c7ec3eb487976 (diff)
downloadPeerTube-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.ts20
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 @@
1import { PluginModel } from '@server/models/server/plugin'
2import { PeerTubeHelpers } from '@server/typings/plugins'
3
4function buildPluginHelpers (npmName: string, plugin: PluginModel): PeerTubeHelpers {
5 const logger = buildLogger(npmName)
6
7 return {
8 logger
9 }
10}
11
12export {
13 buildPluginHelpers
14}
15
16// ---------------------------------------------------------------------------
17
18function buildLogger (npmName: string) {
19 return buildLogger(npmName)
20}