@toa.io/boot 0.20.0-dev.1 → 0.20.0-dev.3

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.
Files changed (2) hide show
  1. package/package.json +7 -7
  2. package/src/operation.js +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/boot",
3
- "version": "0.20.0-dev.1",
3
+ "version": "0.20.0-dev.3",
4
4
  "description": "Toa Boot",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -19,13 +19,13 @@
19
19
  "test": "echo \"Error: run tests from root\" && exit 1"
20
20
  },
21
21
  "dependencies": {
22
- "@toa.io/core": "0.20.0-dev.1",
23
- "@toa.io/filesystem": "0.20.0-dev.1",
24
- "@toa.io/generic": "0.11.0-dev.3",
25
- "@toa.io/norm": "0.20.0-dev.1",
26
- "@toa.io/schema": "0.20.0-dev.1",
22
+ "@toa.io/core": "0.20.0-dev.3",
23
+ "@toa.io/filesystem": "0.20.0-dev.3",
24
+ "@toa.io/generic": "0.20.0-dev.3",
25
+ "@toa.io/norm": "0.20.0-dev.3",
26
+ "@toa.io/schema": "0.20.0-dev.3",
27
27
  "clone-deep": "4.0.1",
28
28
  "dotenv": "16.0.3"
29
29
  },
30
- "gitHead": "23a9b4399af908101aac4ae03f22f7b948dfe55f"
30
+ "gitHead": "3eabf45761f4cf211e1e4c331933ec60b4a828a7"
31
31
  }
package/src/operation.js CHANGED
@@ -6,11 +6,14 @@ const boot = require('./index')
6
6
 
7
7
  const operation = (manifest, endpoint, definition, context, scope) => {
8
8
  const cascade = boot.cascade(manifest, endpoint, definition, context)
9
- const contract = boot.contract.reply(definition.output, definition.error)
9
+ const reply = boot.contract.reply(definition.output, definition.error)
10
+ const input = definition.input
11
+ const request = boot.contract.request({ input })
12
+ const contracts = { reply, request }
10
13
  const query = new Query(manifest.entity.schema.properties)
11
14
  const Type = TYPES[definition.type]
12
15
 
13
- return new Type(cascade, scope, contract, query, definition)
16
+ return new Type(cascade, scope, contracts, query, definition)
14
17
  }
15
18
 
16
19
  const TYPES = {