@toa.io/core 1.0.0-alpha.264 → 1.0.0-alpha.266
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/CHANGELOG.md +22 -0
- package/package.json +2 -2
- package/src/connector.js +7 -3
- package/types/bridges.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.266](https://github.com/toa-io/toa/compare/v1.0.0-alpha.265...v1.0.0-alpha.266) (2026-08-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** say a connector is disconnected once it has closed, not before ([d67b48e](https://github.com/toa-io/toa/commit/d67b48eaafaacd5c635d8b066413f84b8e6a3771))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [1.0.0-alpha.265](https://github.com/toa-io/toa/compare/v1.0.0-alpha.264...v1.0.0-alpha.265) (2026-08-29)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **bridges.node:** add the dispose run command phase ([00df715](https://github.com/toa-io/toa/commit/00df7158f638b976ab09d4007102a4ead3c696c3))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [1.0.0-alpha.264](https://github.com/toa-io/toa/compare/v1.0.0-alpha.263...v1.0.0-alpha.264) (2026-08-29)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @toa.io/core
|
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.266",
|
|
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.264",
|
|
28
28
|
"uuid": "11.1.1"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "0d2b83ff9ed6bf6d9fee7bf00f979b9ee38e9713"
|
|
31
31
|
}
|
package/src/connector.js
CHANGED
|
@@ -130,9 +130,6 @@ class Connector {
|
|
|
130
130
|
|
|
131
131
|
if (linked && interrupt !== true) return
|
|
132
132
|
|
|
133
|
-
this.connected = false
|
|
134
|
-
this.#connecting = undefined
|
|
135
|
-
|
|
136
133
|
this.#disconnecting = (async () => {
|
|
137
134
|
const start = +new Date()
|
|
138
135
|
|
|
@@ -145,6 +142,13 @@ class Connector {
|
|
|
145
142
|
|
|
146
143
|
if (!pending) await this.close()
|
|
147
144
|
|
|
145
|
+
// said once the closing is done rather than when it starts: a dependant that is
|
|
146
|
+
// still closing is still using what it depends on, and the check above reads this
|
|
147
|
+
// of every dependant. Saying it early lets the first to start tear down a shared
|
|
148
|
+
// dependency under the others.
|
|
149
|
+
this.connected = false
|
|
150
|
+
this.#connecting = undefined
|
|
151
|
+
|
|
148
152
|
clearInterval(interval)
|
|
149
153
|
|
|
150
154
|
await Promise.all(this.#dependencies.map(connector => connector.disconnect()))
|
package/types/bridges.ts
CHANGED
|
@@ -29,5 +29,5 @@ export interface Factory {
|
|
|
29
29
|
|
|
30
30
|
receiver?: (path: string, label: string) => Receiver
|
|
31
31
|
|
|
32
|
-
rc?: (path: string, context: Context) => Promise<{ preflight?: Connector, settle?: Connector } | undefined>
|
|
32
|
+
rc?: (path: string, context: Context) => Promise<{ preflight?: Connector, settle?: Connector, dispose?: Connector } | undefined>
|
|
33
33
|
}
|