@toa.io/core 1.0.1-dev.0 → 1.0.2-alpha.56

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/core",
3
- "version": "1.0.1-dev.0",
3
+ "version": "1.0.2-alpha.56+a80d81d4",
4
4
  "description": "Toa Core",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@rsql/parser": "1.2.4",
23
23
  "@toa.io/console": "0.6.0",
24
- "@toa.io/generic": "0.10.0-dev.0",
25
- "@toa.io/yaml": "0.7.5-dev.0",
24
+ "@toa.io/generic": "0.10.1-alpha.56+a80d81d4",
25
+ "@toa.io/yaml": "0.7.6-alpha.56+a80d81d4",
26
26
  "clone-deep": "4.0.1"
27
27
  },
28
- "gitHead": "5e7998b39ea6111a2cf7d38fad8aeae71d742621"
28
+ "gitHead": "a80d81d4d9da9fec07606154c959dd6512de4c76"
29
29
  }
@@ -17,7 +17,6 @@ class Request extends Conditions {
17
17
  const required = []
18
18
 
19
19
  if (definition.input !== undefined) {
20
- definition.input.additionalProperties = false
21
20
  schema.properties.input = definition.input
22
21
  required.push('input')
23
22
  } else {
@@ -1,7 +1,8 @@
1
+ type: object
1
2
  properties:
2
3
  code:
3
4
  type: integer
4
5
  minimum: 0
5
6
  message:
6
7
  type: string
7
- required: [code, message]
8
+ required: [ code, message ]
@@ -1,3 +1,4 @@
1
+ type: object
1
2
  properties:
2
3
  id:
3
4
  $ref: https://schemas.toa.io/0.0.0/definitions#/definitions/id
package/src/exceptions.js CHANGED
@@ -1,5 +1,7 @@
1
1
  'use strict'
2
2
 
3
+ const { swap } = require('@toa.io/generic')
4
+
3
5
  const codes = {
4
6
  System: 0,
5
7
  NotImplemented: 10,
@@ -93,4 +95,5 @@ for (const [name, code] of Object.entries(codes)) {
93
95
  }
94
96
 
95
97
  exports.codes = codes
98
+ exports.names = swap(codes)
96
99
  // #endregion
@@ -1,16 +1,14 @@
1
- // noinspection ES6UnusedImports
2
-
3
- import { Connector } from './connector'
1
+ import * as _core from './connector'
4
2
 
5
3
  declare namespace toa.core {
6
4
 
7
- namespace reflection {
8
- type Source = () => Promise<any>
9
- }
5
+ namespace reflection {
6
+ type Source = () => Promise<any>
7
+ }
10
8
 
11
- interface Reflection<T> extends Connector {
12
- value: T
13
- }
9
+ interface Reflection<T> extends _core.Connector {
10
+ value: T
11
+ }
14
12
  }
15
13
 
16
14
  export type Source = toa.core.reflection.Source