@voxgig/create-sdkgen 0.1.1 → 0.1.2

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.
Files changed (62) hide show
  1. package/package.json +2 -2
  2. package/project/standard/.env.local +1 -0
  3. package/project/standard/.sdk/build/apidef.js +8 -0
  4. package/project/standard/.sdk/build/docgen.js +15 -0
  5. package/project/standard/.sdk/build/sdkgen.js +16 -0
  6. package/project/standard/.sdk/def/README.md +4 -0
  7. package/project/standard/.sdk/model/.model-config/model-config.jsonic +17 -0
  8. package/project/standard/.sdk/model/.model-config/model-config.jsonic~ +16 -0
  9. package/project/standard/.sdk/model/README.md +2 -0
  10. package/project/standard/.sdk/model/api/api-def.jsonic +5 -0
  11. package/project/standard/.sdk/model/api/api-entity-index.jsonic +2 -0
  12. package/project/standard/.sdk/model/config.jsonic +13 -0
  13. package/project/standard/.sdk/model/feature/README.md +2 -0
  14. package/project/standard/.sdk/model/feature/feature-index.jsonic +3 -0
  15. package/project/standard/.sdk/model/flow/flow-index.jsonic +2 -0
  16. package/project/standard/.sdk/model/guide.jsonic +5 -0
  17. package/project/standard/.sdk/model/sdk.fragment.jsonic +38 -0
  18. package/project/standard/.sdk/model/target/README.md +2 -0
  19. package/project/standard/.sdk/model/target/target-index.jsonic +2 -0
  20. package/project/standard/.sdk/model/target/target-index.jsonic~ +4 -0
  21. package/project/standard/.sdk/package.json +34 -0
  22. package/project/standard/.sdk/src/DocStaticRoot.ts +45 -0
  23. package/project/standard/.sdk/src/Root.ts +228 -0
  24. package/project/standard/.sdk/src/cmp/README.md +2 -0
  25. package/project/standard/.sdk/src/tsconfig.json +16 -0
  26. package/project/standard/.sdk/test/.model-config/model-config.json +7 -0
  27. package/project/standard/.sdk/test/.model-config/model-config.jsonic +4 -0
  28. package/project/standard/.sdk/test/primary/auth.jsonic +20 -0
  29. package/project/standard/.sdk/test/primary/body.jsonic +27 -0
  30. package/project/standard/.sdk/test/primary/contextify.jsonic +5 -0
  31. package/project/standard/.sdk/test/primary/done.jsonic +7 -0
  32. package/project/standard/.sdk/test/primary/error.jsonic +19 -0
  33. package/project/standard/.sdk/test/primary/findparam.jsonic +22 -0
  34. package/project/standard/.sdk/test/primary/fullurl.jsonic +50 -0
  35. package/project/standard/.sdk/test/primary/headers.jsonic +12 -0
  36. package/project/standard/.sdk/test/primary/inward.jsonic +3 -0
  37. package/project/standard/.sdk/test/primary/method.jsonic +11 -0
  38. package/project/standard/.sdk/test/primary/operator.jsonic +60 -0
  39. package/project/standard/.sdk/test/primary/options.jsonic +60 -0
  40. package/project/standard/.sdk/test/primary/outward.jsonic +3 -0
  41. package/project/standard/.sdk/test/primary/params.jsonic +10 -0
  42. package/project/standard/.sdk/test/primary/query.jsonic +9 -0
  43. package/project/standard/.sdk/test/primary/reqform.jsonic +9 -0
  44. package/project/standard/.sdk/test/primary/request.jsonic +31 -0
  45. package/project/standard/.sdk/test/primary/resbasic.jsonic +15 -0
  46. package/project/standard/.sdk/test/primary/resbody.jsonic +5 -0
  47. package/project/standard/.sdk/test/primary/resform.jsonic +11 -0
  48. package/project/standard/.sdk/test/primary/resheaders.jsonic +9 -0
  49. package/project/standard/.sdk/test/primary/response.jsonic +20 -0
  50. package/project/standard/.sdk/test/primary/spec.jsonic +32 -0
  51. package/project/standard/.sdk/test/struct/getpath.jsonic +143 -0
  52. package/project/standard/.sdk/test/struct/inject.jsonic +76 -0
  53. package/project/standard/.sdk/test/struct/merge.jsonic +161 -0
  54. package/project/standard/.sdk/test/struct/minor.jsonic +693 -0
  55. package/project/standard/.sdk/test/struct/select.jsonic +166 -0
  56. package/project/standard/.sdk/test/struct/transform.jsonic +453 -0
  57. package/project/standard/.sdk/test/struct/validate.jsonic +287 -0
  58. package/project/standard/.sdk/test/struct/walk.jsonic +57 -0
  59. package/project/standard/.sdk/test/test.json +15080 -0
  60. package/project/standard/.sdk/test/test.jsonic +44 -0
  61. package/project/standard/.sdk/tm/LICENSE +22 -0
  62. package/project/standard/.sdk/tm/README.md +2 -0
@@ -0,0 +1,50 @@
1
+
2
+ basic: set: [
3
+ {
4
+ ctx: {
5
+ op: {
6
+ params: ['a'],
7
+ },
8
+ spec: {
9
+ base: 'base-',
10
+ prefix: 'prefix-',
11
+ suffix: 'suffix-',
12
+ path: '/p0/{a}',
13
+ params: {
14
+ a: 'A'
15
+ },
16
+ query: {
17
+ b: 'B'
18
+ },
19
+ alias: {}
20
+ },
21
+ },
22
+ out: 'base-/prefix-/p0/A/suffix-?b=B'
23
+ }
24
+
25
+ {
26
+ ctx: {
27
+ op: {
28
+ kind: 'res',
29
+ params: ['foo_id'],
30
+ alias: {
31
+ foo_id: 'id'
32
+ },
33
+ match: {
34
+ id: 'A',
35
+ },
36
+ },
37
+ spec: {
38
+ base: 'base-',
39
+ prefix: 'prefix-',
40
+ suffix: 'suffix-',
41
+ path: '/p0/{foo_id}',
42
+ params: {},
43
+ alias: {}
44
+ }
45
+ }
46
+ out: 'base-/prefix-/p0/A/suffix-'
47
+ }
48
+
49
+ ]
50
+
@@ -0,0 +1,12 @@
1
+
2
+ DEF: {
3
+ client: a: test: options: { headers: { foo:FOO, bar:BAR, accept: '*/*' } }
4
+ }
5
+
6
+ basic: set: [
7
+ { ctx: {}, out: { 'content-type': 'application/json', 'accept': 'application/json' } }
8
+
9
+ { ctx: {}, client:a,
10
+ out: { foo:FOO, bar:BAR, 'content-type': 'application/json', 'accept': '*/*' } }
11
+ ]
12
+
@@ -0,0 +1,3 @@
1
+
2
+ basic: set: []
3
+
@@ -0,0 +1,11 @@
1
+
2
+ basic: set: [
3
+ { ctx: { op:name:create }, out: POST }
4
+ { ctx: { op:name:update }, out: PUT }
5
+ { ctx: { op:name:list }, out: GET }
6
+ { ctx: { op:name:load }, out: GET }
7
+ { ctx: { op:name:remove }, out: DELETE }
8
+
9
+ { ctx: { op:name:bad } }
10
+ ]
11
+
@@ -0,0 +1,60 @@
1
+
2
+ basic: set: [
3
+ {
4
+ ctx: {
5
+ op: {
6
+ entity: 'Foo',
7
+ name: 'load',
8
+ path: '/foo/{foo_id}',
9
+ params: ['foo_id'],
10
+ alias: {'foo_id':'id','id':'foo_id'},
11
+ match: {},
12
+ data: {},
13
+ state: {},
14
+ reqform: '`data`',
15
+ resform: '`body`',
16
+ check: {}
17
+ }
18
+ }
19
+ match: {
20
+ ctx: op: {
21
+ kind: ''
22
+ entity: 'Foo',
23
+ name: 'load',
24
+ path: '/foo/{foo_id}',
25
+ params: ['foo_id'],
26
+ alias: {'foo_id':'id','id':'foo_id'},
27
+ match: {},
28
+ data: {},
29
+ state: {},
30
+ reqform: '`data`',
31
+ resform: '`body`',
32
+ check: {}
33
+ }
34
+ }
35
+ }
36
+
37
+ {
38
+ ctx: op: {}
39
+ err: 'Invalid data: Expected field entity to be string, but found no value. | Expected field kind to be exactly equal to one of req, res, but found no value. | Expected field name to be string, but found no value. | Expected field path to be string, but found no value. | Expected field reqform to be one of string, object, function, but found no value. | Expected field resform to be one of string, object, function, but found no value.'
40
+ }
41
+
42
+ {
43
+ ctx: op: {
44
+ entity: 11,
45
+ name: 22,
46
+ path: 33,
47
+ params: [44],
48
+ alias: {'foo_id':55},
49
+ match: 101,
50
+ data: 102,
51
+ state: 103,
52
+ reqform: 66,
53
+ resform: 77,
54
+ check: 88
55
+ }
56
+ err: 'Invalid data: Expected field alias.foo_id to be string, but found number: 55. | Expected field check to be object, but found number: 88. | Expected field data to be one of {}, [], but found number: 102. | Expected field data to be array, but found number: 102. | Expected field entity to be string, but found number: 11. | Expected field kind to be exactly equal to one of req, res, but found no value. | Expected field match to be object, but found number: 101. | Expected field name to be string, but found number: 22. | Expected field path to be string, but found number: 33. | Expected field reqform to be one of string, object, function, but found number: 66. | Expected field resform to be one of string, object, function, but found number: 77. | Expected field state to be object, but found number: 103.'
57
+ }
58
+
59
+ ]
60
+
@@ -0,0 +1,60 @@
1
+
2
+ basic: set: [
3
+ {
4
+ in:prep: { config:{}, options:{} }
5
+ match: out: {
6
+ base: 'http://localhost:8000',
7
+ entity: {},
8
+ prefix: '',
9
+ suffix: '',
10
+ }
11
+ }
12
+
13
+ {
14
+ in:prep: { options: {}, config: options: {
15
+ base: 'http://cbase.example',
16
+ prefix: 'cpre-',
17
+ suffix: 'csuf-',
18
+ entity: {
19
+ foo: {}
20
+ }
21
+ }}
22
+ match: out: {
23
+ base: 'http://cbase.example',
24
+ prefix: 'cpre-',
25
+ suffix: 'csuf-',
26
+ entity: {
27
+ foo: {
28
+ alias: {}
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ {
35
+ in:prep: {
36
+ options: {
37
+ base: 'http://cbase.example',
38
+ prefix: 'cpre-',
39
+ suffix: 'csuf-',
40
+ entity: {
41
+ foo: {}
42
+ }
43
+ }
44
+ config: {}
45
+ }
46
+ match: out: {
47
+ base: 'http://cbase.example',
48
+ prefix: 'cpre-',
49
+ suffix: 'csuf-',
50
+ entity: {
51
+ foo: {
52
+ alias: {}
53
+ }
54
+ }
55
+ }
56
+ }
57
+
58
+
59
+ ]
60
+
@@ -0,0 +1,3 @@
1
+
2
+ basic: set: []
3
+
@@ -0,0 +1,10 @@
1
+
2
+ basic: set: [
3
+ { ctx: {op:{}}, out:{} }
4
+ { ctx: {op:params:[a]}, out:{} }
5
+ { ctx: {op:params:[a], op:match:a:A}, out:{a:A} }
6
+ { ctx: {op:params:[a], op:match:b:B}, out:{} }
7
+ { ctx: {op:params:[a], op:match:a:A,b:B}, out:{a:A} }
8
+
9
+ ]
10
+
@@ -0,0 +1,9 @@
1
+
2
+ basic: set: [
3
+ { mark:10, ctx: {op:{}}, out: {} }
4
+ { mark:20, ctx: {op:params:[a]}, out: {} }
5
+ { mark:30, ctx: {op:params:[a],op:match:a:A}, out: {} }
6
+ { mark:40, ctx: {op:params:[a],op:match:b:B}, out: {b:B} }
7
+ { mark:50, ctx: {op:params:[a],op:match:{a:A,b:B}}, out: {b:B} }
8
+ ]
9
+
@@ -0,0 +1,9 @@
1
+
2
+ basic: set: [
3
+ {
4
+ ctx: { spec:step:'' op:reqform:'`data.foo`' op:data:foo:x:1 }
5
+ out: {x:1}
6
+ match: ctx:spec:step:reqform
7
+ }
8
+ ]
9
+
@@ -0,0 +1,31 @@
1
+
2
+
3
+ DEF: {
4
+ client: a: test: options: { base: 'b0', system: fetch: '`fetch`' }
5
+ }
6
+
7
+
8
+
9
+ basic: set: [
10
+ {
11
+ ctx: {
12
+ op: params: [],
13
+ spec: {
14
+ base: 'http://localhost/base-',
15
+ prefix: 'prefix-',
16
+ suffix: 'suffix-',
17
+ path: '/p0',
18
+ params: {},
19
+ query: {},
20
+ alias: {},
21
+ }
22
+ },
23
+ client: a
24
+
25
+ match:out: {
26
+ native: '__EXISTS__'
27
+ err: '__UNDEF__'
28
+ }
29
+ }
30
+ ]
31
+
@@ -0,0 +1,15 @@
1
+
2
+ basic: set: [
3
+ { ctx:{response:{native:{status:200,reason:'OK'}},result:{}},
4
+ out:{status:200,reason:'OK'}
5
+ }
6
+
7
+ { ctx:{response:{native:{status:500,reason:'r01'}},result:{}},
8
+ match:out:{status:500,reason:'r01',err:message:'request: 500: r01'}
9
+ }
10
+
11
+ { ctx:{response:{native:{status:400,reason:'BAD'},err:message:'Foo'},result:{}},
12
+ out:{status:400,reason:'BAD',err:message:'Foo: request: 400: BAD'}
13
+ }
14
+ ]
15
+
@@ -0,0 +1,5 @@
1
+
2
+ basic: set: [
3
+ { ctx:{response:native:body:{a:A,b:B},result:{}}, out: {body:{a:A,b:B}} }
4
+ ]
5
+
@@ -0,0 +1,11 @@
1
+
2
+ basic: set: [
3
+
4
+ {
5
+ ctx: { result:{ok:true,body:foo:x:1} spec:step:'' op:resform:'`body.foo`'}
6
+ out: {x:1}
7
+ match: ctx:spec:step:'resform'
8
+ }
9
+
10
+ ]
11
+
@@ -0,0 +1,9 @@
1
+
2
+ basic: set: [
3
+ {
4
+ ctx:{response:{native:headers:{a:A,B:B}},result:{}},
5
+ out:headers:{a:A,b:B}
6
+ match:ctx:result:headers:{a:A,b:B}
7
+ }
8
+ ]
9
+
@@ -0,0 +1,20 @@
1
+
2
+ basic: set: [
3
+ {
4
+ ctx:response:native:{
5
+ status: 201,
6
+ reason: 'OK1'
7
+ headers: {h1:v1}
8
+ body: {b:1}
9
+ }
10
+ ctx:spec:{}
11
+ match:ctx:result: {
12
+ ok: true
13
+ status: 201
14
+ reason: 'OK1'
15
+ headers: {h1:v1}
16
+ body: {b:1}
17
+ }
18
+ }
19
+ ]
20
+
@@ -0,0 +1,32 @@
1
+
2
+ DEF: {
3
+ client: a: test: options: {
4
+ base: 'BASE-',
5
+ prefix: 'PREFIX-',
6
+ suffix: 'SUFFIX-',
7
+ }
8
+ }
9
+
10
+
11
+ basic: set: [
12
+ {
13
+ ctx: {
14
+ op:name: 'list'
15
+ },
16
+ client: a
17
+ match: ctx: spec: {
18
+ base: 'BASE-',
19
+ prefix: 'PREFIX-',
20
+ suffix: 'SUFFIX-',
21
+ method: 'GET',
22
+ params: {},
23
+ query: {},
24
+ headers: {
25
+ 'content-type': 'application/json',
26
+ },
27
+ step: 'start',
28
+ alias: {}
29
+ }
30
+ }
31
+ ]
32
+
@@ -0,0 +1,143 @@
1
+
2
+
3
+ basic: {
4
+ set: [
5
+ { in: { path: 'a', store: {a:10} }, out: 10 }
6
+ { in: { path: 'a.b', store: {a:{b:11}} }, out: 11 }
7
+ { in: { path: 'a.b.c', store: {a:{b:{c:12}}} }, out: 12 }
8
+ { in: { path: 'a.b.c.d', store: {a:{b:{c:{d:13}}}} }, out: 13 }
9
+ { in: { path: 'a.b.c.d.e', store: {a:{b:{c:{d:{e:14}}}}} }, out: 14 }
10
+
11
+ { in: { path: 'a', store: {x:2,a:15} }, out: 15 }
12
+ { in: { path: 'a.b', store: {x:2,a:{b:16}} }, out: 16 }
13
+ { in: { path: 'a.b.c', store: {x:2,a:{b:{c:17}}} }, out: 17 }
14
+ { in: { path: 'a.b.c.d', store: {x:2,a:{b:{c:{d:18}}}} }, out: 18 }
15
+ { in: { path: 'a.b.c.d.e', store: {x:2,a:{b:{c:{d:{e:19}}}}} }, out: 19 }
16
+
17
+ { in: { path: 'a', store: {a:21,y:3} }, out: 21 }
18
+ { in: { path: 'a.b', store: {a:{b:22},y:3} }, out: 22 }
19
+ { in: { path: 'a.b.c', store: {a:{b:{c:23}},y:3} }, out: 23 }
20
+ { in: { path: 'a.b.c.d', store: {a:{b:{c:{d:24}}},y:3} }, out: 24 }
21
+ { in: { path: 'a.b.c.d.e', store: {a:{b:{c:{d:{e:25}}}},y:3} }, out: 25 }
22
+
23
+ { in: { path: 'a', store: {x:2,a:31,y:3} }, out: 31 }
24
+ { in: { path: 'a.b', store: {x:2,a:{b:32},y:3} }, out: 32 }
25
+ { in: { path: 'a.b.c', store: {x:2,a:{b:{c:33}},y:3} }, out: 33 }
26
+ { in: { path: 'a.b.c.d', store: {x:2,a:{b:{c:{d:34}}},y:3} }, out: 34 }
27
+ { in: { path: 'a.b.c.d.e', store: {x:2,a:{b:{c:{d:{e:35}}}},y:3} }, out: 35 }
28
+
29
+ { in: { path: 'a.b', store: {x:{y:2},a:{b:41}} }, out: 41 }
30
+ { in: { path: 'x.y', store: {x:{y:42},a:{b:1}} }, out: 42 }
31
+
32
+ { in: { path: '0', store: ['a1'] }, out: 'a1' }
33
+ { in: { path: '0.0', store: [['a2']] }, out: 'a2' }
34
+ { in: { path: '0.0.0', store: [[['a3']]] }, out: 'a3' }
35
+ { in: { path: '0.0.0.0', store: [[[['a4']]]] }, out: 'a4' }
36
+ { in: { path: '0.0.0.0.0', store: [[[[['a5']]]]] }, out: 'a5' }
37
+
38
+ { in: { path: 'a.0', store: {a:['x1']} }, out: 'x1' }
39
+ { in: { path: 'a.0.b', store: {a:[{b:'x2'}]} }, out: 'x2' }
40
+ { in: { path: 'a.0.b.0', store: {a:[{b:['x3']}]} }, out: 'x3' }
41
+
42
+ { in: { path: '1', store: ['a','b'] }, out: 'b' }
43
+ { in: { path: '2', store: ['a','b'] } }
44
+
45
+ { in: { path: 'b', store: {a:1} } }
46
+ { in: { path: '', store: {a:1} }, out: {a:1} }
47
+ { in: { store: {a:111} } }
48
+ { in: { path: 'a' } }
49
+ { in: { } }
50
+
51
+ { in: { path: 'a', store: [] } }
52
+ { in: { path: '0', store: [] } }
53
+ { in: { path: 'a', store: {} } }
54
+ { in: { path: '0', store: {} } }
55
+
56
+ { in: { path: ['a'], store: [] } }
57
+ { in: { path: ['0'], store: [] } }
58
+ { in: { path: ['a'], store: {} } }
59
+ { in: { path: ['0'], store: {} } }
60
+
61
+ { in: { path: ['a'], store: {a:1} }, out: 1 }
62
+ { in: { path: ['a','b'], store: {a:{b:2}} }, out: 2 }
63
+ { in: { path: ['a','b','c'], store: {a:{b:{c:3}}} }, out: 3 }
64
+
65
+ { in: { path: [''], store: {a:40} }, out: {a:40} }
66
+
67
+ { in: { path: true, store: {} } }
68
+ { in: { path: null, store: {} } }
69
+ { in: { path: {}, store: {} } }
70
+ ]
71
+ }
72
+
73
+
74
+ relative: {
75
+ set: [
76
+ { in: { path: '.', store: {a:{b:1}}, dparent: {b:1} }, out: {b:1} }
77
+
78
+ { in: { path: '.b', store: {a:{b:2}}, dparent: {b:2} }, out: 2 }
79
+ { in: { path: 'a.b', store: {a:{b:3}}, dparent: {b:3} }, out: 3 }
80
+ { in: { path: 'a', store: {a:{b:4}}, dparent: {b:4} }, out: {b:4} }
81
+
82
+ { in: { path: '.1', store: {a:[11,22,33] }, dparent: [11,22,33] }, out: 22 }
83
+ { in: { path: 'a.1', store: {a:[11,22,33] }, dparent: [11,22,33] }, out: 22 }
84
+ { in: { path: 'a', store: {a:[11,22,33] }, dparent: [11,22,33] }, out: [11,22,33] }
85
+
86
+ { in: { path: ['','b'], store: {a:{b:1}}, dparent: {b:1} }, out: 1 }
87
+
88
+
89
+ { in: { path: '.', store: {a:b:41}, dparent: 41, dpath: 'a.b' }, out: 41 }
90
+ { in: { path: '..', store: {a:b:42}, dparent: 42, dpath: 'a.b' }, out: b:42 }
91
+ { in: { path: '...', store: {a:b:43}, dparent: 43, dpath: 'a.b' }, out: a:b:43 }
92
+ { in: { path: '....', store: {a:b:44}, dparent: 44, dpath: 'a.b' } }
93
+
94
+ { in: { path: '.', store: {a:b:101}, dparent: b:101, dpath: 'a' }, out: b:101 }
95
+ { in: { path: '..', store: {a:b:102}, dparent: b:102, dpath: 'a' }, out: a:b:102 }
96
+
97
+ { in: { path: '.', store: {a:{b:201,c:66}}, dparent: 201, dpath: 'a.b' }, out: 201 }
98
+ { in: { path: '.x', store: {a:{b:202,c:66}}, dparent: 202, dpath: 'a.b' } }
99
+ { in: { path: '..', store: {a:{b:203,c:66}}, dparent: 203, dpath: 'a.b' },
100
+ out: {b:203,c:66} }
101
+
102
+ { in: { path: '..c', store: {a:{b:204,c:66}}, dparent: 204, dpath: 'a.b' }, out: 66 }
103
+
104
+ { in: { path: '..b', store: {a:{b:205,c:66}}, dparent: 205, dpath: 'a.b' }, out: 205 }
105
+ { in: { path: '...', store: {a:{b:206,c:66}}, dparent: 206, dpath: 'a.b' },
106
+ out: {a:{b:206,c:66}} }
107
+ ]
108
+ }
109
+
110
+
111
+ handler: {
112
+ set: [
113
+ { in: { path: '$FOO', store: {} }, out: 'foo' }
114
+ ]
115
+ }
116
+
117
+
118
+ special: {
119
+ set: [
120
+ { in: { path: 'a.b$$c', store: {a:'b$c':11} }, out: 11 }
121
+ { in: { path: 'a.$$c', store: {a:'$c':12} }, out: 12 }
122
+ { in: { path: 'a.c$$', store: {a:'c$':13} }, out: 13 }
123
+
124
+ { in: { path: 'a.$KEY', store: {a:[11,22]}, inj: {key:'1'} }, out: 22 }
125
+
126
+ { in: { path: 'a.$REF:b$', store: {a:c:44, '$SPEC':{b:c}}, inj:{} }, out: 44 }
127
+ { in: { path: 'a.$REF:d$', store: {a:c:44, '$SPEC':{b:c}}, inj:{} } }
128
+
129
+ { in: { path: 'a.$GET:b$', store: {a:c:55, b:c}, inj:{} }, out: 55 }
130
+ { in: { path: 'a.$GET:d$', store: {a:c:55, b:c}, inj:{} } }
131
+
132
+ { in: { path: 'a.$META:b$', store: {a:c:33}, inj: {meta:{b:c}} }, out: 33 }
133
+ { in: { path: 'a.$META:d$', store: {a:c:33}, inj: {meta:{b:c}} } }
134
+ { in: { path: 'a.$META:e$', store: {a:'b.c':34}, inj: {meta:{e:'b.c'}} }, out: 34 }
135
+
136
+ { in: { path: 'p0$~a', store: {}, inj: {meta:{p0:a:44}} }, out:44 }
137
+ { in: { path: 'p0$~b', store: {}, inj: {meta:{p0:a:45}} } }
138
+ { in: { path: 'p0$~a.c', store: {}, inj: {meta:{p0:a:c:46}} }, out:46 }
139
+
140
+ { in: { path: 'p0$~a', store: {}, inj: {meta:{p0:a:44}} }, out:44 }
141
+ ]
142
+ }
143
+
@@ -0,0 +1,76 @@
1
+
2
+ basic: {
3
+ in: { val: {x: '`a`', y: 2}, store: {a:1} }
4
+ out: {x:1,y:2}
5
+ }
6
+
7
+
8
+ string: {
9
+ set: [
10
+ { in: { val: 'a', store: {a:1} }, out: 'a' }
11
+ { in: { val: '`a`', store: {a:1} }, out: 1 }
12
+ { in: { val: 'x`a`', store: {a:1} }, out: 'x1' }
13
+ { in: { val: '`a`y', store: {a:1} }, out: '1y' }
14
+ { in: { val: 'x`a`y', store: {a:1} }, out: 'x1y' }
15
+ { in: { val: '`a`x`a`y', store: {a:1} }, out: '1x1y' }
16
+ { in: { val: '`a`x`a`y`a`', store: {a:1} }, out: '1x1y1' }
17
+
18
+ { in: { val: '`a1`x`b1`y`c1`', store: {a1:1,b1:2,c1:3} }, out: '1x2y3' }
19
+ { in: { val: '`a2`x`b2`y`c2`', store: {a2:'A',b2:false,c2:true} }, out: 'Axfalseytrue' }
20
+
21
+ { in: { val: '`an`', store: {an:null} }, out: null }
22
+ { in: { val: '`an`x', store: {an:null} }, out: 'nullx' }
23
+
24
+ { in: { val: '`a21`x`b21`y`c21`', store: {a21:'A',b21:false,c21:null} },
25
+ out: 'Axfalseynull' }
26
+ { in: { val: '`a3`x`b3`y`c3`', store: {a3:'A',b3:false} }, out: 'Axfalsey' }
27
+ { in: { val: '`a4`x`b4`y`c4`', store: {a4:{k:4},b4:['B']} }, out: '{"k":4}x["B"]y' }
28
+
29
+ { in: { val: '`a`', store: {a:'A'} }, out: 'A' }
30
+ { in: { val: '`a`', store: {a:true} }, out: true }
31
+ { in: { val: '`a`', store: {a:false} }, out: false }
32
+ { in: { val: '`a`', store: {a:{x:1}} }, out: {x:1} }
33
+ { in: { val: '`a`', store: {a:[2]} }, out: [2] }
34
+ ]
35
+ }
36
+
37
+
38
+
39
+ deep: {
40
+ set: [
41
+ { in: { val: { x: '`a`'}, store: {a:1} }, out: {x:1} }
42
+ { in: { val: '`a`', store: {a:{b:2}} }, out: {b:2} }
43
+
44
+ { in: { val: { x: '`0`'}, store: [3] }, out: {x:3} }
45
+ { in: { val: '`0`', store: [4] }, out: 4 }
46
+
47
+ { in: { val: { x: '`a.b`'}, store: {a:{b:5}} }, out: {x:5} }
48
+ { in: { val: { x: '`a.b`'}, store: {a:{b:{c:6}}} }, out: {x:{c:6}} }
49
+ { in: { val: { x: '`a.b`'}, store: {a:{b:[7]}} }, out: {x:[7]} }
50
+ { in: { val: { x: '`a.b`'}, store: {a:{b:true}} }, out: {x:true} }
51
+
52
+ { in: { val: '`a.b`', store: {a:{b:5}} }, out: 5 }
53
+ { in: { val: '`a.b`', store: {a:{b:{c:6}}} }, out: {c:6} }
54
+ { in: { val: '`a.b`', store: {a:{b:[7]}} }, out: [7] }
55
+ { in: { val: '`a.b`', store: {a:{b:true}} }, out: true }
56
+
57
+ { in: { val: {x: '`a`',y:'`c.d`',z:'`e`'}, store: {a:{b:1},c:{d:2},e:[33,44]} }
58
+ out: { x: { b: 1 }, y: 2, z: [ 33, 44 ]} }
59
+
60
+ { in: { val: ['`0`','`1`'], store: [11,22,33] }, out: [11,22] }
61
+
62
+ { in: { val:{x:'`hold.$TOP`'} , store: {hold:{'$TOP': 44}} }, out: {x:44} }
63
+
64
+
65
+ { in: { val: {x:1}, store: null }, out: {x:1} }
66
+ { in: { val: null, store: null }, out: null }
67
+ { in: { val: null, store: {s:1} }, out: null }
68
+
69
+ { in: { val: {x:1} }, out: {x:1} }
70
+ { in: { store: null }, out: null }
71
+ { in: { val: null }, out: null }
72
+ { in: { store: {x:1} }, out: null }
73
+ ]
74
+ }
75
+
76
+