Adrià Vilanova Martínez | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 1 | import Script, { ConcreteScript } from '../common/architecture/scripts/Script'; |
| 2 | import ScriptFilterListProvider from '../common/architecture/scripts/ScriptFilterListProvider'; |
Adrià Vilanova Martínez | c78c3ad | 2024-05-18 00:35:51 +0200 | [diff] [blame] | 3 | import InjectLitComponentsScript from './litComponents/injectLitComponents.script'; |
Adrià Vilanova Martínez | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 4 | import MWI18nServerScript from './mainWorldServers/MWI18nServerScript.script'; |
| 5 | import MWOptionsWatcherServerScript from './mainWorldServers/MWOptionsWatcherServerScript.script'; |
Adrià Vilanova Martínez | f7e8685 | 2024-05-11 14:16:38 +0200 | [diff] [blame] | 6 | import OptionsProviderSetUpScript from './optionsProvider/optionsProvider.script'; |
Adrià Vilanova Martínez | a2dda31 | 2024-05-18 00:35:51 +0200 | [diff] [blame^] | 7 | import ApplyStartupDataModificationsOnMainScript from './startupDataStorage/applyStartupDataModificationsOnMain.script'; |
| 8 | import ApplyStartupDataModificationsOnStartScript from './startupDataStorage/applyStartupDataModificationsOnStart.script'; |
Adrià Vilanova Martínez | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 9 | import XHRInterceptorScript from './xhrInterceptor/xhrInterceptor.script'; |
| 10 | |
| 11 | export default class StandaloneScripts extends ScriptFilterListProvider { |
| 12 | private scripts: ConcreteScript[] = [ |
Adrià Vilanova Martínez | a2dda31 | 2024-05-18 00:35:51 +0200 | [diff] [blame^] | 13 | ApplyStartupDataModificationsOnMainScript, |
| 14 | ApplyStartupDataModificationsOnStartScript, |
Adrià Vilanova Martínez | c78c3ad | 2024-05-18 00:35:51 +0200 | [diff] [blame] | 15 | InjectLitComponentsScript, |
Adrià Vilanova Martínez | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 16 | MWI18nServerScript, |
| 17 | MWOptionsWatcherServerScript, |
Adrià Vilanova Martínez | f7e8685 | 2024-05-11 14:16:38 +0200 | [diff] [blame] | 18 | OptionsProviderSetUpScript, |
Adrià Vilanova Martínez | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 19 | XHRInterceptorScript, |
| 20 | ]; |
| 21 | private initializedScripts: Script[]; |
| 22 | |
| 23 | protected getUnfilteredScriptsList() { |
| 24 | if (this.initializedScripts === undefined) { |
| 25 | this.initializedScripts = this.scripts.map((script) => new script()); |
| 26 | } |
| 27 | return this.initializedScripts; |
| 28 | } |
| 29 | } |