@live-change/framework 0.8.141 → 0.8.143
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/params.js +4 -5
- package/package.json +4 -4
package/lib/runtime/params.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Model from './Model.js'
|
|
2
1
|
import ModelDefinition from '../definition/ModelDefinition.js'
|
|
3
2
|
|
|
4
3
|
function getModelName(t) {
|
|
@@ -70,10 +69,10 @@ async function processReturns(data, definition, service) {
|
|
|
70
69
|
async function processReturn(data, definition, service) {
|
|
71
70
|
if(!definition) return data
|
|
72
71
|
if(definition.type === Object && definition.properties) {
|
|
73
|
-
return processReturns(data, definition.properties)
|
|
72
|
+
return processReturns(data, definition.properties, service)
|
|
74
73
|
}
|
|
75
74
|
if(definition.type === Array) {
|
|
76
|
-
return data.map(item => processReturn(item, definition.of))
|
|
75
|
+
return data.map(item => processReturn(item, definition.of, service))
|
|
77
76
|
}
|
|
78
77
|
let modelName = getModelName(definition.type)
|
|
79
78
|
if(modelName) {
|
|
@@ -83,13 +82,13 @@ async function processReturn(data, definition, service) {
|
|
|
83
82
|
if (definition.optional) return null
|
|
84
83
|
throw new Error("Return data " + data + " is not " + model.definition.name + "!")
|
|
85
84
|
}
|
|
86
|
-
if (definition.idOnly) return data.id || data
|
|
85
|
+
/* if (definition.idOnly) return data.id || data
|
|
87
86
|
if (!(data instanceof Entity)) {
|
|
88
87
|
if (typeof data != "string")
|
|
89
88
|
throw new Error("Return data " + data + " is not " + model.definition.name + " id!")
|
|
90
89
|
data = await model.get(data)
|
|
91
90
|
}
|
|
92
|
-
return await data.get()
|
|
91
|
+
return await data.get()*/
|
|
93
92
|
}
|
|
94
93
|
}
|
|
95
94
|
return data
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/framework",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.143",
|
|
4
4
|
"description": "Live Change Framework - ultimate solution for real time mobile/web apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/live-change/live-change-stack",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@live-change/dao": "^0.8.
|
|
26
|
-
"@live-change/uid": "^0.8.
|
|
25
|
+
"@live-change/dao": "^0.8.143",
|
|
26
|
+
"@live-change/uid": "^0.8.143"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "66b5f7afb324c434fbc61971fa8e3ec8bf9359d0"
|
|
29
29
|
}
|