@awesome-ecs/abstract 0.14.3 → 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.
- package/dist/components/component.d.ts +1 -2
- package/dist/components/component.d.ts.map +1 -0
- package/dist/components/identity-component.d.ts +2 -1
- package/dist/components/identity-component.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/entities/entity-events.d.ts +1 -0
- package/dist/entities/entity-events.d.ts.map +1 -0
- package/dist/entities/entity-proxies.d.ts +1 -0
- package/dist/entities/entity-proxies.d.ts.map +1 -0
- package/dist/entities/entity-queue.d.ts +1 -0
- package/dist/entities/entity-queue.d.ts.map +1 -0
- package/dist/entities/entity-repository.d.ts +1 -0
- package/dist/entities/entity-repository.d.ts.map +1 -0
- package/dist/entities/entity-scheduler.d.ts +1 -0
- package/dist/entities/entity-scheduler.d.ts.map +1 -0
- package/dist/entities/entity-snapshot.d.ts +1 -0
- package/dist/entities/entity-snapshot.d.ts.map +1 -0
- package/dist/entities/entity.d.ts +4 -1
- package/dist/entities/entity.d.ts.map +1 -0
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/factories/context-factory.d.ts +1 -0
- package/dist/factories/context-factory.d.ts.map +1 -0
- package/dist/factories/index.d.ts +1 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/pipeline-factory.d.ts +6 -3
- package/dist/factories/pipeline-factory.d.ts.map +1 -0
- package/dist/pipelines/index.d.ts +6 -1
- package/dist/pipelines/index.d.ts.map +1 -0
- package/dist/pipelines/index.js +5 -1
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/middleware-result.d.ts +4 -3
- package/dist/pipelines/middleware-result.d.ts.map +1 -0
- package/dist/pipelines/middleware-runner.d.ts +22 -0
- package/dist/pipelines/middleware-runner.d.ts.map +1 -0
- package/dist/pipelines/middleware-runner.js +3 -0
- package/dist/pipelines/middleware-runner.js.map +1 -0
- package/dist/pipelines/middleware.d.ts +6 -5
- package/dist/pipelines/middleware.d.ts.map +1 -0
- package/dist/pipelines/pipeline-context.d.ts +15 -0
- package/dist/pipelines/pipeline-context.d.ts.map +1 -0
- package/dist/{runtime/runtime-pipeline.js → pipelines/pipeline-context.js} +1 -1
- package/dist/pipelines/pipeline-context.js.map +1 -0
- package/dist/pipelines/pipeline-result.d.ts +9 -0
- package/dist/pipelines/pipeline-result.d.ts.map +1 -0
- package/dist/pipelines/{middleware-stop.js → pipeline-result.js} +1 -1
- package/dist/pipelines/pipeline-result.js.map +1 -0
- package/dist/pipelines/pipeline-runner.d.ts +23 -0
- package/dist/pipelines/pipeline-runner.d.ts.map +1 -0
- package/dist/{runtime/runtime-result.js → pipelines/pipeline-runner.js} +1 -1
- package/dist/pipelines/pipeline-runner.js.map +1 -0
- package/dist/pipelines/pipeline-status.d.ts +10 -0
- package/dist/pipelines/pipeline-status.d.ts.map +1 -0
- package/dist/pipelines/pipeline-status.js +14 -0
- package/dist/pipelines/pipeline-status.js.map +1 -0
- package/dist/pipelines/pipeline.d.ts +11 -9
- package/dist/pipelines/pipeline.d.ts.map +1 -0
- package/dist/systems/index.d.ts +12 -11
- package/dist/systems/index.d.ts.map +1 -0
- package/dist/systems/index.js +11 -11
- package/dist/systems/index.js.map +1 -1
- package/dist/systems/{system-type.d.ts → module/system-type.d.ts} +1 -0
- package/dist/systems/module/system-type.d.ts.map +1 -0
- package/dist/systems/module/system-type.js.map +1 -0
- package/dist/systems/{systems-module.d.ts → module/systems-module.d.ts} +6 -5
- package/dist/systems/module/systems-module.d.ts.map +1 -0
- package/dist/systems/module/systems-module.js.map +1 -0
- package/dist/systems/{context → pipeline}/system-context-entity.d.ts +4 -2
- package/dist/systems/pipeline/system-context-entity.d.ts.map +1 -0
- package/dist/systems/pipeline/system-context-entity.js.map +1 -0
- package/dist/systems/{context → pipeline}/system-context-events.d.ts +1 -0
- package/dist/systems/pipeline/system-context-events.d.ts.map +1 -0
- package/dist/systems/pipeline/system-context-events.js.map +1 -0
- package/dist/systems/{context → pipeline}/system-context-proxies.d.ts +1 -0
- package/dist/systems/pipeline/system-context-proxies.d.ts.map +1 -0
- package/dist/systems/pipeline/system-context-proxies.js.map +1 -0
- package/dist/systems/{context → pipeline}/system-context-repository.d.ts +1 -0
- package/dist/systems/pipeline/system-context-repository.d.ts.map +1 -0
- package/dist/systems/pipeline/system-context-repository.js.map +1 -0
- package/dist/systems/{context → pipeline}/system-context-scheduler.d.ts +3 -2
- package/dist/systems/pipeline/system-context-scheduler.d.ts.map +1 -0
- package/dist/systems/pipeline/system-context-scheduler.js.map +1 -0
- package/dist/systems/{context → pipeline}/system-context-snapshot.d.ts +3 -1
- package/dist/systems/pipeline/system-context-snapshot.d.ts.map +1 -0
- package/dist/systems/pipeline/system-context-snapshot.js.map +1 -0
- package/dist/systems/{system-context.d.ts → pipeline/system-context.d.ts} +12 -10
- package/dist/systems/pipeline/system-context.d.ts.map +1 -0
- package/dist/systems/pipeline/system-context.js.map +1 -0
- package/dist/systems/{system-middleware.d.ts → pipeline/system-middleware.d.ts} +3 -2
- package/dist/systems/pipeline/system-middleware.d.ts.map +1 -0
- package/dist/systems/pipeline/system-middleware.js.map +1 -0
- package/dist/systems/runtime/systems-runtime-context.d.ts +10 -10
- package/dist/systems/runtime/systems-runtime-context.d.ts.map +1 -0
- package/dist/systems/runtime/systems-runtime-middleware.d.ts +2 -1
- package/dist/systems/runtime/systems-runtime-middleware.d.ts.map +1 -0
- package/dist/systems/{systems-runtime.d.ts → runtime/systems-runtime.d.ts} +4 -3
- package/dist/systems/runtime/systems-runtime.d.ts.map +1 -0
- package/dist/systems/runtime/systems-runtime.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/json-serializer.d.ts +1 -0
- package/dist/utils/json-serializer.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +1 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/performance-timer.d.ts +1 -0
- package/dist/utils/performance-timer.d.ts.map +1 -0
- package/dist/utils/types.d.ts +1 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/package.json +11 -13
- package/dist/pipelines/middleware-stop.d.ts +0 -5
- package/dist/pipelines/middleware-stop.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -3
- package/dist/runtime/index.js +0 -20
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/runtime-pipeline.d.ts +0 -11
- package/dist/runtime/runtime-pipeline.js.map +0 -1
- package/dist/runtime/runtime-result.d.ts +0 -20
- package/dist/runtime/runtime-result.js.map +0 -1
- package/dist/runtime/runtime-status.d.ts +0 -7
- package/dist/runtime/runtime-status.js +0 -12
- package/dist/runtime/runtime-status.js.map +0 -1
- package/dist/systems/context/system-context-entity.js.map +0 -1
- package/dist/systems/context/system-context-events.js.map +0 -1
- package/dist/systems/context/system-context-proxies.js.map +0 -1
- package/dist/systems/context/system-context-repository.js.map +0 -1
- package/dist/systems/context/system-context-scheduler.js.map +0 -1
- package/dist/systems/context/system-context-snapshot.js.map +0 -1
- package/dist/systems/system-context.js.map +0 -1
- package/dist/systems/system-middleware.js.map +0 -1
- package/dist/systems/system-type.js.map +0 -1
- package/dist/systems/systems-module.js.map +0 -1
- package/dist/systems/systems-runtime.js.map +0 -1
- package/runtime.d.ts +0 -1
- /package/dist/systems/{system-type.js → module/system-type.js} +0 -0
- /package/dist/systems/{systems-module.js → module/systems-module.js} +0 -0
- /package/dist/systems/{context → pipeline}/system-context-entity.js +0 -0
- /package/dist/systems/{context → pipeline}/system-context-events.js +0 -0
- /package/dist/systems/{context → pipeline}/system-context-proxies.js +0 -0
- /package/dist/systems/{context → pipeline}/system-context-repository.js +0 -0
- /package/dist/systems/{context → pipeline}/system-context-scheduler.js +0 -0
- /package/dist/systems/{context → pipeline}/system-context-snapshot.js +0 -0
- /package/dist/systems/{system-context.js → pipeline/system-context.js} +0 -0
- /package/dist/systems/{system-middleware.js → pipeline/system-middleware.js} +0 -0
- /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
|
|
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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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;
|
|
@@ -20,7 +22,7 @@ export interface IEntityModel<TFeatures extends BooleanProps<TFeatures> = unknow
|
|
|
20
22
|
* apart from quick-access functionality.
|
|
21
23
|
*/
|
|
22
24
|
export interface IEntity {
|
|
23
|
-
readonly components:
|
|
25
|
+
readonly components: Map<ComponentTypeUid, IComponent>;
|
|
24
26
|
readonly proxies: Map<EntityTypeUid, Map<EntityUid, IEntityProxy>>;
|
|
25
27
|
/**
|
|
26
28
|
* The IdentityComponent represents mandatory state any Entity needs to have.
|
|
@@ -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"}
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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 {
|
|
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
|
-
|
|
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-
|
|
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"}
|
package/dist/pipelines/index.js
CHANGED
|
@@ -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-
|
|
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 {
|
|
1
|
+
import { PipelineResult } from "./pipeline-result";
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
3
|
+
* The MiddlewareResult can provide Pipeline Results inner pipeline calls.
|
|
4
4
|
*/
|
|
5
|
-
export type MiddlewareResult = void |
|
|
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 @@
|
|
|
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
|
|
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
|
|
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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-runner.js","sourceRoot":"","sources":["../../src/pipelines/pipeline-runner.ts"],"names":[],"mappings":""}
|
|
@@ -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
|
-
*
|
|
6
|
+
* An {@link IMiddleware} container and dispatcher.
|
|
6
7
|
*/
|
|
7
|
-
export interface IPipeline<TContext,
|
|
8
|
+
export interface IPipeline<TContext extends IPipelineContext, TResult = MiddlewareResult> {
|
|
8
9
|
readonly name?: string;
|
|
9
10
|
/**
|
|
10
|
-
* Register
|
|
11
|
+
* Register middleware for this pipeline.
|
|
11
12
|
*/
|
|
12
|
-
use(
|
|
13
|
+
use(middleware: IMiddleware<TContext, TResult>): this;
|
|
13
14
|
/**
|
|
14
|
-
* Execute the chain of
|
|
15
|
+
* Execute the Dispatch on the chain of middleware, with the given Context.
|
|
15
16
|
*/
|
|
16
|
-
dispatch(context: TContext):
|
|
17
|
+
dispatch(context: TContext): PipelineResult;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Execute the Cleanup on the chain of middleware, with the given Context.
|
|
19
20
|
*/
|
|
20
|
-
cleanup(context: TContext):
|
|
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"}
|
package/dist/systems/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
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"}
|
package/dist/systems/index.js
CHANGED
|
@@ -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("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
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,
|
|
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"}
|
|
@@ -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 "
|
|
2
|
-
import { IEntityUpdate } from "
|
|
3
|
-
import {
|
|
4
|
-
import { ISystemMiddleware } from "
|
|
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):
|
|
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":""}
|