@voxgig/model 1.3.1 → 1.4.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/model/sys.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sys": {
|
|
3
|
+
"shape": {
|
|
4
|
+
"srv": {
|
|
5
|
+
"base": {
|
|
6
|
+
"in": {},
|
|
7
|
+
"out": {},
|
|
8
|
+
"deps": {},
|
|
9
|
+
"api": {
|
|
10
|
+
"web": {
|
|
11
|
+
"path": {},
|
|
12
|
+
"cors": {}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"env": {
|
|
16
|
+
"lambda": {
|
|
17
|
+
"handler": {
|
|
18
|
+
"path": {}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"std": {
|
|
24
|
+
"api": {
|
|
25
|
+
"web": {
|
|
26
|
+
"active": true,
|
|
27
|
+
"method": "POST",
|
|
28
|
+
"cors": {
|
|
29
|
+
"active": false
|
|
30
|
+
},
|
|
31
|
+
"path": {
|
|
32
|
+
"prefix": "/api/"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"env": {
|
|
37
|
+
"lambda": {
|
|
38
|
+
"active": false,
|
|
39
|
+
"timeout": 30,
|
|
40
|
+
"handler": {
|
|
41
|
+
"path": {
|
|
42
|
+
"suffix": ".handler"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"kind": "standard"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"in": {},
|
|
49
|
+
"out": {},
|
|
50
|
+
"deps": {}
|
|
51
|
+
},
|
|
52
|
+
"std_js": {
|
|
53
|
+
"env": {
|
|
54
|
+
"lambda": {
|
|
55
|
+
"handler": {
|
|
56
|
+
"path": {
|
|
57
|
+
"prefix": "src/handler/lambda/",
|
|
58
|
+
"suffix": ".handler"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"active": false,
|
|
62
|
+
"timeout": 30,
|
|
63
|
+
"kind": "standard"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"api": {
|
|
67
|
+
"web": {
|
|
68
|
+
"active": true,
|
|
69
|
+
"method": "POST",
|
|
70
|
+
"cors": {
|
|
71
|
+
"active": false
|
|
72
|
+
},
|
|
73
|
+
"path": {
|
|
74
|
+
"prefix": "/api/"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"in": {},
|
|
79
|
+
"out": {},
|
|
80
|
+
"deps": {}
|
|
81
|
+
},
|
|
82
|
+
"std_ts": {
|
|
83
|
+
"env": {
|
|
84
|
+
"lambda": {
|
|
85
|
+
"handler": {
|
|
86
|
+
"path": {
|
|
87
|
+
"prefix": "dist/handler/lambda/",
|
|
88
|
+
"suffix": ".handler"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"active": false,
|
|
92
|
+
"timeout": 30,
|
|
93
|
+
"kind": "standard"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"api": {
|
|
97
|
+
"web": {
|
|
98
|
+
"active": true,
|
|
99
|
+
"method": "POST",
|
|
100
|
+
"cors": {
|
|
101
|
+
"active": false
|
|
102
|
+
},
|
|
103
|
+
"path": {
|
|
104
|
+
"prefix": "/api/"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"in": {},
|
|
109
|
+
"out": {},
|
|
110
|
+
"deps": {}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"ent": {
|
|
114
|
+
"id": {
|
|
115
|
+
"field": "id"
|
|
116
|
+
},
|
|
117
|
+
"field": {
|
|
118
|
+
"id": {
|
|
119
|
+
"kind": "Text",
|
|
120
|
+
"active": true,
|
|
121
|
+
"dx": {},
|
|
122
|
+
"ux": {}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"app": {},
|
|
127
|
+
"part": {
|
|
128
|
+
"img": {}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
package/model/sys.jsonic
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
# Service Shapes
|
|
4
|
+
# --------------
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Service base has no defaults.
|
|
2
8
|
sys: shape: srv: base: {
|
|
3
9
|
in: {
|
|
4
10
|
# TODO: validate leaf?
|
|
5
11
|
# &&: => &:, &: &:, &: &: &:, etc
|
|
6
12
|
}
|
|
13
|
+
out: {}
|
|
7
14
|
deps: {
|
|
8
15
|
&: {}
|
|
9
16
|
}
|
|
@@ -32,6 +39,7 @@ sys: shape: srv: base: {
|
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
|
|
42
|
+
# Shared service defaults
|
|
35
43
|
sys: shape: srv: std: $.sys.shape.srv.base & {
|
|
36
44
|
api: web: {
|
|
37
45
|
active: *true | boolean
|
|
@@ -50,12 +58,15 @@ sys: shape: srv: std: $.sys.shape.srv.base & {
|
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
|
|
61
|
+
# Javascript service defaults
|
|
53
62
|
sys: shape: srv: std_js: $.sys.shape.srv.std & {
|
|
54
63
|
env: lambda: handler: path: {
|
|
55
64
|
prefix: *'src/handler/lambda/' | string
|
|
56
65
|
}
|
|
57
66
|
}
|
|
58
67
|
|
|
68
|
+
|
|
69
|
+
# Typescript service defaults
|
|
59
70
|
sys: shape: srv: std_ts: $.sys.shape.srv.std & {
|
|
60
71
|
env: lambda: handler: path: {
|
|
61
72
|
prefix: *'dist/handler/lambda/' | string
|
|
@@ -64,6 +75,37 @@ sys: shape: srv: std_ts: $.sys.shape.srv.std & {
|
|
|
64
75
|
|
|
65
76
|
|
|
66
77
|
|
|
78
|
+
# Entity Shapes
|
|
79
|
+
# -------------
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
sys: shape: ent: {
|
|
83
|
+
id: {
|
|
84
|
+
field: 'id'
|
|
85
|
+
}
|
|
86
|
+
field: {
|
|
87
|
+
id: kind: *'Text' | string
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
sys: shape: ent: field: &: {
|
|
92
|
+
active: *true | boolean
|
|
93
|
+
kind: *'Text' | string
|
|
94
|
+
title: string
|
|
95
|
+
|
|
96
|
+
# Developer model (backend)
|
|
97
|
+
dx: {}
|
|
98
|
+
|
|
99
|
+
# User inerface model (frontend)
|
|
100
|
+
ux: {
|
|
101
|
+
desc: string
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# App Shapes
|
|
108
|
+
# --------------
|
|
67
109
|
|
|
68
110
|
sys: shape: app: {
|
|
69
111
|
name: string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voxgig/model",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"main": "dist/model.js",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"types": "dist/model.d.ts",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"test-some": "jest -t",
|
|
25
25
|
"test-watch": "jest --coverage --watchAll",
|
|
26
26
|
"test-model": "voxgig-model test/sys01/model/model.jsonic",
|
|
27
|
+
"model": "voxgig-model model/sys.jsonic",
|
|
28
|
+
"model-build": "voxgig-model model/sys.jsonic --once",
|
|
27
29
|
"watch": "tsc -w -d",
|
|
28
30
|
"build": "tsc -d",
|
|
29
31
|
"clean": "rm -rf node_modules yarn.lock package-lock.json",
|
|
@@ -43,11 +45,12 @@
|
|
|
43
45
|
],
|
|
44
46
|
"dependencies": {
|
|
45
47
|
"aontu": "0.19.0",
|
|
46
|
-
"chokidar": "3.
|
|
48
|
+
"chokidar": "3.6.0"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
|
-
"@types/
|
|
50
|
-
"
|
|
51
|
+
"@types/node": "20.11.19",
|
|
52
|
+
"@types/jest": "^29.5.12",
|
|
53
|
+
"esbuild": "^0.20.1",
|
|
51
54
|
"esbuild-jest": "^0.5.0",
|
|
52
55
|
"jest": "^29.7.0",
|
|
53
56
|
"es-jest": "^2.1.0",
|
|
File without changes
|