@toa.io/core 1.0.0-alpha.30 → 1.0.0-alpha.32
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/package.json +5 -5
- package/src/receiver.js +5 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/core",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.32",
|
|
4
4
|
"description": "Toa Core",
|
|
5
5
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/toa-io/toa#readme",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@rsql/parser": "1.2.4",
|
|
24
|
-
"@toa.io/console": "1.0.0-alpha.
|
|
25
|
-
"@toa.io/generic": "1.0.0-alpha.
|
|
26
|
-
"@toa.io/yaml": "1.0.0-alpha.
|
|
24
|
+
"@toa.io/console": "1.0.0-alpha.32",
|
|
25
|
+
"@toa.io/generic": "1.0.0-alpha.32",
|
|
26
|
+
"@toa.io/yaml": "1.0.0-alpha.32",
|
|
27
27
|
"error-value": "0.3.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"clone-deep": "4.0.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "93ceb53797363abb77eb9c550db77e906691d42a"
|
|
33
33
|
}
|
package/src/receiver.js
CHANGED
|
@@ -16,18 +16,13 @@ class Receiver extends Connector {
|
|
|
16
16
|
/** @type {string} */
|
|
17
17
|
#endpoint
|
|
18
18
|
|
|
19
|
-
/** @type {
|
|
19
|
+
/** @type {unknown[]} */
|
|
20
|
+
#arguments
|
|
21
|
+
|
|
20
22
|
#local
|
|
21
23
|
|
|
22
|
-
/** @type {toa.core.bridges.Receiver} */
|
|
23
24
|
#bridge
|
|
24
25
|
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param {toa.norm.component.Receiver} definition
|
|
28
|
-
* @param {toa.core.Component} local
|
|
29
|
-
* @param {toa.core.bridges.Receiver} bridge
|
|
30
|
-
*/
|
|
31
26
|
constructor (definition, local, bridge) {
|
|
32
27
|
super()
|
|
33
28
|
|
|
@@ -36,6 +31,7 @@ class Receiver extends Connector {
|
|
|
36
31
|
this.#conditioned = conditioned
|
|
37
32
|
this.#adaptive = adaptive
|
|
38
33
|
this.#endpoint = operation
|
|
34
|
+
this.#arguments = definition.arguments
|
|
39
35
|
|
|
40
36
|
this.#local = local
|
|
41
37
|
this.#bridge = bridge
|
|
@@ -58,7 +54,7 @@ class Receiver extends Connector {
|
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
async #request (payload) {
|
|
61
|
-
return this.#adaptive ? await this.#bridge.request(payload) : { input: payload }
|
|
57
|
+
return this.#adaptive ? await this.#bridge.request(payload, ...(this.#arguments ?? [])) : { input: payload }
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
|