@live-change/framework 0.5.10 → 0.5.11
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/lib/runtime/Dao.js +2 -2
- package/lib/utils/validators.js +15 -0
- package/package.json +8 -8
package/lib/runtime/Dao.js
CHANGED
|
@@ -141,7 +141,7 @@ function prepareReactiveDaoDefinition(config, clientData) {
|
|
|
141
141
|
Promise.all(
|
|
142
142
|
config.services.map(service => service.app.clientSideDefinition(service, clientData))
|
|
143
143
|
).then(services => new ReactiveDao.ObservableValue({
|
|
144
|
-
client: clientData,
|
|
144
|
+
client: { ...clientData, sessionKey: undefined },
|
|
145
145
|
services
|
|
146
146
|
}))
|
|
147
147
|
)
|
|
@@ -150,7 +150,7 @@ function prepareReactiveDaoDefinition(config, clientData) {
|
|
|
150
150
|
return Promise.all(
|
|
151
151
|
config.services.map(service => service.app.clientSideDefinition(service, clientData))
|
|
152
152
|
).then(services => ({
|
|
153
|
-
client: clientData,
|
|
153
|
+
client: { ...clientData, sessionKey: undefined },
|
|
154
154
|
services
|
|
155
155
|
}))
|
|
156
156
|
}
|
package/lib/utils/validators.js
CHANGED
|
@@ -11,6 +11,21 @@ function nonEmpty(value) {
|
|
|
11
11
|
if(Object.keys(value).length == 0) return 'empty'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
function getField(context, fieldName) {
|
|
16
|
+
const propPath = context.propName ? context.propName.split('.') : []
|
|
17
|
+
propPath.pop()
|
|
18
|
+
let path
|
|
19
|
+
if(fieldName[0] == '/') {
|
|
20
|
+
path = fieldName.slice(1).split('.')
|
|
21
|
+
} else {
|
|
22
|
+
path = propPath.concat(fieldName.split('.'))
|
|
23
|
+
}
|
|
24
|
+
let p = context.props
|
|
25
|
+
for(let part of path) p = p[part]
|
|
26
|
+
return p
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
nonEmpty.isRequired = () => true
|
|
15
30
|
|
|
16
31
|
let validators = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/framework",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.11",
|
|
4
4
|
"description": "Live Change Framework - ultimate solution for real time mobile/web apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/live-change/framework",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@live-change/dao": "^0.3.
|
|
25
|
-
"@live-change/dao-websocket": "^0.3.
|
|
26
|
-
"@live-change/db": "^0.3.
|
|
24
|
+
"@live-change/dao": "^0.3.13",
|
|
25
|
+
"@live-change/dao-websocket": "^0.3.2",
|
|
26
|
+
"@live-change/db": "^0.3.64",
|
|
27
27
|
"@live-change/db-store-level": "^0.1.15",
|
|
28
28
|
"@live-change/db-store-lmdb": "^0.1.22",
|
|
29
29
|
"@live-change/uid": "^0.1.3",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"leveldown": "^6.1.0",
|
|
35
35
|
"levelup": "^5.1.1",
|
|
36
36
|
"memdown": "^6.1.1",
|
|
37
|
-
"node-lmdb": "^0.
|
|
37
|
+
"node-lmdb": "^0.8.0",
|
|
38
38
|
"os-service": "^2.2.0",
|
|
39
39
|
"rimraf": "^3.0.2",
|
|
40
|
-
"rocksdb": "^5.
|
|
41
|
-
"sockjs": "^0.
|
|
40
|
+
"rocksdb": "^5.2.0",
|
|
41
|
+
"@live-change/sockjs": "^0.4.0-rc.1",
|
|
42
42
|
"subleveldown": "^6.0.1",
|
|
43
|
-
"tape": "^5.3.
|
|
43
|
+
"tape": "^5.3.2",
|
|
44
44
|
"websocket": "^1.0.34"
|
|
45
45
|
}
|
|
46
46
|
}
|