+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'
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,
start: 0,
count: 100,
sort: 'name',
- type
+ pluginType
})
const plugins: PeerTubePlugin[] = res.body.data