@twin.org/engine-server-types 0.0.3-next.52 → 0.0.3-next.54
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/es/index.js +0 -3
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IEngineServerConfig.js.map +1 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/models/IEngineServerConfig.d.ts +0 -5
- package/docs/changelog.md +30 -0
- package/docs/reference/index.md +0 -4
- package/docs/reference/interfaces/IEngineServerConfig.md +0 -6
- package/package.json +3 -3
- package/dist/es/components/hosting.js +0 -29
- package/dist/es/components/hosting.js.map +0 -1
- package/dist/es/models/config/hostingComponentConfig.js +0 -2
- package/dist/es/models/config/hostingComponentConfig.js.map +0 -1
- package/dist/es/models/types/hostingComponentType.js +0 -13
- package/dist/es/models/types/hostingComponentType.js.map +0 -1
- package/dist/types/components/hosting.d.ts +0 -12
- package/dist/types/models/config/hostingComponentConfig.d.ts +0 -9
- package/dist/types/models/types/hostingComponentType.d.ts +0 -13
- package/docs/reference/functions/initialiseHostingComponent.md +0 -31
- package/docs/reference/type-aliases/HostingComponentConfig.md +0 -17
- package/docs/reference/type-aliases/HostingComponentType.md +0 -5
- package/docs/reference/variables/HostingComponentType.md +0 -13
package/dist/es/index.js
CHANGED
|
@@ -4,7 +4,6 @@ export * from "./components/authentication.js";
|
|
|
4
4
|
export * from "./components/authenticationAdmin.js";
|
|
5
5
|
export * from "./components/authenticationAudit.js";
|
|
6
6
|
export * from "./components/authenticationRate.js";
|
|
7
|
-
export * from "./components/hosting.js";
|
|
8
7
|
export * from "./components/information.js";
|
|
9
8
|
export * from "./components/mimeTypeProcessor.js";
|
|
10
9
|
export * from "./components/restRouteProcessor.js";
|
|
@@ -13,7 +12,6 @@ export * from "./models/config/authenticationAdminComponentConfig.js";
|
|
|
13
12
|
export * from "./models/config/authenticationAuditComponentConfig.js";
|
|
14
13
|
export * from "./models/config/authenticationComponentConfig.js";
|
|
15
14
|
export * from "./models/config/authenticationRateComponentConfig.js";
|
|
16
|
-
export * from "./models/config/hostingComponentConfig.js";
|
|
17
15
|
export * from "./models/config/informationComponentConfig.js";
|
|
18
16
|
export * from "./models/config/mimeTypeProcessorConfig.js";
|
|
19
17
|
export * from "./models/config/restRouteProcessorConfig.js";
|
|
@@ -23,7 +21,6 @@ export * from "./models/types/authenticationAdminComponentType.js";
|
|
|
23
21
|
export * from "./models/types/authenticationAuditComponentType.js";
|
|
24
22
|
export * from "./models/types/authenticationComponentType.js";
|
|
25
23
|
export * from "./models/types/authenticationRateComponentType.js";
|
|
26
|
-
export * from "./models/types/hostingComponentType.js";
|
|
27
24
|
export * from "./models/types/informationComponentType.js";
|
|
28
25
|
export * from "./models/types/mimeTypeProcessorType.js";
|
|
29
26
|
export * from "./models/types/restRouteProcessorType.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iCAAiC,CAAC;AAChD,cAAc,oDAAoD,CAAC;AACnE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./components/authentication.js\";\nexport * from \"./components/authenticationAdmin.js\";\nexport * from \"./components/authenticationAudit.js\";\nexport * from \"./components/authenticationRate.js\";\nexport * from \"./components/information.js\";\nexport * from \"./components/mimeTypeProcessor.js\";\nexport * from \"./components/restRouteProcessor.js\";\nexport * from \"./components/socketRouteProcessor.js\";\nexport * from \"./models/config/authenticationAdminComponentConfig.js\";\nexport * from \"./models/config/authenticationAuditComponentConfig.js\";\nexport * from \"./models/config/authenticationComponentConfig.js\";\nexport * from \"./models/config/authenticationRateComponentConfig.js\";\nexport * from \"./models/config/informationComponentConfig.js\";\nexport * from \"./models/config/mimeTypeProcessorConfig.js\";\nexport * from \"./models/config/restRouteProcessorConfig.js\";\nexport * from \"./models/config/socketRouteProcessorConfig.js\";\nexport * from \"./models/IEngineServerConfig.js\";\nexport * from \"./models/types/authenticationAdminComponentType.js\";\nexport * from \"./models/types/authenticationAuditComponentType.js\";\nexport * from \"./models/types/authenticationComponentType.js\";\nexport * from \"./models/types/authenticationRateComponentType.js\";\nexport * from \"./models/types/informationComponentType.js\";\nexport * from \"./models/types/mimeTypeProcessorType.js\";\nexport * from \"./models/types/restRouteProcessorType.js\";\nexport * from \"./models/types/socketRouteProcessorType.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEngineServerConfig.js","sourceRoot":"","sources":["../../../src/models/IEngineServerConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IWebServerOptions } from \"@twin.org/api-models\";\nimport type { IEngineCoreTypeConfig } from \"@twin.org/engine-models\";\nimport type { IEngineConfig } from \"@twin.org/engine-types\";\nimport type { AuthenticationAdminComponentConfig } from \"./config/authenticationAdminComponentConfig.js\";\nimport type { AuthenticationAuditComponentConfig } from \"./config/authenticationAuditComponentConfig.js\";\nimport type { AuthenticationComponentConfig } from \"./config/authenticationComponentConfig.js\";\nimport type { AuthenticationRateComponentConfig } from \"./config/authenticationRateComponentConfig.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"IEngineServerConfig.js","sourceRoot":"","sources":["../../../src/models/IEngineServerConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IWebServerOptions } from \"@twin.org/api-models\";\nimport type { IEngineCoreTypeConfig } from \"@twin.org/engine-models\";\nimport type { IEngineConfig } from \"@twin.org/engine-types\";\nimport type { AuthenticationAdminComponentConfig } from \"./config/authenticationAdminComponentConfig.js\";\nimport type { AuthenticationAuditComponentConfig } from \"./config/authenticationAuditComponentConfig.js\";\nimport type { AuthenticationComponentConfig } from \"./config/authenticationComponentConfig.js\";\nimport type { AuthenticationRateComponentConfig } from \"./config/authenticationRateComponentConfig.js\";\nimport type { InformationComponentConfig } from \"./config/informationComponentConfig.js\";\nimport type { MimeTypeProcessorConfig } from \"./config/mimeTypeProcessorConfig.js\";\nimport type { RestRouteProcessorConfig } from \"./config/restRouteProcessorConfig.js\";\nimport type { SocketRouteProcessorConfig } from \"./config/socketRouteProcessorConfig.js\";\n\n/**\n * Extended engine server config with known types.\n */\nexport interface IEngineServerConfig extends IEngineConfig {\n\t/**\n\t * Configuration for the web server.\n\t */\n\tweb?: IWebServerOptions;\n\n\t/**\n\t * The types to initialise in the engine.\n\t */\n\ttypes: IEngineConfig[\"types\"] & {\n\t\t[type: string]: IEngineCoreTypeConfig[] | undefined;\n\n\t\t/**\n\t\t * Information component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tinformationComponent?: IEngineCoreTypeConfig<InformationComponentConfig>[];\n\n\t\t/**\n\t\t * REST route processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trestRouteProcessor?: IEngineCoreTypeConfig<RestRouteProcessorConfig>[];\n\n\t\t/**\n\t\t * Socket route processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tsocketRouteProcessor?: IEngineCoreTypeConfig<SocketRouteProcessorConfig>[];\n\n\t\t/**\n\t\t * Mime type processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmimeTypeProcessor?: IEngineCoreTypeConfig<MimeTypeProcessorConfig>[];\n\n\t\t/**\n\t\t * Authentication audit component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationAuditComponent?: IEngineCoreTypeConfig<AuthenticationAuditComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication rate component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationRateComponent?: IEngineCoreTypeConfig<AuthenticationRateComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationComponent?: IEngineCoreTypeConfig<AuthenticationComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication admin component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationAdminComponent?: IEngineCoreTypeConfig<AuthenticationAdminComponentConfig>[];\n\t};\n}\n"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from "./components/authentication.js";
|
|
|
2
2
|
export * from "./components/authenticationAdmin.js";
|
|
3
3
|
export * from "./components/authenticationAudit.js";
|
|
4
4
|
export * from "./components/authenticationRate.js";
|
|
5
|
-
export * from "./components/hosting.js";
|
|
6
5
|
export * from "./components/information.js";
|
|
7
6
|
export * from "./components/mimeTypeProcessor.js";
|
|
8
7
|
export * from "./components/restRouteProcessor.js";
|
|
@@ -11,7 +10,6 @@ export * from "./models/config/authenticationAdminComponentConfig.js";
|
|
|
11
10
|
export * from "./models/config/authenticationAuditComponentConfig.js";
|
|
12
11
|
export * from "./models/config/authenticationComponentConfig.js";
|
|
13
12
|
export * from "./models/config/authenticationRateComponentConfig.js";
|
|
14
|
-
export * from "./models/config/hostingComponentConfig.js";
|
|
15
13
|
export * from "./models/config/informationComponentConfig.js";
|
|
16
14
|
export * from "./models/config/mimeTypeProcessorConfig.js";
|
|
17
15
|
export * from "./models/config/restRouteProcessorConfig.js";
|
|
@@ -21,7 +19,6 @@ export * from "./models/types/authenticationAdminComponentType.js";
|
|
|
21
19
|
export * from "./models/types/authenticationAuditComponentType.js";
|
|
22
20
|
export * from "./models/types/authenticationComponentType.js";
|
|
23
21
|
export * from "./models/types/authenticationRateComponentType.js";
|
|
24
|
-
export * from "./models/types/hostingComponentType.js";
|
|
25
22
|
export * from "./models/types/informationComponentType.js";
|
|
26
23
|
export * from "./models/types/mimeTypeProcessorType.js";
|
|
27
24
|
export * from "./models/types/restRouteProcessorType.js";
|
|
@@ -5,7 +5,6 @@ import type { AuthenticationAdminComponentConfig } from "./config/authentication
|
|
|
5
5
|
import type { AuthenticationAuditComponentConfig } from "./config/authenticationAuditComponentConfig.js";
|
|
6
6
|
import type { AuthenticationComponentConfig } from "./config/authenticationComponentConfig.js";
|
|
7
7
|
import type { AuthenticationRateComponentConfig } from "./config/authenticationRateComponentConfig.js";
|
|
8
|
-
import type { HostingComponentConfig } from "./config/hostingComponentConfig.js";
|
|
9
8
|
import type { InformationComponentConfig } from "./config/informationComponentConfig.js";
|
|
10
9
|
import type { MimeTypeProcessorConfig } from "./config/mimeTypeProcessorConfig.js";
|
|
11
10
|
import type { RestRouteProcessorConfig } from "./config/restRouteProcessorConfig.js";
|
|
@@ -27,10 +26,6 @@ export interface IEngineServerConfig extends IEngineConfig {
|
|
|
27
26
|
* Information component options which can be overridden by individual components by specifying types other than default.
|
|
28
27
|
*/
|
|
29
28
|
informationComponent?: IEngineCoreTypeConfig<InformationComponentConfig>[];
|
|
30
|
-
/**
|
|
31
|
-
* Hosting component options which can be overridden by individual components by specifying types other than default.
|
|
32
|
-
*/
|
|
33
|
-
hostingComponent?: IEngineCoreTypeConfig<HostingComponentConfig>[];
|
|
34
29
|
/**
|
|
35
30
|
* REST route processors options which can be overridden by individual components by specifying types other than default.
|
|
36
31
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.54](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.0.3-next.53...engine-server-types-v0.0.3-next.54) (2026-06-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **engine-server-types:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/engine-models bumped from 0.0.3-next.53 to 0.0.3-next.54
|
|
16
|
+
* @twin.org/engine-types bumped from 0.0.3-next.53 to 0.0.3-next.54
|
|
17
|
+
|
|
18
|
+
## [0.0.3-next.53](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.0.3-next.52...engine-server-types-v0.0.3-next.53) (2026-06-18)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* remove hosting component ([#159](https://github.com/iotaledger/twin-engine/issues/159)) ([bf304ad](https://github.com/iotaledger/twin-engine/commit/bf304ad97b2b94a77169d9ea2730ee5d750d8996))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Dependencies
|
|
27
|
+
|
|
28
|
+
* The following workspace dependencies were updated
|
|
29
|
+
* dependencies
|
|
30
|
+
* @twin.org/engine-models bumped from 0.0.3-next.52 to 0.0.3-next.53
|
|
31
|
+
* @twin.org/engine-types bumped from 0.0.3-next.52 to 0.0.3-next.53
|
|
32
|
+
|
|
3
33
|
## [0.0.3-next.52](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.0.3-next.51...engine-server-types-v0.0.3-next.52) (2026-06-16)
|
|
4
34
|
|
|
5
35
|
|
package/docs/reference/index.md
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
- [AuthenticationAuditComponentConfig](type-aliases/AuthenticationAuditComponentConfig.md)
|
|
11
11
|
- [AuthenticationComponentConfig](type-aliases/AuthenticationComponentConfig.md)
|
|
12
12
|
- [AuthenticationRateComponentConfig](type-aliases/AuthenticationRateComponentConfig.md)
|
|
13
|
-
- [HostingComponentConfig](type-aliases/HostingComponentConfig.md)
|
|
14
13
|
- [InformationComponentConfig](type-aliases/InformationComponentConfig.md)
|
|
15
14
|
- [MimeTypeProcessorConfig](type-aliases/MimeTypeProcessorConfig.md)
|
|
16
15
|
- [RestRouteProcessorConfig](type-aliases/RestRouteProcessorConfig.md)
|
|
@@ -19,7 +18,6 @@
|
|
|
19
18
|
- [AuthenticationAuditComponentType](type-aliases/AuthenticationAuditComponentType.md)
|
|
20
19
|
- [AuthenticationComponentType](type-aliases/AuthenticationComponentType.md)
|
|
21
20
|
- [AuthenticationRateComponentType](type-aliases/AuthenticationRateComponentType.md)
|
|
22
|
-
- [HostingComponentType](type-aliases/HostingComponentType.md)
|
|
23
21
|
- [InformationComponentType](type-aliases/InformationComponentType.md)
|
|
24
22
|
- [MimeTypeProcessorType](type-aliases/MimeTypeProcessorType.md)
|
|
25
23
|
- [RestRouteProcessorType](type-aliases/RestRouteProcessorType.md)
|
|
@@ -31,7 +29,6 @@
|
|
|
31
29
|
- [AuthenticationAuditComponentType](variables/AuthenticationAuditComponentType.md)
|
|
32
30
|
- [AuthenticationComponentType](variables/AuthenticationComponentType.md)
|
|
33
31
|
- [AuthenticationRateComponentType](variables/AuthenticationRateComponentType.md)
|
|
34
|
-
- [HostingComponentType](variables/HostingComponentType.md)
|
|
35
32
|
- [InformationComponentType](variables/InformationComponentType.md)
|
|
36
33
|
- [MimeTypeProcessorType](variables/MimeTypeProcessorType.md)
|
|
37
34
|
- [RestRouteProcessorType](variables/RestRouteProcessorType.md)
|
|
@@ -43,7 +40,6 @@
|
|
|
43
40
|
- [initialiseAuthenticationAdminComponent](functions/initialiseAuthenticationAdminComponent.md)
|
|
44
41
|
- [initialiseAuthenticationAuditComponent](functions/initialiseAuthenticationAuditComponent.md)
|
|
45
42
|
- [initialiseAuthenticationRateComponent](functions/initialiseAuthenticationRateComponent.md)
|
|
46
|
-
- [initialiseHostingComponent](functions/initialiseHostingComponent.md)
|
|
47
43
|
- [initialiseInformationComponent](functions/initialiseInformationComponent.md)
|
|
48
44
|
- [initialiseMimeTypeProcessorComponent](functions/initialiseMimeTypeProcessorComponent.md)
|
|
49
45
|
- [initialiseRestRouteProcessorComponent](functions/initialiseRestRouteProcessorComponent.md)
|
|
@@ -506,12 +506,6 @@ Context Id Handler component options which can be overridden by individual compo
|
|
|
506
506
|
|
|
507
507
|
Information component options which can be overridden by individual components by specifying types other than default.
|
|
508
508
|
|
|
509
|
-
##### hostingComponent?
|
|
510
|
-
|
|
511
|
-
> `optional` **hostingComponent?**: `IEngineCoreTypeConfig`\<[`HostingComponentConfig`](../type-aliases/HostingComponentConfig.md)\>[]
|
|
512
|
-
|
|
513
|
-
Hosting component options which can be overridden by individual components by specifying types other than default.
|
|
514
|
-
|
|
515
509
|
##### restRouteProcessor?
|
|
516
510
|
|
|
517
511
|
> `optional` **restRouteProcessor?**: `IEngineCoreTypeConfig`\<[`RestRouteProcessorConfig`](../type-aliases/RestRouteProcessorConfig.md)\>[]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/engine-server-types",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.54",
|
|
4
4
|
"description": "Server-focused component types and configuration models for API routing and hosting.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@twin.org/api-tenant-processor": "next",
|
|
26
26
|
"@twin.org/context": "next",
|
|
27
27
|
"@twin.org/core": "next",
|
|
28
|
-
"@twin.org/engine-models": "0.0.3-next.
|
|
29
|
-
"@twin.org/engine-types": "0.0.3-next.
|
|
28
|
+
"@twin.org/engine-models": "0.0.3-next.54",
|
|
29
|
+
"@twin.org/engine-types": "0.0.3-next.54",
|
|
30
30
|
"@twin.org/entity": "next",
|
|
31
31
|
"@twin.org/nameof": "next"
|
|
32
32
|
},
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 IOTA Stiftung.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
-
import { HostingService } from "@twin.org/api-service";
|
|
4
|
-
import { ComponentFactory } from "@twin.org/core";
|
|
5
|
-
import { EngineTypeHelper } from "@twin.org/engine-types";
|
|
6
|
-
import { HostingComponentType } from "../models/types/hostingComponentType.js";
|
|
7
|
-
/**
|
|
8
|
-
* Initialise the hosting component.
|
|
9
|
-
* @param engineCore The engine core.
|
|
10
|
-
* @param context The context for the engine.
|
|
11
|
-
* @param instanceConfig The instance config.
|
|
12
|
-
* @returns The instance created and the factory for it.
|
|
13
|
-
*/
|
|
14
|
-
export function initialiseHostingComponent(engineCore, context, instanceConfig) {
|
|
15
|
-
let createComponent;
|
|
16
|
-
let instanceTypeName;
|
|
17
|
-
if (instanceConfig.type === HostingComponentType.Service) {
|
|
18
|
-
createComponent = (createConfig) => new HostingService(EngineTypeHelper.mergeConfig({
|
|
19
|
-
tenantAdminComponentType: engineCore.getRegisteredInstanceTypeOptional("tenantAdminComponent")
|
|
20
|
-
}, createConfig.options));
|
|
21
|
-
instanceTypeName = "hosting-service";
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
createComponent,
|
|
25
|
-
instanceTypeName,
|
|
26
|
-
factory: ComponentFactory
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=hosting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosting.js","sourceRoot":"","sources":["../../../src/components/hosting.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAMlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACzC,UAA4C,EAC5C,OAAgD,EAChD,cAAsC;IAEtC,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,oBAAoB,CAAC,OAAO,EAAE,CAAC;QAC1D,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,cAAc,CACjB,gBAAgB,CAAC,WAAW,CAC3B;YACC,wBAAwB,EACvB,UAAU,CAAC,iCAAiC,CAAC,sBAAsB,CAAC;SACrE,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,oBAAkC,CAAC;IACpD,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { HostingService } from \"@twin.org/api-service\";\nimport { ComponentFactory } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { EngineTypeHelper } from \"@twin.org/engine-types\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport type { HostingComponentConfig } from \"../models/config/hostingComponentConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { HostingComponentType } from \"../models/types/hostingComponentType.js\";\n\n/**\n * Initialise the hosting component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseHostingComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: HostingComponentConfig\n): EngineTypeInitialiserReturn<HostingComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === HostingComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew HostingService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(HostingService);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hostingComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/hostingComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IHostingServiceConstructorOptions } from \"@twin.org/api-service\";\nimport type { HostingComponentType } from \"../types/hostingComponentType.js\";\n\n/**\n * Hosting component config types.\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type HostingComponentConfig = {\n\ttype: typeof HostingComponentType.Service;\n\toptions: IHostingServiceConstructorOptions;\n};\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 IOTA Stiftung.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
-
/**
|
|
4
|
-
* Hosting component types.
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
-
export const HostingComponentType = {
|
|
8
|
-
/**
|
|
9
|
-
* Service.
|
|
10
|
-
*/
|
|
11
|
-
Service: "service"
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=hostingComponentType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hostingComponentType.js","sourceRoot":"","sources":["../../../../src/models/types/hostingComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Hosting component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const HostingComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\"\n} as const;\n\n/**\n * Hosting component types.\n */\nexport type HostingComponentType = (typeof HostingComponentType)[keyof typeof HostingComponentType];\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ComponentFactory } from "@twin.org/core";
|
|
2
|
-
import type { EngineTypeInitialiserReturn, IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
3
|
-
import type { HostingComponentConfig } from "../models/config/hostingComponentConfig.js";
|
|
4
|
-
import type { IEngineServerConfig } from "../models/IEngineServerConfig.js";
|
|
5
|
-
/**
|
|
6
|
-
* Initialise the hosting component.
|
|
7
|
-
* @param engineCore The engine core.
|
|
8
|
-
* @param context The context for the engine.
|
|
9
|
-
* @param instanceConfig The instance config.
|
|
10
|
-
* @returns The instance created and the factory for it.
|
|
11
|
-
*/
|
|
12
|
-
export declare function initialiseHostingComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: HostingComponentConfig): EngineTypeInitialiserReturn<HostingComponentConfig, typeof ComponentFactory>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IHostingServiceConstructorOptions } from "@twin.org/api-service";
|
|
2
|
-
import type { HostingComponentType } from "../types/hostingComponentType.js";
|
|
3
|
-
/**
|
|
4
|
-
* Hosting component config types.
|
|
5
|
-
*/
|
|
6
|
-
export type HostingComponentConfig = {
|
|
7
|
-
type: typeof HostingComponentType.Service;
|
|
8
|
-
options: IHostingServiceConstructorOptions;
|
|
9
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hosting component types.
|
|
3
|
-
*/
|
|
4
|
-
export declare const HostingComponentType: {
|
|
5
|
-
/**
|
|
6
|
-
* Service.
|
|
7
|
-
*/
|
|
8
|
-
readonly Service: "service";
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Hosting component types.
|
|
12
|
-
*/
|
|
13
|
-
export type HostingComponentType = (typeof HostingComponentType)[keyof typeof HostingComponentType];
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Function: initialiseHostingComponent()
|
|
2
|
-
|
|
3
|
-
> **initialiseHostingComponent**(`engineCore`, `context`, `instanceConfig`): `EngineTypeInitialiserReturn`\<[`HostingComponentConfig`](../type-aliases/HostingComponentConfig.md), `Factory`\<`IComponent`\>\>
|
|
4
|
-
|
|
5
|
-
Initialise the hosting component.
|
|
6
|
-
|
|
7
|
-
## Parameters
|
|
8
|
-
|
|
9
|
-
### engineCore
|
|
10
|
-
|
|
11
|
-
`IEngineCore`\<[`IEngineServerConfig`](../interfaces/IEngineServerConfig.md)\>
|
|
12
|
-
|
|
13
|
-
The engine core.
|
|
14
|
-
|
|
15
|
-
### context
|
|
16
|
-
|
|
17
|
-
`IEngineCoreContext`\<[`IEngineServerConfig`](../interfaces/IEngineServerConfig.md)\>
|
|
18
|
-
|
|
19
|
-
The context for the engine.
|
|
20
|
-
|
|
21
|
-
### instanceConfig
|
|
22
|
-
|
|
23
|
-
[`HostingComponentConfig`](../type-aliases/HostingComponentConfig.md)
|
|
24
|
-
|
|
25
|
-
The instance config.
|
|
26
|
-
|
|
27
|
-
## Returns
|
|
28
|
-
|
|
29
|
-
`EngineTypeInitialiserReturn`\<[`HostingComponentConfig`](../type-aliases/HostingComponentConfig.md), `Factory`\<`IComponent`\>\>
|
|
30
|
-
|
|
31
|
-
The instance created and the factory for it.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Type Alias: HostingComponentConfig
|
|
2
|
-
|
|
3
|
-
> **HostingComponentConfig** = `object`
|
|
4
|
-
|
|
5
|
-
Hosting component config types.
|
|
6
|
-
|
|
7
|
-
## Properties
|
|
8
|
-
|
|
9
|
-
### type {#type}
|
|
10
|
-
|
|
11
|
-
> **type**: *typeof* [`Service`](../variables/HostingComponentType.md#service)
|
|
12
|
-
|
|
13
|
-
***
|
|
14
|
-
|
|
15
|
-
### options {#options}
|
|
16
|
-
|
|
17
|
-
> **options**: `IHostingServiceConstructorOptions`
|