X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fplugins%2Fplugin-manager.ts;h=1305f660ff3333ff1c0feec816dd8770c51a85c6;hb=4d526901349b35bfac9811acc45854c65639cee3;hp=ff00ab9e8b5bd2d164fb63e3fbccd894380a8f90;hpb=c7cdac440970525d78d257a055899c26f6899a82;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts index ff00ab9e8..1305f660f 100644 --- a/server/lib/plugins/plugin-manager.ts +++ b/server/lib/plugins/plugin-manager.ts @@ -5,7 +5,13 @@ import { basename, join } from 'path' import { decachePlugin } from '@server/helpers/decache' import { MOAuthTokenUser, MUser } from '@server/types/models' import { getCompleteLocale } from '@shared/core-utils' -import { ClientScriptJSON, PluginPackageJSON, PluginTranslation, PluginTranslationPathsJSON, RegisterServerHookOptions } from '@shared/models' +import { + ClientScriptJSON, + PluginPackageJSON, + PluginTranslation, + PluginTranslationPathsJSON, + RegisterServerHookOptions +} from '@shared/models' import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks' import { PluginType } from '../../../shared/models/plugins/plugin.type' import { ServerHook, ServerHookName } from '../../../shared/models/plugins/server/server-hook.model' @@ -271,6 +277,8 @@ export class PluginManager implements ServerHook { logger.info('Regenerating registered plugin CSS to global file.') await this.regeneratePluginGlobalCSS() } + + ClientHtml.invalidCache() } // ###################### Installation ###################### @@ -413,6 +421,8 @@ export class PluginManager implements ServerHook { } await this.addTranslations(plugin, npmName, packageJSON.translations) + + ClientHtml.invalidCache() } private async registerPlugin (plugin: PluginModel, pluginPath: string, packageJSON: PluginPackageJSON) { @@ -467,8 +477,6 @@ export class PluginManager implements ServerHook { // ###################### CSS ###################### private resetCSSGlobalFile () { - ClientHtml.invalidCache() - return outputFile(PLUGIN_GLOBAL_CSS_PATH, '') } @@ -476,8 +484,6 @@ export class PluginManager implements ServerHook { for (const cssPath of cssRelativePaths) { await this.concatFiles(join(pluginPath, cssPath), PLUGIN_GLOBAL_CSS_PATH) } - - ClientHtml.invalidCache() } private concatFiles (input: string, output: string) {