@abtnode/db-cache 1.16.49 → 1.16.50-beta-20250902-043619-201bcaed

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.
package/dist/index.cjs CHANGED
@@ -4,6 +4,7 @@ const path = require('path');
4
4
  const redis = require('redis');
5
5
  const sqlite3 = require('sqlite3');
6
6
  const fs = require('fs');
7
+ const util = require('util');
7
8
 
8
9
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
9
10
 
@@ -467,7 +468,8 @@ const _SqliteAdapter = class _SqliteAdapter {
467
468
  }
468
469
  async flushAll() {
469
470
  const client = this.getClient();
470
- await client.run("DELETE FROM kvcache");
471
+ const run = util.promisify(client.run.bind(client));
472
+ await run("DELETE FROM kvcache");
471
473
  }
472
474
  };
473
475
  __publicField$3(_SqliteAdapter, "clients", /* @__PURE__ */ new Map());
package/dist/index.mjs CHANGED
@@ -3,6 +3,7 @@ import path__default from 'path';
3
3
  import { createClient } from 'redis';
4
4
  import sqlite3 from 'sqlite3';
5
5
  import * as fs from 'fs';
6
+ import { promisify } from 'util';
6
7
 
7
8
  var __defProp$4 = Object.defineProperty;
8
9
  var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -447,7 +448,8 @@ const _SqliteAdapter = class _SqliteAdapter {
447
448
  }
448
449
  async flushAll() {
449
450
  const client = this.getClient();
450
- await client.run("DELETE FROM kvcache");
451
+ const run = promisify(client.run.bind(client));
452
+ await run("DELETE FROM kvcache");
451
453
  }
452
454
  };
453
455
  __publicField$3(_SqliteAdapter, "clients", /* @__PURE__ */ new Map());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/db-cache",
3
- "version": "1.16.49",
3
+ "version": "1.16.50-beta-20250902-043619-201bcaed",
4
4
  "description": "Db cache use redis or sqlite as backend",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -45,5 +45,5 @@
45
45
  "typescript": "^5.6.3",
46
46
  "unbuild": "^2.0.0"
47
47
  },
48
- "gitHead": "58c3ce97ab6586c52c5cee838a072d49ccb59b4b"
48
+ "gitHead": "303555dda4a22370d579651b10886d05688c5533"
49
49
  }