@toa.io/norm 1.0.2-dev.9 → 1.1.0-canary.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/norm",
3
- "version": "1.0.2-dev.9",
3
+ "version": "1.1.0-canary.1",
4
4
  "description": "Toa declarations normalization and validation",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -19,14 +19,14 @@
19
19
  "test": "echo \"Error: run tests from root\" && exit 1"
20
20
  },
21
21
  "devDependencies": {
22
- "@toa.io/mock": "0.7.9-dev.9"
22
+ "@toa.io/mock": "0.7.9-canary.1"
23
23
  },
24
24
  "dependencies": {
25
- "@toa.io/core": "1.1.0-dev.9",
26
- "@toa.io/generic": "0.11.0-dev.9",
27
- "@toa.io/schema": "0.7.6-dev.9",
28
- "@toa.io/schemas": "0.8.4-dev.9",
29
- "@toa.io/yaml": "0.7.6-dev.9"
25
+ "@toa.io/core": "1.1.0-canary.1",
26
+ "@toa.io/generic": "0.11.0-canary.1",
27
+ "@toa.io/schema": "0.7.6-canary.1",
28
+ "@toa.io/schemas": "0.8.4-canary.1",
29
+ "@toa.io/yaml": "0.7.6-canary.1"
30
30
  },
31
- "gitHead": "db624e061c5017062f46561e6d5e4106b7420e28"
31
+ "gitHead": "6da1b8e37c13d5a48d1b403909b3d92141124442"
32
32
  }
@@ -3,15 +3,7 @@
3
3
  // these defaults are required before validation
4
4
  const defaults = (manifest) => {
5
5
  if (manifest.prototype === undefined) manifest.prototype = '@toa.io/prototype'
6
-
7
- if (manifest.bindings === undefined) {
8
- const local = process.env.TOA_DEV === '1'
9
-
10
- manifest.bindings = local
11
- ? ['@toa.io/bindings.amqp']
12
- : ['@toa.io/bindings.http', '@toa.io/bindings.amqp']
13
- }
14
-
6
+ if (manifest.bindings === undefined) manifest.bindings = ['@toa.io/bindings.amqp']
15
7
  if (manifest.bridge === undefined) manifest.bridge = '@toa.io/bridges.node'
16
8
 
17
9
  if (manifest.entity === null || manifest.entity === undefined) manifest.entity = { storage: null }
@@ -12,6 +12,7 @@ properties:
12
12
  packages:
13
13
  type: string
14
14
  runtime:
15
+ type: object
15
16
  properties:
16
17
  version:
17
18
  $ref: 'definitions#/definitions/version'
@@ -21,7 +22,7 @@ properties:
21
22
  proxy:
22
23
  type: string
23
24
  format: uri
24
- required: [version]
25
+ required: [ version ]
25
26
  environment:
26
27
  type: string
27
28
  registry:
@@ -39,7 +40,7 @@ properties:
39
40
  - linux/amd64
40
41
  - linux/arm/v7
41
42
  - linux/arm64
42
- required: [base, platforms]
43
+ required: [ base, platforms ]
43
44
  compositions:
44
45
  type: array
45
46
  minItems: 1
@@ -53,8 +54,8 @@ properties:
53
54
  minItems: 1
54
55
  items:
55
56
  $ref: 'definitions#/definitions/locator'
56
- required: [name, components]
57
+ required: [ name, components ]
57
58
  annotations:
58
59
  type: object
59
- required: [runtime, name, packages, registry]
60
+ required: [ runtime, name, packages, registry ]
60
61
  additionalProperties: false
@@ -1,6 +1,4 @@
1
- // noinspection ES6UnusedImports
2
-
3
- import { Component } from './component'
1
+ import * as _component from './component'
4
2
  import { Locator } from '@toa.io/core/types'
5
3
 
6
4
  declare namespace toa.norm {
@@ -14,13 +12,13 @@ declare namespace toa.norm {
14
12
  }
15
13
 
16
14
  interface Registry {
17
- base: string
15
+ base?: string
18
16
  platforms?: string[] | null
19
17
  }
20
18
 
21
19
  interface Composition {
22
20
  name: string,
23
- components: string[] | Component[]
21
+ components: string[] | _component.Component[]
24
22
  }
25
23
 
26
24
  namespace dependencies {
@@ -31,7 +29,7 @@ declare namespace toa.norm {
31
29
  }
32
30
 
33
31
  type References = {
34
- [reference: string]: Component[]
32
+ [reference: string]: _component.Component[]
35
33
  }
36
34
 
37
35
  }
@@ -42,11 +40,11 @@ declare namespace toa.norm {
42
40
 
43
41
  interface Declaration {
44
42
  name: string
45
- description: string
46
- version: string
47
- runtime: Runtime | string
48
- registry: Registry | string
49
- packages: string
43
+ description?: string
44
+ version?: string
45
+ runtime?: Runtime | string
46
+ registry?: Registry | string
47
+ packages?: string
50
48
  compositions?: Composition[]
51
49
  annotations?: Record<string, object>
52
50
  }
@@ -55,11 +53,10 @@ declare namespace toa.norm {
55
53
  }
56
54
 
57
55
  interface Context extends context.Declaration {
58
- locator: Locator
59
- runtime: context.Runtime
56
+ runtime?: context.Runtime
60
57
  environment?: string
61
- registry: context.Registry
62
- components: Component[]
58
+ registry?: context.Registry
59
+ components?: _component.Component[]
63
60
  dependencies?: context.Dependencies
64
61
  }
65
62