@toa.io/norm 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/norm",
3
- "version": "1.0.1-dev.0",
3
+ "version": "1.0.2-alpha.56+a80d81d4",
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.8-dev.0"
22
+ "@toa.io/mock": "0.7.9-alpha.56+a80d81d4"
23
23
  },
24
24
  "dependencies": {
25
- "@toa.io/core": "1.0.1-dev.0",
26
- "@toa.io/generic": "0.10.0-dev.0",
27
- "@toa.io/schema": "0.7.5-dev.0",
28
- "@toa.io/schemas": "0.8.3-dev.0",
29
- "@toa.io/yaml": "0.7.5-dev.0"
25
+ "@toa.io/core": "1.0.2-alpha.56+a80d81d4",
26
+ "@toa.io/generic": "0.10.1-alpha.56+a80d81d4",
27
+ "@toa.io/schema": "0.7.6-alpha.56+a80d81d4",
28
+ "@toa.io/schemas": "0.8.4-alpha.56+a80d81d4",
29
+ "@toa.io/yaml": "0.7.6-alpha.56+a80d81d4"
30
30
  },
31
- "gitHead": "5e7998b39ea6111a2cf7d38fad8aeae71d742621"
31
+ "gitHead": "a80d81d4d9da9fec07606154c959dd6512de4c76"
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 }
@@ -11,7 +11,13 @@ properties:
11
11
  type: string
12
12
  packages:
13
13
  type: string
14
+ build:
15
+ type: object
16
+ properties:
17
+ command:
18
+ type: string
14
19
  runtime:
20
+ type: object
15
21
  properties:
16
22
  version:
17
23
  $ref: 'definitions#/definitions/version'
@@ -8,6 +8,9 @@ const context = {
8
8
  description: 'context fixture',
9
9
  version: '0.0.0',
10
10
  packages: 'namespaces/**/*',
11
+ build: {
12
+ command: 'echo test'
13
+ },
11
14
  registry: {
12
15
  base: 'localhost:5000',
13
16
  platforms: ['linux/amd64', 'linux/arm/v7', 'linux/arm64']
@@ -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,17 @@ declare namespace toa.norm {
14
12
  }
15
13
 
16
14
  interface Registry {
17
- base: string
15
+ base?: string
18
16
  platforms?: string[] | null
17
+ build?: {
18
+ command?: string
19
+ arguments?: string[]
20
+ }
19
21
  }
20
22
 
21
23
  interface Composition {
22
24
  name: string,
23
- components: string[] | Component[]
25
+ components: string[] | _component.Component[]
24
26
  }
25
27
 
26
28
  namespace dependencies {
@@ -31,7 +33,7 @@ declare namespace toa.norm {
31
33
  }
32
34
 
33
35
  type References = {
34
- [reference: string]: Component[]
36
+ [reference: string]: _component.Component[]
35
37
  }
36
38
 
37
39
  }
@@ -42,11 +44,11 @@ declare namespace toa.norm {
42
44
 
43
45
  interface Declaration {
44
46
  name: string
45
- description: string
46
- version: string
47
- runtime: Runtime | string
48
- registry: Registry | string
49
- packages: string
47
+ description?: string
48
+ version?: string
49
+ runtime?: Runtime | string
50
+ registry?: Registry | string
51
+ packages?: string
50
52
  compositions?: Composition[]
51
53
  annotations?: Record<string, object>
52
54
  }
@@ -55,11 +57,10 @@ declare namespace toa.norm {
55
57
  }
56
58
 
57
59
  interface Context extends context.Declaration {
58
- locator: Locator
59
- runtime: context.Runtime
60
+ runtime?: context.Runtime
60
61
  environment?: string
61
- registry: context.Registry
62
- components: Component[]
62
+ registry?: context.Registry
63
+ components?: _component.Component[]
63
64
  dependencies?: context.Dependencies
64
65
  }
65
66