@awesome-ecs/abstract 0.4.0 → 0.4.3
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.
|
@@ -11,7 +11,7 @@ export interface IMiddleware<TContext> {
|
|
|
11
11
|
* being met so this middleware's action should run.
|
|
12
12
|
* @param context The Context to determine whether the run condition is satisfied.
|
|
13
13
|
*/
|
|
14
|
-
shouldRun?(context: TContext): boolean;
|
|
14
|
+
shouldRun?(context: TContext): Promise<boolean> | boolean;
|
|
15
15
|
/**
|
|
16
16
|
* The function gets called as part of the pipeline, based on the registration order.
|
|
17
17
|
* @param context The Context can be read or updated. The Context holds all the state necessary for the execution of the middleware.
|
|
@@ -19,7 +19,7 @@ export interface IMiddleware<TContext> {
|
|
|
19
19
|
*/
|
|
20
20
|
action(context: TContext, stop: Stop): Promise<void> | void;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* This (optional) function gets called when the cleanup of the Pipeline is necessary, based on reverse order of Middleware registration.
|
|
23
23
|
* @param context Part of the Context should be cleaned, and any allocated resources in the Action, should be disposed.
|
|
24
24
|
*/
|
|
25
25
|
cleanup?(context: TContext): Promise<void> | void;
|
|
@@ -10,7 +10,7 @@ export interface IPipeline<TContext> {
|
|
|
10
10
|
/**
|
|
11
11
|
* Execute the chain of middlewares, in the order they were added on a given Context.
|
|
12
12
|
*/
|
|
13
|
-
dispatch(context: TContext):
|
|
13
|
+
dispatch(context: TContext): boolean;
|
|
14
14
|
/**
|
|
15
15
|
* Runs the Cleanup function on all middlewares.
|
|
16
16
|
*/
|
|
@@ -7,6 +7,5 @@ var SystemPipelineType;
|
|
|
7
7
|
SystemPipelineType["update"] = "update";
|
|
8
8
|
SystemPipelineType["render"] = "render";
|
|
9
9
|
SystemPipelineType["sync"] = "sync";
|
|
10
|
-
SystemPipelineType["dispatch"] = "dispatch";
|
|
11
10
|
})(SystemPipelineType = exports.SystemPipelineType || (exports.SystemPipelineType = {}));
|
|
12
11
|
//# sourceMappingURL=system-pipeline-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-pipeline-type.js","sourceRoot":"","sources":["../../src/systems/system-pipeline-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"system-pipeline-type.js","sourceRoot":"","sources":["../../src/systems/system-pipeline-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,+CAAyB,CAAA;IACzB,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awesome-ecs/abstract",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "A comprehensive Entity-Component-System (ECS) Architecture implementation. Abstract components.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"url": "https://github.com/andreicojocaru/awesome-ecs/issues"
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/andreicojocaru/awesome-ecs#readme",
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "61e9339706ad6e034178f167247b1d8d8729c427"
|
|
36
36
|
}
|