@toa.io/boot 1.0.0-alpha.86 → 1.0.0-alpha.87
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 +2 -2
- package/src/bindings/produce.js +12 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/boot",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.87",
|
|
4
4
|
"description": "Toa Boot",
|
|
5
5
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/toa-io/toa#readme",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"dotenv": "16.1.1",
|
|
30
30
|
"openspan": "1.0.0-alpha.86"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "fb372975085006d4a845a39eea184a7ac7a667cb"
|
|
33
33
|
}
|
package/src/bindings/produce.js
CHANGED
|
@@ -9,18 +9,19 @@ const produce = (component, operations) => group(operations, (factory, endpoints
|
|
|
9
9
|
const group = (operations, callback) => {
|
|
10
10
|
const map = {}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
if (operations !== undefined)
|
|
13
|
+
for (const [endpoint, operation] of Object.entries(operations)) {
|
|
14
|
+
// noinspection JSUnresolvedVariable
|
|
15
|
+
const bindings = global.TOA_INTEGRATION_BINDINGS_LOOP_DISABLED
|
|
16
|
+
? operation.bindings
|
|
17
|
+
: [LOOP].concat(operation.bindings)
|
|
18
|
+
|
|
19
|
+
for (const binding of bindings) {
|
|
20
|
+
if (!map[binding]) map[binding] = []
|
|
21
|
+
|
|
22
|
+
map[binding].push(endpoint)
|
|
23
|
+
}
|
|
22
24
|
}
|
|
23
|
-
}
|
|
24
25
|
|
|
25
26
|
return Object.entries(map).map(([binding, endpoints]) => callback(factory(binding), endpoints))
|
|
26
27
|
}
|