@toa.io/norm 1.0.0-alpha.81 → 1.0.0-alpha.82

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.0-alpha.81",
3
+ "version": "1.0.0-alpha.82",
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",
@@ -25,5 +25,5 @@
25
25
  "@toa.io/schemas": "1.0.0-alpha.63",
26
26
  "@toa.io/yaml": "1.0.0-alpha.63"
27
27
  },
28
- "gitHead": "99c366c07ee6a34206ecb15d46c0f53e46eb9b06"
28
+ "gitHead": "4ada56b4f1cf97445e3cbc88e552e3819f8da3ed"
29
29
  }
@@ -34,14 +34,19 @@ const collapse = (manifest, prototype) => {
34
34
  }
35
35
  }
36
36
 
37
- const { entity, events, extensions } = prototype
38
-
39
37
  if (manifest.entity?.schema?.properties.id !== undefined && entity?.schema?.properties.id !== undefined) {
40
38
  manifest.entity.custom = true
41
39
 
42
40
  delete prototype.entity.schema.properties.id
43
41
  }
44
42
 
43
+ if (prototype.events !== undefined && manifest.events !== undefined)
44
+ for (const event of Object.keys(prototype.events))
45
+ if (event in manifest.events)
46
+ delete prototype.events[event]
47
+
48
+ const { entity, events, extensions } = prototype
49
+
45
50
  merge(manifest, { entity, events, extensions })
46
51
  }
47
52