blob: 1686b77bb0052d8668b21f9288ab4adf6dd774d0 [file] [log] [blame]
Adrià Vilanova Martíneza2dda312024-05-18 00:35:51 +02001import DependenciesProviderSingleton, {
2 StartupDataStorageDependency,
3} from '../../common/architecture/dependenciesProvider/DependenciesProvider';
4import Script, {
5 ScriptEnvironment,
6 ScriptPage,
7} from '../../common/architecture/scripts/Script';
8
9/**
10 * Base class which applies pending startup data modifications which have been
11 * added by other scripts.
12 */
13export default abstract class BaseApplyStartupDataModificationsScript extends Script {
14 priority = 2 ** 32;
15
16 page = ScriptPage.CommunityConsole;
17 environment = ScriptEnvironment.ContentScript;
18
19 execute() {
20 const dependenciesProvider = DependenciesProviderSingleton.getInstance();
21 const startupDataStoarge = dependenciesProvider.getDependency(
22 StartupDataStorageDependency,
23 );
24 startupDataStoarge.applyModifications();
25 }
26}