@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 +9 -8
- package/src/env.js +15 -0
- package/src/index.js +2 -0
- package/src/receivers.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/boot",
|
|
3
|
-
"version": "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.
|
|
23
|
-
"@toa.io/filesystem": "0.
|
|
24
|
-
"@toa.io/generic": "0.9.0",
|
|
25
|
-
"@toa.io/norm": "0.
|
|
26
|
-
"@toa.io/schema": "0.7.
|
|
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": "
|
|
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
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
|
|