@live-change/framework 0.6.8 → 0.6.9
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 +12 -2
- package/lib/definition/ServiceDefinition.js +7 -1
- package/package.json +5 -5
package/lib/App.js
CHANGED
|
@@ -102,10 +102,20 @@ class App {
|
|
|
102
102
|
processors = processors.filter(function(item, pos, self) {
|
|
103
103
|
return self.indexOf(item) == pos
|
|
104
104
|
})
|
|
105
|
+
processors = processors.map(p => {
|
|
106
|
+
if(typeof p == 'function') {
|
|
107
|
+
return {
|
|
108
|
+
process: p
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
return p
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
processors.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0))
|
|
105
115
|
//console.log("RUNNING PROCESSORS", processors.length)
|
|
106
116
|
for(let processor of processors) {
|
|
107
|
-
//console.log("PROCESSOR", processor)
|
|
108
|
-
processor(sourceService, this)
|
|
117
|
+
//console.log("PROCESSOR", processor.toString())
|
|
118
|
+
processor.process(sourceService, this)
|
|
109
119
|
}
|
|
110
120
|
}
|
|
111
121
|
|
|
@@ -140,7 +140,13 @@ class ServiceDefinition {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
processor(processor) {
|
|
143
|
-
|
|
143
|
+
if(typeof processor == "function") {
|
|
144
|
+
this.processors.push({
|
|
145
|
+
process: processor
|
|
146
|
+
})
|
|
147
|
+
} else {
|
|
148
|
+
this.processors.push(processor)
|
|
149
|
+
}
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
authenticator(authenticator) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/framework",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "Live Change Framework - ultimate solution for real time mobile/web apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/live-change/live-change-framework",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@live-change/dao": "0.5.
|
|
25
|
-
"@live-change/dao-websocket": "0.5.
|
|
24
|
+
"@live-change/dao": "0.5.1",
|
|
25
|
+
"@live-change/dao-websocket": "0.5.1",
|
|
26
26
|
"@live-change/db": "0.5.13",
|
|
27
27
|
"@live-change/db-store-level": "0.5.13",
|
|
28
28
|
"@live-change/db-store-lmdb": "0.5.13",
|
|
29
29
|
"@live-change/sockjs": "0.4.1",
|
|
30
|
-
"@live-change/uid": "^0.6.
|
|
30
|
+
"@live-change/uid": "^0.6.9",
|
|
31
31
|
"cookie": "^0.4.1",
|
|
32
32
|
"express": "^4.18.1",
|
|
33
33
|
"os-service": "^2.2.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"tape": "^5.3.2",
|
|
36
36
|
"websocket": "^1.0.34"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "d3d3afb0342113502281c3ab0e362a3c76519df5"
|
|
39
39
|
}
|