@toa.io/norm 1.0.0-alpha.314 → 1.0.0-alpha.316
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/CHANGELOG.md +17 -0
- package/package.json +5 -5
- package/test/system.test.js +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.316](https://github.com/toa-io/toa/compare/v1.0.0-alpha.315...v1.0.0-alpha.316) (2026-09-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @toa.io/norm
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.0.0-alpha.315](https://github.com/toa-io/toa/compare/v1.0.0-alpha.314...v1.0.0-alpha.315) (2026-09-23)
|
|
15
|
+
|
|
16
|
+
* feat(map)!: leave out of a contract what the runtime gives every component ([b81837a](https://github.com/toa-io/toa/commit/b81837a3bc4771d7ee1c10fe613c9a1d7501bf1a))
|
|
17
|
+
|
|
18
|
+
### BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* the deployed component map is `/etc/toa/.map.json.gz`.
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
# [1.0.0-alpha.314](https://github.com/toa-io/toa/compare/v1.0.0-alpha.313...v1.0.0-alpha.314) (2026-09-19)
|
|
7
24
|
|
|
8
25
|
* feat(core)!: let an operation state how long its calls are remembered ([af177c2](https://github.com/toa-io/toa/commit/af177c2ab3d00d475840b5ef9e612f04e82b72bd))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/norm",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.316",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Toa declarations normalization and validation",
|
|
6
6
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@toa.io/core": "1.0.0-alpha.
|
|
25
|
-
"@toa.io/definitions": "1.0.0-alpha.
|
|
24
|
+
"@toa.io/core": "1.0.0-alpha.315",
|
|
25
|
+
"@toa.io/definitions": "1.0.0-alpha.316",
|
|
26
26
|
"@toa.io/generic": "1.0.0-alpha.311",
|
|
27
|
-
"@toa.io/prototype": "1.0.0-alpha.
|
|
27
|
+
"@toa.io/prototype": "1.0.0-alpha.315",
|
|
28
28
|
"@toa.io/schemas": "1.0.0-alpha.311",
|
|
29
29
|
"fast-glob": "3.3.3"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "1a873a2f74dc27cc82cc523aa4557a38f23593c6"
|
|
32
32
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'
|
|
2
|
+
import { dirname, join } from 'node:path'
|
|
3
|
+
import { readFileSync } from 'node:fs'
|
|
4
|
+
import { it } from 'node:test'
|
|
5
|
+
import assert from 'node:assert/strict'
|
|
6
|
+
|
|
7
|
+
import { yaml as jsyaml } from '@toa.io/generic'
|
|
8
|
+
import { contract } from '@toa.io/core'
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* A contract leaves out what the root prototype gives every entity, and `@toa.io/core` is what
|
|
12
|
+
* puts it back — where the prototype is not installed, so it holds a copy of that declaration.
|
|
13
|
+
* This is what keeps the copy the same as what a component is actually collapsed with.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const path = dirname(createRequire(import.meta.url).resolve('@toa.io/prototype'))
|
|
17
|
+
const prototype = jsyaml.load(readFileSync(join(path, 'manifest.toa.yaml'), 'utf8'))
|
|
18
|
+
|
|
19
|
+
it('should state the system properties the prototype gives', () => {
|
|
20
|
+
const { id, ...system } = prototype.entity.properties
|
|
21
|
+
|
|
22
|
+
assert.deepStrictEqual(system, contract.SYSTEM)
|
|
23
|
+
assert.deepStrictEqual(id, contract.ID)
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it('should require every one of them, and nothing else', () => {
|
|
27
|
+
assert.deepStrictEqual(prototype.entity.required, [
|
|
28
|
+
'id',
|
|
29
|
+
...Object.keys(contract.SYSTEM)
|
|
30
|
+
])
|
|
31
|
+
})
|