@toa.io/userland 1.0.0-alpha.307 → 1.0.0-alpha.309
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 +16 -0
- package/package.json +6 -6
- package/stage/src/map.js +7 -7
- package/stage/src/shutdown.js +4 -1
- package/stage/test/boot.mock.js +1 -1
- package/stage/types/index.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.309](https://github.com/toa-io/toa/compare/v1.0.0-alpha.308...v1.0.0-alpha.309) (2026-09-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @toa.io/userland
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.0.0-alpha.308](https://github.com/toa-io/toa/compare/v1.0.0-alpha.307...v1.0.0-alpha.308) (2026-09-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @toa.io/userland
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [1.0.0-alpha.307](https://github.com/toa-io/toa/compare/v1.0.0-alpha.306...v1.0.0-alpha.307) (2026-09-15)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @toa.io/userland
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/userland",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.309",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Toa development kit",
|
|
6
6
|
"homepage": "https://toa.io",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"./package.json": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@toa.io/boot": "1.0.0-alpha.
|
|
36
|
-
"@toa.io/core": "1.0.0-alpha.
|
|
35
|
+
"@toa.io/boot": "1.0.0-alpha.309",
|
|
36
|
+
"@toa.io/core": "1.0.0-alpha.308",
|
|
37
37
|
"@toa.io/generic": "1.0.0-alpha.304",
|
|
38
|
-
"@toa.io/norm": "1.0.0-alpha.
|
|
38
|
+
"@toa.io/norm": "1.0.0-alpha.309",
|
|
39
39
|
"@toa.io/schemas": "1.0.0-alpha.304",
|
|
40
|
-
"@toa.io/storages.null": "1.0.0-alpha.
|
|
40
|
+
"@toa.io/storages.null": "1.0.0-alpha.308"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "6e0cd9ef0c9b9f4f9db666f6f19fc44e61bf2606"
|
|
43
43
|
}
|
package/stage/src/map.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as boot from '@toa.io/boot'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* What this process is given about the components it calls: the contract of the version each of
|
|
5
|
+
* them runs.
|
|
5
6
|
*
|
|
6
|
-
* A composition staged here is given none unless a test states one, and a
|
|
7
|
-
*
|
|
8
|
-
* deployment gets.
|
|
7
|
+
* A composition staged here is given none unless a test states one, and a component the map
|
|
8
|
+
* states nothing of is asked what it provides — which is what a run outside a deployment gets.
|
|
9
9
|
*
|
|
10
|
-
* @param {Record<string,
|
|
10
|
+
* @param {Record<string, import('@toa.io/core').Contract> | undefined} contracts
|
|
11
11
|
* @returns {void}
|
|
12
12
|
*/
|
|
13
|
-
export const map = (
|
|
14
|
-
boot.map.use(
|
|
13
|
+
export const map = (contracts) => {
|
|
14
|
+
boot.map.use(contracts)
|
|
15
15
|
}
|
package/stage/src/shutdown.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as boot from '@toa.io/boot'
|
|
2
|
+
|
|
1
3
|
import { state } from './state.js'
|
|
2
4
|
import { map } from './map.js'
|
|
3
5
|
|
|
@@ -18,8 +20,9 @@ export const shutdown = async () => {
|
|
|
18
20
|
|
|
19
21
|
await Promise.all(disconnections)
|
|
20
22
|
|
|
21
|
-
// whatever a test stated is not carried into the next one
|
|
23
|
+
// whatever a test stated is not carried into the next one, and what it composed is gone
|
|
22
24
|
map(undefined)
|
|
25
|
+
boot.map.forget()
|
|
23
26
|
|
|
24
27
|
state.reset()
|
|
25
28
|
}
|
package/stage/test/boot.mock.js
CHANGED
|
@@ -8,7 +8,7 @@ const connector = () => ({
|
|
|
8
8
|
link: mock.fn()
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
export const map = { use: mock.fn() }
|
|
11
|
+
export const map = { use: mock.fn(), forget: mock.fn() }
|
|
12
12
|
export const manifest = mock.fn(async () => generate())
|
|
13
13
|
export const component = mock.fn(async () => connector())
|
|
14
14
|
export const composition = mock.fn(async () => connector())
|
package/stage/types/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import type * as _boot from '@toa.io/boot'
|
|
|
5
5
|
|
|
6
6
|
export function manifest(path: string): Promise<_norm.Component>
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
export function map(
|
|
8
|
+
/** what this process is given about the components it calls */
|
|
9
|
+
export function map(contracts: Record<string, _norm.Contract> | undefined): void
|
|
10
10
|
|
|
11
11
|
export function component(path: string): Promise<_core.Component>
|
|
12
12
|
|