feat(scripts): add sorted scripts provider with new runAfter field
This scripts provider provides scripts sorted by priority and taking
into account the new runAfter field for scripts.
Bug: twpowertools:226
Change-Id: I40e39121f5c18a04eeff932c30dc2c4277993bde
diff --git a/src/common/architecture/scripts/Script.ts b/src/common/architecture/scripts/Script.ts
index 0e33e7e..8a8e9de 100644
--- a/src/common/architecture/scripts/Script.ts
+++ b/src/common/architecture/scripts/Script.ts
@@ -53,6 +53,12 @@
export default abstract class Script {
/**
+ * Used to indicate that this script should run after the members of the
+ * provided array.
+ */
+ readonly runAfter: ConcreteScript[] = [];
+
+ /**
* Priority with which the script is executed. Scripts with a lower value are
* executed first.
*/