@onlineapps/service-wrapper 2.2.6 → 2.2.7
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/package.json +3 -3
- package/src/ServiceWrapper.js +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/service-wrapper",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7",
|
|
4
4
|
"description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"author": "OA Drive Team",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@onlineapps/conn-base-cache": "1.0.
|
|
27
|
+
"@onlineapps/conn-base-cache": "1.0.9",
|
|
28
28
|
"@onlineapps/conn-base-monitoring": "1.0.10",
|
|
29
29
|
"@onlineapps/conn-infra-error-handler": "1.0.9",
|
|
30
30
|
"@onlineapps/conn-infra-mq": "1.1.69",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@onlineapps/conn-orch-registry": "1.1.54",
|
|
35
35
|
"@onlineapps/conn-orch-validator": "2.0.31",
|
|
36
36
|
"@onlineapps/monitoring-core": "1.0.21",
|
|
37
|
-
"@onlineapps/service-common": "1.0.
|
|
37
|
+
"@onlineapps/service-common": "1.0.18",
|
|
38
38
|
"@onlineapps/runtime-config": "1.0.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
package/src/ServiceWrapper.js
CHANGED
|
@@ -1070,8 +1070,17 @@ class ServiceWrapper {
|
|
|
1070
1070
|
|
|
1071
1071
|
const serviceName = this.config.service?.name || 'unnamed-service';
|
|
1072
1072
|
|
|
1073
|
+
let host = cacheUrl;
|
|
1074
|
+
let port = 6379;
|
|
1075
|
+
if (cacheUrl.startsWith('redis://')) {
|
|
1076
|
+
const parsed = new URL(cacheUrl);
|
|
1077
|
+
host = parsed.hostname;
|
|
1078
|
+
port = parseInt(parsed.port, 10) || 6379;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1073
1081
|
this.cacheConnector = new CacheConnector({
|
|
1074
|
-
host
|
|
1082
|
+
host,
|
|
1083
|
+
port,
|
|
1075
1084
|
namespace: serviceName,
|
|
1076
1085
|
defaultTTL: this.config.wrapper?.cache?.ttl || 300
|
|
1077
1086
|
});
|