@toa.io/boot 1.0.0-alpha.278 → 1.0.0-alpha.282

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 CHANGED
@@ -3,6 +3,17 @@
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.282](https://github.com/toa-io/toa/compare/v1.0.0-alpha.281...v1.0.0-alpha.282) (2026-09-03)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **boot:** declare host, and build extensions with it in the step definitions ([915d957](https://github.com/toa-io/toa/commit/915d9571823358f8fca6fe19ef3aabd1b62e5605))
11
+
12
+ ### Features
13
+
14
+ * **core:** a Host for extensions ([6315eac](https://github.com/toa-io/toa/commit/6315eac1e9fb05be472272de06385c54ad5934ce))
15
+
16
+
6
17
  # [1.0.0-alpha.278](https://github.com/toa-io/toa/compare/v1.0.0-alpha.277...v1.0.0-alpha.278) (2026-09-03)
7
18
 
8
19
  **Note:** Version bump only for package @toa.io/boot
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/boot",
3
- "version": "1.0.0-alpha.278",
3
+ "version": "1.0.0-alpha.282",
4
4
  "type": "module",
5
5
  "description": "Toa Boot",
6
6
  "author": "temich <tema.gurtovoy@gmail.com>",
@@ -21,14 +21,14 @@
21
21
  "test": "echo \"Error: run tests from root\" && exit 1"
22
22
  },
23
23
  "dependencies": {
24
- "@toa.io/atomicity": "1.0.0-alpha.278",
25
- "@toa.io/core": "1.0.0-alpha.278",
26
- "@toa.io/generic": "1.0.0-alpha.278",
27
- "@toa.io/norm": "1.0.0-alpha.278",
28
- "@toa.io/schemas": "1.0.0-alpha.278",
24
+ "@toa.io/atomicity": "1.0.0-alpha.282",
25
+ "@toa.io/core": "1.0.0-alpha.282",
26
+ "@toa.io/generic": "1.0.0-alpha.282",
27
+ "@toa.io/norm": "1.0.0-alpha.282",
28
+ "@toa.io/schemas": "1.0.0-alpha.282",
29
29
  "clone-deep": "4.0.1",
30
30
  "dotenv": "17.4.2",
31
31
  "openspan": "1.0.0-alpha.277"
32
32
  },
33
- "gitHead": "5872815748eed8021ea99d7beca1602f4fc5c958"
33
+ "gitHead": "4007c814725dd015d3bbebb9a28e28a247645c4f"
34
34
  }
@@ -48,5 +48,5 @@ export const instance = (reference, base = process.cwd()) => {
48
48
  const create = async (path) => {
49
49
  const { Factory } = await import(pathToFileURL(require.resolve(path)).href)
50
50
 
51
- return new Factory(boot)
51
+ return new Factory(boot.host())
52
52
  }
package/src/host.js ADDED
@@ -0,0 +1,15 @@
1
+ import * as boot from './index.js'
2
+
3
+ /**
4
+ * What the process hosting an extension provides to it. The counterpart of a component's
5
+ * context: an extension reaches the core through this and through nothing else.
6
+ *
7
+ * @returns {toa.core.extensions.Host}
8
+ */
9
+ export const host = () => ({
10
+ remote: boot.remote,
11
+ broadcast: boot.bindings.broadcast,
12
+ composition: boot.composition,
13
+ receive: boot.receive,
14
+ atom: boot.atomicity
15
+ })
package/src/index.js CHANGED
@@ -24,8 +24,9 @@ import { receivers, receive } from './receivers.js'
24
24
  import { remote } from './remote.js'
25
25
  import { storage } from './storage.js'
26
26
  import { guards } from './guards.js'
27
+ import { host } from './host.js'
27
28
  import { rc } from './rc.js'
28
29
 
29
- export { call, cascade, component, composition, context, emission, events, outbox, atomicity, atom, exposition, manifest, operation, receivers, receive, remote, storage, guards, rc }
30
+ export { call, cascade, component, composition, context, emission, events, outbox, atomicity, atom, exposition, host, manifest, operation, receivers, receive, remote, storage, guards, rc }
30
31
 
31
32
  export { bindings, bridge, contract, discovery, extensions }
package/types/index.d.ts CHANGED
@@ -19,3 +19,5 @@ export async function receive<T = any> (
19
19
  ): Promise<core.Connector>
20
20
 
21
21
  type Receiver = { receive: (message: core.Message<T>) => void | Promise<void> }
22
+
23
+ export function host (): core.extensions.Host