@toa.io/core 1.0.0-alpha.225 → 1.0.0-alpha.228

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/core",
3
- "version": "1.0.0-alpha.225",
3
+ "version": "1.0.0-alpha.228",
4
4
  "description": "Toa Core",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -27,5 +27,5 @@
27
27
  "openspan": "1.0.0-alpha.173",
28
28
  "uuid": "11.1.1"
29
29
  },
30
- "gitHead": "633616125b4d6a18c41a164c147e9b196fd409be"
30
+ "gitHead": "2c5ad2211fc9bbf411a812cb8b240d8f1d9484e0"
31
31
  }
package/src/cascade.js CHANGED
@@ -6,13 +6,16 @@ class Cascade extends Connector {
6
6
  // #bridges
7
7
  #last
8
8
 
9
- constructor (bridges) {
9
+ constructor (bridges, rc) {
10
10
  super()
11
11
 
12
12
  // this.#bridges = bridges
13
13
  this.#last = bridges[bridges.length - 1]
14
14
 
15
- this.depends(bridges)
15
+ if (rc === undefined)
16
+ this.depends(bridges)
17
+ else
18
+ this.depends(bridges).depends(rc)
16
19
  }
17
20
 
18
21
  async run (...args) {
package/types/bridges.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Request, Reply } from './request'
2
2
  import type { Context } from './context'
3
+ import type { Connector } from './connector'
3
4
 
4
5
  export interface Algorithm {
5
6
  mount: (context?: Context) => Promise<void>
@@ -27,4 +28,6 @@ export interface Factory {
27
28
  event?: (path: string, label: string) => Event
28
29
 
29
30
  receiver?: (path: string, label: string) => Receiver
31
+
32
+ rc?: (path: string, context: Context) => Promise<Connector>
30
33
  }