@live-change/db-client 0.8.136 → 0.8.138

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.
Files changed (2) hide show
  1. package/lib/dump.js +2 -1
  2. package/package.json +4 -4
package/lib/dump.js CHANGED
@@ -105,12 +105,13 @@ async function dump(
105
105
  }
106
106
 
107
107
  async function stream(path, output) {
108
- const bucket = 256
108
+ const bucket = options.bucket ?? 256
109
109
  let found = 0
110
110
  let position = ''
111
111
  do {
112
112
  const results = await dao.get(path(position, bucket))
113
113
  await Promise.all(results.map(output))
114
+ if(options.delay) await new Promise(resolve => setTimeout(resolve, options.delay))
114
115
  found = results.length
115
116
  if(results.length) position = results[results.length - 1].id
116
117
  } while(found === bucket)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/db-client",
3
- "version": "0.8.136",
3
+ "version": "0.8.138",
4
4
  "description": "Database with observable data for live queries",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "type": "module",
30
30
  "dependencies": {
31
- "@live-change/dao": "^0.8.136",
32
- "@live-change/dao-websocket": "^0.8.136",
31
+ "@live-change/dao": "^0.8.138",
32
+ "@live-change/dao-websocket": "^0.8.138",
33
33
  "line-reader": "^0.4.0",
34
34
  "websocket": "^1.0.34",
35
35
  "yargs": "^17.7.2"
36
36
  },
37
- "gitHead": "a641c8fbe90fa2383c623eaae18563765d1db28a"
37
+ "gitHead": "1f054bf57145194109ac510b06faa08af6733e6e"
38
38
  }