@awesome-ecs/abstract 0.13.0 → 0.13.2

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 (76) hide show
  1. package/LICENSE.md +201 -201
  2. package/README.md +99 -99
  3. package/dist/components/component.d.ts +36 -36
  4. package/dist/components/component.js +2 -2
  5. package/dist/components/identity-component.d.ts +24 -24
  6. package/dist/components/identity-component.js +7 -7
  7. package/dist/entities/entity-events.d.ts +52 -39
  8. package/dist/entities/entity-events.js +2 -2
  9. package/dist/entities/entity-proxies.d.ts +25 -25
  10. package/dist/entities/entity-proxies.js +2 -2
  11. package/dist/entities/entity-queue.d.ts +31 -31
  12. package/dist/entities/entity-queue.js +11 -11
  13. package/dist/entities/entity-repository.d.ts +16 -16
  14. package/dist/entities/entity-repository.js +2 -2
  15. package/dist/entities/entity-scheduler.d.ts +11 -11
  16. package/dist/entities/entity-scheduler.js +2 -2
  17. package/dist/entities/entity-snapshot.d.ts +24 -24
  18. package/dist/entities/entity-snapshot.js +2 -2
  19. package/dist/entities/entity.d.ts +33 -31
  20. package/dist/entities/entity.js +2 -2
  21. package/dist/factories/context-factory.d.ts +9 -9
  22. package/dist/factories/context-factory.js +2 -2
  23. package/dist/factories/pipeline-factory.d.ts +11 -11
  24. package/dist/factories/pipeline-factory.js +2 -2
  25. package/dist/factories/runtime-factory.d.ts +10 -10
  26. package/dist/factories/runtime-factory.js +2 -2
  27. package/dist/index.d.ts +35 -35
  28. package/dist/index.js +51 -51
  29. package/dist/index.js.map +1 -1
  30. package/dist/pipelines/middleware-result.d.ts +5 -5
  31. package/dist/pipelines/middleware-result.js +2 -2
  32. package/dist/pipelines/middleware-stop.d.ts +4 -4
  33. package/dist/pipelines/middleware-stop.js +2 -2
  34. package/dist/pipelines/middleware.d.ts +24 -24
  35. package/dist/pipelines/middleware.js +2 -2
  36. package/dist/pipelines/pipeline-type.d.ts +7 -7
  37. package/dist/pipelines/pipeline-type.js +11 -11
  38. package/dist/pipelines/pipeline.d.ts +22 -22
  39. package/dist/pipelines/pipeline.js +2 -2
  40. package/dist/runtime/runtime-pipeline.d.ts +11 -11
  41. package/dist/runtime/runtime-pipeline.js +2 -2
  42. package/dist/runtime/runtime-result.d.ts +20 -20
  43. package/dist/runtime/runtime-result.js +2 -2
  44. package/dist/runtime/runtime-status.d.ts +7 -7
  45. package/dist/runtime/runtime-status.js +11 -11
  46. package/dist/systems/context/system-context-events.d.ts +65 -19
  47. package/dist/systems/context/system-context-events.js +2 -2
  48. package/dist/systems/context/system-context-proxies.d.ts +12 -12
  49. package/dist/systems/context/system-context-proxies.js +2 -2
  50. package/dist/systems/context/system-context-repository.d.ts +15 -15
  51. package/dist/systems/context/system-context-repository.js +2 -2
  52. package/dist/systems/context/system-context-scheduler.d.ts +9 -9
  53. package/dist/systems/context/system-context-scheduler.js +2 -2
  54. package/dist/systems/context/system-context-snapshot.d.ts +15 -15
  55. package/dist/systems/context/system-context-snapshot.js +2 -2
  56. package/dist/systems/runtime/systems-runtime-context.d.ts +18 -18
  57. package/dist/systems/runtime/systems-runtime-context.js +2 -2
  58. package/dist/systems/runtime/systems-runtime-middleware.d.ts +8 -8
  59. package/dist/systems/runtime/systems-runtime-middleware.js +2 -2
  60. package/dist/systems/system-pipeline-context.d.ts +21 -21
  61. package/dist/systems/system-pipeline-context.js +2 -2
  62. package/dist/systems/system-pipeline-middleware.d.ts +8 -8
  63. package/dist/systems/system-pipeline-middleware.js +2 -2
  64. package/dist/systems/system-pipeline-type.d.ts +10 -10
  65. package/dist/systems/system-pipeline-type.js +14 -14
  66. package/dist/systems/systems-module.d.ts +22 -22
  67. package/dist/systems/systems-module.js +2 -2
  68. package/dist/systems/systems-runtime.d.ts +16 -16
  69. package/dist/systems/systems-runtime.js +2 -2
  70. package/dist/utils/json-serializer.d.ts +7 -7
  71. package/dist/utils/json-serializer.js +3 -3
  72. package/dist/utils/performance-timer.d.ts +11 -11
  73. package/dist/utils/performance-timer.js +2 -2
  74. package/dist/utils/types.d.ts +21 -18
  75. package/dist/utils/types.js +2 -2
  76. package/package.json +3 -3
@@ -1,11 +1,11 @@
1
- import { IPipeline } from "../pipelines/pipeline";
2
- import { PipelineType } from "../pipelines/pipeline-type";
3
- /**
4
- * The PipelineFactory can be used as an abstraction layer to quickly create IPipeline objects,
5
- * without having to manually resolve all of their dependencies.
6
- */
7
- export interface IPipelineFactory {
8
- createPipeline<TContext>(type: PipelineType): IPipeline<TContext>;
9
- createAsyncPipeline<TContext>(): IPipeline<TContext>;
10
- createSyncPipeline<TContext>(): IPipeline<TContext>;
11
- }
1
+ import { IPipeline } from "../pipelines/pipeline";
2
+ import { PipelineType } from "../pipelines/pipeline-type";
3
+ /**
4
+ * The PipelineFactory can be used as an abstraction layer to quickly create IPipeline objects,
5
+ * without having to manually resolve all of their dependencies.
6
+ */
7
+ export interface IPipelineFactory {
8
+ createPipeline<TContext>(type: PipelineType): IPipeline<TContext>;
9
+ createAsyncPipeline<TContext>(): IPipeline<TContext>;
10
+ createSyncPipeline<TContext>(): IPipeline<TContext>;
11
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=pipeline-factory.js.map
@@ -1,10 +1,10 @@
1
- import { IEntity } from "../entities/entity";
2
- import { PipelineType } from "../pipelines/pipeline-type";
3
- import { IRuntimePipeline } from "../runtime/runtime-pipeline";
4
- /**
5
- * The RuntimeFactory can be used as an abstraction layer to quickly create IRuntimePipeline objects,
6
- * without having to manually resolve all of their dependencies.
7
- */
8
- export interface IRuntimeFactory {
9
- createRuntimePipeline<TEntity extends IEntity>(type: PipelineType): IRuntimePipeline<TEntity>;
10
- }
1
+ import { IEntity } from "../entities/entity";
2
+ import { PipelineType } from "../pipelines/pipeline-type";
3
+ import { IRuntimePipeline } from "../runtime/runtime-pipeline";
4
+ /**
5
+ * The RuntimeFactory can be used as an abstraction layer to quickly create IRuntimePipeline objects,
6
+ * without having to manually resolve all of their dependencies.
7
+ */
8
+ export interface IRuntimeFactory {
9
+ createRuntimePipeline<TEntity extends IEntity>(type: PipelineType): IRuntimePipeline<TEntity>;
10
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=runtime-factory.js.map
package/dist/index.d.ts CHANGED
@@ -1,35 +1,35 @@
1
- export * from './components/component';
2
- export * from './components/identity-component';
3
- export * from './entities/entity';
4
- export * from './entities/entity-events';
5
- export * from './entities/entity-proxies';
6
- export * from './entities/entity-queue';
7
- export * from './entities/entity-repository';
8
- export * from './entities/entity-scheduler';
9
- export * from './entities/entity-snapshot';
10
- export * from './factories/context-factory';
11
- export * from './factories/pipeline-factory';
12
- export * from './factories/runtime-factory';
13
- export * from './runtime/runtime-pipeline';
14
- export * from './runtime/runtime-result';
15
- export * from './runtime/runtime-status';
16
- export * from './pipelines/middleware';
17
- export * from './pipelines/middleware-result';
18
- export * from './pipelines/middleware-stop';
19
- export * from './pipelines/pipeline';
20
- export * from './pipelines/pipeline-type';
21
- export * from './systems/context/system-context-events';
22
- export * from './systems/context/system-context-proxies';
23
- export * from './systems/context/system-context-repository';
24
- export * from './systems/context/system-context-scheduler';
25
- export * from './systems/context/system-context-snapshot';
26
- export * from './systems/runtime/systems-runtime-context';
27
- export * from './systems/runtime/systems-runtime-middleware';
28
- export * from './systems/system-pipeline-middleware';
29
- export * from './systems/system-pipeline-context';
30
- export * from './systems/system-pipeline-type';
31
- export * from './systems/systems-module';
32
- export * from './systems/systems-runtime';
33
- export * from './utils/json-serializer';
34
- export * from './utils/performance-timer';
35
- export * from './utils/types';
1
+ export * from "./components/component";
2
+ export * from "./components/identity-component";
3
+ export * from "./entities/entity";
4
+ export * from "./entities/entity-events";
5
+ export * from "./entities/entity-proxies";
6
+ export * from "./entities/entity-queue";
7
+ export * from "./entities/entity-repository";
8
+ export * from "./entities/entity-scheduler";
9
+ export * from "./entities/entity-snapshot";
10
+ export * from "./factories/context-factory";
11
+ export * from "./factories/pipeline-factory";
12
+ export * from "./factories/runtime-factory";
13
+ export * from "./runtime/runtime-pipeline";
14
+ export * from "./runtime/runtime-result";
15
+ export * from "./runtime/runtime-status";
16
+ export * from "./pipelines/middleware";
17
+ export * from "./pipelines/middleware-result";
18
+ export * from "./pipelines/middleware-stop";
19
+ export * from "./pipelines/pipeline";
20
+ export * from "./pipelines/pipeline-type";
21
+ export * from "./systems/context/system-context-events";
22
+ export * from "./systems/context/system-context-proxies";
23
+ export * from "./systems/context/system-context-repository";
24
+ export * from "./systems/context/system-context-scheduler";
25
+ export * from "./systems/context/system-context-snapshot";
26
+ export * from "./systems/runtime/systems-runtime-context";
27
+ export * from "./systems/runtime/systems-runtime-middleware";
28
+ export * from "./systems/system-pipeline-middleware";
29
+ export * from "./systems/system-pipeline-context";
30
+ export * from "./systems/system-pipeline-type";
31
+ export * from "./systems/systems-module";
32
+ export * from "./systems/systems-runtime";
33
+ export * from "./utils/json-serializer";
34
+ export * from "./utils/performance-timer";
35
+ export * from "./utils/types";
package/dist/index.js CHANGED
@@ -1,52 +1,52 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./components/component"), exports);
18
- __exportStar(require("./components/identity-component"), exports);
19
- __exportStar(require("./entities/entity"), exports);
20
- __exportStar(require("./entities/entity-events"), exports);
21
- __exportStar(require("./entities/entity-proxies"), exports);
22
- __exportStar(require("./entities/entity-queue"), exports);
23
- __exportStar(require("./entities/entity-repository"), exports);
24
- __exportStar(require("./entities/entity-scheduler"), exports);
25
- __exportStar(require("./entities/entity-snapshot"), exports);
26
- __exportStar(require("./factories/context-factory"), exports);
27
- __exportStar(require("./factories/pipeline-factory"), exports);
28
- __exportStar(require("./factories/runtime-factory"), exports);
29
- __exportStar(require("./runtime/runtime-pipeline"), exports);
30
- __exportStar(require("./runtime/runtime-result"), exports);
31
- __exportStar(require("./runtime/runtime-status"), exports);
32
- __exportStar(require("./pipelines/middleware"), exports);
33
- __exportStar(require("./pipelines/middleware-result"), exports);
34
- __exportStar(require("./pipelines/middleware-stop"), exports);
35
- __exportStar(require("./pipelines/pipeline"), exports);
36
- __exportStar(require("./pipelines/pipeline-type"), exports);
37
- __exportStar(require("./systems/context/system-context-events"), exports);
38
- __exportStar(require("./systems/context/system-context-proxies"), exports);
39
- __exportStar(require("./systems/context/system-context-repository"), exports);
40
- __exportStar(require("./systems/context/system-context-scheduler"), exports);
41
- __exportStar(require("./systems/context/system-context-snapshot"), exports);
42
- __exportStar(require("./systems/runtime/systems-runtime-context"), exports);
43
- __exportStar(require("./systems/runtime/systems-runtime-middleware"), exports);
44
- __exportStar(require("./systems/system-pipeline-middleware"), exports);
45
- __exportStar(require("./systems/system-pipeline-context"), exports);
46
- __exportStar(require("./systems/system-pipeline-type"), exports);
47
- __exportStar(require("./systems/systems-module"), exports);
48
- __exportStar(require("./systems/systems-runtime"), exports);
49
- __exportStar(require("./utils/json-serializer"), exports);
50
- __exportStar(require("./utils/performance-timer"), exports);
51
- __exportStar(require("./utils/types"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components/component"), exports);
18
+ __exportStar(require("./components/identity-component"), exports);
19
+ __exportStar(require("./entities/entity"), exports);
20
+ __exportStar(require("./entities/entity-events"), exports);
21
+ __exportStar(require("./entities/entity-proxies"), exports);
22
+ __exportStar(require("./entities/entity-queue"), exports);
23
+ __exportStar(require("./entities/entity-repository"), exports);
24
+ __exportStar(require("./entities/entity-scheduler"), exports);
25
+ __exportStar(require("./entities/entity-snapshot"), exports);
26
+ __exportStar(require("./factories/context-factory"), exports);
27
+ __exportStar(require("./factories/pipeline-factory"), exports);
28
+ __exportStar(require("./factories/runtime-factory"), exports);
29
+ __exportStar(require("./runtime/runtime-pipeline"), exports);
30
+ __exportStar(require("./runtime/runtime-result"), exports);
31
+ __exportStar(require("./runtime/runtime-status"), exports);
32
+ __exportStar(require("./pipelines/middleware"), exports);
33
+ __exportStar(require("./pipelines/middleware-result"), exports);
34
+ __exportStar(require("./pipelines/middleware-stop"), exports);
35
+ __exportStar(require("./pipelines/pipeline"), exports);
36
+ __exportStar(require("./pipelines/pipeline-type"), exports);
37
+ __exportStar(require("./systems/context/system-context-events"), exports);
38
+ __exportStar(require("./systems/context/system-context-proxies"), exports);
39
+ __exportStar(require("./systems/context/system-context-repository"), exports);
40
+ __exportStar(require("./systems/context/system-context-scheduler"), exports);
41
+ __exportStar(require("./systems/context/system-context-snapshot"), exports);
42
+ __exportStar(require("./systems/runtime/systems-runtime-context"), exports);
43
+ __exportStar(require("./systems/runtime/systems-runtime-middleware"), exports);
44
+ __exportStar(require("./systems/system-pipeline-middleware"), exports);
45
+ __exportStar(require("./systems/system-pipeline-context"), exports);
46
+ __exportStar(require("./systems/system-pipeline-type"), exports);
47
+ __exportStar(require("./systems/systems-module"), exports);
48
+ __exportStar(require("./systems/systems-runtime"), exports);
49
+ __exportStar(require("./utils/json-serializer"), exports);
50
+ __exportStar(require("./utils/performance-timer"), exports);
51
+ __exportStar(require("./utils/types"), exports);
52
52
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC;AACtC,kEAA+C;AAE/C,oDAAiC;AACjC,2DAAwC;AACxC,4DAAyC;AACzC,0DAAuC;AACvC,+DAA4C;AAC5C,8DAA2C;AAC3C,6DAA0C;AAE1C,8DAA2C;AAC3C,+DAA4C;AAC5C,8DAA2C;AAE3C,6DAA0C;AAC1C,2DAAwC;AACxC,2DAAwC;AAExC,yDAAsC;AACtC,gEAA6C;AAC7C,8DAA2C;AAC3C,uDAAoC;AACpC,4DAAyC;AAEzC,0EAAuD;AACvD,2EAAwD;AACxD,8EAA2D;AAC3D,6EAA0D;AAC1D,4EAAyD;AAEzD,4EAAyD;AACzD,+EAA4D;AAE5D,uEAAoD;AACpD,oEAAiD;AACjD,iEAA8C;AAC9C,2DAAwC;AACxC,4DAAyC;AAEzC,0DAAuC;AACvC,4DAAyC;AACzC,gDAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,kEAAgD;AAEhD,oDAAkC;AAClC,2DAAyC;AACzC,4DAA0C;AAC1C,0DAAwC;AACxC,+DAA6C;AAC7C,8DAA4C;AAC5C,6DAA2C;AAE3C,8DAA4C;AAC5C,+DAA6C;AAC7C,8DAA4C;AAE5C,6DAA2C;AAC3C,2DAAyC;AACzC,2DAAyC;AAEzC,yDAAuC;AACvC,gEAA8C;AAC9C,8DAA4C;AAC5C,uDAAqC;AACrC,4DAA0C;AAE1C,0EAAwD;AACxD,2EAAyD;AACzD,8EAA4D;AAC5D,6EAA2D;AAC3D,4EAA0D;AAE1D,4EAA0D;AAC1D,+EAA6D;AAE7D,uEAAqD;AACrD,oEAAkD;AAClD,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAE1C,0DAAwC;AACxC,4DAA0C;AAC1C,gDAA8B"}
@@ -1,5 +1,5 @@
1
- import { IRuntimeResult } from "../runtime/runtime-result";
2
- /**
3
- * The Middleware could potentially run another Pipeline inside, and so we can propagate that result.
4
- */
5
- export type MiddlewareResult = void | IRuntimeResult;
1
+ import { IRuntimeResult } from "../runtime/runtime-result";
2
+ /**
3
+ * The Middleware could potentially run another Pipeline inside, and so we can propagate that result.
4
+ */
5
+ export type MiddlewareResult = void | IRuntimeResult;
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=middleware-result.js.map
@@ -1,4 +1,4 @@
1
- /**
2
- * 'Stop' function, passed to a middleware. Call it to break the pipeline execution.
3
- */
4
- export type Stop = () => void;
1
+ /**
2
+ * 'Stop' function, passed to a middleware. Call it to break the pipeline execution.
3
+ */
4
+ export type Stop = () => void;
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=middleware-stop.js.map
@@ -1,24 +1,24 @@
1
- import { Stop } from "./middleware-stop";
2
- import { MiddlewareResult } from "./middleware-result";
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.
5
- */
6
- export interface IMiddleware<TContext, TResult = MiddlewareResult> {
7
- /**
8
- * This (optional) function gets called before executing the middleware. It acts as a boolean gateway whether enough conditions are
9
- * being met so this middleware's action should run.
10
- * @param context The Context to determine whether the run condition is satisfied.
11
- */
12
- shouldRun?(context: TContext): Promise<boolean> | boolean;
13
- /**
14
- * The function gets called as part of the pipeline, based on the registration order.
15
- * @param context The Context can be read or updated. The Context holds all the state necessary for the execution of the middleware.
16
- * @param stop The function to halt the execution of the Pipeline. The next Middlewares won't be called anymore.
17
- */
18
- action(context: TContext, stop: Stop): Promise<TResult> | TResult;
19
- /**
20
- * This (optional) function gets called when the cleanup of the Pipeline is necessary, based on reverse order of Middleware registration.
21
- * @param context Part of the Context should be cleaned, and any allocated resources in the Action, should be disposed.
22
- */
23
- cleanup?(context: TContext): Promise<TResult> | TResult;
24
- }
1
+ import { Stop } from "./middleware-stop";
2
+ import { MiddlewareResult } from "./middleware-result";
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.
5
+ */
6
+ export interface IMiddleware<TContext, TResult = MiddlewareResult> {
7
+ /**
8
+ * This (optional) function gets called before executing the middleware. It acts as a boolean gateway whether enough conditions are
9
+ * being met so this middleware's action should run.
10
+ * @param context The Context to determine whether the run condition is satisfied.
11
+ */
12
+ shouldRun?(context: TContext): Promise<boolean> | boolean;
13
+ /**
14
+ * The function gets called as part of the pipeline, based on the registration order.
15
+ * @param context The Context can be read or updated. The Context holds all the state necessary for the execution of the middleware.
16
+ * @param stop The function to halt the execution of the Pipeline. The next Middlewares won't be called anymore.
17
+ */
18
+ action(context: TContext, stop: Stop): Promise<TResult> | TResult;
19
+ /**
20
+ * This (optional) function gets called when the cleanup of the Pipeline is necessary, based on reverse order of Middleware registration.
21
+ * @param context Part of the Context should be cleaned, and any allocated resources in the Action, should be disposed.
22
+ */
23
+ cleanup?(context: TContext): Promise<TResult> | TResult;
24
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=middleware.js.map
@@ -1,7 +1,7 @@
1
- /**
2
- * Specify how the runtime of the Pipeline should be handled.
3
- */
4
- export declare enum PipelineType {
5
- sync = 0,
6
- async = 1
7
- }
1
+ /**
2
+ * Specify how the runtime of the Pipeline should be handled.
3
+ */
4
+ export declare enum PipelineType {
5
+ sync = 0,
6
+ async = 1
7
+ }
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PipelineType = void 0;
4
- /**
5
- * Specify how the runtime of the Pipeline should be handled.
6
- */
7
- var PipelineType;
8
- (function (PipelineType) {
9
- PipelineType[PipelineType["sync"] = 0] = "sync";
10
- PipelineType[PipelineType["async"] = 1] = "async";
11
- })(PipelineType = exports.PipelineType || (exports.PipelineType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PipelineType = void 0;
4
+ /**
5
+ * Specify how the runtime of the Pipeline should be handled.
6
+ */
7
+ var PipelineType;
8
+ (function (PipelineType) {
9
+ PipelineType[PipelineType["sync"] = 0] = "sync";
10
+ PipelineType[PipelineType["async"] = 1] = "async";
11
+ })(PipelineType = exports.PipelineType || (exports.PipelineType = {}));
12
12
  //# sourceMappingURL=pipeline-type.js.map
@@ -1,22 +1,22 @@
1
- import { IRuntimeResult } from "../runtime/runtime-result";
2
- import { IMiddleware } from "./middleware";
3
- import { MiddlewareResult } from "./middleware-result";
4
- import { PipelineType } from "./pipeline-type";
5
- /**
6
- * A middleware container and dispatcher.
7
- */
8
- export interface IPipeline<TContext, TMiddlewareResult = MiddlewareResult> {
9
- readonly type: PipelineType;
10
- /**
11
- * Register middlewares for this pipeline, in order.
12
- */
13
- use(...middleware: IMiddleware<TContext, TMiddlewareResult>[]): void;
14
- /**
15
- * Execute the chain of middlewares, in the order they were added on a given Context.
16
- */
17
- dispatch(context: TContext): IRuntimeResult<TMiddlewareResult> | Promise<IRuntimeResult<TMiddlewareResult>>;
18
- /**
19
- * Runs the Cleanup function on all middlewares.
20
- */
21
- cleanup(context: TContext): IRuntimeResult<TMiddlewareResult> | Promise<IRuntimeResult<TMiddlewareResult>>;
22
- }
1
+ import { IRuntimeResult } from "../runtime/runtime-result";
2
+ import { IMiddleware } from "./middleware";
3
+ import { MiddlewareResult } from "./middleware-result";
4
+ import { PipelineType } from "./pipeline-type";
5
+ /**
6
+ * A middleware container and dispatcher.
7
+ */
8
+ export interface IPipeline<TContext, TMiddlewareResult = MiddlewareResult> {
9
+ readonly type: PipelineType;
10
+ /**
11
+ * Register middlewares for this pipeline, in order.
12
+ */
13
+ use(...middleware: IMiddleware<TContext, TMiddlewareResult>[]): void;
14
+ /**
15
+ * Execute the chain of middlewares, in the order they were added on a given Context.
16
+ */
17
+ dispatch(context: TContext): IRuntimeResult<TMiddlewareResult> | Promise<IRuntimeResult<TMiddlewareResult>>;
18
+ /**
19
+ * Runs the Cleanup function on all middlewares.
20
+ */
21
+ cleanup(context: TContext): IRuntimeResult<TMiddlewareResult> | Promise<IRuntimeResult<TMiddlewareResult>>;
22
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=pipeline.js.map
@@ -1,11 +1,11 @@
1
- import { IEntity } from "../entities/entity";
2
- import { ISystemsRuntimeContext } from "../systems/runtime/systems-runtime-context";
3
- import { IRuntimeResult } from "./runtime-result";
4
- /**
5
- * The RuntimePipeline is the main way of orchestrating the steps taken on a System Tick.
6
- * It should provide a way to make the runtime SYNC or ASYNC by setting the PipelineType flag.
7
- */
8
- export interface IRuntimePipeline<TEntity extends IEntity> {
9
- dispatch(context: ISystemsRuntimeContext<TEntity>): IRuntimeResult | Promise<IRuntimeResult>;
10
- cleanup(context: ISystemsRuntimeContext<TEntity>): IRuntimeResult | Promise<IRuntimeResult>;
11
- }
1
+ import { IEntity } from "../entities/entity";
2
+ import { ISystemsRuntimeContext } from "../systems/runtime/systems-runtime-context";
3
+ import { IRuntimeResult } from "./runtime-result";
4
+ /**
5
+ * The RuntimePipeline is the main way of orchestrating the steps taken on a System Tick.
6
+ * It should provide a way to make the runtime SYNC or ASYNC by setting the PipelineType flag.
7
+ */
8
+ export interface IRuntimePipeline<TEntity extends IEntity> {
9
+ dispatch(context: ISystemsRuntimeContext<TEntity>): IRuntimeResult | Promise<IRuntimeResult>;
10
+ cleanup(context: ISystemsRuntimeContext<TEntity>): IRuntimeResult | Promise<IRuntimeResult>;
11
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=runtime-pipeline.js.map
@@ -1,20 +1,20 @@
1
- import { MiddlewareResult } from "../pipelines/middleware-result";
2
- import { RuntimeStatus } from "./runtime-status";
3
- import { PerformanceTimeEntry } from "../utils/performance-timer";
4
- /**
5
- * The IRuntimeResult contains the RuntimeStatus of the completed runtime operation.
6
- * Can provide Performance metrics collected from inner runtime calls.
7
- */
8
- export interface IRuntimeResult<TMiddlewareResult = MiddlewareResult> {
9
- readonly status: RuntimeStatus;
10
- readonly performance?: IRuntimeResultPerformance<TMiddlewareResult>[];
11
- }
12
- /**
13
- * The IRuntimeResultPerformance contains the PerformanceTimeEntry for the runtime operation.
14
- * Can also contain a nested structure of Performance metrics that contain the metrics captured from
15
- * inner runtime calls.
16
- */
17
- export interface IRuntimeResultPerformance<TResult = MiddlewareResult> {
18
- performance: PerformanceTimeEntry;
19
- result?: TResult;
20
- }
1
+ import { MiddlewareResult } from "../pipelines/middleware-result";
2
+ import { RuntimeStatus } from "./runtime-status";
3
+ import { PerformanceTimeEntry } from "../utils/performance-timer";
4
+ /**
5
+ * The IRuntimeResult contains the RuntimeStatus of the completed runtime operation.
6
+ * Can provide Performance metrics collected from inner runtime calls.
7
+ */
8
+ export interface IRuntimeResult<TMiddlewareResult = MiddlewareResult> {
9
+ readonly status: RuntimeStatus;
10
+ readonly performance?: IRuntimeResultPerformance<TMiddlewareResult>[];
11
+ }
12
+ /**
13
+ * The IRuntimeResultPerformance contains the PerformanceTimeEntry for the runtime operation.
14
+ * Can also contain a nested structure of Performance metrics that contain the metrics captured from
15
+ * inner runtime calls.
16
+ */
17
+ export interface IRuntimeResultPerformance<TResult = MiddlewareResult> {
18
+ performance: PerformanceTimeEntry;
19
+ result?: TResult;
20
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=runtime-result.js.map
@@ -1,7 +1,7 @@
1
- /**
2
- * The RuntimeStatus tells whether the Runtime components have ran to completion or not.
3
- */
4
- export declare enum RuntimeStatus {
5
- completed = "completed",
6
- halted = "halted"
7
- }
1
+ /**
2
+ * The RuntimeStatus tells whether the Runtime components have ran to completion or not.
3
+ */
4
+ export declare enum RuntimeStatus {
5
+ completed = "completed",
6
+ halted = "halted"
7
+ }
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RuntimeStatus = void 0;
4
- /**
5
- * The RuntimeStatus tells whether the Runtime components have ran to completion or not.
6
- */
7
- var RuntimeStatus;
8
- (function (RuntimeStatus) {
9
- RuntimeStatus["completed"] = "completed";
10
- RuntimeStatus["halted"] = "halted";
11
- })(RuntimeStatus = exports.RuntimeStatus || (exports.RuntimeStatus = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RuntimeStatus = void 0;
4
+ /**
5
+ * The RuntimeStatus tells whether the Runtime components have ran to completion or not.
6
+ */
7
+ var RuntimeStatus;
8
+ (function (RuntimeStatus) {
9
+ RuntimeStatus["completed"] = "completed";
10
+ RuntimeStatus["halted"] = "halted";
11
+ })(RuntimeStatus = exports.RuntimeStatus || (exports.RuntimeStatus = {}));
12
12
  //# sourceMappingURL=runtime-status.js.map