@toa.io/boot 0.8.2-dev.0 → 1.0.0-dev.1

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/boot",
3
- "version": "0.8.2-dev.0",
3
+ "version": "1.0.0-dev.1",
4
4
  "description": "Toa Boot",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -19,12 +19,13 @@
19
19
  "test": "echo \"Error: run tests from root\" && exit 1"
20
20
  },
21
21
  "dependencies": {
22
- "@toa.io/core": "0.8.1",
23
- "@toa.io/filesystem": "0.7.2",
24
- "@toa.io/generic": "0.9.0",
25
- "@toa.io/norm": "0.10.1-dev.0",
26
- "@toa.io/schema": "0.7.3",
27
- "clone-deep": "4.0.1"
22
+ "@toa.io/core": "1.0.0-dev.1",
23
+ "@toa.io/filesystem": "1.0.0-dev.1",
24
+ "@toa.io/generic": "0.9.1-dev.0",
25
+ "@toa.io/norm": "1.0.0-dev.1",
26
+ "@toa.io/schema": "0.7.4-dev.1",
27
+ "clone-deep": "4.0.1",
28
+ "dotenv": "16.0.3"
28
29
  },
29
- "gitHead": "7f1fdbfe3aa33eb4a06cb1a33d15be18854bcd88"
30
+ "gitHead": "1121d84f7051a0d54ecf899efeaf3b328d7894c0"
30
31
  }
package/src/env.js ADDED
@@ -0,0 +1,15 @@
1
+ 'use strict'
2
+
3
+ const { file } = require('@toa.io/filesystem')
4
+
5
+ async function setup () {
6
+ const path = await file.dot('env')
7
+
8
+ if (path !== undefined) require('dotenv').config({ path })
9
+ }
10
+
11
+ if (!('TOA_ENV' in process.env)) {
12
+ (async () => {
13
+ await setup()
14
+ })()
15
+ }
package/src/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  'use strict'
2
2
 
3
+ require('./env')
4
+
3
5
  const { call } = require('./call')
4
6
  const { cascade } = require('./cascade')
5
7
  const { component } = require('./component')
package/src/receivers.js CHANGED
@@ -12,7 +12,7 @@ const receivers = async (manifest, runtime) => {
12
12
 
13
13
  for (const [label, definition] of Object.entries(manifest.receivers)) {
14
14
  const local = await boot.remote(manifest.locator, manifest)
15
- const bridge = boot.bridge.receiver(definition.bridge, manifest.path, label)
15
+ const bridge = definition.bridge !== undefined ? boot.bridge.receiver(definition.bridge, manifest.path, label) : undefined
16
16
  const receiver = new Receiver(definition, local, bridge)
17
17
  const decorator = extensions.receiver(receiver, manifest.locator)
18
18