@zlink-systems/nestjs 0.32.1 → 0.33.0
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/LICENSE +66 -160
- package/dist/.tsbuildinfo +1 -1
- package/dist/spot-node-handler-registry.js +8 -3
- package/package.json +4 -4
|
@@ -29,11 +29,16 @@ class SpotNodeHandlerRegistry {
|
|
|
29
29
|
return this.nodes;
|
|
30
30
|
}
|
|
31
31
|
entrySpotTargets(entrySpotType, missingMessage) {
|
|
32
|
-
|
|
32
|
+
const exact = Object.values(this.nodes).filter((node) => node.entrySpotType === entrySpotType);
|
|
33
|
+
if (exact.length > 0)
|
|
34
|
+
return exact;
|
|
35
|
+
return this.requireTargets((node) => node.entrySpotType !== undefined && node.entrySpotType.prototype instanceof entrySpotType, missingMessage);
|
|
33
36
|
}
|
|
34
37
|
spotTargets(spotType, missingMessage) {
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
const exact = Object.values(this.nodes).filter((node) => [...(node.spotFactories ?? []), ...Object.values(node.instanceSpotFactories ?? {})].includes(spotType));
|
|
39
|
+
if (exact.length > 0)
|
|
40
|
+
return exact;
|
|
41
|
+
return this.requireTargets((node) => [...(node.spotFactories ?? []), ...Object.values(node.instanceSpotFactories ?? {})].some((type) => type.prototype instanceof spotType), missingMessage);
|
|
37
42
|
}
|
|
38
43
|
addEntrySpotTimer(node, registration) {
|
|
39
44
|
node.entrySpotTimerHandlers = [...(node.entrySpotTimerHandlers ?? []), registration];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zlink-systems/nestjs",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "0.33.0",
|
|
4
|
+
"license": "Elastic-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/zlink-systems/zlink.git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@nestjs/common": "^10.4.22",
|
|
24
|
-
"@zlink-systems/framework": "0.
|
|
25
|
-
"@zlink-systems/http-client": "0.
|
|
24
|
+
"@zlink-systems/framework": "0.33.0",
|
|
25
|
+
"@zlink-systems/http-client": "0.33.0",
|
|
26
26
|
"reflect-metadata": "^0.2.2",
|
|
27
27
|
"rxjs": "^7.8.2"
|
|
28
28
|
},
|