@orion-js/echoes 3.1.25 → 3.2.2
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/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -12,3 +22,4 @@ const echo_1 = __importDefault(require("./echo"));
|
|
|
12
22
|
exports.echo = echo_1.default;
|
|
13
23
|
const request_1 = __importDefault(require("./request"));
|
|
14
24
|
exports.request = request_1.default;
|
|
25
|
+
__exportStar(require("./types"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function (method: string): import("
|
|
1
|
+
export default function (method: string): import("..").Echo;
|
|
@@ -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
|
|
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.
|
|
3
|
+
"version": "3.2.2",
|
|
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.
|
|
21
|
-
"@orion-js/http": "^3.
|
|
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": "
|
|
39
|
+
"gitHead": "95d6f776514b789bb1c267ee9fbe3b4eaa4c961d"
|
|
42
40
|
}
|