@awesome-ecs/abstract 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/dist/components/component.d.ts +1 -2
  2. package/dist/components/component.d.ts.map +1 -0
  3. package/dist/components/identity-component.d.ts +2 -1
  4. package/dist/components/identity-component.d.ts.map +1 -0
  5. package/dist/components/index.d.ts +1 -0
  6. package/dist/components/index.d.ts.map +1 -0
  7. package/dist/entities/entity-events.d.ts +1 -0
  8. package/dist/entities/entity-events.d.ts.map +1 -0
  9. package/dist/entities/entity-proxies.d.ts +1 -0
  10. package/dist/entities/entity-proxies.d.ts.map +1 -0
  11. package/dist/entities/entity-queue.d.ts +1 -0
  12. package/dist/entities/entity-queue.d.ts.map +1 -0
  13. package/dist/entities/entity-repository.d.ts +1 -0
  14. package/dist/entities/entity-repository.d.ts.map +1 -0
  15. package/dist/entities/entity-scheduler.d.ts +1 -0
  16. package/dist/entities/entity-scheduler.d.ts.map +1 -0
  17. package/dist/entities/entity-snapshot.d.ts +1 -0
  18. package/dist/entities/entity-snapshot.d.ts.map +1 -0
  19. package/dist/entities/entity.d.ts +3 -0
  20. package/dist/entities/entity.d.ts.map +1 -0
  21. package/dist/entities/index.d.ts +1 -0
  22. package/dist/entities/index.d.ts.map +1 -0
  23. package/dist/factories/context-factory.d.ts +1 -0
  24. package/dist/factories/context-factory.d.ts.map +1 -0
  25. package/dist/factories/index.d.ts +1 -0
  26. package/dist/factories/index.d.ts.map +1 -0
  27. package/dist/factories/pipeline-factory.d.ts +6 -3
  28. package/dist/factories/pipeline-factory.d.ts.map +1 -0
  29. package/dist/pipelines/index.d.ts +6 -1
  30. package/dist/pipelines/index.d.ts.map +1 -0
  31. package/dist/pipelines/index.js +5 -1
  32. package/dist/pipelines/index.js.map +1 -1
  33. package/dist/pipelines/middleware-result.d.ts +4 -3
  34. package/dist/pipelines/middleware-result.d.ts.map +1 -0
  35. package/dist/pipelines/middleware-runner.d.ts +22 -0
  36. package/dist/pipelines/middleware-runner.d.ts.map +1 -0
  37. package/dist/pipelines/middleware-runner.js +3 -0
  38. package/dist/pipelines/middleware-runner.js.map +1 -0
  39. package/dist/pipelines/middleware.d.ts +6 -5
  40. package/dist/pipelines/middleware.d.ts.map +1 -0
  41. package/dist/pipelines/pipeline-context.d.ts +15 -0
  42. package/dist/pipelines/pipeline-context.d.ts.map +1 -0
  43. package/dist/{runtime/runtime-pipeline.js → pipelines/pipeline-context.js} +1 -1
  44. package/dist/pipelines/pipeline-context.js.map +1 -0
  45. package/dist/pipelines/pipeline-result.d.ts +9 -0
  46. package/dist/pipelines/pipeline-result.d.ts.map +1 -0
  47. package/dist/pipelines/{middleware-stop.js → pipeline-result.js} +1 -1
  48. package/dist/pipelines/pipeline-result.js.map +1 -0
  49. package/dist/pipelines/pipeline-runner.d.ts +23 -0
  50. package/dist/pipelines/pipeline-runner.d.ts.map +1 -0
  51. package/dist/{runtime/runtime-result.js → pipelines/pipeline-runner.js} +1 -1
  52. package/dist/pipelines/pipeline-runner.js.map +1 -0
  53. package/dist/pipelines/pipeline-status.d.ts +10 -0
  54. package/dist/pipelines/pipeline-status.d.ts.map +1 -0
  55. package/dist/pipelines/pipeline-status.js +14 -0
  56. package/dist/pipelines/pipeline-status.js.map +1 -0
  57. package/dist/pipelines/pipeline.d.ts +11 -9
  58. package/dist/pipelines/pipeline.d.ts.map +1 -0
  59. package/dist/systems/index.d.ts +12 -11
  60. package/dist/systems/index.d.ts.map +1 -0
  61. package/dist/systems/index.js +11 -11
  62. package/dist/systems/index.js.map +1 -1
  63. package/dist/systems/{system-type.d.ts → module/system-type.d.ts} +1 -0
  64. package/dist/systems/module/system-type.d.ts.map +1 -0
  65. package/dist/systems/module/system-type.js.map +1 -0
  66. package/dist/systems/{systems-module.d.ts → module/systems-module.d.ts} +6 -5
  67. package/dist/systems/module/systems-module.d.ts.map +1 -0
  68. package/dist/systems/module/systems-module.js.map +1 -0
  69. package/dist/systems/{context → pipeline}/system-context-entity.d.ts +4 -2
  70. package/dist/systems/pipeline/system-context-entity.d.ts.map +1 -0
  71. package/dist/systems/pipeline/system-context-entity.js.map +1 -0
  72. package/dist/systems/{context → pipeline}/system-context-events.d.ts +1 -0
  73. package/dist/systems/pipeline/system-context-events.d.ts.map +1 -0
  74. package/dist/systems/pipeline/system-context-events.js.map +1 -0
  75. package/dist/systems/{context → pipeline}/system-context-proxies.d.ts +1 -0
  76. package/dist/systems/pipeline/system-context-proxies.d.ts.map +1 -0
  77. package/dist/systems/pipeline/system-context-proxies.js.map +1 -0
  78. package/dist/systems/{context → pipeline}/system-context-repository.d.ts +1 -0
  79. package/dist/systems/pipeline/system-context-repository.d.ts.map +1 -0
  80. package/dist/systems/pipeline/system-context-repository.js.map +1 -0
  81. package/dist/systems/{context → pipeline}/system-context-scheduler.d.ts +3 -2
  82. package/dist/systems/pipeline/system-context-scheduler.d.ts.map +1 -0
  83. package/dist/systems/pipeline/system-context-scheduler.js.map +1 -0
  84. package/dist/systems/{context → pipeline}/system-context-snapshot.d.ts +3 -1
  85. package/dist/systems/pipeline/system-context-snapshot.d.ts.map +1 -0
  86. package/dist/systems/pipeline/system-context-snapshot.js.map +1 -0
  87. package/dist/systems/{system-context.d.ts → pipeline/system-context.d.ts} +12 -10
  88. package/dist/systems/pipeline/system-context.d.ts.map +1 -0
  89. package/dist/systems/pipeline/system-context.js.map +1 -0
  90. package/dist/systems/{system-middleware.d.ts → pipeline/system-middleware.d.ts} +3 -2
  91. package/dist/systems/pipeline/system-middleware.d.ts.map +1 -0
  92. package/dist/systems/pipeline/system-middleware.js.map +1 -0
  93. package/dist/systems/runtime/systems-runtime-context.d.ts +10 -10
  94. package/dist/systems/runtime/systems-runtime-context.d.ts.map +1 -0
  95. package/dist/systems/runtime/systems-runtime-middleware.d.ts +2 -1
  96. package/dist/systems/runtime/systems-runtime-middleware.d.ts.map +1 -0
  97. package/dist/systems/{systems-runtime.d.ts → runtime/systems-runtime.d.ts} +4 -3
  98. package/dist/systems/runtime/systems-runtime.d.ts.map +1 -0
  99. package/dist/systems/runtime/systems-runtime.js.map +1 -0
  100. package/dist/utils/index.d.ts +1 -0
  101. package/dist/utils/index.d.ts.map +1 -0
  102. package/dist/utils/json-serializer.d.ts +1 -0
  103. package/dist/utils/json-serializer.d.ts.map +1 -0
  104. package/dist/utils/logger.d.ts +1 -0
  105. package/dist/utils/logger.d.ts.map +1 -0
  106. package/dist/utils/performance-timer.d.ts +1 -0
  107. package/dist/utils/performance-timer.d.ts.map +1 -0
  108. package/dist/utils/types.d.ts +1 -0
  109. package/dist/utils/types.d.ts.map +1 -0
  110. package/package.json +8 -10
  111. package/dist/pipelines/middleware-stop.d.ts +0 -5
  112. package/dist/pipelines/middleware-stop.js.map +0 -1
  113. package/dist/runtime/index.d.ts +0 -3
  114. package/dist/runtime/index.js +0 -20
  115. package/dist/runtime/index.js.map +0 -1
  116. package/dist/runtime/runtime-pipeline.d.ts +0 -11
  117. package/dist/runtime/runtime-pipeline.js.map +0 -1
  118. package/dist/runtime/runtime-result.d.ts +0 -20
  119. package/dist/runtime/runtime-result.js.map +0 -1
  120. package/dist/runtime/runtime-status.d.ts +0 -7
  121. package/dist/runtime/runtime-status.js +0 -12
  122. package/dist/runtime/runtime-status.js.map +0 -1
  123. package/dist/systems/context/system-context-entity.js.map +0 -1
  124. package/dist/systems/context/system-context-events.js.map +0 -1
  125. package/dist/systems/context/system-context-proxies.js.map +0 -1
  126. package/dist/systems/context/system-context-repository.js.map +0 -1
  127. package/dist/systems/context/system-context-scheduler.js.map +0 -1
  128. package/dist/systems/context/system-context-snapshot.js.map +0 -1
  129. package/dist/systems/system-context.js.map +0 -1
  130. package/dist/systems/system-middleware.js.map +0 -1
  131. package/dist/systems/system-type.js.map +0 -1
  132. package/dist/systems/systems-module.js.map +0 -1
  133. package/dist/systems/systems-runtime.js.map +0 -1
  134. package/runtime.d.ts +0 -1
  135. /package/dist/systems/{system-type.js → module/system-type.js} +0 -0
  136. /package/dist/systems/{systems-module.js → module/systems-module.js} +0 -0
  137. /package/dist/systems/{context → pipeline}/system-context-entity.js +0 -0
  138. /package/dist/systems/{context → pipeline}/system-context-events.js +0 -0
  139. /package/dist/systems/{context → pipeline}/system-context-proxies.js +0 -0
  140. /package/dist/systems/{context → pipeline}/system-context-repository.js +0 -0
  141. /package/dist/systems/{context → pipeline}/system-context-scheduler.js +0 -0
  142. /package/dist/systems/{context → pipeline}/system-context-snapshot.js +0 -0
  143. /package/dist/systems/{system-context.js → pipeline/system-context.js} +0 -0
  144. /package/dist/systems/{system-middleware.js → pipeline/system-middleware.js} +0 -0
  145. /package/dist/systems/{systems-runtime.js → runtime/systems-runtime.js} +0 -0
@@ -28,9 +28,8 @@ export interface IComponent {
28
28
  toJSON?(): string | object;
29
29
  /**
30
30
  * Allows for custom logic when loading the current from an `IEntitySnapshot`.
31
- *
32
31
  * The default behavior simply overwrites the fields with the target state.
33
- * @param component The target component state to apply.
34
32
  */
35
33
  load?(targetState: this): void;
36
34
  }
35
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/components/component.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAC;IAEzC;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,MAAM,CAAC,IAAI,MAAM,GAAG,MAAM,CAAC;IAE3B;;;OAGG;IACH,IAAI,CAAC,CAAC,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;CAChC"}
@@ -20,5 +20,6 @@ export interface IdentityComponent<TModel extends IEntityModel> extends ICompone
20
20
  /**
21
21
  * Keeps track when the Entity's systems have ran last. Useful to calculate the `DeltaTime` between runs.
22
22
  */
23
- readonly lastUpdated: Date;
23
+ readonly lastUpdated?: Date;
24
24
  }
25
+ //# sourceMappingURL=identity-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-component.d.ts","sourceRoot":"","sources":["../../src/components/identity-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,oBAAY,kBAAkB;IAC5B,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,MAAM,SAAS,YAAY,CAAE,SAAQ,UAAU;IAChF;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IAEnC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC;CAC7B"}
@@ -1,2 +1,3 @@
1
1
  export * from "./component";
2
2
  export * from "./identity-component";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
@@ -50,3 +50,4 @@ export interface IEntityEventsDispatcher {
50
50
  dispatchEvent(event: IEntityEvent<IEventData>, ...targets: IEntityProxy[]): void;
51
51
  dispatchEvents(events: IEntityEvent<IEventData>[], ...targets: IEntityProxy[]): void;
52
52
  }
53
+ //# sourceMappingURL=entity-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-events.d.ts","sourceRoot":"","sources":["../../src/entities/entity-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAC7C,MAAM,MAAM,6BAA6B,GAAG,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC;AAEzF;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,cAAc,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY,CAAC,UAAU,SAAS,UAAU;IACzD,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACnG,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAE7D,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,CAAC,GAAG,YAAY,EAAE,CAAC;IAElE;;OAEG;IACH,kBAAkB,IAAI,IAAI,CAAC;IAE3B;;;OAGG;IACH,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CAAC;IAEtD;;;OAGG;IACH,2BAA2B,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CACzD;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,CAAC,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACjF,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;CACtF"}
@@ -23,3 +23,4 @@ export interface IEntityProxiesManager {
23
23
  removeProxy(entity: IEntity, proxy: IEntityProxy): void;
24
24
  removeProxies(entity: IEntity, proxyEntityType?: EntityTypeUid): void;
25
25
  }
26
+ //# sourceMappingURL=entity-proxies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-proxies.d.ts","sourceRoot":"","sources":["../../src/entities/entity-proxies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B;AAED;;;GAGG;AAEH,MAAM,WAAW,WAAW,CAAC,OAAO,SAAS,OAAO,CAAE,SAAQ,YAAY;CAAG;AAE7E;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7E,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACnF,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IACxD,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACvE"}
@@ -29,3 +29,4 @@ export interface IEntityUpdateQueue {
29
29
  peek(): IEntityUpdate;
30
30
  clear(): void;
31
31
  }
32
+ //# sourceMappingURL=entity-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-queue.d.ts","sourceRoot":"","sources":["../../src/entities/entity-queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,OAAO,IAAI,aAAa,CAAC;IAEzB,IAAI,IAAI,aAAa,CAAC;IACtB,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -14,3 +14,4 @@ export interface IEntityRepository {
14
14
  delete(proxy: IEntityProxy): void;
15
15
  clear(entityType: EntityTypeUid): void;
16
16
  }
17
+ //# sourceMappingURL=entity-repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-repository.d.ts","sourceRoot":"","sources":["../../src/entities/entity-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC;IAElC,GAAG,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC;IAC3D,MAAM,CAAC,OAAO,SAAS,OAAO,EAAE,UAAU,EAAE,aAAa,GAAG,OAAO,EAAE,CAAC;IAEtE,OAAO,IAAI,OAAO,EAAE,CAAC;IAErB,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAElC,KAAK,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CAAC;CACxC"}
@@ -9,3 +9,4 @@ export interface IEntityScheduler {
9
9
  remove(entityProxy: IEntityProxy): void;
10
10
  has(entityProxy: IEntityProxy): boolean;
11
11
  }
12
+ //# sourceMappingURL=entity-scheduler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-scheduler.d.ts","sourceRoot":"","sources":["../../src/entities/entity-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/D,MAAM,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IACxC,GAAG,CAAC,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC;CACzC"}
@@ -22,3 +22,4 @@ export interface IEntitySnapshotProvider {
22
22
  applySnapshot(entity: IEntity, snapshot: IEntitySnapshot): void;
23
23
  createSnapshot(entity: IEntity): IEntitySnapshot;
24
24
  }
25
+ //# sourceMappingURL=entity-snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-snapshot.d.ts","sourceRoot":"","sources":["../../src/entities/entity-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAChE,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,eAAe,CAAC;CAClD"}
@@ -7,6 +7,8 @@ export type EntityUid = string | number;
7
7
  /**
8
8
  * The `IEntityModel` represents the basic identity information about the current `IEntity`.
9
9
  * It's mandatory for each Entity, and it contains the minimal-required information needed for instantiating the Entity.
10
+ *
11
+ * The Features property can be used to toggle Entity features on and off.
10
12
  */
11
13
  export interface IEntityModel<TFeatures extends BooleanProps<TFeatures> = unknown> {
12
14
  readonly uid: EntityUid;
@@ -31,3 +33,4 @@ export interface IEntity {
31
33
  */
32
34
  readonly myProxy: Readonly<IEntityProxy>;
33
35
  }
36
+ //# sourceMappingURL=entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/entities/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAC5C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,WAAW,YAAY,CAAC,SAAS,SAAS,YAAY,CAAC,SAAS,CAAC,GAAG,OAAO;IAC/E,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IACvD,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAEnE;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;IAE7D;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;CAC1C"}
@@ -5,3 +5,4 @@ export * from "./entity-queue";
5
5
  export * from "./entity-repository";
6
6
  export * from "./entity-scheduler";
7
7
  export * from "./entity-snapshot";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
@@ -7,3 +7,4 @@ import { ISystemsRuntimeContext } from "../systems/runtime/systems-runtime-conte
7
7
  export interface IContextFactory {
8
8
  createRuntimeContext<TEntity extends IEntity>(): ISystemsRuntimeContext<TEntity>;
9
9
  }
10
+ //# sourceMappingURL=context-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-factory.d.ts","sourceRoot":"","sources":["../../src/factories/context-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB,CAAC,OAAO,SAAS,OAAO,KAAK,sBAAsB,CAAC,OAAO,CAAC,CAAC;CAClF"}
@@ -1,2 +1,3 @@
1
1
  export * from "./context-factory";
2
2
  export * from "./pipeline-factory";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
@@ -1,11 +1,14 @@
1
1
  import { IEntity } from "../entities/entity";
2
+ import { IPipelineContext, MiddlewareResult } from "../pipelines";
2
3
  import { IPipeline } from "../pipelines/pipeline";
3
- import { IRuntimePipeline } from "../runtime/runtime-pipeline";
4
+ import { ISystemContext, ISystemsRuntimeContext } from "../systems";
4
5
  /**
5
6
  * The PipelineFactory can be used as an abstraction layer to quickly create IPipeline objects,
6
7
  * without having to manually resolve all of their dependencies.
7
8
  */
8
9
  export interface IPipelineFactory {
9
- createPipeline<TContext>(): IPipeline<TContext>;
10
- createRuntimePipeline<TEntity extends IEntity>(): IRuntimePipeline<TEntity>;
10
+ createPipeline<TContext extends IPipelineContext, TResult = MiddlewareResult>(name?: string): IPipeline<TContext, TResult>;
11
+ createSystemsPipeline<TEntity extends IEntity, TResult = MiddlewareResult>(name?: string): IPipeline<ISystemContext<TEntity>, TResult>;
12
+ createRuntimePipeline<TEntity extends IEntity, TResult = MiddlewareResult>(name?: string): IPipeline<ISystemsRuntimeContext<TEntity>, TResult>;
11
13
  }
14
+ //# sourceMappingURL=pipeline-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-factory.d.ts","sourceRoot":"","sources":["../../src/factories/pipeline-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CAAC,QAAQ,SAAS,gBAAgB,EAAE,OAAO,GAAG,gBAAgB,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAE3H,qBAAqB,CAAC,OAAO,SAAS,OAAO,EAAE,OAAO,GAAG,gBAAgB,EACvE,IAAI,CAAC,EAAE,MAAM,GACZ,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;IAE/C,qBAAqB,CAAC,OAAO,SAAS,OAAO,EAAE,OAAO,GAAG,gBAAgB,EACvE,IAAI,CAAC,EAAE,MAAM,GACZ,SAAS,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;CACxD"}
@@ -1,4 +1,9 @@
1
1
  export * from "./middleware";
2
2
  export * from "./middleware-result";
3
- export * from "./middleware-stop";
3
+ export * from "./middleware-runner";
4
+ export * from "./pipeline-context";
5
+ export * from "./pipeline-result";
6
+ export * from "./pipeline-runner";
7
+ export * from "./pipeline-status";
4
8
  export * from "./pipeline";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pipelines/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
@@ -16,6 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./middleware"), exports);
18
18
  __exportStar(require("./middleware-result"), exports);
19
- __exportStar(require("./middleware-stop"), exports);
19
+ __exportStar(require("./middleware-runner"), exports);
20
+ __exportStar(require("./pipeline-context"), exports);
21
+ __exportStar(require("./pipeline-result"), exports);
22
+ __exportStar(require("./pipeline-runner"), exports);
23
+ __exportStar(require("./pipeline-status"), exports);
20
24
  __exportStar(require("./pipeline"), exports);
21
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pipelines/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,sDAAoC;AACpC,oDAAkC;AAClC,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pipelines/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,sDAAoC;AACpC,sDAAoC;AAEpC,qDAAmC;AACnC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,6CAA2B"}
@@ -1,5 +1,6 @@
1
- import { IRuntimeResult } from "../runtime/runtime-result";
1
+ import { PipelineResult } from "./pipeline-result";
2
2
  /**
3
- * The Middleware could potentially run another Pipeline inside, and so we can propagate that result.
3
+ * The MiddlewareResult can provide Pipeline Results inner pipeline calls.
4
4
  */
5
- export type MiddlewareResult = void | IRuntimeResult;
5
+ export type MiddlewareResult = void | PipelineResult;
6
+ //# sourceMappingURL=middleware-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware-result.d.ts","sourceRoot":"","sources":["../../src/pipelines/middleware-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,cAAc,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { IMiddleware } from "./middleware";
2
+ import { MiddlewareResult } from "./middleware-result";
3
+ import { IPipelineContext } from "./pipeline-context";
4
+ /**
5
+ * The `Middleware Runner` allows for custom logic when running an {@link IMiddleware} method.
6
+ * It's useful for implementing different `Decorators` to compose extensible runtime logic.
7
+ */
8
+ export interface IMiddlewareRunner<TContext extends IPipelineContext> {
9
+ /**
10
+ * The {@link dispatch} method will decide how to run the {@link IMiddleware.action} method on the provided {@link IMiddleware} instance.
11
+ * @param context The {@link IPipelineContext} passed to the Middleware's {@link IMiddleware.action} method.
12
+ * @param middleware The {@link IMiddleware} to call the {@link IMiddleware.action} method on.
13
+ */
14
+ dispatch(context: TContext, middleware: IMiddleware<TContext>): MiddlewareResult;
15
+ /**
16
+ * The {@link cleanup} method will decide how to run the {@link IMiddleware.cleanup} method on the provided {@link IMiddleware} instance.
17
+ * @param context The {@link IPipelineContext} passed to the Middleware's {@link IMiddleware.cleanup} method.
18
+ * @param middleware The {@link IMiddleware} to call the {@link IMiddleware.cleanup} method on.
19
+ */
20
+ cleanup(context: TContext, middleware: IMiddleware<TContext>): MiddlewareResult;
21
+ }
22
+ //# sourceMappingURL=middleware-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware-runner.d.ts","sourceRoot":"","sources":["../../src/pipelines/middleware-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAAC,QAAQ,SAAS,gBAAgB;IAClE;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC;IAEjF;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC;CACjF"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=middleware-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware-runner.js","sourceRoot":"","sources":["../../src/pipelines/middleware-runner.ts"],"names":[],"mappings":""}
@@ -1,9 +1,10 @@
1
- import { Stop } from "./middleware-stop";
2
1
  import { MiddlewareResult } from "./middleware-result";
2
+ import { IPipelineContext } from "./pipeline-context";
3
3
  /**
4
- * A middleware, the building block of a Pipeline. The middlewares will get called in the same order they get registered in the Pipeline.
4
+ * A middleware, the building block of a Pipeline. The middlewares will provide a unit-of-work implementation
5
+ * dealing with potential state changes over the input Context, or running cleanup logic over the input Context.
5
6
  */
6
- export interface IMiddleware<TContext, TResult = MiddlewareResult> {
7
+ export interface IMiddleware<TContext extends IPipelineContext, TResult = MiddlewareResult> {
7
8
  readonly name?: string;
8
9
  /**
9
10
  * This (optional) function gets called before executing the middleware. It acts as a boolean gateway whether enough conditions are
@@ -14,12 +15,12 @@ export interface IMiddleware<TContext, TResult = MiddlewareResult> {
14
15
  /**
15
16
  * The function gets called as part of the pipeline, based on the registration order.
16
17
  * @param context The Context can be read or updated. The Context holds all the state necessary for the execution of the middleware.
17
- * @param stop The function to halt the execution of the Pipeline. The next Middlewares won't be called anymore.
18
18
  */
19
- action(context: TContext, stop: Stop): TResult;
19
+ action(context: TContext): TResult;
20
20
  /**
21
21
  * This (optional) function gets called when the cleanup of the Pipeline is necessary, based on reverse order of Middleware registration.
22
22
  * @param context Part of the Context should be cleaned, and any allocated resources in the Action, should be disposed.
23
23
  */
24
24
  cleanup?(context: TContext): TResult;
25
25
  }
26
+ //# sourceMappingURL=middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/pipelines/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,QAAQ,SAAS,gBAAgB,EAAE,OAAO,GAAG,gBAAgB;IACxF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,SAAS,CAAC,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC;IAEvC;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC;IAEnC;;;OAGG;IACH,OAAO,CAAC,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC;CACtC"}
@@ -0,0 +1,15 @@
1
+ import { PipelineStatus } from "./pipeline-status";
2
+ /**
3
+ * The Pipeline Context allows exposing state to the Pipeline's middlewares.
4
+ */
5
+ export interface IPipelineContext {
6
+ readonly runtime: PipelineRuntime;
7
+ }
8
+ /**
9
+ * The Pipeline Runtime exposes runtime status controls for Middlewares, as part of tbe PipelineContext.
10
+ */
11
+ export type PipelineRuntime = {
12
+ shouldStop: boolean;
13
+ status?: PipelineStatus;
14
+ };
15
+ //# sourceMappingURL=pipeline-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-context.d.ts","sourceRoot":"","sources":["../../src/pipelines/pipeline-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=runtime-pipeline.js.map
3
+ //# sourceMappingURL=pipeline-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-context.js","sourceRoot":"","sources":["../../src/pipelines/pipeline-context.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { PerformanceTimeEntry } from "../utils";
2
+ /**
3
+ * The PipelineResult can provide Performance metrics collected from self or inner middleware & pipeline calls.
4
+ */
5
+ export type PipelineResult = {
6
+ readonly performance?: PerformanceTimeEntry;
7
+ readonly inner?: PipelineResult[];
8
+ };
9
+ //# sourceMappingURL=pipeline-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-result.d.ts","sourceRoot":"","sources":["../../src/pipelines/pipeline-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,oBAAoB,CAAC;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CACnC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=middleware-stop.js.map
3
+ //# sourceMappingURL=pipeline-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-result.js","sourceRoot":"","sources":["../../src/pipelines/pipeline-result.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import { IMiddleware } from "./middleware";
2
+ import { IPipelineContext } from "./pipeline-context";
3
+ import { PipelineResult } from "./pipeline-result";
4
+ /**
5
+ * The `Pipeline Runner` allows for custom logic when running an {@link IMiddleware} Array.
6
+ * It's useful for implementing different `Decorators` to compose extensible runtime logic.
7
+ */
8
+ export interface IPipelineRunner<TContext extends IPipelineContext> {
9
+ /**
10
+ * The {@link dispatch} method will decide how to run the {@link IMiddleware.action} method on the provided {@link IMiddleware} instances, starting with the provided {@link startIndex} (optional).
11
+ * @param context The {@link IPipelineContext} passed to the Middleware's {@link IMiddleware.action} method.
12
+ * @param middleware The {@link IMiddleware} Array to call the {@link IMiddleware.action} methods on.
13
+ * @param startIndex (optional) the Start Index to run in the Middleware Array.
14
+ */
15
+ dispatch(context: TContext, middleware: IMiddleware<TContext>[], startIndex?: number): PipelineResult;
16
+ /**
17
+ * The {@link cleanup} method will decide how to run the {@link IMiddleware.cleanup} method on the provided {@link IMiddleware} instances.
18
+ * @param context The {@link IPipelineContext} passed to the Middleware's {@link IMiddleware.cleanup} method.
19
+ * @param middleware The {@link IMiddleware} Array to call the {@link IMiddleware.cleanup} methods on.
20
+ */
21
+ cleanup(context: TContext, middleware: IMiddleware<TContext>[]): PipelineResult;
22
+ }
23
+ //# sourceMappingURL=pipeline-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-runner.d.ts","sourceRoot":"","sources":["../../src/pipelines/pipeline-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,QAAQ,SAAS,gBAAgB;IAChE;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAEtG;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,QAAQ,CAAC,EAAE,GAAG,cAAc,CAAC;CACjF"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=runtime-result.js.map
3
+ //# sourceMappingURL=pipeline-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-runner.js","sourceRoot":"","sources":["../../src/pipelines/pipeline-runner.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The PipelineStatus tracks the current status of the pipeline.
3
+ */
4
+ export declare enum PipelineStatus {
5
+ idle = "idle",
6
+ ongoing = "ongoing",
7
+ completed = "completed",
8
+ halted = "halted"
9
+ }
10
+ //# sourceMappingURL=pipeline-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-status.d.ts","sourceRoot":"","sources":["../../src/pipelines/pipeline-status.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PipelineStatus = void 0;
4
+ /**
5
+ * The PipelineStatus tracks the current status of the pipeline.
6
+ */
7
+ var PipelineStatus;
8
+ (function (PipelineStatus) {
9
+ PipelineStatus["idle"] = "idle";
10
+ PipelineStatus["ongoing"] = "ongoing";
11
+ PipelineStatus["completed"] = "completed";
12
+ PipelineStatus["halted"] = "halted";
13
+ })(PipelineStatus || (exports.PipelineStatus = PipelineStatus = {}));
14
+ //# sourceMappingURL=pipeline-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-status.js","sourceRoot":"","sources":["../../src/pipelines/pipeline-status.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
@@ -1,21 +1,23 @@
1
- import { IRuntimeResult } from "../runtime/runtime-result";
2
1
  import { IMiddleware } from "./middleware";
3
2
  import { MiddlewareResult } from "./middleware-result";
3
+ import { IPipelineContext } from "./pipeline-context";
4
+ import { PipelineResult } from "./pipeline-result";
4
5
  /**
5
- * A middleware container and dispatcher.
6
+ * An {@link IMiddleware} container and dispatcher.
6
7
  */
7
- export interface IPipeline<TContext, TMiddlewareResult = MiddlewareResult> {
8
+ export interface IPipeline<TContext extends IPipelineContext, TResult = MiddlewareResult> {
8
9
  readonly name?: string;
9
10
  /**
10
- * Register middlewares for this pipeline, in order.
11
+ * Register middleware for this pipeline.
11
12
  */
12
- use(...middleware: IMiddleware<TContext, TMiddlewareResult>[]): void;
13
+ use(middleware: IMiddleware<TContext, TResult>): this;
13
14
  /**
14
- * Execute the chain of middlewares, in the order they were added on a given Context.
15
+ * Execute the Dispatch on the chain of middleware, with the given Context.
15
16
  */
16
- dispatch(context: TContext): IRuntimeResult<TMiddlewareResult>;
17
+ dispatch(context: TContext): PipelineResult;
17
18
  /**
18
- * Runs the Cleanup function on all middlewares.
19
+ * Execute the Cleanup on the chain of middleware, with the given Context.
19
20
  */
20
- cleanup(context: TContext): IRuntimeResult<TMiddlewareResult>;
21
+ cleanup(context: TContext): PipelineResult;
21
22
  }
23
+ //# sourceMappingURL=pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/pipelines/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,QAAQ,SAAS,gBAAgB,EAAE,OAAO,GAAG,gBAAgB;IACtF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAEtD;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,cAAc,CAAC;IAE5C;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,cAAc,CAAC;CAC5C"}
@@ -1,13 +1,14 @@
1
- export * from "./context/system-context-entity";
2
- export * from "./context/system-context-events";
3
- export * from "./context/system-context-proxies";
4
- export * from "./context/system-context-repository";
5
- export * from "./context/system-context-scheduler";
6
- export * from "./context/system-context-snapshot";
1
+ export * from "./pipeline/system-context-entity";
2
+ export * from "./pipeline/system-context-events";
3
+ export * from "./pipeline/system-context-proxies";
4
+ export * from "./pipeline/system-context-repository";
5
+ export * from "./pipeline/system-context-scheduler";
6
+ export * from "./pipeline/system-context-snapshot";
7
7
  export * from "./runtime/systems-runtime-context";
8
8
  export * from "./runtime/systems-runtime-middleware";
9
- export * from "./system-middleware";
10
- export * from "./system-context";
11
- export * from "./system-type";
12
- export * from "./systems-module";
13
- export * from "./systems-runtime";
9
+ export * from "./pipeline/system-middleware";
10
+ export * from "./pipeline/system-context";
11
+ export * from "./module/system-type";
12
+ export * from "./module/systems-module";
13
+ export * from "./runtime/systems-runtime";
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/systems/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC"}
@@ -14,17 +14,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./context/system-context-entity"), exports);
18
- __exportStar(require("./context/system-context-events"), exports);
19
- __exportStar(require("./context/system-context-proxies"), exports);
20
- __exportStar(require("./context/system-context-repository"), exports);
21
- __exportStar(require("./context/system-context-scheduler"), exports);
22
- __exportStar(require("./context/system-context-snapshot"), exports);
17
+ __exportStar(require("./pipeline/system-context-entity"), exports);
18
+ __exportStar(require("./pipeline/system-context-events"), exports);
19
+ __exportStar(require("./pipeline/system-context-proxies"), exports);
20
+ __exportStar(require("./pipeline/system-context-repository"), exports);
21
+ __exportStar(require("./pipeline/system-context-scheduler"), exports);
22
+ __exportStar(require("./pipeline/system-context-snapshot"), exports);
23
23
  __exportStar(require("./runtime/systems-runtime-context"), exports);
24
24
  __exportStar(require("./runtime/systems-runtime-middleware"), exports);
25
- __exportStar(require("./system-middleware"), exports);
26
- __exportStar(require("./system-context"), exports);
27
- __exportStar(require("./system-type"), exports);
28
- __exportStar(require("./systems-module"), exports);
29
- __exportStar(require("./systems-runtime"), exports);
25
+ __exportStar(require("./pipeline/system-middleware"), exports);
26
+ __exportStar(require("./pipeline/system-context"), exports);
27
+ __exportStar(require("./module/system-type"), exports);
28
+ __exportStar(require("./module/systems-module"), exports);
29
+ __exportStar(require("./runtime/systems-runtime"), exports);
30
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/systems/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,kEAAgD;AAChD,mEAAiD;AACjD,sEAAoD;AACpD,qEAAmD;AACnD,oEAAkD;AAClD,oEAAkD;AAClD,uEAAqD;AACrD,sDAAoC;AACpC,mDAAiC;AACjC,gDAA8B;AAC9B,mDAAiC;AACjC,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/systems/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,mEAAiD;AACjD,oEAAkD;AAClD,uEAAqD;AACrD,sEAAoD;AACpD,qEAAmD;AACnD,oEAAkD;AAClD,uEAAqD;AACrD,+DAA6C;AAC7C,4DAA0C;AAC1C,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C"}
@@ -8,3 +8,4 @@ export declare enum SystemType {
8
8
  render = "render",
9
9
  sync = "sync"
10
10
  }
11
+ //# sourceMappingURL=system-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-type.d.ts","sourceRoot":"","sources":["../../../src/systems/module/system-type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,UAAU;IACpB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-type.js","sourceRoot":"","sources":["../../../src/systems/module/system-type.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,uCAAyB,CAAA;IACzB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACf,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB"}
@@ -1,7 +1,7 @@
1
- import { IEntity } from "../entities/entity";
2
- import { IEntityUpdate } from "../entities/entity-queue";
3
- import { IRuntimeResult } from "../runtime/runtime-result";
4
- import { ISystemMiddleware } from "./system-middleware";
1
+ import { IEntity } from "../../entities/entity";
2
+ import { IEntityUpdate } from "../../entities/entity-queue";
3
+ import { PipelineResult } from "../../pipelines";
4
+ import { ISystemMiddleware } from "../pipeline/system-middleware";
5
5
  import { SystemType } from "./system-type";
6
6
  /**
7
7
  * The SystemModule is the main way of registering and triggering the SystemMiddlewares registered for an Entity.
@@ -18,5 +18,6 @@ export interface ISystemsModule<TEntity extends IEntity> {
18
18
  * Trigger all registered SystemPipelines, to apply the changes from the provided EntityUpdate to an Entity instance.
19
19
  * @param update The EntityUpdate containing the desired changes to be applied on an Entity instance.
20
20
  */
21
- triggerSystems(update: IEntityUpdate): IRuntimeResult;
21
+ triggerSystems(update: IEntityUpdate): PipelineResult;
22
22
  }
23
+ //# sourceMappingURL=systems-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systems-module.d.ts","sourceRoot":"","sources":["../../../src/systems/module/systems-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,OAAO,SAAS,OAAO;IACrD;;;;OAIG;IACH,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;IAE/E;;;OAGG;IACH,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,CAAC;CACvD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systems-module.js","sourceRoot":"","sources":["../../../src/systems/module/systems-module.ts"],"names":[],"mappings":""}
@@ -1,8 +1,10 @@
1
1
  import { IEntity } from "../../entities/entity";
2
2
  import { IEntityUpdate } from "../../entities/entity-queue";
3
+ import { Immutable } from "../../utils/types";
3
4
  export interface ISystemContextEntity {
4
- readonly entity: IEntity;
5
- readonly update: IEntityUpdate;
5
+ readonly entity: Immutable<IEntity>;
6
+ readonly update: Immutable<IEntityUpdate>;
6
7
  setEntity(entity: IEntity): void;
7
8
  setUpdate(update: IEntityUpdate): void;
8
9
  }
10
+ //# sourceMappingURL=system-context-entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-context-entity.d.ts","sourceRoot":"","sources":["../../../src/systems/pipeline/system-context-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IAE1C,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CACxC"}