@toa.io/core 0.6.0-dev.3 → 0.6.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/package.json +5 -5
- package/src/cascade.js +1 -1
- package/test/cascade.fixtures.js +1 -1
- package/test/cascade.test.js +3 -3
- package/types/bridges.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/core",
|
|
3
|
-
"version": "0.6.0
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Toa Core",
|
|
5
5
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/toa-io/toa#readme",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@rsql/parser": "1.2.4",
|
|
23
|
-
"@toa.io/console": "0.6.0
|
|
24
|
-
"@toa.io/generic": "0.6.0
|
|
25
|
-
"@toa.io/yaml": "0.6.0
|
|
23
|
+
"@toa.io/console": "0.6.0",
|
|
24
|
+
"@toa.io/generic": "0.6.0",
|
|
25
|
+
"@toa.io/yaml": "0.6.0",
|
|
26
26
|
"clone-deep": "4.0.1"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "a807d9906db194f5851613a1ead5450d277f4939"
|
|
29
29
|
}
|
package/src/cascade.js
CHANGED
package/test/cascade.fixtures.js
CHANGED
package/test/cascade.test.js
CHANGED
|
@@ -21,11 +21,11 @@ it('should depend on bridges', () => {
|
|
|
21
21
|
expect(Connector.mock.instances[0].depends).toHaveBeenCalledWith(fixtures.bridges)
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
it('should call bridges.
|
|
24
|
+
it('should call bridges.execute', async () => {
|
|
25
25
|
const args = [1, 2]
|
|
26
26
|
await cascade.run(...args)
|
|
27
27
|
|
|
28
|
-
for (const bridge of fixtures.bridges) expect(bridge.
|
|
28
|
+
for (const bridge of fixtures.bridges) expect(bridge.execute).toHaveBeenCalledWith(...args)
|
|
29
29
|
})
|
|
30
30
|
|
|
31
31
|
it('should merge output', async () => {
|
|
@@ -38,5 +38,5 @@ it('should interrupt on error', async () => {
|
|
|
38
38
|
const reply = await cascade.run({ error: 'b' })
|
|
39
39
|
|
|
40
40
|
expect(reply).toStrictEqual({ error: 'b' })
|
|
41
|
-
expect(fixtures.bridges[2].
|
|
41
|
+
expect(fixtures.bridges[2].execute).not.toHaveBeenCalled()
|
|
42
42
|
})
|
package/types/bridges.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type * as connector from './connector'
|
|
|
6
6
|
declare namespace toa.core.bridges {
|
|
7
7
|
|
|
8
8
|
interface Algorithm extends connector.Connector {
|
|
9
|
-
|
|
9
|
+
execute(input?: any, scope?: object | object[]): Promise<reply.Reply>
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
interface Event {
|