@routr/processor 2.19.0 → 2.21.0
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/dist/response.d.ts +6 -0
- package/dist/response.js +11 -0
- package/package.json +3 -3
package/dist/response.d.ts
CHANGED
|
@@ -46,6 +46,12 @@ export default class Response {
|
|
|
46
46
|
* Sends a not implemented response.
|
|
47
47
|
*/
|
|
48
48
|
sendNotImplemented(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Sends a bad gateway response: the next hop cannot be reached as configured.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} reasonPhrase - Optional reason phrase.
|
|
53
|
+
*/
|
|
54
|
+
sendBadGateway(reasonPhrase?: string): void;
|
|
49
55
|
/**
|
|
50
56
|
* Sends a internal server error response.
|
|
51
57
|
*/
|
package/dist/response.js
CHANGED
|
@@ -98,6 +98,17 @@ class Response {
|
|
|
98
98
|
reasonPhrase: "Not Implemented"
|
|
99
99
|
}));
|
|
100
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Sends a bad gateway response: the next hop cannot be reached as configured.
|
|
103
|
+
*
|
|
104
|
+
* @param {string} reasonPhrase - Optional reason phrase.
|
|
105
|
+
*/
|
|
106
|
+
sendBadGateway(reasonPhrase) {
|
|
107
|
+
this.callback(null, buildResponse({
|
|
108
|
+
code: common_1.CommonTypes.ResponseType.BAD_GATEWAY,
|
|
109
|
+
reasonPhrase: reasonPhrase || "Bad Gateway"
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
101
112
|
/**
|
|
102
113
|
* Sends a internal server error response.
|
|
103
114
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/processor",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
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.6.0",
|
|
16
16
|
"@grpc/grpc-js": "~1.14.6",
|
|
17
17
|
"@grpc/proto-loader": "~0.7.10",
|
|
18
|
-
"@routr/common": "^2.
|
|
18
|
+
"@routr/common": "^2.21.0",
|
|
19
19
|
"fp-ts": "^2.11.8",
|
|
20
20
|
"phone": "^3.1.68"
|
|
21
21
|
},
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/fonoster/routr/issues"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "ea4d16d5910dda781e91e067c590df7454373ec3"
|
|
40
40
|
}
|