@live-change/framework 0.9.85 → 0.9.86
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/App.js
CHANGED
|
@@ -265,7 +265,7 @@ class App {
|
|
|
265
265
|
})
|
|
266
266
|
const routes = await this.dao.get(['database', 'tableRange', this.databaseName, 'triggerRoutes',
|
|
267
267
|
{ gte: trigger.type+'=', lte: trigger.type+'=\xFF\xFF\xFF\xFF' }])
|
|
268
|
-
console.log("TRIGGER ROUTES", trigger.type, '=>', routes)
|
|
268
|
+
console.log("TRIGGER ROUTES", trigger.type, '=>', routes.map(r => r.service).join(', '))
|
|
269
269
|
let promises = []
|
|
270
270
|
for(const route of routes) {
|
|
271
271
|
promises.push(this.triggerService({ ...trigger, service: route.service }, { ...data }, true))
|
|
@@ -8,10 +8,12 @@ export default function clientSideFilter(service, definition, app) {
|
|
|
8
8
|
const view = service.views[viewName]
|
|
9
9
|
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
const view = service.views[viewName]
|
|
11
|
+
*/
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
for(let modelName in definition.models) {
|
|
14
|
+
const model = definition.models[modelName]
|
|
15
|
+
if(model.indexes) delete model.indexes
|
|
16
|
+
}
|
|
15
17
|
|
|
16
18
|
delete definition.events
|
|
17
19
|
delete definition.triggers
|
|
@@ -7,7 +7,7 @@ import TriggerDefinition, { TriggerDefinitionSpecification } from "./TriggerDefi
|
|
|
7
7
|
import ViewDefinition, { ViewDefinitionSpecification } from "./ViewDefinition.js"
|
|
8
8
|
import EventDefinition from "./EventDefinition.js"
|
|
9
9
|
import defaultValidators from '../utils/validators.js'
|
|
10
|
-
import { crudChanges } from "../utils.js"
|
|
10
|
+
import { crudChanges, definitionToJSON } from "../utils.js"
|
|
11
11
|
|
|
12
12
|
function createModelProxy(definition, model) {
|
|
13
13
|
return new Proxy(model, {
|
|
@@ -208,7 +208,7 @@ class ServiceDefinition<T extends ServiceDefinitionSpecification> {
|
|
|
208
208
|
for(let key in this.views) views[key] = this.views[key].toJSON()
|
|
209
209
|
let triggers = {}
|
|
210
210
|
for(let key in this.triggers) triggers[key] = this.triggers[key].map(t=>t.toJSON())
|
|
211
|
-
|
|
211
|
+
let json = {
|
|
212
212
|
...this,
|
|
213
213
|
_runtime: undefined,
|
|
214
214
|
models,
|
|
@@ -220,6 +220,8 @@ class ServiceDefinition<T extends ServiceDefinitionSpecification> {
|
|
|
220
220
|
events,
|
|
221
221
|
triggers
|
|
222
222
|
}
|
|
223
|
+
const fixed = definitionToJSON(json, true)
|
|
224
|
+
return fixed
|
|
223
225
|
}
|
|
224
226
|
|
|
225
227
|
callTrigger(trigger, data) {
|
package/lib/runtime/ApiServer.js
CHANGED
|
@@ -35,7 +35,6 @@ class ApiServer {
|
|
|
35
35
|
allAuthenticators.push(...auth.filter(a => !!a))
|
|
36
36
|
}
|
|
37
37
|
for(const service of this.config.services) {
|
|
38
|
-
//console.log("SERIVCE AUTH", service.name, service.authenticators)
|
|
39
38
|
if(service.authenticators) {
|
|
40
39
|
allAuthenticators.push(...service.authenticators.filter(a => !!a))
|
|
41
40
|
}
|
package/lib/utils/validation.js
CHANGED
|
@@ -91,7 +91,7 @@ async function validate(props, validators, context) {
|
|
|
91
91
|
propErrors[propName] = errors[0]
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
console.log("PROP ERRORS", propErrors)
|
|
94
|
+
//console.log("PROP ERRORS", propErrors)
|
|
95
95
|
if(Object.keys(propErrors).length > 0) throw { properties: propErrors }
|
|
96
96
|
}
|
|
97
97
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/framework",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.86",
|
|
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.86",
|
|
26
|
+
"@live-change/uid": "^0.9.86",
|
|
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": "7b0013ef101d9033402eeec45fd1be60e151aada"
|
|
32
32
|
}
|