@toa.io/core 0.20.0-alpha.0 → 0.20.0-alpha.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/package.json +5 -5
- package/src/call.js +2 -0
- package/src/context.js +1 -1
- package/src/operation.js +1 -1
- package/src/transition.js +0 -1
- package/types/component.d.ts +0 -1
- package/types/message.d.ts +2 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/core",
|
|
3
|
-
"version": "0.20.0-alpha.
|
|
3
|
+
"version": "0.20.0-alpha.2",
|
|
4
4
|
"description": "Toa Core",
|
|
5
5
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/toa-io/toa#readme",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@rsql/parser": "1.2.4",
|
|
27
|
-
"@toa.io/console": "0.20.0-alpha.
|
|
28
|
-
"@toa.io/generic": "0.20.0-alpha.
|
|
29
|
-
"@toa.io/yaml": "0.20.0-alpha.
|
|
27
|
+
"@toa.io/console": "0.20.0-alpha.2",
|
|
28
|
+
"@toa.io/generic": "0.20.0-alpha.2",
|
|
29
|
+
"@toa.io/yaml": "0.20.0-alpha.2",
|
|
30
30
|
"clone-deep": "4.0.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "d6e8c5bdae26e2beb66f4d7f37f71a3494fe9fcb"
|
|
33
33
|
}
|
package/src/call.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const { Connector } = require('./connector')
|
|
4
4
|
const { Nope } = require('nopeable')
|
|
5
|
+
const { Readable } = require('stream')
|
|
5
6
|
|
|
6
7
|
class Call extends Connector {
|
|
7
8
|
#transmitter
|
|
@@ -25,6 +26,7 @@ class Call extends Connector {
|
|
|
25
26
|
const reply = await this.#transmitter.request(request)
|
|
26
27
|
|
|
27
28
|
if (reply === null) return null
|
|
29
|
+
else if (reply instanceof Readable) return reply
|
|
28
30
|
else {
|
|
29
31
|
if (reply.exception !== undefined)
|
|
30
32
|
throw reply.exception
|
package/src/context.js
CHANGED
|
@@ -38,7 +38,7 @@ class Context extends Connector {
|
|
|
38
38
|
async #remote (namespace, name) {
|
|
39
39
|
const key = namespace + '.' + name
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
this.#remotes[key] ??= this.#connect(namespace, name)
|
|
42
42
|
|
|
43
43
|
return this.#remotes[key]
|
|
44
44
|
}
|
package/src/operation.js
CHANGED
package/src/transition.js
CHANGED
package/types/component.d.ts
CHANGED