blob: 2f4db190908cf9f927f68d90aab837d91466497c [file] [log] [blame]
Adrià Vilanova Martínez2ba5d8d2024-05-04 21:17:16 +02001import Script, { ConcreteScript } from '../common/architecture/scripts/Script';
2import ScriptFilterListProvider from '../common/architecture/scripts/ScriptFilterListProvider';
Adrià Vilanova Martínezc78c3ad2024-05-18 00:35:51 +02003import InjectLitComponentsScript from './litComponents/injectLitComponents.script';
Adrià Vilanova Martínez2ba5d8d2024-05-04 21:17:16 +02004import MWI18nServerScript from './mainWorldServers/MWI18nServerScript.script';
5import MWOptionsWatcherServerScript from './mainWorldServers/MWOptionsWatcherServerScript.script';
Adrià Vilanova Martínezf7e86852024-05-11 14:16:38 +02006import OptionsProviderSetUpScript from './optionsProvider/optionsProvider.script';
Adrià Vilanova Martíneza2dda312024-05-18 00:35:51 +02007import ApplyStartupDataModificationsOnMainScript from './startupDataStorage/applyStartupDataModificationsOnMain.script';
8import ApplyStartupDataModificationsOnStartScript from './startupDataStorage/applyStartupDataModificationsOnStart.script';
Adrià Vilanova Martínez2ba5d8d2024-05-04 21:17:16 +02009import XHRInterceptorScript from './xhrInterceptor/xhrInterceptor.script';
10
11export default class StandaloneScripts extends ScriptFilterListProvider {
12 private scripts: ConcreteScript[] = [
Adrià Vilanova Martíneza2dda312024-05-18 00:35:51 +020013 ApplyStartupDataModificationsOnMainScript,
14 ApplyStartupDataModificationsOnStartScript,
Adrià Vilanova Martínezc78c3ad2024-05-18 00:35:51 +020015 InjectLitComponentsScript,
Adrià Vilanova Martínez2ba5d8d2024-05-04 21:17:16 +020016 MWI18nServerScript,
17 MWOptionsWatcherServerScript,
Adrià Vilanova Martínezf7e86852024-05-11 14:16:38 +020018 OptionsProviderSetUpScript,
Adrià Vilanova Martínez2ba5d8d2024-05-04 21:17:16 +020019 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}