@routr/location 2.0.25 → 2.0.31

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.
Files changed (2) hide show
  1. package/dist/helper.js +3 -0
  2. package/package.json +4 -4
package/dist/helper.js CHANGED
@@ -12,6 +12,7 @@ const processor_1 = require("@routr/processor");
12
12
  // and https://github.com/fonoster/routr/blob/ee5d339888344013939d06c734385f17f0cd75c2/mod/registrar/utils.js#L131
13
13
  function buildRoute(request, uri) {
14
14
  var _a;
15
+ const via = request.message.via[0];
15
16
  const sessionCount = processor_1.Extensions.getHeaderValue(request, common_1.CommonTypes.ExtraHeader.SESSION_COUNT)
16
17
  ? parseInt(processor_1.Extensions.getHeaderValue(request, common_1.CommonTypes.ExtraHeader.SESSION_COUNT))
17
18
  : -1;
@@ -20,6 +21,8 @@ function buildRoute(request, uri) {
20
21
  user: uri.user,
21
22
  host: uri.host,
22
23
  port: uri.port,
24
+ advertisedHost: via.host,
25
+ advertisedPort: via.port,
23
26
  transport: (_a = uri.transportParam) === null || _a === void 0 ? void 0 : _a.toUpperCase(),
24
27
  registeredOn: Date.now(),
25
28
  sessionCount,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/location",
3
- "version": "2.0.25",
3
+ "version": "2.0.31",
4
4
  "description": "Creates and maintains a list of routes to all registered endpoints",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -35,8 +35,8 @@
35
35
  "@opentelemetry/sdk-trace-base": "^1.0.4",
36
36
  "@opentelemetry/sdk-trace-node": "^1.0.4",
37
37
  "@opentelemetry/semantic-conventions": "^1.0.4",
38
- "@routr/common": "^2.0.20",
39
- "@routr/processor": "^2.0.20",
38
+ "@routr/common": "^2.0.31",
39
+ "@routr/processor": "^2.0.31",
40
40
  "ajv": "^6.12.6",
41
41
  "fp-ts": "^2.11.8",
42
42
  "redis": "^4.0.4"
@@ -48,5 +48,5 @@
48
48
  "bugs": {
49
49
  "url": "https://github.com/fonoster/routr/issues"
50
50
  },
51
- "gitHead": "6395051f8c7b55ba1376b56a86d7235729f5894b"
51
+ "gitHead": "bef1839e53701906f0739c8116639a1371f69173"
52
52
  }