refactor(interop-thread-page): migrate to the new DI architecture
Bug: twpowertools:226
Change-Id: Ie2a5e57574a1d986efc6e1c7a64a562d435e956e
diff --git a/src/features/Features.ts b/src/features/Features.ts
index d0861c5..2f38f34 100644
--- a/src/features/Features.ts
+++ b/src/features/Features.ts
@@ -3,14 +3,12 @@
import ExtraInfoFeature from './extraInfo/extraInfo.feature';
import WorkflowsFeature from './workflows/workflows.feature';
import LoadDraftsFeature from './loadDrafts/loadDrafts.feature';
-import InteropThreadPageFeature from './interopThreadPage/interopThreadPage.feature';
export type ConcreteFeatureClass = { new (): Feature };
export default class Features extends ScriptFilterListProvider {
private features: ConcreteFeatureClass[] = [
ExtraInfoFeature,
- InteropThreadPageFeature,
LoadDraftsFeature,
WorkflowsFeature,
];
diff --git a/src/features/interopThreadPage/interopThreadPage.feature.ts b/src/features/interopThreadPage/interopThreadPage.feature.ts
deleted file mode 100644
index 0d84075..0000000
--- a/src/features/interopThreadPage/interopThreadPage.feature.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import Feature from '../../common/architecture/features/Feature';
-import { ConcreteScript } from '../../common/architecture/scripts/Script';
-import { OptionCodename } from '../../common/options/optionsPrototype';
-import SetThreadPageInDataStartupScript from './scripts/setThreadPageInDataStartupScript.script';
-
-export default class InteropThreadPageFeature extends Feature {
- public readonly scripts: ConcreteScript[] = [
- SetThreadPageInDataStartupScript,
- ];
-
- readonly codename = 'interopThreadPage';
- readonly relatedOptions: OptionCodename[] = [
- 'interopthreadpage',
- 'interopthreadpage_mode',
- ];
-}
diff --git a/src/features/interopThreadPage/scripts/setThreadPageInDataStartupScript.script.ts b/src/features/interopThreadPage/presentation/scripts/setup.script.ts
similarity index 76%
rename from src/features/interopThreadPage/scripts/setThreadPageInDataStartupScript.script.ts
rename to src/features/interopThreadPage/presentation/scripts/setup.script.ts
index 32c17eb..67c0ce9 100644
--- a/src/features/interopThreadPage/scripts/setThreadPageInDataStartupScript.script.ts
+++ b/src/features/interopThreadPage/presentation/scripts/setup.script.ts
@@ -1,19 +1,15 @@
import DependenciesProviderSingleton, {
OptionsProviderDependency,
StartupDataStorageDependency,
-} from '../../../common/architecture/dependenciesProvider/DependenciesProvider';
-import Script, {
- ScriptEnvironment,
- ScriptPage,
- ScriptRunPhase,
-} from '../../../common/architecture/scripts/Script';
+} from '../../../../common/architecture/dependenciesProvider/DependenciesProvider';
+import Script from '../../../../common/architecture/scripts/Script';
const SMEI_RCE_THREAD_INTEROP = 22;
-export default class SetThreadPageInDataStartupScript extends Script {
- page = ScriptPage.CommunityConsole;
- environment = ScriptEnvironment.ContentScript;
- runPhase = ScriptRunPhase.Start;
+export default class InteropThreadPageSetupScript extends Script {
+ page: never;
+ environment: never;
+ runPhase: never;
async execute() {
const dependenciesProvider = DependenciesProviderSingleton.getInstance();