X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube-plugins.ts;h=e40606107249e5b7ab8ea81be2dd14c5b9cfbd4e;hb=49c3bf6fa25afb49c8a27937147043c6e4ce95c3;hp=10cff7dd739468303196af16c4e553300d95c4fa;hpb=b5f919ac8eb2a1c20e26582fdfd377d687710d8f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube-plugins.ts b/server/tools/peertube-plugins.ts index 10cff7dd7..e40606107 100644 --- a/server/tools/peertube-plugins.ts +++ b/server/tools/peertube-plugins.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as program from 'commander' import { PluginType } from '../../shared/models/plugins/plugin.type' import { getAccessToken } from '../../shared/extra-utils/users/login' @@ -65,9 +68,9 @@ async function pluginsListCLI () { const { url, username, password } = await getServerCredentials(program) const accessToken = await getAdminTokenOrDie(url, username, password) - let type: PluginType - if (program['onlyThemes']) type = PluginType.THEME - if (program['onlyPlugins']) type = PluginType.PLUGIN + let pluginType: PluginType + if (program['onlyThemes']) pluginType = PluginType.THEME + if (program['onlyPlugins']) pluginType = PluginType.PLUGIN const res = await listPlugins({ url, @@ -75,7 +78,7 @@ async function pluginsListCLI () { start: 0, count: 100, sort: 'name', - type + pluginType }) const plugins: PeerTubePlugin[] = res.body.data