Adrià Vilanova MartÃnez | 33a009c | 2024-11-09 22:41:56 +0100 | [diff] [blame] | 1 | import Script, { |
| 2 | ScriptEnvironment, |
| 3 | ScriptPage, |
| 4 | } from '../../../common/architecture/scripts/Script'; |
| 5 | import { StartupDataStoragePort } from '../../../services/communityConsole/StartupDataStorage.port'; |
| 6 | |
| 7 | /** |
| 8 | * Base class which applies pending startup data modifications which have been |
| 9 | * added by other scripts. |
| 10 | */ |
| 11 | export default abstract class BaseApplyStartupDataModificationsScript extends Script { |
| 12 | priority = 2 ** 32; |
| 13 | |
| 14 | page = ScriptPage.CommunityConsole; |
| 15 | environment = ScriptEnvironment.ContentScript; |
| 16 | |
| 17 | constructor(private startupDataStorage: StartupDataStoragePort) { |
| 18 | super(); |
| 19 | } |
| 20 | |
| 21 | execute() { |
| 22 | this.startupDataStorage.applyModifications(); |
| 23 | } |
| 24 | } |