@toa.io/norm 1.0.0-alpha.110 → 1.0.0-alpha.116
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.
|
|
3
|
+
"version": "1.0.0-alpha.116",
|
|
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",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@toa.io/core": "1.0.0-alpha.
|
|
23
|
+
"@toa.io/core": "1.0.0-alpha.116",
|
|
24
24
|
"@toa.io/generic": "1.0.0-alpha.93",
|
|
25
25
|
"@toa.io/schemas": "1.0.0-alpha.93",
|
|
26
26
|
"@toa.io/yaml": "1.0.0-alpha.93"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "1ff4e4f580295056386cf7fccd5fe323b1f87731"
|
|
29
29
|
}
|
|
@@ -32,11 +32,11 @@ const receivers = (manifest) => {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
if (!TYPES.has(manifest.operations[receiver.operation].type)) {
|
|
35
|
-
throw new Error(`Receiver '${locator}' must refer to an operation of
|
|
35
|
+
throw new Error(`Receiver '${locator}' must refer to an operation of the allowed types: ${Array.from(TYPES).join(', ')}`)
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const TYPES = new Set(['transition', 'effect'])
|
|
40
|
+
const TYPES = new Set(['transition', 'effect', 'unmanaged'])
|
|
41
41
|
|
|
42
42
|
exports.validate = validate
|
|
@@ -247,7 +247,7 @@ describe('receivers', () => {
|
|
|
247
247
|
it('should throw if transition points to observation', () => {
|
|
248
248
|
manifest.receivers['foo.bar.happened'].operation = 'get'
|
|
249
249
|
|
|
250
|
-
expect(() => validate(manifest)).toThrow(/
|
|
250
|
+
expect(() => validate(manifest)).toThrow(/of the allowed types/)
|
|
251
251
|
})
|
|
252
252
|
|
|
253
253
|
it('should throw if source has a name `context`', async () => {
|