@twin.org/engine-core 0.0.2-next.2 → 0.0.2-next.20

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/docs/changelog.md CHANGED
@@ -1,5 +1,257 @@
1
1
  # @twin.org/engine-core - Changelog
2
2
 
3
+ ## [0.0.2-next.20](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.19...engine-core-v0.0.2-next.20) (2025-10-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * standardised engine logging naming ([0dbf857](https://github.com/twinfoundation/engine/commit/0dbf857587641f86ddf010143519d0e8333489ff))
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.19 to 0.0.2-next.20
16
+
17
+ ## [0.0.2-next.19](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.18...engine-core-v0.0.2-next.19) (2025-10-02)
18
+
19
+
20
+ ### Features
21
+
22
+ * simplify config building ([732c871](https://github.com/twinfoundation/engine/commit/732c871c5aca236759168f4bc15aeffd98a330a8))
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.18 to 0.0.2-next.19
30
+
31
+ ## [0.0.2-next.18](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.17...engine-core-v0.0.2-next.18) (2025-09-29)
32
+
33
+
34
+ ### Features
35
+
36
+ * upgrade framework components ([efd52e8](https://github.com/twinfoundation/engine/commit/efd52e80564fff29c3897bfa09b6305b3a322812))
37
+
38
+
39
+ ### Dependencies
40
+
41
+ * The following workspace dependencies were updated
42
+ * dependencies
43
+ * @twin.org/engine-models bumped from 0.0.2-next.17 to 0.0.2-next.18
44
+
45
+ ## [0.0.2-next.17](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.16...engine-core-v0.0.2-next.17) (2025-09-26)
46
+
47
+
48
+ ### Miscellaneous Chores
49
+
50
+ * **engine-core:** Synchronize repo versions
51
+
52
+
53
+ ### Dependencies
54
+
55
+ * The following workspace dependencies were updated
56
+ * dependencies
57
+ * @twin.org/engine-models bumped from 0.0.2-next.16 to 0.0.2-next.17
58
+
59
+ ## [0.0.2-next.16](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.15...engine-core-v0.0.2-next.16) (2025-09-25)
60
+
61
+
62
+ ### Miscellaneous Chores
63
+
64
+ * **engine-core:** Synchronize repo versions
65
+
66
+
67
+ ### Dependencies
68
+
69
+ * The following workspace dependencies were updated
70
+ * dependencies
71
+ * @twin.org/engine-models bumped from 0.0.2-next.15 to 0.0.2-next.16
72
+
73
+ ## [0.0.2-next.15](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.14...engine-core-v0.0.2-next.15) (2025-09-24)
74
+
75
+
76
+ ### Miscellaneous Chores
77
+
78
+ * **engine-core:** Synchronize repo versions
79
+
80
+
81
+ ### Dependencies
82
+
83
+ * The following workspace dependencies were updated
84
+ * dependencies
85
+ * @twin.org/engine-models bumped from 0.0.2-next.14 to 0.0.2-next.15
86
+
87
+ ## [0.0.2-next.14](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.13...engine-core-v0.0.2-next.14) (2025-09-19)
88
+
89
+
90
+ ### Miscellaneous Chores
91
+
92
+ * **engine-core:** Synchronize repo versions
93
+
94
+
95
+ ### Dependencies
96
+
97
+ * The following workspace dependencies were updated
98
+ * dependencies
99
+ * @twin.org/engine-models bumped from 0.0.2-next.13 to 0.0.2-next.14
100
+
101
+ ## [0.0.2-next.13](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.12...engine-core-v0.0.2-next.13) (2025-09-08)
102
+
103
+
104
+ ### Miscellaneous Chores
105
+
106
+ * **engine-core:** Synchronize repo versions
107
+
108
+
109
+ ### Dependencies
110
+
111
+ * The following workspace dependencies were updated
112
+ * dependencies
113
+ * @twin.org/engine-models bumped from 0.0.2-next.12 to 0.0.2-next.13
114
+
115
+ ## [0.0.2-next.12](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.11...engine-core-v0.0.2-next.12) (2025-09-05)
116
+
117
+
118
+ ### Features
119
+
120
+ * add rights management negotiation ([84ef46b](https://github.com/twinfoundation/engine/commit/84ef46bff110611a19512793425c8c873ee2a590))
121
+
122
+
123
+ ### Dependencies
124
+
125
+ * The following workspace dependencies were updated
126
+ * dependencies
127
+ * @twin.org/engine-models bumped from 0.0.2-next.11 to 0.0.2-next.12
128
+
129
+ ## [0.0.2-next.11](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.10...engine-core-v0.0.2-next.11) (2025-08-29)
130
+
131
+
132
+ ### Features
133
+
134
+ * eslint migration to flat config ([6b978da](https://github.com/twinfoundation/engine/commit/6b978daf777a615d7758b63c3df57d5a376f6dfb))
135
+
136
+
137
+ ### Dependencies
138
+
139
+ * The following workspace dependencies were updated
140
+ * dependencies
141
+ * @twin.org/engine-models bumped from 0.0.2-next.10 to 0.0.2-next.11
142
+
143
+ ## [0.0.2-next.10](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.9...engine-core-v0.0.2-next.10) (2025-08-26)
144
+
145
+
146
+ ### Miscellaneous Chores
147
+
148
+ * **engine-core:** Synchronize repo versions
149
+
150
+
151
+ ### Dependencies
152
+
153
+ * The following workspace dependencies were updated
154
+ * dependencies
155
+ * @twin.org/engine-models bumped from 0.0.2-next.9 to 0.0.2-next.10
156
+
157
+ ## [0.0.2-next.9](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.8...engine-core-v0.0.2-next.9) (2025-08-25)
158
+
159
+
160
+ ### Features
161
+
162
+ * add isPrimary and isClone methods ([a7c63e9](https://github.com/twinfoundation/engine/commit/a7c63e97f54c95b104cc81e66d3fa42c6607bdc1))
163
+
164
+
165
+ ### Dependencies
166
+
167
+ * The following workspace dependencies were updated
168
+ * dependencies
169
+ * @twin.org/engine-models bumped from 0.0.2-next.8 to 0.0.2-next.9
170
+
171
+ ## [0.0.2-next.8](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.7...engine-core-v0.0.2-next.8) (2025-08-22)
172
+
173
+
174
+ ### Miscellaneous Chores
175
+
176
+ * **engine-core:** Synchronize repo versions
177
+
178
+
179
+ ### Dependencies
180
+
181
+ * The following workspace dependencies were updated
182
+ * dependencies
183
+ * @twin.org/engine-models bumped from 0.0.2-next.7 to 0.0.2-next.8
184
+
185
+ ## [0.0.2-next.7](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.6...engine-core-v0.0.2-next.7) (2025-08-22)
186
+
187
+
188
+ ### Features
189
+
190
+ * remove unused component states ([d56d648](https://github.com/twinfoundation/engine/commit/d56d6486119ea8b8501a33f9e3a3101a08b826ed))
191
+
192
+
193
+ ### Dependencies
194
+
195
+ * The following workspace dependencies were updated
196
+ * dependencies
197
+ * @twin.org/engine-models bumped from 0.0.2-next.6 to 0.0.2-next.7
198
+
199
+ ## [0.0.2-next.6](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.5...engine-core-v0.0.2-next.6) (2025-08-21)
200
+
201
+
202
+ ### Features
203
+
204
+ * update framework core ([acc0f8d](https://github.com/twinfoundation/engine/commit/acc0f8d455a4b8ec47f1da643139fa0f07775fa6))
205
+
206
+
207
+ ### Dependencies
208
+
209
+ * The following workspace dependencies were updated
210
+ * dependencies
211
+ * @twin.org/engine-models bumped from 0.0.2-next.5 to 0.0.2-next.6
212
+
213
+ ## [0.0.2-next.5](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.4...engine-core-v0.0.2-next.5) (2025-08-14)
214
+
215
+
216
+ ### Features
217
+
218
+ * add synchronised storage support ([5142e34](https://github.com/twinfoundation/engine/commit/5142e3488f09195cf9f48a9c6c6d1014231a4c2c))
219
+
220
+
221
+ ### Dependencies
222
+
223
+ * The following workspace dependencies were updated
224
+ * dependencies
225
+ * @twin.org/engine-models bumped from 0.0.2-next.4 to 0.0.2-next.5
226
+
227
+ ## [0.0.2-next.4](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.3...engine-core-v0.0.2-next.4) (2025-07-25)
228
+
229
+
230
+ ### Features
231
+
232
+ * add default logging component for web server ([8ad94f0](https://github.com/twinfoundation/engine/commit/8ad94f0d2d9a5241a8854b1e59fb9a55ce310142))
233
+
234
+
235
+ ### Dependencies
236
+
237
+ * The following workspace dependencies were updated
238
+ * dependencies
239
+ * @twin.org/engine-models bumped from 0.0.2-next.3 to 0.0.2-next.4
240
+
241
+ ## [0.0.2-next.3](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.2...engine-core-v0.0.2-next.3) (2025-07-24)
242
+
243
+
244
+ ### Miscellaneous Chores
245
+
246
+ * **engine-core:** Synchronize repo versions
247
+
248
+
249
+ ### Dependencies
250
+
251
+ * The following workspace dependencies were updated
252
+ * dependencies
253
+ * @twin.org/engine-models bumped from 0.0.2-next.2 to 0.0.2-next.3
254
+
3
255
  ## [0.0.2-next.2](https://github.com/twinfoundation/engine/compare/engine-core-v0.0.2-next.1...engine-core-v0.0.2-next.2) (2025-07-21)
4
256
 
5
257
 
@@ -38,19 +38,11 @@ The options for the engine.
38
38
 
39
39
  ## Properties
40
40
 
41
- ### LOGGER\_TYPE\_NAME
41
+ ### LOGGING\_TYPE\_NAME
42
42
 
43
- > `readonly` `static` **LOGGER\_TYPE\_NAME**: `string` = `"engine"`
43
+ > `readonly` `static` **LOGGING\_TYPE\_NAME**: `string` = `"engine-logging-service"`
44
44
 
45
- Name for the engine logger.
46
-
47
- ***
48
-
49
- ### CLASS\_NAME
50
-
51
- > `readonly` **CLASS\_NAME**: `string`
52
-
53
- Runtime name for the class.
45
+ Name for the engine logger, used for direct console logging.
54
46
 
55
47
  ***
56
48
 
@@ -64,7 +56,7 @@ The core context.
64
56
 
65
57
  ### addTypeInitialiser()
66
58
 
67
- > **addTypeInitialiser**(`type`, `typeConfig`, `module`, `method`): `void`
59
+ > **addTypeInitialiser**(`type`, `module`, `method`): `void`
68
60
 
69
61
  Add a type initialiser.
70
62
 
@@ -76,12 +68,6 @@ Add a type initialiser.
76
68
 
77
69
  The type to add the initialiser for.
78
70
 
79
- ##### typeConfig
80
-
81
- The type config.
82
-
83
- `undefined` | `IEngineCoreTypeConfig`[]
84
-
85
71
  ##### module
86
72
 
87
73
  `string`
@@ -104,6 +90,32 @@ The name of the method to call.
104
90
 
105
91
  ***
106
92
 
93
+ ### getTypeConfig()
94
+
95
+ > **getTypeConfig**(`type`): `undefined` \| `IEngineCoreTypeConfig`[]
96
+
97
+ Get the type config for a specific type.
98
+
99
+ #### Parameters
100
+
101
+ ##### type
102
+
103
+ `string`
104
+
105
+ The type to get the config for.
106
+
107
+ #### Returns
108
+
109
+ `undefined` \| `IEngineCoreTypeConfig`[]
110
+
111
+ The type config or undefined if not found.
112
+
113
+ #### Implementation of
114
+
115
+ `IEngineCore.getTypeConfig`
116
+
117
+ ***
118
+
107
119
  ### start()
108
120
 
109
121
  > **start**(): `Promise`\<`boolean`\>
@@ -140,6 +152,60 @@ Nothing.
140
152
 
141
153
  ***
142
154
 
155
+ ### isStarted()
156
+
157
+ > **isStarted**(): `boolean`
158
+
159
+ Is the engine started.
160
+
161
+ #### Returns
162
+
163
+ `boolean`
164
+
165
+ True if the engine is started.
166
+
167
+ #### Implementation of
168
+
169
+ `IEngineCore.isStarted`
170
+
171
+ ***
172
+
173
+ ### isPrimary()
174
+
175
+ > **isPrimary**(): `boolean`
176
+
177
+ Is this the primary engine instance.
178
+
179
+ #### Returns
180
+
181
+ `boolean`
182
+
183
+ True if the engine is the primary instance.
184
+
185
+ #### Implementation of
186
+
187
+ `IEngineCore.isPrimary`
188
+
189
+ ***
190
+
191
+ ### isClone()
192
+
193
+ > **isClone**(): `boolean`
194
+
195
+ Is this engine instance a clone.
196
+
197
+ #### Returns
198
+
199
+ `boolean`
200
+
201
+ True if the engine instance is a clone.
202
+
203
+ #### Implementation of
204
+
205
+ `IEngineCore.isClone`
206
+
207
+ ***
208
+
143
209
  ### logInfo()
144
210
 
145
211
  > **logInfo**(`message`): `void`
@@ -224,21 +290,89 @@ The state of the engine.
224
290
 
225
291
  ***
226
292
 
227
- ### getDefaultTypes()
293
+ ### getRegisteredInstances()
228
294
 
229
- > **getDefaultTypes**(): `object`
295
+ > **getRegisteredInstances**(): `object`
230
296
 
231
- Get the types for the component.
297
+ Get all the registered instances.
232
298
 
233
299
  #### Returns
234
300
 
235
301
  `object`
236
302
 
237
- The default types.
303
+ The registered instances.
304
+
305
+ #### Implementation of
306
+
307
+ `IEngineCore.getRegisteredInstances`
308
+
309
+ ***
310
+
311
+ ### getRegisteredInstanceType()
312
+
313
+ > **getRegisteredInstanceType**(`componentConnectorType`, `features?`): `string`
314
+
315
+ Get the registered instance type for the component/connector.
316
+
317
+ #### Parameters
318
+
319
+ ##### componentConnectorType
320
+
321
+ `string`
322
+
323
+ The type of the component/connector.
324
+
325
+ ##### features?
326
+
327
+ `string`[]
328
+
329
+ The requested features of the component, if not specified the default entry will be retrieved.
330
+
331
+ #### Returns
332
+
333
+ `string`
334
+
335
+ The instance type matching the criteria if one is registered.
336
+
337
+ #### Throws
338
+
339
+ If a matching instance was not found.
340
+
341
+ #### Implementation of
342
+
343
+ `IEngineCore.getRegisteredInstanceType`
344
+
345
+ ***
346
+
347
+ ### getRegisteredInstanceTypeOptional()
348
+
349
+ > **getRegisteredInstanceTypeOptional**(`componentConnectorType`, `features?`): `undefined` \| `string`
350
+
351
+ Get the registered instance type for the component/connector if it exists.
352
+
353
+ #### Parameters
354
+
355
+ ##### componentConnectorType
356
+
357
+ `string`
358
+
359
+ The type of the component/connector.
360
+
361
+ ##### features?
362
+
363
+ `string`[]
364
+
365
+ The requested features of the component, if not specified the default entry will be retrieved.
366
+
367
+ #### Returns
368
+
369
+ `undefined` \| `string`
370
+
371
+ The instance type matching the criteria if one is registered.
238
372
 
239
373
  #### Implementation of
240
374
 
241
- `IEngineCore.getDefaultTypes`
375
+ `IEngineCore.getRegisteredInstanceTypeOptional`
242
376
 
243
377
  ***
244
378
 
@@ -0,0 +1,55 @@
1
+ # Class: EngineModuleHelper
2
+
3
+ Helper class for engine modules.
4
+
5
+ ## Constructors
6
+
7
+ ### Constructor
8
+
9
+ > **new EngineModuleHelper**(): `EngineModuleHelper`
10
+
11
+ #### Returns
12
+
13
+ `EngineModuleHelper`
14
+
15
+ ## Properties
16
+
17
+ ### CLASS\_NAME
18
+
19
+ > `readonly` `static` **CLASS\_NAME**: `string`
20
+
21
+ Runtime name for the class.
22
+
23
+ ## Methods
24
+
25
+ ### loadComponent()
26
+
27
+ > `static` **loadComponent**\<`T`\>(`engineCore`, `engineModuleConfig`): `Promise`\<`T`\>
28
+
29
+ Loads an engine component and constructs it with the relevant dependencies and configuration.
30
+
31
+ #### Type Parameters
32
+
33
+ ##### T
34
+
35
+ `T`
36
+
37
+ #### Parameters
38
+
39
+ ##### engineCore
40
+
41
+ `IEngineCore`
42
+
43
+ The engine core.
44
+
45
+ ##### engineModuleConfig
46
+
47
+ `IEngineModuleConfig`
48
+
49
+ The configuration for the module.
50
+
51
+ #### Returns
52
+
53
+ `Promise`\<`T`\>
54
+
55
+ The instantiated component.
@@ -5,6 +5,7 @@
5
5
  - [EngineCore](classes/EngineCore.md)
6
6
  - [FileStateStorage](classes/FileStateStorage.md)
7
7
  - [MemoryStateStorage](classes/MemoryStateStorage.md)
8
+ - [EngineModuleHelper](classes/EngineModuleHelper.md)
8
9
 
9
10
  ## Interfaces
10
11
 
@@ -79,17 +79,3 @@ Custom bootstrap method for the engine.
79
79
  #### Returns
80
80
 
81
81
  `Promise`\<`void`\>
82
-
83
- ***
84
-
85
- ### loggerTypeName?
86
-
87
- > `optional` **loggerTypeName**: `string`
88
-
89
- The name of the logger to use in the engine.
90
-
91
- #### Default
92
-
93
- ```ts
94
- engine
95
- ```
package/locales/en.json CHANGED
@@ -6,11 +6,15 @@
6
6
  "entityStorageCustomMissing": "Entity storage custom \"{typeCustom}\" missing for component \"{storageName}\"",
7
7
  "entityStorageMissing": "Entity storage configuration missing for component \"{storageName}\"",
8
8
  "bootstrapFailed": "Bootstrap failed for component \"{component}\", please check the logs for more information",
9
- "componentStopFailed": "Failed to stop component \"{component}\""
9
+ "componentStopFailed": "Failed to stop component \"{component}\"",
10
+ "instanceTypeNotFound": "Instance type not found for \"{type}\" with features \"{features}\""
10
11
  },
11
12
  "fileStateStorage": {
12
13
  "failedLoading": "Failed to load file state storage from \"{filename}\"",
13
14
  "failedSaving": "Failed to save file state storage to \"{filename}\""
15
+ },
16
+ "engineModuleHelper": {
17
+ "moduleNotClass": "The module \"{moduleName}\" does not export a class \"{className}\""
14
18
  }
15
19
  },
16
20
  "engineCore": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-core",
3
- "version": "0.0.2-next.2",
3
+ "version": "0.0.2-next.20",
4
4
  "description": "Engine core.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,10 +17,11 @@
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.2",
20
+ "@twin.org/engine-models": "0.0.2-next.20",
21
21
  "@twin.org/entity": "next",
22
22
  "@twin.org/logging-connector-console": "next",
23
23
  "@twin.org/logging-models": "next",
24
+ "@twin.org/logging-service": "next",
24
25
  "@twin.org/modules": "next",
25
26
  "@twin.org/nameof": "next"
26
27
  },
@@ -41,5 +42,16 @@
41
42
  "dist/types",
42
43
  "locales",
43
44
  "docs"
45
+ ],
46
+ "keywords": [
47
+ "twin",
48
+ "trade",
49
+ "iota",
50
+ "framework",
51
+ "blockchain",
52
+ "engine",
53
+ "core",
54
+ "foundation",
55
+ "utilities"
44
56
  ]
45
57
  }