@awesome-ecs/abstract 0.21.0 → 0.22.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/index.cjs +10 -32
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +3 -2
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +11 -8
- package/dist/components/index.js.map +1 -1
- package/dist/entities/index.cjs +11 -33
- package/dist/entities/index.cjs.map +1 -1
- package/dist/entities/index.d.cts +4 -34
- package/dist/entities/index.d.ts +4 -34
- package/dist/entities/index.js +12 -9
- package/dist/entities/index.js.map +1 -1
- package/dist/factories/index.cjs +0 -18
- package/dist/factories/index.d.cts +44 -42
- package/dist/factories/index.d.ts +44 -42
- package/dist/factories/index.js +0 -1
- package/dist/identity-component-BDWEtAXA.d.cts +238 -0
- package/dist/identity-component-CR1ULadR.d.ts +238 -0
- package/dist/index-C3UGZqUG.d.ts +288 -0
- package/dist/index-CH8ucsKZ.d.ts +472 -0
- package/dist/index-ChV4Q5j6.d.cts +137 -0
- package/dist/index-CjNeb3ML.d.cts +472 -0
- package/dist/index-Cm-YSPhK.d.ts +254 -0
- package/dist/index-D81Fo9XN.d.cts +254 -0
- package/dist/index-DLm-DKAk.d.cts +288 -0
- package/dist/index-oenqxDCa.d.ts +137 -0
- package/dist/pipelines/index.cjs +28 -35
- package/dist/pipelines/index.cjs.map +1 -1
- package/dist/pipelines/index.d.cts +4 -89
- package/dist/pipelines/index.d.ts +4 -89
- package/dist/pipelines/index.js +29 -11
- package/dist/pipelines/index.js.map +1 -1
- package/dist/systems/index.cjs +31 -35
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +7 -114
- package/dist/systems/index.d.ts +7 -114
- package/dist/systems/index.js +32 -11
- package/dist/systems/index.js.map +1 -1
- package/dist/{types-cZ-1lGPD.d.ts → types-DvzdpbLu.d.cts} +9 -17
- package/dist/{types-cZ-1lGPD.d.cts → types-yh4pOGEm.d.ts} +9 -17
- package/dist/utils/index.cjs +25 -35
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +3 -92
- package/dist/utils/index.d.ts +3 -92
- package/dist/utils/index.js +26 -11
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/entity-repository-BlSpo-x2.d.ts +0 -253
- package/dist/entity-repository-DJ1xbvaN.d.cts +0 -253
- package/dist/factories/index.cjs.map +0 -1
- package/dist/factories/index.js.map +0 -1
- package/dist/index-B1KXekZD.d.ts +0 -199
- package/dist/index-CnlpX7ys.d.cts +0 -199
- package/dist/performance-timer-BVyl0SRs.d.cts +0 -45
- package/dist/performance-timer-BVyl0SRs.d.ts +0 -45
- package/dist/pipeline-9bVMwJKD.d.ts +0 -161
- package/dist/pipeline-CzwetuCd.d.cts +0 -161
- package/dist/systems-runtime-context-Bz9hIdKT.d.cts +0 -330
- package/dist/systems-runtime-context-C_Tsvoym.d.ts +0 -330
|
@@ -1,35 +1,13 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
1
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
//#region src/components/identity-component.ts
|
|
3
|
+
/**
|
|
4
|
+
* The `BasicComponentType` enum defines the types of basic components available.
|
|
5
|
+
*/
|
|
6
|
+
let BasicComponentType = /* @__PURE__ */ function(BasicComponentType$1) {
|
|
7
|
+
BasicComponentType$1["identity"] = "identity";
|
|
8
|
+
return BasicComponentType$1;
|
|
9
|
+
}({});
|
|
25
10
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
BasicComponentType2["identity"] = "identity";
|
|
29
|
-
return BasicComponentType2;
|
|
30
|
-
})(BasicComponentType || {});
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
BasicComponentType
|
|
34
|
-
});
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.BasicComponentType = BasicComponentType;
|
|
35
13
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\nimport { Immutable } from '../utils/types';\nimport { IComponent } from './component';\n\n/**\n * The `BasicComponentType` enum defines the types of basic components available.\n */\nexport enum BasicComponentType {\n identity = 'identity'\n}\n\n/**\n * IdentityComponent interface represents the basic information regarding what makes the current Entity unique.\n * It extends the IComponent interface.\n *\n * @template TModel - The type of the model that extends IEntityModel.\n */\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\n /**\n * The Entity Type that defines what Category type the Entity is part of.\n * There can be multiple Entities sharing the same EntityType.\n */\n readonly entityType: EntityTypeUid;\n\n /**\n * The Model is the basic information needed to create an `IEntity` when it's first initialized.\n * It provides a first snapshot of information needed for the successful creation of an Entity instance.\n *\n * @type {Immutable<TModel>}\n */\n readonly model: Immutable<TModel>;\n\n /**\n * Keeps track when the Entity's systems have ran last.\n * Useful to calculate the `DeltaTime` between runs.\n *\n * @type {Date | undefined}\n */\n readonly lastUpdated?: Date;\n}\n"],"mappings":";;;;;AAOA,IAAY,oEAAL;AACL;;AACD"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent } from "../identity-component-BDWEtAXA.cjs";
|
|
2
|
+
import "../types-DvzdpbLu.cjs";
|
|
3
|
+
export { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent } from "../identity-component-CR1ULadR.js";
|
|
2
|
+
import "../types-yh4pOGEm.js";
|
|
3
|
+
export { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent };
|
package/dist/components/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
1
|
+
//#region src/components/identity-component.ts
|
|
2
|
+
/**
|
|
3
|
+
* The `BasicComponentType` enum defines the types of basic components available.
|
|
4
|
+
*/
|
|
5
|
+
let BasicComponentType = /* @__PURE__ */ function(BasicComponentType$1) {
|
|
6
|
+
BasicComponentType$1["identity"] = "identity";
|
|
7
|
+
return BasicComponentType$1;
|
|
8
|
+
}({});
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BasicComponentType };
|
|
9
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\nimport { Immutable } from '../utils/types';\nimport { IComponent } from './component';\n\n/**\n * The `BasicComponentType` enum defines the types of basic components available.\n */\nexport enum BasicComponentType {\n identity = 'identity'\n}\n\n/**\n * IdentityComponent interface represents the basic information regarding what makes the current Entity unique.\n * It extends the IComponent interface.\n *\n * @template TModel - The type of the model that extends IEntityModel.\n */\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\n /**\n * The Entity Type that defines what Category type the Entity is part of.\n * There can be multiple Entities sharing the same EntityType.\n */\n readonly entityType: EntityTypeUid;\n\n /**\n * The Model is the basic information needed to create an `IEntity` when it's first initialized.\n * It provides a first snapshot of information needed for the successful creation of an Entity instance.\n *\n * @type {Immutable<TModel>}\n */\n readonly model: Immutable<TModel>;\n\n /**\n * Keeps track when the Entity's systems have ran last.\n * Useful to calculate the `DeltaTime` between runs.\n *\n * @type {Date | undefined}\n */\n readonly lastUpdated?: Date;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\nimport { Immutable } from '../utils/types';\nimport { IComponent } from './component';\n\n/**\n * The `BasicComponentType` enum defines the types of basic components available.\n */\nexport enum BasicComponentType {\n identity = 'identity'\n}\n\n/**\n * IdentityComponent interface represents the basic information regarding what makes the current Entity unique.\n * It extends the IComponent interface.\n *\n * @template TModel - The type of the model that extends IEntityModel.\n */\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\n /**\n * The Entity Type that defines what Category type the Entity is part of.\n * There can be multiple Entities sharing the same EntityType.\n */\n readonly entityType: EntityTypeUid;\n\n /**\n * The Model is the basic information needed to create an `IEntity` when it's first initialized.\n * It provides a first snapshot of information needed for the successful creation of an Entity instance.\n *\n * @type {Immutable<TModel>}\n */\n readonly model: Immutable<TModel>;\n\n /**\n * Keeps track when the Entity's systems have ran last.\n * Useful to calculate the `DeltaTime` between runs.\n *\n * @type {Date | undefined}\n */\n readonly lastUpdated?: Date;\n}\n"],"mappings":";;;;AAOA,IAAY,oEAAL;AACL;;AACD"}
|
package/dist/entities/index.cjs
CHANGED
|
@@ -1,36 +1,14 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
1
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
//#region src/entities/entity-queue.ts
|
|
3
|
+
/**
|
|
4
|
+
* The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.
|
|
5
|
+
*/
|
|
6
|
+
let EntityUpdateType = /* @__PURE__ */ function(EntityUpdateType$1) {
|
|
7
|
+
EntityUpdateType$1["update"] = "update";
|
|
8
|
+
EntityUpdateType$1["remove"] = "remove";
|
|
9
|
+
return EntityUpdateType$1;
|
|
10
|
+
}({});
|
|
25
11
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
EntityUpdateType2["update"] = "update";
|
|
29
|
-
EntityUpdateType2["remove"] = "remove";
|
|
30
|
-
return EntityUpdateType2;
|
|
31
|
-
})(EntityUpdateType || {});
|
|
32
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
-
0 && (module.exports = {
|
|
34
|
-
EntityUpdateType
|
|
35
|
-
});
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.EntityUpdateType = EntityUpdateType;
|
|
36
14
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/entities/entity-queue.ts"],"sourcesContent":["import { IEntityModel } from './entity';\nimport { IEntityProxy } from './entity-proxies';\nimport { IEntitySnapshot } from './entity-snapshot';\n\n/**\n * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.\n */\nexport enum EntityUpdateType {\n update = 'update',\n remove = 'remove'\n}\n\n/**\n * The `IEntityUpdate` interface represents an Entity update that should be applied over an existing Entity.\n */\nexport interface IEntityUpdate {\n /**\n * The type of the update, which can be either `update` or `remove`.\n */\n type: EntityUpdateType;\n\n /**\n * The proxy of the Entity that needs to be updated.\n */\n entity: IEntityProxy;\n\n /**\n * Optional. The model of the Entity that needs to be updated.\n */\n model?: IEntityModel;\n\n /**\n * Optional. The snapshot of the Entity that needs to be updated.\n */\n snapshot?: IEntitySnapshot;\n}\n\n/**\n * The `IEntityUpdateQueue` interface is the main mechanism to queue and retrieve `EntityUpdate` instances.\n *\n * The interface can be implemented using a simple queue mechanism, or perhaps, a Priority Queue.\n */\nexport interface IEntityUpdateQueue {\n /**\n * The number of `EntityUpdate` instances currently in the queue.\n */\n readonly size: number;\n\n /**\n * Adds an `EntityUpdate` instance to the end of the queue.\n * @param change - The `EntityUpdate` instance to be added.\n */\n enqueue(change: IEntityUpdate): void;\n\n /**\n * Removes and returns the `EntityUpdate` instance at the front of the queue.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n dequeue(): IEntityUpdate;\n\n /**\n * Returns the `EntityUpdate` instance at the front of the queue without removing it.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n peek(): IEntityUpdate;\n\n /**\n * Removes all `EntityUpdate` instances from the queue.\n */\n clear(): void;\n}\n"],"mappings":";;;;;AAOA,IAAY,gEAAL;AACL;AACA;;AACD"}
|
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The `IEntityScheduler` is the main way of queuing `IEntityUpdate` instances on an Interval (based on time or a custom implementation).
|
|
8
|
-
*
|
|
9
|
-
* It usually reads the Entities from the `IEntityRepository`, and uses the `IEntityUpdateQueue` to enqueue Entity updates.
|
|
10
|
-
*/
|
|
11
|
-
interface IEntityScheduler {
|
|
12
|
-
/**
|
|
13
|
-
* Schedules an entity for updates at a specified interval.
|
|
14
|
-
*
|
|
15
|
-
* @param entityProxy - The entity to schedule for updates.
|
|
16
|
-
* @param intervalMs - The interval at which to schedule updates, in milliseconds. If not provided, the default interval will be used.
|
|
17
|
-
*/
|
|
18
|
-
schedule(entityProxy: IEntityProxy, intervalMs?: number): void;
|
|
19
|
-
/**
|
|
20
|
-
* Removes an entity from the scheduler.
|
|
21
|
-
*
|
|
22
|
-
* @param entityProxy - The entity to remove from the scheduler.
|
|
23
|
-
*/
|
|
24
|
-
remove(entityProxy: IEntityProxy): void;
|
|
25
|
-
/**
|
|
26
|
-
* Checks if an entity is currently scheduled for updates.
|
|
27
|
-
*
|
|
28
|
-
* @param entityProxy - The entity to check.
|
|
29
|
-
* @returns `true` if the entity is scheduled, `false` otherwise.
|
|
30
|
-
*/
|
|
31
|
-
has(entityProxy: IEntityProxy): boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { IEntityProxy, type IEntityScheduler };
|
|
1
|
+
import { EntityProxy, EntityTypeUid, EntityUid, IEntity, IEntityModel, IEntityModelWithFeatures, IEntityModelWithRequiredProxies, IEntityProxy, IEntityProxyRepository, RequiredProxies, TypedEntityProxy } from "../identity-component-BDWEtAXA.cjs";
|
|
2
|
+
import "../types-DvzdpbLu.cjs";
|
|
3
|
+
import { EntityEventSubscriptionFilter, EntityEventUid, EntityUpdateType, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData } from "../index-DLm-DKAk.cjs";
|
|
4
|
+
export { EntityEventSubscriptionFilter, EntityEventUid, EntityProxy, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityModelWithFeatures, IEntityModelWithRequiredProxies, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, TypedEntityProxy };
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The `IEntityScheduler` is the main way of queuing `IEntityUpdate` instances on an Interval (based on time or a custom implementation).
|
|
8
|
-
*
|
|
9
|
-
* It usually reads the Entities from the `IEntityRepository`, and uses the `IEntityUpdateQueue` to enqueue Entity updates.
|
|
10
|
-
*/
|
|
11
|
-
interface IEntityScheduler {
|
|
12
|
-
/**
|
|
13
|
-
* Schedules an entity for updates at a specified interval.
|
|
14
|
-
*
|
|
15
|
-
* @param entityProxy - The entity to schedule for updates.
|
|
16
|
-
* @param intervalMs - The interval at which to schedule updates, in milliseconds. If not provided, the default interval will be used.
|
|
17
|
-
*/
|
|
18
|
-
schedule(entityProxy: IEntityProxy, intervalMs?: number): void;
|
|
19
|
-
/**
|
|
20
|
-
* Removes an entity from the scheduler.
|
|
21
|
-
*
|
|
22
|
-
* @param entityProxy - The entity to remove from the scheduler.
|
|
23
|
-
*/
|
|
24
|
-
remove(entityProxy: IEntityProxy): void;
|
|
25
|
-
/**
|
|
26
|
-
* Checks if an entity is currently scheduled for updates.
|
|
27
|
-
*
|
|
28
|
-
* @param entityProxy - The entity to check.
|
|
29
|
-
* @returns `true` if the entity is scheduled, `false` otherwise.
|
|
30
|
-
*/
|
|
31
|
-
has(entityProxy: IEntityProxy): boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { IEntityProxy, type IEntityScheduler };
|
|
1
|
+
import { EntityProxy, EntityTypeUid, EntityUid, IEntity, IEntityModel, IEntityModelWithFeatures, IEntityModelWithRequiredProxies, IEntityProxy, IEntityProxyRepository, RequiredProxies, TypedEntityProxy } from "../identity-component-CR1ULadR.js";
|
|
2
|
+
import "../types-yh4pOGEm.js";
|
|
3
|
+
import { EntityEventSubscriptionFilter, EntityEventUid, EntityUpdateType, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData } from "../index-C3UGZqUG.js";
|
|
4
|
+
export { EntityEventSubscriptionFilter, EntityEventUid, EntityProxy, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityModelWithFeatures, IEntityModelWithRequiredProxies, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, TypedEntityProxy };
|
package/dist/entities/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
1
|
+
//#region src/entities/entity-queue.ts
|
|
2
|
+
/**
|
|
3
|
+
* The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.
|
|
4
|
+
*/
|
|
5
|
+
let EntityUpdateType = /* @__PURE__ */ function(EntityUpdateType$1) {
|
|
6
|
+
EntityUpdateType$1["update"] = "update";
|
|
7
|
+
EntityUpdateType$1["remove"] = "remove";
|
|
8
|
+
return EntityUpdateType$1;
|
|
9
|
+
}({});
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { EntityUpdateType };
|
|
10
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/entities/entity-queue.ts"],"sourcesContent":["import { IEntityModel } from './entity';\nimport { IEntityProxy } from './entity-proxies';\nimport { IEntitySnapshot } from './entity-snapshot';\n\n/**\n * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.\n */\nexport enum EntityUpdateType {\n update = 'update',\n remove = 'remove'\n}\n\n/**\n * The `IEntityUpdate` interface represents an Entity update that should be applied over an existing Entity.\n */\nexport interface IEntityUpdate {\n /**\n * The type of the update, which can be either `update` or `remove`.\n */\n type: EntityUpdateType;\n\n /**\n * The proxy of the Entity that needs to be updated.\n */\n entity: IEntityProxy;\n\n /**\n * Optional. The model of the Entity that needs to be updated.\n */\n model?: IEntityModel;\n\n /**\n * Optional. The snapshot of the Entity that needs to be updated.\n */\n snapshot?: IEntitySnapshot;\n}\n\n/**\n * The `IEntityUpdateQueue` interface is the main mechanism to queue and retrieve `EntityUpdate` instances.\n *\n * The interface can be implemented using a simple queue mechanism, or perhaps, a Priority Queue.\n */\nexport interface IEntityUpdateQueue {\n /**\n * The number of `EntityUpdate` instances currently in the queue.\n */\n readonly size: number;\n\n /**\n * Adds an `EntityUpdate` instance to the end of the queue.\n * @param change - The `EntityUpdate` instance to be added.\n */\n enqueue(change: IEntityUpdate): void;\n\n /**\n * Removes and returns the `EntityUpdate` instance at the front of the queue.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n dequeue(): IEntityUpdate;\n\n /**\n * Returns the `EntityUpdate` instance at the front of the queue without removing it.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n peek(): IEntityUpdate;\n\n /**\n * Removes all `EntityUpdate` instances from the queue.\n */\n clear(): void;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/entities/entity-queue.ts"],"sourcesContent":["import { IEntityModel } from './entity';\nimport { IEntityProxy } from './entity-proxies';\nimport { IEntitySnapshot } from './entity-snapshot';\n\n/**\n * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.\n */\nexport enum EntityUpdateType {\n update = 'update',\n remove = 'remove'\n}\n\n/**\n * The `IEntityUpdate` interface represents an Entity update that should be applied over an existing Entity.\n */\nexport interface IEntityUpdate {\n /**\n * The type of the update, which can be either `update` or `remove`.\n */\n type: EntityUpdateType;\n\n /**\n * The proxy of the Entity that needs to be updated.\n */\n entity: IEntityProxy;\n\n /**\n * Optional. The model of the Entity that needs to be updated.\n */\n model?: IEntityModel;\n\n /**\n * Optional. The snapshot of the Entity that needs to be updated.\n */\n snapshot?: IEntitySnapshot;\n}\n\n/**\n * The `IEntityUpdateQueue` interface is the main mechanism to queue and retrieve `EntityUpdate` instances.\n *\n * The interface can be implemented using a simple queue mechanism, or perhaps, a Priority Queue.\n */\nexport interface IEntityUpdateQueue {\n /**\n * The number of `EntityUpdate` instances currently in the queue.\n */\n readonly size: number;\n\n /**\n * Adds an `EntityUpdate` instance to the end of the queue.\n * @param change - The `EntityUpdate` instance to be added.\n */\n enqueue(change: IEntityUpdate): void;\n\n /**\n * Removes and returns the `EntityUpdate` instance at the front of the queue.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n dequeue(): IEntityUpdate;\n\n /**\n * Returns the `EntityUpdate` instance at the front of the queue without removing it.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n peek(): IEntityUpdate;\n\n /**\n * Removes all `EntityUpdate` instances from the queue.\n */\n clear(): void;\n}\n"],"mappings":";;;;AAOA,IAAY,gEAAL;AACL;AACA;;AACD"}
|
package/dist/factories/index.cjs
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
|
|
15
|
-
// src/factories/index.ts
|
|
16
|
-
var factories_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(factories_exports);
|
|
18
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,55 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import '../performance-timer-BVyl0SRs.cjs';
|
|
1
|
+
import { IEntity } from "../identity-component-BDWEtAXA.cjs";
|
|
2
|
+
import "../types-DvzdpbLu.cjs";
|
|
3
|
+
import "../index-DLm-DKAk.cjs";
|
|
4
|
+
import { IPipeline, IPipelineContext } from "../index-D81Fo9XN.cjs";
|
|
5
|
+
import "../index-ChV4Q5j6.cjs";
|
|
6
|
+
import { ISystemContext, ISystemsRuntimeContext } from "../index-CjNeb3ML.cjs";
|
|
8
7
|
|
|
8
|
+
//#region src/factories/context-factory.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* The IContextFactory interface is used to create abstraction layers for quickly creating Pipeline Contexts.
|
|
11
11
|
* It helps to avoid manually resolving all dependencies when creating these contexts.
|
|
12
12
|
*/
|
|
13
13
|
interface IContextFactory {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new instance of ISystemsRuntimeContext.
|
|
16
|
+
*
|
|
17
|
+
* @template TEntity - The type of entity to be used in the runtime context. It must extend IEntity.
|
|
18
|
+
* @returns A new instance of ISystemsRuntimeContext with the specified entity type.
|
|
19
|
+
*/
|
|
20
|
+
createRuntimeContext<TEntity extends IEntity>(): ISystemsRuntimeContext<TEntity>;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/factories/pipeline-factory.d.ts
|
|
23
24
|
/**
|
|
24
25
|
* The PipelineFactory interface provides methods to create different types of pipelines.
|
|
25
26
|
* It helps to quickly create IPipeline objects without manually resolving their dependencies.
|
|
26
27
|
*/
|
|
27
28
|
interface IPipelineFactory {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new pipeline with the specified context and result type.
|
|
31
|
+
*
|
|
32
|
+
* @template TContext - The type of the pipeline context. It must extend IPipelineContext.
|
|
33
|
+
* @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
|
|
34
|
+
* @returns A new instance of IPipeline with the specified context and result type.
|
|
35
|
+
*/
|
|
36
|
+
createPipeline<TContext extends IPipelineContext>(name?: string): IPipeline<TContext>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new pipeline specifically for systems with the specified entity type and result type.
|
|
39
|
+
*
|
|
40
|
+
* @template TEntity - The type of the entity. It must extend IEntity.
|
|
41
|
+
* @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
|
|
42
|
+
* @returns A new instance of IPipeline with the specified system context and result type.
|
|
43
|
+
*/
|
|
44
|
+
createSystemsPipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemContext<TEntity>>;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new pipeline specifically for systems runtime with the specified entity type and result type.
|
|
47
|
+
*
|
|
48
|
+
* @template TEntity - The type of the entity. It must extend IEntity.
|
|
49
|
+
* @template TResult - The type of the result returned by the pipeline. Default is MiddlewareResult.
|
|
50
|
+
* @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
|
|
51
|
+
* @returns A new instance of IPipeline with the specified systems runtime context and result type.
|
|
52
|
+
*/
|
|
53
|
+
createRuntimePipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemsRuntimeContext<TEntity>>;
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
export
|
|
55
|
+
//#endregion
|
|
56
|
+
export { IContextFactory, IPipelineFactory };
|
|
57
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,55 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import '../performance-timer-BVyl0SRs.js';
|
|
1
|
+
import { IEntity } from "../identity-component-CR1ULadR.js";
|
|
2
|
+
import "../types-yh4pOGEm.js";
|
|
3
|
+
import "../index-C3UGZqUG.js";
|
|
4
|
+
import { IPipeline, IPipelineContext } from "../index-Cm-YSPhK.js";
|
|
5
|
+
import "../index-oenqxDCa.js";
|
|
6
|
+
import { ISystemContext, ISystemsRuntimeContext } from "../index-CH8ucsKZ.js";
|
|
8
7
|
|
|
8
|
+
//#region src/factories/context-factory.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* The IContextFactory interface is used to create abstraction layers for quickly creating Pipeline Contexts.
|
|
11
11
|
* It helps to avoid manually resolving all dependencies when creating these contexts.
|
|
12
12
|
*/
|
|
13
13
|
interface IContextFactory {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new instance of ISystemsRuntimeContext.
|
|
16
|
+
*
|
|
17
|
+
* @template TEntity - The type of entity to be used in the runtime context. It must extend IEntity.
|
|
18
|
+
* @returns A new instance of ISystemsRuntimeContext with the specified entity type.
|
|
19
|
+
*/
|
|
20
|
+
createRuntimeContext<TEntity extends IEntity>(): ISystemsRuntimeContext<TEntity>;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/factories/pipeline-factory.d.ts
|
|
23
24
|
/**
|
|
24
25
|
* The PipelineFactory interface provides methods to create different types of pipelines.
|
|
25
26
|
* It helps to quickly create IPipeline objects without manually resolving their dependencies.
|
|
26
27
|
*/
|
|
27
28
|
interface IPipelineFactory {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new pipeline with the specified context and result type.
|
|
31
|
+
*
|
|
32
|
+
* @template TContext - The type of the pipeline context. It must extend IPipelineContext.
|
|
33
|
+
* @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
|
|
34
|
+
* @returns A new instance of IPipeline with the specified context and result type.
|
|
35
|
+
*/
|
|
36
|
+
createPipeline<TContext extends IPipelineContext>(name?: string): IPipeline<TContext>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new pipeline specifically for systems with the specified entity type and result type.
|
|
39
|
+
*
|
|
40
|
+
* @template TEntity - The type of the entity. It must extend IEntity.
|
|
41
|
+
* @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
|
|
42
|
+
* @returns A new instance of IPipeline with the specified system context and result type.
|
|
43
|
+
*/
|
|
44
|
+
createSystemsPipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemContext<TEntity>>;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new pipeline specifically for systems runtime with the specified entity type and result type.
|
|
47
|
+
*
|
|
48
|
+
* @template TEntity - The type of the entity. It must extend IEntity.
|
|
49
|
+
* @template TResult - The type of the result returned by the pipeline. Default is MiddlewareResult.
|
|
50
|
+
* @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
|
|
51
|
+
* @returns A new instance of IPipeline with the specified systems runtime context and result type.
|
|
52
|
+
*/
|
|
53
|
+
createRuntimePipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemsRuntimeContext<TEntity>>;
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
export
|
|
55
|
+
//#endregion
|
|
56
|
+
export { IContextFactory, IPipelineFactory };
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/factories/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.js.map
|