@3sixty/engine-server 0.0.0-stage → 0.20.0-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,181 @@
1
+ # Class: EngineServer\<T\>
2
+
3
+ Server for the engine.
4
+
5
+ ## Type Parameters
6
+
7
+ ### T {#t}
8
+
9
+ `T` *extends* `IEngineServerConfig` = `IEngineServerConfig`
10
+
11
+ ## Implements
12
+
13
+ - `IEngineServer`
14
+
15
+ ## Constructors
16
+
17
+ ### Constructor
18
+
19
+ > **new EngineServer**\<`T`\>(`options`): `EngineServer`\<`T`\>
20
+
21
+ Create a new instance of EngineServer.
22
+
23
+ #### Parameters
24
+
25
+ ##### options
26
+
27
+ The options for the engine.
28
+
29
+ ###### engineCore
30
+
31
+ `IEngineCore`\<`T`\>
32
+
33
+ The engine core to serve from.
34
+
35
+ #### Returns
36
+
37
+ `EngineServer`\<`T`\>
38
+
39
+ ## Properties
40
+
41
+ ### CLASS\_NAME {#class_name}
42
+
43
+ > `readonly` `static` **CLASS\_NAME**: `string`
44
+
45
+ Runtime name for the class.
46
+
47
+ ## Methods
48
+
49
+ ### addRestRouteGenerator() {#addrestroutegenerator}
50
+
51
+ > **addRestRouteGenerator**(`type`, `module`, `method`): `void`
52
+
53
+ Add a REST route generator.
54
+
55
+ #### Parameters
56
+
57
+ ##### type
58
+
59
+ `string`
60
+
61
+ The type to add the generator for.
62
+
63
+ ##### module
64
+
65
+ `string`
66
+
67
+ The module containing the generator.
68
+
69
+ ##### method
70
+
71
+ `string`
72
+
73
+ The method to call on the module.
74
+
75
+ #### Returns
76
+
77
+ `void`
78
+
79
+ #### Implementation of
80
+
81
+ `IEngineServer.addRestRouteGenerator`
82
+
83
+ ***
84
+
85
+ ### addSocketRouteGenerator() {#addsocketroutegenerator}
86
+
87
+ > **addSocketRouteGenerator**(`type`, `module`, `method`): `void`
88
+
89
+ Add a socket route generator.
90
+
91
+ #### Parameters
92
+
93
+ ##### type
94
+
95
+ `string`
96
+
97
+ The type to add the generator for.
98
+
99
+ ##### module
100
+
101
+ `string`
102
+
103
+ The module containing the generator.
104
+
105
+ ##### method
106
+
107
+ `string`
108
+
109
+ The method to call on the module.
110
+
111
+ #### Returns
112
+
113
+ `void`
114
+
115
+ #### Implementation of
116
+
117
+ `IEngineServer.addSocketRouteGenerator`
118
+
119
+ ***
120
+
121
+ ### getRestRoutes() {#getrestroutes}
122
+
123
+ > **getRestRoutes**(): `IRestRoute`\<`any`, `any`\>[]
124
+
125
+ Get the built REST routes.
126
+
127
+ #### Returns
128
+
129
+ `IRestRoute`\<`any`, `any`\>[]
130
+
131
+ The REST routes.
132
+
133
+ ***
134
+
135
+ ### getSocketRoutes() {#getsocketroutes}
136
+
137
+ > **getSocketRoutes**(): `ISocketRoute`\<`any`, `any`\>[]
138
+
139
+ Get the built socket routes.
140
+
141
+ #### Returns
142
+
143
+ `ISocketRoute`\<`any`, `any`\>[]
144
+
145
+ The socket routes.
146
+
147
+ ***
148
+
149
+ ### start() {#start}
150
+
151
+ > **start**(): `Promise`\<`void`\>
152
+
153
+ Start the engine server.
154
+
155
+ #### Returns
156
+
157
+ `Promise`\<`void`\>
158
+
159
+ A promise that resolves when the server has started and is ready to accept requests.
160
+
161
+ #### Implementation of
162
+
163
+ `IEngineServer.start`
164
+
165
+ ***
166
+
167
+ ### stop() {#stop}
168
+
169
+ > **stop**(): `Promise`\<`void`\>
170
+
171
+ Stop the engine server.
172
+
173
+ #### Returns
174
+
175
+ `Promise`\<`void`\>
176
+
177
+ A promise that resolves when the server has stopped and all connections are closed.
178
+
179
+ #### Implementation of
180
+
181
+ `IEngineServer.stop`
@@ -0,0 +1,17 @@
1
+ # Function: addDefaultRestPaths()
2
+
3
+ > **addDefaultRestPaths**(`serverConfig`): `void`
4
+
5
+ Adds the rest paths to the server config if not already set.
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`
@@ -0,0 +1,10 @@
1
+ # @3sixty/engine-server
2
+
3
+ ## Classes
4
+
5
+ - [EngineServer](classes/EngineServer.md)
6
+
7
+ ## Functions
8
+
9
+ - [addDefaultRestPaths](functions/addDefaultRestPaths.md)
10
+ - [addDefaultSocketPaths](functions/addDefaultSocketPaths.md)
@@ -0,0 +1 @@
1
+ {}
package/package.json CHANGED
@@ -1,6 +1,54 @@
1
1
  {
2
- "name": "@3sixty/engine-server",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@3sixty/engine-server",
3
+ "version": "0.20.0-next.1",
4
+ "description": "Server runtime that exposes engine components through REST and socket routes.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/3sixtyglobal/engine.git",
8
+ "directory": "packages/engine-server"
9
+ },
10
+ "author": "martyn.janes@iota.org",
11
+ "license": "Apache-2.0",
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=24.0.0"
15
+ },
16
+ "dependencies": {
17
+ "@3sixty/api-models": "next",
18
+ "@3sixty/api-server-fastify": "next",
19
+ "@3sixty/context": "next",
20
+ "@3sixty/core": "next",
21
+ "@3sixty/engine-models": "0.20.0-next.1",
22
+ "@3sixty/engine-server-types": "0.20.0-next.1",
23
+ "@3sixty/modules": "next",
24
+ "@3sixty/nameof": "next"
25
+ },
26
+ "main": "./dist/es/index.js",
27
+ "types": "./dist/types/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/types/index.d.ts",
31
+ "import": "./dist/es/index.js",
32
+ "default": "./dist/es/index.js"
33
+ },
34
+ "./locales/*.json": "./locales/*.json"
35
+ },
36
+ "files": [
37
+ "dist/es",
38
+ "dist/types",
39
+ "locales",
40
+ "docs"
41
+ ],
42
+ "keywords": [
43
+ "twin",
44
+ "trade",
45
+ "iota",
46
+ "framework",
47
+ "blockchain",
48
+ "engine"
49
+ ],
50
+ "bugs": {
51
+ "url": "git+https://github.com/3sixtyglobal/engine/issues"
52
+ },
53
+ "homepage": "https://3sixty.global"
54
+ }