feat(scripts): add ScriptRunner and NodeWatcherScript
This will allow us to initialize and use scripts and node watcher
handlers in the entrypoints instead of using the legacy
EntrypointScriptRunner.
Bug: twpowertools:226
Change-Id: Ic7e2f36a758555210dc0197fd10b1da7d9f424e9
diff --git a/src/infrastructure/presentation/scripts/ScriptRunner.ts b/src/infrastructure/presentation/scripts/ScriptRunner.ts
new file mode 100644
index 0000000..15e70bb
--- /dev/null
+++ b/src/infrastructure/presentation/scripts/ScriptRunner.ts
@@ -0,0 +1,11 @@
+import Script from '../../../common/architecture/scripts/Script';
+
+export default class ScriptRunner {
+ constructor(private scripts: Script[]) {}
+
+ run() {
+ for (const script of this.scripts) {
+ script.execute();
+ }
+ }
+}