@live-change/framework 0.8.11 → 0.8.13
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.
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import EventSourcing from '../utils/EventSourcing.js'
|
|
2
2
|
|
|
3
|
+
import Debug from 'debug'
|
|
4
|
+
const debug = Debug("framework:eventListener")
|
|
5
|
+
|
|
3
6
|
async function startEventListener(service, config) {
|
|
4
7
|
if(!config.handleEvents) return
|
|
5
8
|
|
|
@@ -19,7 +22,7 @@ async function startEventListener(service, config) {
|
|
|
19
22
|
return await service.profileLog.profile({ operation: "handleEvent", eventName, id: ev.id,
|
|
20
23
|
bucketId: bucket.id, triggerId: bucket.triggerId, commandId: bucket.commandId },
|
|
21
24
|
() => {
|
|
22
|
-
|
|
25
|
+
debug("EXECUTING EVENT", ev)
|
|
23
26
|
return event.execute(ev, bucket)
|
|
24
27
|
}
|
|
25
28
|
)
|
package/lib/runtime/LiveDao.js
CHANGED
|
@@ -47,7 +47,7 @@ class LiveDao extends LcDao.DaoProxy {
|
|
|
47
47
|
const observable = result.then ? new LcDao.ObservablePromiseProxy(result) : result
|
|
48
48
|
const observer = {
|
|
49
49
|
set: (data) => {
|
|
50
|
-
console.log("NEW CREDENTIALS", data)
|
|
50
|
+
//console.log("NEW CREDENTIALS", data)
|
|
51
51
|
if(data) {
|
|
52
52
|
const { id, ...newCredentials } = data
|
|
53
53
|
state.credentials = newCredentials
|
package/lib/runtime/utils.js
CHANGED
|
@@ -10,11 +10,12 @@ export function getIp(connection) {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function waitForSignal(observable, timeout = 1000, filter = () => true) {
|
|
13
|
+
//console.trace("WAIT FOR SIGNAL")
|
|
13
14
|
let observer
|
|
14
15
|
let done = false
|
|
15
16
|
return new Promise((resolve, reject) => {
|
|
16
17
|
observer = (signal, value) => {
|
|
17
|
-
console.log("SIGNAL", signal, value)
|
|
18
|
+
//console.log("SIGNAL", signal, value)
|
|
18
19
|
if(done) return
|
|
19
20
|
if(signal != 'set') return reject('unknownSignal')
|
|
20
21
|
if(filter(value)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/framework",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.13",
|
|
4
4
|
"description": "Live Change Framework - ultimate solution for real time mobile/web apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/live-change/live-change-
|
|
11
|
+
"url": "git+https://github.com/live-change/live-change-stack.git"
|
|
12
12
|
},
|
|
13
13
|
"author": {
|
|
14
14
|
"email": "m8@em8.pl",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"type": "module",
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"bugs": {
|
|
21
|
-
"url": "https://github.com/live-change/live-change-
|
|
21
|
+
"url": "https://github.com/live-change/live-change-stack/issues"
|
|
22
22
|
},
|
|
23
|
-
"homepage": "https://github.com/live-change/live-change-
|
|
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.13",
|
|
26
|
+
"@live-change/uid": "^0.8.13"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "4453aa639a9fe1a857d93d73ebd28a82c97fdd87"
|
|
29
29
|
}
|