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 | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 7 | import XHRInterceptorScript from './xhrInterceptor/xhrInterceptor.script'; |
| 8 | |
| 9 | export default class StandaloneScripts extends ScriptFilterListProvider { |
| 10 | private scripts: ConcreteScript[] = [ |
Adrià Vilanova Martínez | c78c3ad | 2024-05-18 00:35:51 +0200 | [diff] [blame] | 11 | InjectLitComponentsScript, |
Adrià Vilanova Martínez | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 12 | MWI18nServerScript, |
| 13 | MWOptionsWatcherServerScript, |
Adrià Vilanova Martínez | f7e8685 | 2024-05-11 14:16:38 +0200 | [diff] [blame] | 14 | OptionsProviderSetUpScript, |
Adrià Vilanova Martínez | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 15 | XHRInterceptorScript, |
| 16 | ]; |
| 17 | private initializedScripts: Script[]; |
| 18 | |
| 19 | protected getUnfilteredScriptsList() { |
| 20 | if (this.initializedScripts === undefined) { |
| 21 | this.initializedScripts = this.scripts.map((script) => new script()); |
| 22 | } |
| 23 | return this.initializedScripts; |
| 24 | } |
| 25 | } |