@toa.io/norm 0.7.0 → 0.7.1-dev.0

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": "0.7.0",
3
+ "version": "0.7.1-dev.0",
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,7 +19,7 @@
19
19
  "test": "echo \"Error: run tests from root\" && exit 1"
20
20
  },
21
21
  "devDependencies": {
22
- "@toa.io/mock": "0.7.0"
22
+ "@toa.io/mock": "0.7.1-dev.0"
23
23
  },
24
24
  "dependencies": {
25
25
  "@toa.io/core": "0.7.0",
@@ -28,5 +28,5 @@
28
28
  "@toa.io/schemas": "0.7.0",
29
29
  "@toa.io/yaml": "0.7.0"
30
30
  },
31
- "gitHead": "d187b730c30df301fa28e1ea1ccf0f3186267bcb"
31
+ "gitHead": "7c52ddaad46512d8a8d913982d7330f83adcc98b"
32
32
  }
@@ -34,11 +34,11 @@ const collapse = (manifest, prototype) => {
34
34
  }
35
35
  }
36
36
 
37
- delete prototype.entity?.storage
37
+ delete prototype.entity?.storage // ???
38
38
 
39
- const { entity, remotes, events } = prototype
39
+ const { entity, events } = prototype
40
40
 
41
- merge(manifest, { entity, remotes, events })
41
+ merge(manifest, { entity, events })
42
42
  }
43
43
 
44
44
  exports.collapse = collapse
@@ -47,10 +47,6 @@ const schema = (object, resolve) => {
47
47
  return object
48
48
  }
49
49
 
50
- const types = {
51
- id: { $ref: 'https://schemas.toa.io/0.0.0/definitions#/definitions/id' }
52
- }
53
-
54
50
  const forward = (operation, operations) => {
55
51
  const target = operations[operation.forward]
56
52
 
@@ -60,6 +60,7 @@ it('should ignore bindings', () => {
60
60
  expect(manifest).toStrictEqual(source)
61
61
 
62
62
  delete manifest.bindings
63
+
63
64
  collapse(manifest, prototype)
64
65
  expect(manifest).toStrictEqual({})
65
66
  })
@@ -71,11 +72,3 @@ it('should merge operations', () => {
71
72
  collapse(manifest, prototype, '/somewhere')
72
73
  expect(manifest).toStrictEqual(samples.operations.result)
73
74
  })
74
-
75
- it('should merge remotes', () => {
76
- const manifest = clone(samples.remotes.manifest)
77
- const prototype = clone(samples.remotes.prototype)
78
-
79
- collapse(manifest, prototype, '/somewhere')
80
- expect(manifest).toStrictEqual(samples.remotes.result)
81
- })
@@ -45,7 +45,7 @@ export namespace toa.norm {
45
45
  }
46
46
 
47
47
  type Entity = {
48
- schema: Object
48
+ schema: object
49
49
  storage?: string
50
50
  initialized?: boolean
51
51
  }
@@ -59,7 +59,8 @@ export namespace toa.norm {
59
59
  operations?: Operations
60
60
  events?: Events
61
61
  receivers: Record<string, Receiver>
62
- extensions?: Record<string, Object>
62
+ extensions?: Record<string, object>
63
+ properties: Record<string, object>
63
64
  }
64
65
 
65
66
  type Constructor = (path: string) => Promise<Component>