@twin.org/engine-server 0.0.2-next.21 → 0.0.2-next.23
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/cjs/index.cjs +24 -10
- package/dist/esm/index.mjs +24 -10
- package/docs/changelog.md +36 -0
- package/package.json +4 -4
package/dist/cjs/index.cjs
CHANGED
|
@@ -309,11 +309,18 @@ class EngineServer {
|
|
|
309
309
|
core.Guards.stringValue(EngineServer.CLASS_NAME, "type", type);
|
|
310
310
|
core.Guards.stringValue(EngineServer.CLASS_NAME, "module", module);
|
|
311
311
|
core.Guards.stringValue(EngineServer.CLASS_NAME, "method", method);
|
|
312
|
-
this._restRouteGenerators.
|
|
313
|
-
|
|
314
|
-
module
|
|
315
|
-
method
|
|
316
|
-
}
|
|
312
|
+
const currentIndex = this._restRouteGenerators.findIndex(r => r.type === type);
|
|
313
|
+
if (currentIndex >= 0) {
|
|
314
|
+
this._restRouteGenerators[currentIndex].module = module;
|
|
315
|
+
this._restRouteGenerators[currentIndex].method = method;
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
this._restRouteGenerators.push({
|
|
319
|
+
type,
|
|
320
|
+
module,
|
|
321
|
+
method
|
|
322
|
+
});
|
|
323
|
+
}
|
|
317
324
|
}
|
|
318
325
|
/**
|
|
319
326
|
* Add a socket route generator.
|
|
@@ -325,11 +332,18 @@ class EngineServer {
|
|
|
325
332
|
core.Guards.stringValue(EngineServer.CLASS_NAME, "type", type);
|
|
326
333
|
core.Guards.stringValue(EngineServer.CLASS_NAME, "module", module);
|
|
327
334
|
core.Guards.stringValue(EngineServer.CLASS_NAME, "method", method);
|
|
328
|
-
this._socketRouteGenerators.
|
|
329
|
-
|
|
330
|
-
module
|
|
331
|
-
method
|
|
332
|
-
}
|
|
335
|
+
const currentIndex = this._socketRouteGenerators.findIndex(s => s.type === type);
|
|
336
|
+
if (currentIndex >= 0) {
|
|
337
|
+
this._socketRouteGenerators[currentIndex].module = module;
|
|
338
|
+
this._socketRouteGenerators[currentIndex].method = method;
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
this._socketRouteGenerators.push({
|
|
342
|
+
type,
|
|
343
|
+
module,
|
|
344
|
+
method
|
|
345
|
+
});
|
|
346
|
+
}
|
|
333
347
|
}
|
|
334
348
|
/**
|
|
335
349
|
* Get the built REST routes.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -307,11 +307,18 @@ class EngineServer {
|
|
|
307
307
|
Guards.stringValue(EngineServer.CLASS_NAME, "type", type);
|
|
308
308
|
Guards.stringValue(EngineServer.CLASS_NAME, "module", module);
|
|
309
309
|
Guards.stringValue(EngineServer.CLASS_NAME, "method", method);
|
|
310
|
-
this._restRouteGenerators.
|
|
311
|
-
|
|
312
|
-
module
|
|
313
|
-
method
|
|
314
|
-
}
|
|
310
|
+
const currentIndex = this._restRouteGenerators.findIndex(r => r.type === type);
|
|
311
|
+
if (currentIndex >= 0) {
|
|
312
|
+
this._restRouteGenerators[currentIndex].module = module;
|
|
313
|
+
this._restRouteGenerators[currentIndex].method = method;
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
this._restRouteGenerators.push({
|
|
317
|
+
type,
|
|
318
|
+
module,
|
|
319
|
+
method
|
|
320
|
+
});
|
|
321
|
+
}
|
|
315
322
|
}
|
|
316
323
|
/**
|
|
317
324
|
* Add a socket route generator.
|
|
@@ -323,11 +330,18 @@ class EngineServer {
|
|
|
323
330
|
Guards.stringValue(EngineServer.CLASS_NAME, "type", type);
|
|
324
331
|
Guards.stringValue(EngineServer.CLASS_NAME, "module", module);
|
|
325
332
|
Guards.stringValue(EngineServer.CLASS_NAME, "method", method);
|
|
326
|
-
this._socketRouteGenerators.
|
|
327
|
-
|
|
328
|
-
module
|
|
329
|
-
method
|
|
330
|
-
}
|
|
333
|
+
const currentIndex = this._socketRouteGenerators.findIndex(s => s.type === type);
|
|
334
|
+
if (currentIndex >= 0) {
|
|
335
|
+
this._socketRouteGenerators[currentIndex].module = module;
|
|
336
|
+
this._socketRouteGenerators[currentIndex].method = method;
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
this._socketRouteGenerators.push({
|
|
340
|
+
type,
|
|
341
|
+
module,
|
|
342
|
+
method
|
|
343
|
+
});
|
|
344
|
+
}
|
|
331
345
|
}
|
|
332
346
|
/**
|
|
333
347
|
* Get the built REST routes.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @twin.org/engine-server - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.23](https://github.com/twinfoundation/engine/compare/engine-server-v0.0.2-next.22...engine-server-v0.0.2-next.23) (2025-10-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* override type initialisers with new registrations ([5b4ff56](https://github.com/twinfoundation/engine/commit/5b4ff561d06b6513c870a72bb20ba23c0653cfe8))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/engine-core bumped from 0.0.2-next.22 to 0.0.2-next.23
|
|
16
|
+
* @twin.org/engine-models bumped from 0.0.2-next.22 to 0.0.2-next.23
|
|
17
|
+
* @twin.org/engine-server-types bumped from 0.0.2-next.22 to 0.0.2-next.23
|
|
18
|
+
* devDependencies
|
|
19
|
+
* @twin.org/engine bumped from 0.0.2-next.22 to 0.0.2-next.23
|
|
20
|
+
|
|
21
|
+
## [0.0.2-next.22](https://github.com/twinfoundation/engine/compare/engine-server-v0.0.2-next.21...engine-server-v0.0.2-next.22) (2025-10-07)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Miscellaneous Chores
|
|
25
|
+
|
|
26
|
+
* **engine-server:** Synchronize repo versions
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Dependencies
|
|
30
|
+
|
|
31
|
+
* The following workspace dependencies were updated
|
|
32
|
+
* dependencies
|
|
33
|
+
* @twin.org/engine-core bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
34
|
+
* @twin.org/engine-models bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
35
|
+
* @twin.org/engine-server-types bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
36
|
+
* devDependencies
|
|
37
|
+
* @twin.org/engine bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
38
|
+
|
|
3
39
|
## [0.0.2-next.21](https://github.com/twinfoundation/engine/compare/engine-server-v0.0.2-next.20...engine-server-v0.0.2-next.21) (2025-10-07)
|
|
4
40
|
|
|
5
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/engine-server",
|
|
3
|
-
"version": "0.0.2-next.
|
|
3
|
+
"version": "0.0.2-next.23",
|
|
4
4
|
"description": "Engine implementation for a server.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@twin.org/api-models": "next",
|
|
18
18
|
"@twin.org/api-server-fastify": "next",
|
|
19
19
|
"@twin.org/core": "next",
|
|
20
|
-
"@twin.org/engine-core": "0.0.2-next.
|
|
21
|
-
"@twin.org/engine-models": "0.0.2-next.
|
|
22
|
-
"@twin.org/engine-server-types": "0.0.2-next.
|
|
20
|
+
"@twin.org/engine-core": "0.0.2-next.23",
|
|
21
|
+
"@twin.org/engine-models": "0.0.2-next.23",
|
|
22
|
+
"@twin.org/engine-server-types": "0.0.2-next.23",
|
|
23
23
|
"@twin.org/modules": "next",
|
|
24
24
|
"@twin.org/nameof": "next"
|
|
25
25
|
},
|