@twin.org/engine-server 0.0.1-next.9 → 0.0.2-next.1

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.
@@ -0,0 +1,17 @@
1
+ # Function: addDefaultRestPaths()
2
+
3
+ > **addDefaultRestPaths**(`serverConfig`): `void`
4
+
5
+ Adds the rest paths to the server config.
6
+
7
+ ## Parameters
8
+
9
+ ### serverConfig
10
+
11
+ `IEngineServerConfig`
12
+
13
+ The server config.
14
+
15
+ ## Returns
16
+
17
+ `void`
@@ -0,0 +1,17 @@
1
+ # Function: addDefaultSocketPaths()
2
+
3
+ > **addDefaultSocketPaths**(`serverConfig`): `void`
4
+
5
+ Adds the socket paths to the server config.
6
+
7
+ ## Parameters
8
+
9
+ ### serverConfig
10
+
11
+ `IEngineServerConfig`
12
+
13
+ The server config.
14
+
15
+ ## Returns
16
+
17
+ `void`
@@ -4,10 +4,7 @@
4
4
 
5
5
  - [EngineServer](classes/EngineServer.md)
6
6
 
7
- ## Interfaces
8
-
9
- - [IEngineServerEnvironmentVariables](interfaces/IEngineServerEnvironmentVariables.md)
10
-
11
7
  ## Functions
12
8
 
13
- - [buildEngineServerConfiguration](functions/buildEngineServerConfiguration.md)
9
+ - [addDefaultRestPaths](functions/addDefaultRestPaths.md)
10
+ - [addDefaultSocketPaths](functions/addDefaultSocketPaths.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-server",
3
- "version": "0.0.1-next.9",
3
+ "version": "0.0.2-next.1",
4
4
  "description": "Engine implementation for a server.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,83 +14,23 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-auth-entity-storage-service": "next",
18
- "@twin.org/api-core": "next",
19
17
  "@twin.org/api-models": "next",
20
- "@twin.org/api-processors": "next",
21
18
  "@twin.org/api-server-fastify": "next",
22
- "@twin.org/api-service": "next",
23
- "@twin.org/attestation-connector-entity-storage": "next",
24
- "@twin.org/attestation-connector-iota": "next",
25
- "@twin.org/attestation-models": "next",
26
- "@twin.org/attestation-service": "next",
27
- "@twin.org/auditable-item-graph-models": "next",
28
- "@twin.org/auditable-item-graph-service": "next",
29
- "@twin.org/auditable-item-stream-models": "next",
30
- "@twin.org/auditable-item-stream-service": "next",
31
- "@twin.org/background-task-connector-entity-storage": "next",
32
- "@twin.org/background-task-models": "next",
33
- "@twin.org/blob-storage-connector-aws-s3": "next",
34
- "@twin.org/blob-storage-connector-azure": "next",
35
- "@twin.org/blob-storage-connector-file": "next",
36
- "@twin.org/blob-storage-connector-gcp": "next",
37
- "@twin.org/blob-storage-connector-ipfs": "next",
38
- "@twin.org/blob-storage-connector-memory": "next",
39
- "@twin.org/blob-storage-models": "next",
40
- "@twin.org/blob-storage-service": "next",
41
- "@twin.org/cli-core": "next",
42
19
  "@twin.org/core": "next",
43
- "@twin.org/crypto": "next",
44
- "@twin.org/data-core": "next",
45
- "@twin.org/data-schema-org": "next",
46
- "@twin.org/engine-core": "0.0.1-next.9",
47
- "@twin.org/engine-models": "0.0.1-next.9",
48
- "@twin.org/entity": "next",
49
- "@twin.org/entity-storage-connector-cosmosdb": "next",
50
- "@twin.org/entity-storage-connector-dynamodb": "next",
51
- "@twin.org/entity-storage-connector-file": "next",
52
- "@twin.org/entity-storage-connector-gcp-firestore": "next",
53
- "@twin.org/entity-storage-connector-memory": "next",
54
- "@twin.org/entity-storage-connector-scylladb": "next",
55
- "@twin.org/entity-storage-models": "next",
56
- "@twin.org/entity-storage-service": "next",
57
- "@twin.org/identity-connector-entity-storage": "next",
58
- "@twin.org/identity-connector-iota": "next",
59
- "@twin.org/identity-models": "next",
60
- "@twin.org/identity-service": "next",
61
- "@twin.org/immutable-proof-models": "next",
62
- "@twin.org/immutable-proof-service": "next",
63
- "@twin.org/immutable-storage-connector-entity-storage": "next",
64
- "@twin.org/immutable-storage-connector-iota": "next",
65
- "@twin.org/immutable-storage-models": "next",
66
- "@twin.org/logging-connector-console": "next",
67
- "@twin.org/logging-connector-entity-storage": "next",
68
- "@twin.org/logging-models": "next",
69
- "@twin.org/logging-service": "next",
70
- "@twin.org/nameof": "next",
71
- "@twin.org/nft-connector-entity-storage": "next",
72
- "@twin.org/nft-connector-iota": "next",
73
- "@twin.org/nft-models": "next",
74
- "@twin.org/nft-service": "next",
75
- "@twin.org/telemetry-connector-entity-storage": "next",
76
- "@twin.org/telemetry-models": "next",
77
- "@twin.org/telemetry-service": "next",
78
- "@twin.org/vault-connector-entity-storage": "next",
79
- "@twin.org/vault-connector-hashicorp": "next",
80
- "@twin.org/vault-models": "next",
81
- "@twin.org/wallet-connector-entity-storage": "next",
82
- "@twin.org/wallet-connector-iota": "next",
83
- "@twin.org/wallet-models": "next",
84
- "@twin.org/web": "next"
20
+ "@twin.org/engine-core": "0.0.2-next.1",
21
+ "@twin.org/engine-models": "0.0.2-next.1",
22
+ "@twin.org/engine-server-types": "0.0.2-next.1",
23
+ "@twin.org/modules": "next",
24
+ "@twin.org/nameof": "next"
85
25
  },
86
26
  "main": "./dist/cjs/index.cjs",
87
27
  "module": "./dist/esm/index.mjs",
88
28
  "types": "./dist/types/index.d.ts",
89
29
  "exports": {
90
30
  ".": {
31
+ "types": "./dist/types/index.d.ts",
91
32
  "require": "./dist/cjs/index.cjs",
92
- "import": "./dist/esm/index.mjs",
93
- "types": "./dist/types/index.d.ts"
33
+ "import": "./dist/esm/index.mjs"
94
34
  },
95
35
  "./locales/*.json": "./locales/*.json"
96
36
  },
@@ -1,11 +0,0 @@
1
- import { type IEngineCoreContext, type AuthenticationComponentConfig, type IEngineCore } from "@twin.org/engine-models";
2
- /**
3
- * Initialise the authentication.
4
- * @param engineCore The engine core.
5
- * @param context The context for the engine.
6
- * @param instanceConfig The instance config.
7
- * @param overrideInstanceType The instance type to override the default.
8
- * @returns The name of the instance created.
9
- * @throws GeneralError if the component type is unknown.
10
- */
11
- export declare function initialiseAuthenticationComponent(engineCore: IEngineCore, context: IEngineCoreContext, instanceConfig: AuthenticationComponentConfig, overrideInstanceType?: string): string | undefined;
@@ -1,11 +0,0 @@
1
- import { type IEngineCore, type IEngineCoreContext, type InformationComponentConfig } from "@twin.org/engine-models";
2
- /**
3
- * Initialise the information component.
4
- * @param engineCore The engine core.
5
- * @param context The context for the engine.
6
- * @param instanceConfig The instance config.
7
- * @param overrideInstanceType The instance type to override the default.
8
- * @returns The name of the instance created.
9
- * @throws GeneralError if the component type is unknown.
10
- */
11
- export declare function initialiseInformationComponent(engineCore: IEngineCore, context: IEngineCoreContext, instanceConfig: InformationComponentConfig, overrideInstanceType?: string): string | undefined;
@@ -1,11 +0,0 @@
1
- import { type IEngineCore, type IEngineCoreContext, type MimeTypeProcessorConfig } from "@twin.org/engine-models";
2
- /**
3
- * Initialise the mime type processor.
4
- * @param engineCore The engine core.
5
- * @param context The context for the engine.
6
- * @param instanceConfig The instance config.
7
- * @param overrideInstanceType The instance type to override the default.
8
- * @returns The name of the instance created.
9
- * @throws GeneralError if the component type is unknown.
10
- */
11
- export declare function initialiseMimeTypeProcessorComponent(engineCore: IEngineCore, context: IEngineCoreContext, instanceConfig: MimeTypeProcessorConfig, overrideInstanceType?: string): string | undefined;
@@ -1,11 +0,0 @@
1
- import { type IEngineCoreContext, type IEngineCore, type RestRouteProcessorConfig } from "@twin.org/engine-models";
2
- /**
3
- * Initialise the rest route processor.
4
- * @param engineCore The engine core.
5
- * @param context The context for the engine.
6
- * @param instanceConfig The instance config.
7
- * @param overrideInstanceType The instance type to override the default.
8
- * @returns The name of the instance created.
9
- * @throws GeneralError if the component type is unknown.
10
- */
11
- export declare function initialiseRestRouteProcessorComponent(engineCore: IEngineCore, context: IEngineCoreContext, instanceConfig: RestRouteProcessorConfig, overrideInstanceType?: string): string | undefined;
@@ -1,11 +0,0 @@
1
- import { type IEngineCoreContext, type IEngineCore, type SocketRouteProcessorConfig } from "@twin.org/engine-models";
2
- /**
3
- * Initialise the socket route processor.
4
- * @param engineCore The engine core.
5
- * @param context The context for the engine.
6
- * @param instanceConfig The instance config.
7
- * @param overrideInstanceType The instance type to override the default.
8
- * @returns The name of the instance created.
9
- * @throws GeneralError if the component type is unknown.
10
- */
11
- export declare function initialiseSocketRouteProcessorComponent(engineCore: IEngineCore, context: IEngineCoreContext, instanceConfig: SocketRouteProcessorConfig, overrideInstanceType?: string): string | undefined;
@@ -1,41 +0,0 @@
1
- /**
2
- * The engine server environment variables.
3
- */
4
- export interface IEngineServerEnvironmentVariables {
5
- /**
6
- * The name of the admin user.
7
- */
8
- adminUsername: string;
9
- /**
10
- * The port to serve the API from.
11
- */
12
- port: string;
13
- /**
14
- * The host to serve the API from.
15
- */
16
- host: string;
17
- /**
18
- * The CORS origins to allow, defaults to *.
19
- */
20
- corsOrigins: string;
21
- /**
22
- * The CORS methods to allow, defaults to GET, POST, PUT, DELETE, OPTIONS.
23
- */
24
- httpMethods: string;
25
- /**
26
- * The CORS headers to allow.
27
- */
28
- httpAllowedHeaders: string;
29
- /**
30
- * The CORS headers to expose.
31
- */
32
- httpExposedHeaders: string;
33
- /**
34
- * The type of auth processor to use on the API: entity-storage.
35
- */
36
- authProcessorType: string;
37
- /**
38
- * The id of the key in the vault to use for signing in auth operations.
39
- */
40
- authSigningKeyId: string;
41
- }
@@ -1,11 +0,0 @@
1
- import type { IServerInfo } from "@twin.org/api-models";
2
- import { type IEngineCoreConfig, type IEngineServerConfig } from "@twin.org/engine-models";
3
- import type { IEngineServerEnvironmentVariables } from "../models/IEngineServerEnvironmentVariables";
4
- /**
5
- * Handles the configuration of the server.
6
- * @param envVars The environment variables.
7
- * @param coreEngineConfig The core engine config.
8
- * @param serverInfo The server information.
9
- * @returns The the config for the core and the server.
10
- */
11
- export declare function buildEngineServerConfiguration(envVars: IEngineServerEnvironmentVariables, coreEngineConfig: IEngineCoreConfig, serverInfo: IServerInfo): IEngineServerConfig;
@@ -1,25 +0,0 @@
1
- # Function: buildEngineServerConfiguration()
2
-
3
- > **buildEngineServerConfiguration**(`envVars`, `coreEngineConfig`, `serverInfo`): `IEngineServerConfig`
4
-
5
- Handles the configuration of the server.
6
-
7
- ## Parameters
8
-
9
- • **envVars**: [`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md)
10
-
11
- The environment variables.
12
-
13
- • **coreEngineConfig**: `IEngineCoreConfig`
14
-
15
- The core engine config.
16
-
17
- • **serverInfo**: `IServerInfo`
18
-
19
- The server information.
20
-
21
- ## Returns
22
-
23
- `IEngineServerConfig`
24
-
25
- The the config for the core and the server.
@@ -1,75 +0,0 @@
1
- # Interface: IEngineServerEnvironmentVariables
2
-
3
- The engine server environment variables.
4
-
5
- ## Properties
6
-
7
- ### adminUsername
8
-
9
- > **adminUsername**: `string`
10
-
11
- The name of the admin user.
12
-
13
- ***
14
-
15
- ### port
16
-
17
- > **port**: `string`
18
-
19
- The port to serve the API from.
20
-
21
- ***
22
-
23
- ### host
24
-
25
- > **host**: `string`
26
-
27
- The host to serve the API from.
28
-
29
- ***
30
-
31
- ### corsOrigins
32
-
33
- > **corsOrigins**: `string`
34
-
35
- The CORS origins to allow, defaults to *.
36
-
37
- ***
38
-
39
- ### httpMethods
40
-
41
- > **httpMethods**: `string`
42
-
43
- The CORS methods to allow, defaults to GET, POST, PUT, DELETE, OPTIONS.
44
-
45
- ***
46
-
47
- ### httpAllowedHeaders
48
-
49
- > **httpAllowedHeaders**: `string`
50
-
51
- The CORS headers to allow.
52
-
53
- ***
54
-
55
- ### httpExposedHeaders
56
-
57
- > **httpExposedHeaders**: `string`
58
-
59
- The CORS headers to expose.
60
-
61
- ***
62
-
63
- ### authProcessorType
64
-
65
- > **authProcessorType**: `string`
66
-
67
- The type of auth processor to use on the API: entity-storage.
68
-
69
- ***
70
-
71
- ### authSigningKeyId
72
-
73
- > **authSigningKeyId**: `string`
74
-
75
- The id of the key in the vault to use for signing in auth operations.