Adrià Vilanova MartÃnez | a2dda31 | 2024-05-18 00:35:51 +0200 | [diff] [blame] | 1 | import DependenciesProviderSingleton, { |
| 2 | StartupDataStorageDependency, |
| 3 | } from '../../common/architecture/dependenciesProvider/DependenciesProvider'; |
| 4 | import 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 | */ |
| 13 | export 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 | } |