@live-change/db-web 0.9.98 → 0.9.100

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/dbDao.js +2 -2
  2. package/package.json +7 -7
package/lib/dbDao.js CHANGED
@@ -226,13 +226,13 @@ function localRequests(server, scriptContext) {
226
226
  if(!log) throw new Error("logNotFound")
227
227
  return log.putOld(object)
228
228
  },
229
- clearLog: (dbName, logName, before) => {
229
+ clearLog: (dbName, logName, before, maxCount) => {
230
230
  if(dbName === 'system') throw new Error("system database is not writable")
231
231
  const db = server.databases.get(dbName)
232
232
  if(!db) throw new Error('databaseNotFound')
233
233
  const log = db.log(logName)
234
234
  if(!log) throw new Error("logNotFound")
235
- return log.clear(before)
235
+ return log.clear(before, maxCount || Infinity)
236
236
  },
237
237
  query: (dbName, code, params) => {
238
238
  if(dbName === 'system') throw new Error("system database is not writable")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/db-web",
3
- "version": "0.9.98",
3
+ "version": "0.9.100",
4
4
  "author": {
5
5
  "email": "michal@laszczewski.com",
6
6
  "name": "Michał Łaszczewski",
@@ -29,12 +29,12 @@
29
29
  },
30
30
  "type": "module",
31
31
  "dependencies": {
32
- "@live-change/dao": "^0.9.98",
33
- "@live-change/db": "^0.9.98",
34
- "@live-change/db-store-indexeddb": "^0.9.98",
35
- "@live-change/db-store-localstorage": "^0.9.98",
36
- "@live-change/db-store-rbtree": "^0.9.98",
32
+ "@live-change/dao": "^0.9.100",
33
+ "@live-change/db": "^0.9.100",
34
+ "@live-change/db-store-indexeddb": "^0.9.100",
35
+ "@live-change/db-store-localstorage": "^0.9.100",
36
+ "@live-change/db-store-rbtree": "^0.9.100",
37
37
  "debug": "^4.3.4"
38
38
  },
39
- "gitHead": "a0e25c0ac835707d27763e56a2c20bd75d978583"
39
+ "gitHead": "4e7ef4d160d217e1d82b8dc5fdf542a65f8a1834"
40
40
  }