@live-change/framework 0.9.101 → 0.9.103
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/Action.js +2 -2
- package/lib/utils/CommandQueue.js +1 -1
- package/lib/utils/validation.js +1 -1
- package/lib/utils.js +1 -0
- package/package.json +4 -4
package/lib/runtime/Action.js
CHANGED
|
@@ -13,7 +13,7 @@ class Action {
|
|
|
13
13
|
let preparedParams = await prepareParameters(parameters, this.definition.properties, this.service)
|
|
14
14
|
//console.log("PREP PARAMS", preparedParams)
|
|
15
15
|
|
|
16
|
-
let resultPromise = this.definition.execute({
|
|
16
|
+
let resultPromise = (async () => this.definition.execute({
|
|
17
17
|
...parameters,
|
|
18
18
|
...preparedParams
|
|
19
19
|
}, {
|
|
@@ -33,7 +33,7 @@ class Action {
|
|
|
33
33
|
client: command.client,
|
|
34
34
|
...trigger
|
|
35
35
|
}, data, returnArray)
|
|
36
|
-
}, emit)
|
|
36
|
+
}, emit))()
|
|
37
37
|
|
|
38
38
|
resultPromise = resultPromise.then(async result => {
|
|
39
39
|
let processedResult = await processReturn(result, this.definition.returns, this.service)
|
|
@@ -88,7 +88,7 @@ class CommandQueue {
|
|
|
88
88
|
const result = await this.connection.request(['database', 'update'], this.database, this.tableName, command.id, [
|
|
89
89
|
{
|
|
90
90
|
op: 'merge', property: null,
|
|
91
|
-
value: { state: 'failed', error:
|
|
91
|
+
value: { state: 'failed', error: `${this.tableName.slice(0, -1)} ${command.type} was not handled` }
|
|
92
92
|
}
|
|
93
93
|
])
|
|
94
94
|
return Promise.resolve(result)
|
package/lib/utils/validation.js
CHANGED
|
@@ -69,7 +69,7 @@ async function validate(props, validators, context) {
|
|
|
69
69
|
}
|
|
70
70
|
propPromises[propNameAccumulator] = promises
|
|
71
71
|
} else {
|
|
72
|
-
if(data === null) return
|
|
72
|
+
if(data === null || data === undefined) return
|
|
73
73
|
if(path[pathIndex] === '#') {
|
|
74
74
|
for(let i = 0; i < data.length; i++) {
|
|
75
75
|
validateProperty(data[i], pathIndex + 1,
|
package/lib/utils.js
CHANGED
|
@@ -229,6 +229,7 @@ function prefixRange({ gt, lt, gte, lte, limit, reverse }, prefix, from = "") {
|
|
|
229
229
|
if(id.length > from.length) {
|
|
230
230
|
if(id.slice(0, from.length) !== from) {
|
|
231
231
|
console.error("ID:", id, "does not start with", from)
|
|
232
|
+
console.trace('id does not match prefix')
|
|
232
233
|
throw new Error("id does not match prefix")
|
|
233
234
|
}
|
|
234
235
|
id = id.slice(from.length)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/framework",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.103",
|
|
4
4
|
"description": "Live Change Framework - ultimate solution for real time mobile/web apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/live-change/live-change-stack",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@live-change/dao": "^0.9.
|
|
26
|
-
"@live-change/uid": "^0.9.
|
|
25
|
+
"@live-change/dao": "^0.9.103",
|
|
26
|
+
"@live-change/uid": "^0.9.103",
|
|
27
27
|
"typedoc": "0.28.3",
|
|
28
28
|
"typedoc-plugin-markdown": "^4.6.3",
|
|
29
29
|
"typedoc-plugin-rename-defaults": "^0.7.3"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "665bfa896fe92865a97556c86953f6d515ffc9ab"
|
|
32
32
|
}
|