@cryptexlabs/codex-nodejs-common 0.10.11 → 0.10.12
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/lib/package.json
CHANGED
|
@@ -2,5 +2,5 @@ import { HostConfig } from "./host-config";
|
|
|
2
2
|
import { EndpointConfigInterface } from "./endpoint-config.interface";
|
|
3
3
|
export declare class EndpointConfig extends HostConfig implements EndpointConfigInterface {
|
|
4
4
|
constructor(host: any, port: string);
|
|
5
|
-
get endpoint():
|
|
5
|
+
get endpoint(): any;
|
|
6
6
|
}
|
|
@@ -7,7 +7,15 @@ class EndpointConfig extends host_config_1.HostConfig {
|
|
|
7
7
|
super(host, port);
|
|
8
8
|
}
|
|
9
9
|
get endpoint() {
|
|
10
|
-
|
|
10
|
+
if (!this.host.includes(",")) {
|
|
11
|
+
return `${this.host}:${this.port}`;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return this.host
|
|
15
|
+
.split(",")
|
|
16
|
+
.map((h) => `${h}:${this.port}`)
|
|
17
|
+
.join(",");
|
|
18
|
+
}
|
|
11
19
|
}
|
|
12
20
|
}
|
|
13
21
|
exports.EndpointConfig = EndpointConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-config.js","sourceRoot":"","sources":["../../../src/config/endpoint-config.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAG3C,MAAa,cACX,SAAQ,wBAAU;IAElB,YAAY,IAAI,EAAE,IAAY;QAC5B,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"endpoint-config.js","sourceRoot":"","sources":["../../../src/config/endpoint-config.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAG3C,MAAa,cACX,SAAQ,wBAAU;IAElB,YAAY,IAAI,EAAE,IAAY;QAC5B,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,IAAI,QAAQ;QACV,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,IAAI;iBACb,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;iBAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;IACH,CAAC;CACF;AAjBD,wCAiBC"}
|
package/package.json
CHANGED
|
@@ -9,6 +9,13 @@ export class EndpointConfig
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
get endpoint() {
|
|
12
|
-
|
|
12
|
+
if (!this.host.includes(",")) {
|
|
13
|
+
return `${this.host}:${this.port}`;
|
|
14
|
+
} else {
|
|
15
|
+
return this.host
|
|
16
|
+
.split(",")
|
|
17
|
+
.map((h) => `${h}:${this.port}`)
|
|
18
|
+
.join(",");
|
|
19
|
+
}
|
|
13
20
|
}
|
|
14
21
|
}
|