@orion-js/echoes 3.1.24 → 3.2.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.
@@ -11,7 +11,7 @@ exports.default = (options) => (0, http_1.route)({
11
11
  method: 'post',
12
12
  path: options.requests.handlerPath || '/echoes-services',
13
13
  bodyParser: 'json',
14
- async resolve(req, res) {
14
+ async resolve(req) {
15
15
  try {
16
16
  const { body, signature } = req.body;
17
17
  (0, checkSignature_1.default)(body, signature);
@@ -10,6 +10,10 @@ const types_1 = __importDefault(require("../echo/types"));
10
10
  const http_1 = require("@orion-js/http");
11
11
  function default_1(options) {
12
12
  config_1.default.echoes = options.echoes;
13
+ if (options.requests) {
14
+ config_1.default.requests = options.requests;
15
+ (0, http_1.registerRoute)((0, requestsHandler_1.default)(options));
16
+ }
13
17
  if (options.client) {
14
18
  const kafka = new kafkajs_1.Kafka(options.client);
15
19
  config_1.default.producer = kafka.producer(options.producer);
@@ -33,9 +37,5 @@ function default_1(options) {
33
37
  }
34
38
  });
35
39
  }
36
- if (options.requests) {
37
- config_1.default.requests = options.requests;
38
- (0, http_1.registerRoute)((0, requestsHandler_1.default)(options));
39
- }
40
40
  }
41
41
  exports.default = default_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-js/echoes",
3
- "version": "3.1.24",
3
+ "version": "3.2.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [
@@ -17,10 +17,8 @@
17
17
  "upgrade-interactive": "yarn upgrade-interactive"
18
18
  },
19
19
  "dependencies": {
20
- "@orion-js/helpers": "^3.1.12",
21
- "@orion-js/http": "^3.1.24",
22
- "@orion-js/resolvers": "^3.1.13",
23
- "@orion-js/schema": "^3.1.13",
20
+ "@orion-js/helpers": "^3.2.0",
21
+ "@orion-js/http": "^3.2.0",
24
22
  "axios": "^0.24.0",
25
23
  "jssha": "^3.2.0",
26
24
  "kafkajs": "^1.15.0",
@@ -38,5 +36,5 @@
38
36
  "publishConfig": {
39
37
  "access": "public"
40
38
  },
41
- "gitHead": "0cf7e83aaff738b621455afeb9d281b266ebb5bb"
39
+ "gitHead": "683cc5a018d45654ddf1299ea28e291fc7367dee"
42
40
  }