@live-change/framework 0.8.12 → 0.8.14

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
- console.log("EXECUTING EVENT", ev)
25
+ debug("EXECUTING EVENT", ev)
23
26
  return event.execute(ev, bucket)
24
27
  }
25
28
  )
@@ -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
@@ -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.12",
3
+ "version": "0.8.14",
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-framework.git"
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-framework/issues"
21
+ "url": "https://github.com/live-change/live-change-stack/issues"
22
22
  },
23
- "homepage": "https://github.com/live-change/live-change-framework",
23
+ "homepage": "https://github.com/live-change/live-change-stack",
24
24
  "devDependencies": {
25
- "@live-change/dao": "^0.8.12",
26
- "@live-change/uid": "^0.8.12"
25
+ "@live-change/dao": "^0.8.14",
26
+ "@live-change/uid": "^0.8.14"
27
27
  },
28
- "gitHead": "5c93162184742550bf6a5e7b37a5537c69f8a3c4"
28
+ "gitHead": "d81b573fb8891746ae1c67f4f68558123c9f85f7"
29
29
  }