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'
logger.info('Regenerating registered plugin CSS to global file.')
await this.regeneratePluginGlobalCSS()
}
+
+ ClientHtml.invalidCache()
}
// ###################### Installation ######################
}
await this.addTranslations(plugin, npmName, packageJSON.translations)
+
+ ClientHtml.invalidCache()
}
private async registerPlugin (plugin: PluginModel, pluginPath: string, packageJSON: PluginPackageJSON) {
// ###################### CSS ######################
private resetCSSGlobalFile () {
- ClientHtml.invalidCache()
-
return outputFile(PLUGIN_GLOBAL_CSS_PATH, '')
}
for (const cssPath of cssRelativePaths) {
await this.concatFiles(join(pluginPath, cssPath), PLUGIN_GLOBAL_CSS_PATH)
}
-
- ClientHtml.invalidCache()
}
private concatFiles (input: string, output: string) {