socket-function 1.1.2 → 1.1.3
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 +1 -1
- package/src/nodeCache.ts +3 -1
package/package.json
CHANGED
package/src/nodeCache.ts
CHANGED
|
@@ -49,6 +49,8 @@ export function getNodeIdLocation(nodeId: string): { address: string, port: numb
|
|
|
49
49
|
return { address, port: parseInt(port) };
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
// NOTE: This returns the full domain.
|
|
53
|
+
// - It didn't used to, but I think it also wasn't used before, and now we're using this to find the ip.
|
|
52
54
|
export function getNodeIdDomain(nodeId: string): string {
|
|
53
55
|
let result = getNodeIdDomainMaybeUndefined(nodeId);
|
|
54
56
|
if (result === undefined) {
|
|
@@ -61,7 +63,7 @@ export function getNodeIdDomainMaybeUndefined(nodeId: string): string | undefine
|
|
|
61
63
|
if (!location) {
|
|
62
64
|
return undefined;
|
|
63
65
|
}
|
|
64
|
-
return new URL("https://" + location.address).hostname
|
|
66
|
+
return new URL("https://" + location.address).hostname;
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
// NOTE: CallFactory turns into an actual CallFactory when registerNodeClient is called
|