@live-change/framework 0.7.37 → 0.7.38

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.
@@ -37,15 +37,23 @@ class CommandQueue {
37
37
  })
38
38
  }
39
39
  })`, { tableName: this.tableName }, this.config.storage ?? {}).catch(e => 'ok')
40
+ this.queuePath = ['database', 'indexRange', this.database, this.indexName, {
41
+ gt: this.serviceName+'_',
42
+ lt: this.serviceName+'_\xFF',
43
+ limit: 128
44
+ }]
40
45
  this.observable = this.connection.observable(
41
- ['database', 'indexRange', this.database, this.indexName, {
42
- gt: this.serviceName+'_',
43
- lt: this.serviceName+'_\xFF',
44
- limit: 128
45
- }],
46
+ this.queuePath,
46
47
  ReactiveDao.ObservableList)
47
48
  this.observable.observe(this)
48
49
 
50
+ /* setInterval(async () => {
51
+ const realCommands = await this.connection.get(this.queuePath)
52
+ const observableCommands = this.observable ? this.observable.getValue() : this.observable
53
+ console.log("COMMAND QUEUE", this.tableName, this.indexName, this.serviceName, "CONTENTS:", observableCommands)
54
+ console.log("REAL COMMANDS", realCommands.length)
55
+ }, 1000)*/
56
+
49
57
  return new Promise((resolve, reject) => {
50
58
  this.resolveStart = { resolve, reject }
51
59
  })
@@ -125,9 +125,7 @@ let validators = {
125
125
  ifEmpty: ({ prop, then }, { getValidator }) => {
126
126
  let validators = then.map(getValidator)
127
127
  const validator = (value, context) => {
128
- console.log("IFEMPTY CTX", context, "FIELD", prop, "VALUE", getField(context, prop))
129
128
  if(!getField(context, prop)) {
130
- console.log("V", validators)
131
129
  for(let v of validators) {
132
130
  const err = v(value, context)
133
131
  if(err) return err
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/framework",
3
- "version": "0.7.37",
3
+ "version": "0.7.38",
4
4
  "description": "Live Change Framework - ultimate solution for real time mobile/web apps",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,7 +27,7 @@
27
27
  "@live-change/db-store-level": "0.6.23",
28
28
  "@live-change/db-store-lmdb": "0.6.23",
29
29
  "@live-change/sockjs": "0.4.1",
30
- "@live-change/uid": "^0.7.37",
30
+ "@live-change/uid": "^0.7.38",
31
31
  "cookie": "^0.4.1",
32
32
  "express": "^4.18.2",
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": "8f1f29cb2368f64e80ad491f8026be96d2d61c8e"
38
+ "gitHead": "9636ce5e683e6eb467e1af75e84a238baaeee6de"
39
39
  }