@routr/processor 2.0.5-alpha.5 → 2.0.5-alpha.6

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.
@@ -43,7 +43,7 @@ const addSelfVia = (request) => {
43
43
  port: 5060,
44
44
  transport: 'udp'
45
45
  }]*/
46
- return null;
46
+ return request;
47
47
  };
48
48
  exports.addSelfVia = addSelfVia;
49
49
  const removeTopVia = (request) => {
@@ -4,6 +4,7 @@ export default class Response {
4
4
  constructor(callback: Function);
5
5
  sendOk(): void;
6
6
  sendMethodNotAllowed(): void;
7
+ sendNotFound(): void;
7
8
  sendNotImplemented(): void;
8
9
  send(message: MessageRequest | Record<string, unknown>): void;
9
10
  sendError(error: any): void;
package/dist/response.js CHANGED
@@ -13,6 +13,9 @@ class Response {
13
13
  sendMethodNotAllowed() {
14
14
  this.callback(null, buildResponse(21));
15
15
  }
16
+ sendNotFound() {
17
+ this.callback(null, buildResponse(20));
18
+ }
16
19
  sendNotImplemented() {
17
20
  this.callback(null, buildResponse(47));
18
21
  }
package/dist/target.js CHANGED
@@ -6,9 +6,10 @@ exports.getAOR = getAOR;
6
6
  const getTargetAOR = (request) => exports.getAOR(request.message.to.address.uri);
7
7
  exports.getTargetAOR = getTargetAOR;
8
8
  const getTargetExpires = (request) => {
9
+ var _a, _b;
9
10
  // The expires value in the Contact header takes presendence over the value
10
11
  // on the Expires header
11
- const expires = request.message.contact.expires;
12
+ const expires = ((_b = (_a = request.message) === null || _a === void 0 ? void 0 : _a.contact) === null || _b === void 0 ? void 0 : _b.expires) || -1;
12
13
  return expires > -1 ? expires : request.message.expires.expires;
13
14
  };
14
15
  exports.getTargetExpires = getTargetExpires;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/processor",
3
- "version": "2.0.5-alpha.5",
3
+ "version": "2.0.5-alpha.6",
4
4
  "description": "Processor server and API",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -15,7 +15,7 @@
15
15
  "@fonoster/logger": "^0.3.3",
16
16
  "@grpc/grpc-js": "^1.5.9",
17
17
  "@grpc/proto-loader": "^0.6.9",
18
- "@routr/common": "^2.0.5-alpha.4",
18
+ "@routr/common": "^2.0.5-alpha.6",
19
19
  "fp-ts": "^2.11.8"
20
20
  },
21
21
  "directories": {
@@ -35,5 +35,5 @@
35
35
  "bugs": {
36
36
  "url": "https://github.com/fonoster/routr/issues"
37
37
  },
38
- "gitHead": "acce1d39ee71686a77f9a81c9f64ba01c6904a15"
38
+ "gitHead": "ac4963e735fbc4ad3045379463796137e650509c"
39
39
  }