@twin.org/engine-models 0.0.3-next.11 → 0.0.3-next.13

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.
@@ -1 +1 @@
1
- {"version":3,"file":"IEngineCore.js","sourceRoot":"","sources":["../../../src/models/IEngineCore.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IContextIds } from \"@twin.org/context\";\nimport type { IError } from \"@twin.org/core\";\nimport type { IEngineCoreConfig } from \"./config/IEngineCoreConfig.js\";\nimport type { IEngineCoreTypeConfig } from \"./config/IEngineCoreTypeConfig.js\";\nimport type { IEngineCoreClone } from \"./IEngineCoreClone.js\";\nimport type { IEngineState } from \"./IEngineState.js\";\n\n/**\n * Interface describing the engine core methods.\n */\nexport interface IEngineCore<\n\tC extends IEngineCoreConfig = IEngineCoreConfig,\n\tS extends IEngineState = IEngineState\n> {\n\t/**\n\t * Add a type initialiser.\n\t * @param type The type to add the initialiser for.\n\t * @param module The name of the module which contains the initialiser method.\n\t * @param method The name of the method to call.\n\t */\n\taddTypeInitialiser(type: string, module: string, method: string): void;\n\n\t/**\n\t * Get the type config for a specific type.\n\t * @param type The type to get the config for.\n\t * @returns The type config or undefined if not found.\n\t */\n\tgetTypeConfig(type: string): IEngineCoreTypeConfig[] | undefined;\n\n\t/**\n\t * Add a context ID key to the engine.\n\t * @param key The context ID key.\n\t * @param componentFeatures The component features for the context ID handler.\n\t */\n\taddContextIdKey(key: string, componentFeatures: string[]): void;\n\n\t/**\n\t * Get the context ID keys for the engine.\n\t * @returns The context IDs keys.\n\t */\n\tgetContextIdKeys(): string[];\n\n\t/**\n\t * Add a context ID to the engine.\n\t * @param key The context ID key.\n\t * @param value The context ID value.\n\t */\n\taddContextId(key: string, value: string): void;\n\n\t/**\n\t * Get the context IDs for the engine.\n\t * @returns The context IDs or undefined if none are set.\n\t */\n\tgetContextIds(): IContextIds | undefined;\n\n\t/**\n\t * Start the engine core.\n\t * @param skipComponentStart Should the component start be skipped.\n\t * @returns True if the start was successful.\n\t */\n\tstart(skipComponentStart?: boolean): Promise<boolean>;\n\n\t/**\n\t * Stop the engine core.\n\t * @returns Nothing.\n\t */\n\tstop(): Promise<void>;\n\n\t/**\n\t * Is the engine started.\n\t * @returns True if the engine is started.\n\t */\n\tisStarted(): boolean;\n\n\t/**\n\t * Is this the primary engine instance.\n\t * @returns True if the engine is the primary instance.\n\t */\n\tisPrimary(): boolean;\n\n\t/**\n\t * Is this engine instance a clone.\n\t * @returns True if the engine instance is a clone.\n\t */\n\tisClone(): boolean;\n\n\t/**\n\t * Log info.\n\t * @param message The message to log.\n\t */\n\tlogInfo(message: string): void;\n\n\t/**\n\t * Log error.\n\t * @param error The error to log.\n\t */\n\tlogError(error: IError): void;\n\n\t/**\n\t * Get the config for the engine.\n\t * @returns The config for the engine.\n\t */\n\tgetConfig(): C;\n\n\t/**\n\t * Get the state of the engine.\n\t * @returns The state of the engine.\n\t */\n\tgetState(): S;\n\n\t/**\n\t * Set the state to dirty so it gets saved.\n\t */\n\tsetStateDirty(): void;\n\n\t/**\n\t * Get all the registered instances.\n\t * @returns The registered instances.\n\t */\n\tgetRegisteredInstances(): {\n\t\t[name: string]: {\n\t\t\ttype: string;\n\t\t\tfeatures?: string[];\n\t\t}[];\n\t};\n\n\t/**\n\t * Get the registered instance type for the component/connector.\n\t * @param componentConnectorType The type of the component/connector.\n\t * @param features The requested features of the component, if not specified the default entry will be retrieved.\n\t * @returns The instance type matching the criteria if one is registered.\n\t * @throws If a matching instance was not found.\n\t */\n\tgetRegisteredInstanceType(componentConnectorType: string, features?: string[]): string;\n\n\t/**\n\t * Get the registered instance type for the component/connector.\n\t * @param componentConnectorType The type of the component/connector.\n\t * @param features The requested features of the component, if not specified the default entry will be retrieved.\n\t * @returns The instance type matching the criteria if one is registered.\n\t */\n\tgetRegisteredInstanceTypeOptional(\n\t\tcomponentConnectorType: string,\n\t\tfeatures?: string[]\n\t): string | undefined;\n\n\t/**\n\t * Get the data required to create a clone of the engine.\n\t * @returns The clone data.\n\t */\n\tgetCloneData(): IEngineCoreClone<C, S>;\n\n\t/**\n\t * Populate the engine from the clone data.\n\t * @param cloneData The clone data to populate from.\n\t * @param silent Should the clone be silent.\n\t */\n\tpopulateClone(cloneData: IEngineCoreClone<C, S>, silent?: boolean): void;\n}\n"]}
1
+ {"version":3,"file":"IEngineCore.js","sourceRoot":"","sources":["../../../src/models/IEngineCore.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IContextIds } from \"@twin.org/context\";\nimport type { IError } from \"@twin.org/core\";\nimport type { IEngineCoreConfig } from \"./config/IEngineCoreConfig.js\";\nimport type { IEngineCoreTypeConfig } from \"./config/IEngineCoreTypeConfig.js\";\nimport type { IEngineCoreClone } from \"./IEngineCoreClone.js\";\nimport type { IEngineState } from \"./IEngineState.js\";\n\n/**\n * Interface describing the engine core methods.\n */\nexport interface IEngineCore<\n\tC extends IEngineCoreConfig = IEngineCoreConfig,\n\tS extends IEngineState = IEngineState\n> {\n\t/**\n\t * Add a type initialiser.\n\t * @param type The type to add the initialiser for.\n\t * @param module The name of the module which contains the initialiser method.\n\t * @param method The name of the method to call.\n\t */\n\taddTypeInitialiser(type: string, module: string, method: string): void;\n\n\t/**\n\t * Get the type config for a specific type.\n\t * @param type The type to get the config for.\n\t * @returns The type config or undefined if not found.\n\t */\n\tgetTypeConfig(type: string): IEngineCoreTypeConfig[] | undefined;\n\n\t/**\n\t * Add a context ID key to the engine.\n\t * @param key The context ID key.\n\t * @param componentFeatures The component features for the context ID handler.\n\t */\n\taddContextIdKey(key: string, componentFeatures: string[]): void;\n\n\t/**\n\t * Get the context ID keys for the engine.\n\t * @returns The context IDs keys.\n\t */\n\tgetContextIdKeys(): string[];\n\n\t/**\n\t * Add a context ID to the engine.\n\t * @param key The context ID key.\n\t * @param value The context ID value.\n\t */\n\taddContextId(key: string, value: string): void;\n\n\t/**\n\t * Get the context IDs for the engine.\n\t * @returns The context IDs or undefined if none are set.\n\t */\n\tgetContextIds(): IContextIds | undefined;\n\n\t/**\n\t * Start the engine core.\n\t * @param skipComponentStart Should the component start be skipped.\n\t * @returns Nothing.\n\t */\n\tstart(skipComponentStart?: boolean): Promise<void>;\n\n\t/**\n\t * Stop the engine core.\n\t * @returns Nothing.\n\t */\n\tstop(): Promise<void>;\n\n\t/**\n\t * Is the engine started.\n\t * @returns True if the engine is started.\n\t */\n\tisStarted(): boolean;\n\n\t/**\n\t * Is this the primary engine instance.\n\t * @returns True if the engine is the primary instance.\n\t */\n\tisPrimary(): boolean;\n\n\t/**\n\t * Is this engine instance a clone.\n\t * @returns True if the engine instance is a clone.\n\t */\n\tisClone(): boolean;\n\n\t/**\n\t * Log info.\n\t * @param message The message to log.\n\t */\n\tlogInfo(message: string): void;\n\n\t/**\n\t * Log error.\n\t * @param error The error to log.\n\t */\n\tlogError(error: IError): void;\n\n\t/**\n\t * Get the config for the engine.\n\t * @returns The config for the engine.\n\t */\n\tgetConfig(): C;\n\n\t/**\n\t * Get the state of the engine.\n\t * @returns The state of the engine.\n\t */\n\tgetState(): S;\n\n\t/**\n\t * Set the state to dirty so it gets saved.\n\t */\n\tsetStateDirty(): void;\n\n\t/**\n\t * Get all the registered instances.\n\t * @returns The registered instances.\n\t */\n\tgetRegisteredInstances(): {\n\t\t[name: string]: {\n\t\t\ttype: string;\n\t\t\tfeatures?: string[];\n\t\t}[];\n\t};\n\n\t/**\n\t * Get the registered instance type for the component/connector.\n\t * @param componentConnectorType The type of the component/connector.\n\t * @param features The requested features of the component, if not specified the default entry will be retrieved.\n\t * @returns The instance type matching the criteria if one is registered.\n\t * @throws If a matching instance was not found.\n\t */\n\tgetRegisteredInstanceType(componentConnectorType: string, features?: string[]): string;\n\n\t/**\n\t * Get the registered instance type for the component/connector.\n\t * @param componentConnectorType The type of the component/connector.\n\t * @param features The requested features of the component, if not specified the default entry will be retrieved.\n\t * @returns The instance type matching the criteria if one is registered.\n\t */\n\tgetRegisteredInstanceTypeOptional(\n\t\tcomponentConnectorType: string,\n\t\tfeatures?: string[]\n\t): string | undefined;\n\n\t/**\n\t * Get the data required to create a clone of the engine.\n\t * @returns The clone data.\n\t */\n\tgetCloneData(): IEngineCoreClone<C, S>;\n\n\t/**\n\t * Populate the engine from the clone data.\n\t * @param cloneData The clone data to populate from.\n\t * @param silent Should the clone be silent.\n\t */\n\tpopulateClone(cloneData: IEngineCoreClone<C, S>, silent?: boolean): void;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IEngineServer.js","sourceRoot":"","sources":["../../../src/models/IEngineServer.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing the engine server methods.\n */\nexport interface IEngineServer {\n\t/**\n\t * Add a REST route generator.\n\t * @param type The type to add the generator for.\n\t * @param module The module containing the generator.\n\t * @param method The method to call on the module.\n\t */\n\taddRestRouteGenerator(type: string, module: string, method: string): void;\n\n\t/**\n\t * Add a socket route generator.\n\t * @param type The type to add the generator for.\n\t * @param module The module containing the generator.\n\t * @param method The method to call on the module.\n\t */\n\taddSocketRouteGenerator(type: string, module: string, method: string): void;\n\n\t/**\n\t * Start the engine server.\n\t * @returns True if the start was successful.\n\t */\n\tstart(): Promise<boolean>;\n\n\t/**\n\t * Stop the engine server.\n\t * @returns Nothing.\n\t */\n\tstop(): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"IEngineServer.js","sourceRoot":"","sources":["../../../src/models/IEngineServer.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing the engine server methods.\n */\nexport interface IEngineServer {\n\t/**\n\t * Add a REST route generator.\n\t * @param type The type to add the generator for.\n\t * @param module The module containing the generator.\n\t * @param method The method to call on the module.\n\t */\n\taddRestRouteGenerator(type: string, module: string, method: string): void;\n\n\t/**\n\t * Add a socket route generator.\n\t * @param type The type to add the generator for.\n\t * @param module The module containing the generator.\n\t * @param method The method to call on the module.\n\t */\n\taddSocketRouteGenerator(type: string, module: string, method: string): void;\n\n\t/**\n\t * Start the engine server.\n\t * @returns Nothing.\n\t */\n\tstart(): Promise<void>;\n\n\t/**\n\t * Stop the engine server.\n\t * @returns Nothing.\n\t */\n\tstop(): Promise<void>;\n}\n"]}
@@ -46,9 +46,9 @@ export interface IEngineCore<C extends IEngineCoreConfig = IEngineCoreConfig, S
46
46
  /**
47
47
  * Start the engine core.
48
48
  * @param skipComponentStart Should the component start be skipped.
49
- * @returns True if the start was successful.
49
+ * @returns Nothing.
50
50
  */
51
- start(skipComponentStart?: boolean): Promise<boolean>;
51
+ start(skipComponentStart?: boolean): Promise<void>;
52
52
  /**
53
53
  * Stop the engine core.
54
54
  * @returns Nothing.
@@ -18,9 +18,9 @@ export interface IEngineServer {
18
18
  addSocketRouteGenerator(type: string, module: string, method: string): void;
19
19
  /**
20
20
  * Start the engine server.
21
- * @returns True if the start was successful.
21
+ * @returns Nothing.
22
22
  */
23
- start(): Promise<boolean>;
23
+ start(): Promise<void>;
24
24
  /**
25
25
  * Stop the engine server.
26
26
  * @returns Nothing.
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @twin.org/engine-models - Changelog
2
2
 
3
+ ## [0.0.3-next.13](https://github.com/twinfoundation/engine/compare/engine-models-v0.0.3-next.12...engine-models-v0.0.3-next.13) (2026-01-19)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **engine-models:** Synchronize repo versions
9
+
10
+ ## [0.0.3-next.12](https://github.com/twinfoundation/engine/compare/engine-models-v0.0.3-next.11...engine-models-v0.0.3-next.12) (2026-01-19)
11
+
12
+
13
+ ### Features
14
+
15
+ * improve startup error handling ([#65](https://github.com/twinfoundation/engine/issues/65)) ([5b2d1c5](https://github.com/twinfoundation/engine/commit/5b2d1c539cf5484afa85e294d6d6c18f24ef8274))
16
+
3
17
  ## [0.0.3-next.11](https://github.com/twinfoundation/engine/compare/engine-models-v0.0.3-next.10...engine-models-v0.0.3-next.11) (2026-01-16)
4
18
 
5
19
 
@@ -150,7 +150,7 @@ The context IDs or undefined if none are set.
150
150
 
151
151
  ### start()
152
152
 
153
- > **start**(`skipComponentStart?`): `Promise`\<`boolean`\>
153
+ > **start**(`skipComponentStart?`): `Promise`\<`void`\>
154
154
 
155
155
  Start the engine core.
156
156
 
@@ -164,9 +164,9 @@ Should the component start be skipped.
164
164
 
165
165
  #### Returns
166
166
 
167
- `Promise`\<`boolean`\>
167
+ `Promise`\<`void`\>
168
168
 
169
- True if the start was successful.
169
+ Nothing.
170
170
 
171
171
  ***
172
172
 
@@ -70,15 +70,15 @@ The method to call on the module.
70
70
 
71
71
  ### start()
72
72
 
73
- > **start**(): `Promise`\<`boolean`\>
73
+ > **start**(): `Promise`\<`void`\>
74
74
 
75
75
  Start the engine server.
76
76
 
77
77
  #### Returns
78
78
 
79
- `Promise`\<`boolean`\>
79
+ `Promise`\<`void`\>
80
80
 
81
- True if the start was successful.
81
+ Nothing.
82
82
 
83
83
  ***
84
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-models",
3
- "version": "0.0.3-next.11",
3
+ "version": "0.0.3-next.13",
4
4
  "description": "Models which define the structure of the engine.",
5
5
  "repository": {
6
6
  "type": "git",