@twin.org/engine-core 0.0.2-next.21 → 0.0.2-next.23

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.
@@ -76,7 +76,6 @@ class EngineCore {
76
76
  static LOGGING_TYPE_NAME = "engine-logging-service";
77
77
  /**
78
78
  * Runtime name for the class.
79
- * @internal
80
79
  */
81
80
  static CLASS_NAME = "EngineCore";
82
81
  /**
@@ -161,11 +160,18 @@ class EngineCore {
161
160
  core.Guards.stringValue(EngineCore.CLASS_NAME, "type", type);
162
161
  core.Guards.stringValue(EngineCore.CLASS_NAME, "module", module);
163
162
  core.Guards.stringValue(EngineCore.CLASS_NAME, "method", method);
164
- this._typeInitialisers.push({
165
- type,
166
- module,
167
- method
168
- });
163
+ const currentIndex = this._typeInitialisers.findIndex(t => t.type === type);
164
+ if (currentIndex >= 0) {
165
+ this._typeInitialisers[currentIndex].module = module;
166
+ this._typeInitialisers[currentIndex].method = method;
167
+ }
168
+ else {
169
+ this._typeInitialisers.push({
170
+ type,
171
+ module,
172
+ method
173
+ });
174
+ }
169
175
  }
170
176
  /**
171
177
  * Get the type config for a specific type.
@@ -74,7 +74,6 @@ class EngineCore {
74
74
  static LOGGING_TYPE_NAME = "engine-logging-service";
75
75
  /**
76
76
  * Runtime name for the class.
77
- * @internal
78
77
  */
79
78
  static CLASS_NAME = "EngineCore";
80
79
  /**
@@ -159,11 +158,18 @@ class EngineCore {
159
158
  Guards.stringValue(EngineCore.CLASS_NAME, "type", type);
160
159
  Guards.stringValue(EngineCore.CLASS_NAME, "module", module);
161
160
  Guards.stringValue(EngineCore.CLASS_NAME, "method", method);
162
- this._typeInitialisers.push({
163
- type,
164
- module,
165
- method
166
- });
161
+ const currentIndex = this._typeInitialisers.findIndex(t => t.type === type);
162
+ if (currentIndex >= 0) {
163
+ this._typeInitialisers[currentIndex].module = module;
164
+ this._typeInitialisers[currentIndex].method = method;
165
+ }
166
+ else {
167
+ this._typeInitialisers.push({
168
+ type,
169
+ module,
170
+ method
171
+ });
172
+ }
167
173
  }
168
174
  /**
169
175
  * Get the type config for a specific type.
@@ -9,6 +9,10 @@ export declare class EngineCore<C extends IEngineCoreConfig = IEngineCoreConfig,
9
9
  * Name for the engine logger, used for direct console logging.
10
10
  */
11
11
  static readonly LOGGING_TYPE_NAME: string;
12
+ /**
13
+ * Runtime name for the class.
14
+ */
15
+ static readonly CLASS_NAME: string;
12
16
  /**
13
17
  * The core context.
14
18
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @twin.org/engine-core - Changelog
2
2
 
3
+ ## [0.0.2-next.23](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.22...engine-core-v0.0.2-next.23) (2025-10-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * override type initialisers with new registrations ([5b4ff56](https://github.com/twinfoundation/engine/commit/5b4ff561d06b6513c870a72bb20ba23c0653cfe8))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/engine-models bumped from 0.0.2-next.22 to 0.0.2-next.23
16
+
17
+ ## [0.0.2-next.22](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.21...engine-core-v0.0.2-next.22) (2025-10-07)
18
+
19
+
20
+ ### Miscellaneous Chores
21
+
22
+ * **engine-core:** Synchronize repo versions
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/engine-models bumped from 0.0.2-next.21 to 0.0.2-next.22
30
+
3
31
  ## [0.0.2-next.21](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.20...engine-core-v0.0.2-next.21) (2025-10-07)
4
32
 
5
33
 
@@ -46,6 +46,14 @@ Name for the engine logger, used for direct console logging.
46
46
 
47
47
  ***
48
48
 
49
+ ### CLASS\_NAME
50
+
51
+ > `readonly` `static` **CLASS\_NAME**: `string`
52
+
53
+ Runtime name for the class.
54
+
55
+ ***
56
+
49
57
  ### \_context
50
58
 
51
59
  > `protected` **\_context**: `IEngineCoreContext`\<`C`, `S`\>
package/locales/en.json CHANGED
@@ -1,10 +1,7 @@
1
1
  {
2
2
  "error": {
3
3
  "engineCore": {
4
- "connectorUnknownType": "Unknown connector type \"{type}\" specified for \"{connectorType}\"",
5
4
  "componentUnknownType": "Unknown component type \"{type}\" specified for \"{componentType}\"",
6
- "entityStorageCustomMissing": "Entity storage custom \"{typeCustom}\" missing for component \"{storageName}\"",
7
- "entityStorageMissing": "Entity storage configuration missing for component \"{storageName}\"",
8
5
  "bootstrapFailed": "Bootstrap failed for component \"{component}\", please check the logs for more information",
9
6
  "componentStopFailed": "Failed to stop component \"{component}\"",
10
7
  "instanceTypeNotFound": "Instance type not found for \"{type}\" with features \"{features}\""
@@ -24,7 +21,6 @@
24
21
  "stopping": "Engine is stopping",
25
22
  "stopped": "Engine has stopped",
26
23
  "configuring": "Configuring {element}",
27
- "configuringEntityStorage": "Configuring {element} with name \"{storageName}\" using \"{storageType}\" connector",
28
24
  "bootstrapStarted": "Bootstrap started",
29
25
  "bootstrapComplete": "Bootstrap complete",
30
26
  "bootstrapping": "Bootstrap {element}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-core",
3
- "version": "0.0.2-next.21",
3
+ "version": "0.0.2-next.23",
4
4
  "description": "Engine core.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "@twin.org/core": "next",
18
18
  "@twin.org/crypto": "next",
19
19
  "@twin.org/data-core": "next",
20
- "@twin.org/engine-models": "0.0.2-next.21",
20
+ "@twin.org/engine-models": "0.0.2-next.23",
21
21
  "@twin.org/entity": "next",
22
22
  "@twin.org/logging-connector-console": "next",
23
23
  "@twin.org/logging-models": "next",