refactor(workflows): migrate to the new DI architecture
Bug: twpowertools:226
Change-Id: I8700cfd66883a667fc6ae0dffe9deb96f8d8cc80
diff --git a/src/entryPoints/communityConsole/contentScripts/start.ts b/src/entryPoints/communityConsole/contentScripts/start.ts
index c408b9f..73d2230 100644
--- a/src/entryPoints/communityConsole/contentScripts/start.ts
+++ b/src/entryPoints/communityConsole/contentScripts/start.ts
@@ -5,6 +5,7 @@
AutoRefreshDependency,
OptionsProviderDependency,
StartupDataStorageDependency,
+ WorkflowsImportDependency,
} from '../../../common/architecture/dependenciesProvider/DependenciesProvider';
import { Context } from '../../../common/architecture/entrypoint/Context';
import {
@@ -22,6 +23,7 @@
import { SortedScriptsProviderAdapter } from '../../../infrastructure/presentation/scripts/SortedScriptsProvider.adapter';
import StandaloneScripts from '../../../scripts/Scripts';
import LoadDraftsSetupScript from '../../../features/loadDrafts/presentation/scripts/setup.script';
+import WorkflowsImportSetUpScript from '../../../features/workflows/presentation/scripts/importSetUp.script';
const scriptRunner = createScriptRunner();
scriptRunner.run();
@@ -35,6 +37,9 @@
const startupDataStorage = dependenciesProvider.getDependency(
StartupDataStorageDependency,
);
+ const workflowsImport = dependenciesProvider.getDependency(
+ WorkflowsImportDependency,
+ );
const context: Context = {
page: ScriptPage.CommunityConsole,
@@ -51,6 +56,7 @@
new CCDarkThemeInjectForcedDarkTheme(),
new InteropThreadPageSetupScript(),
new LoadDraftsSetupScript(optionsProvider, startupDataStorage),
+ new WorkflowsImportSetUpScript(workflowsImport),
// Non-DI scripts (legacy, should be migrated to use a DI approach)
...new Features().getScripts(context),