@live-change/framework
Advanced tools
Comparing version 0.6.8 to 0.6.9
@@ -105,6 +105,16 @@ const { uidGenerator, randomString } = require('@live-change/uid') | ||
}) | ||
processors = processors.map(p => { | ||
if(typeof p == 'function') { | ||
return { | ||
process: p | ||
} | ||
} else { | ||
return p | ||
} | ||
}) | ||
processors.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0)) | ||
//console.log("RUNNING PROCESSORS", processors.length) | ||
for(let processor of processors) { | ||
//console.log("PROCESSOR", processor) | ||
processor(sourceService, this) | ||
//console.log("PROCESSOR", processor.toString()) | ||
processor.process(sourceService, this) | ||
} | ||
@@ -111,0 +121,0 @@ } |
@@ -143,3 +143,9 @@ const ModelDefinition = require("./ModelDefinition.js") | ||
processor(processor) { | ||
this.processors.push(processor) | ||
if(typeof processor == "function") { | ||
this.processors.push({ | ||
process: processor | ||
}) | ||
} else { | ||
this.processors.push(processor) | ||
} | ||
} | ||
@@ -146,0 +152,0 @@ |
{ | ||
"name": "@live-change/framework", | ||
"version": "0.6.8", | ||
"version": "0.6.9", | ||
"description": "Live Change Framework - ultimate solution for real time mobile/web apps", | ||
@@ -24,4 +24,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@live-change/dao": "0.5.0", | ||
"@live-change/dao-websocket": "0.5.0", | ||
"@live-change/dao": "0.5.1", | ||
"@live-change/dao-websocket": "0.5.1", | ||
"@live-change/db": "0.5.13", | ||
@@ -31,3 +31,3 @@ "@live-change/db-store-level": "0.5.13", | ||
"@live-change/sockjs": "0.4.1", | ||
"@live-change/uid": "^0.6.8", | ||
"@live-change/uid": "^0.6.9", | ||
"cookie": "^0.4.1", | ||
@@ -40,3 +40,3 @@ "express": "^4.18.1", | ||
}, | ||
"gitHead": "74c4b8b2066b33bbdc37f76dd20d9ca4eb939239" | ||
"gitHead": "d3d3afb0342113502281c3ab0e362a3c76519df5" | ||
} |
165816
4516