befly 3.19.7 → 3.19.8

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/redisHelper.js +11 -7
  2. package/package.json +2 -2
@@ -501,15 +501,19 @@ export class RedisHelper {
501
501
  async info(section) {
502
502
  try {
503
503
  const client = this.client;
504
- if (typeof client.info !== "function") {
505
- throw new Error("Redis info 不支持", {
506
- cause: null,
507
- code: "runtime"
508
- });
504
+
505
+ if (typeof client.info === "function") {
506
+ return await client.info(section);
509
507
  }
510
508
 
511
- const res = await client.info(section);
512
- return res;
509
+ if (typeof client.send === "function") {
510
+ return await client.send("INFO", section ? [String(section)] : []);
511
+ }
512
+
513
+ throw new Error("Redis info 不支持", {
514
+ cause: null,
515
+ code: "runtime"
516
+ });
513
517
  } catch (error) {
514
518
  Logger.error("Redis info 错误", error);
515
519
  return "";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "3.19.7",
4
- "gitHead": "c47d1e515dabe142531e0a8415979cccb2729259",
3
+ "version": "3.19.8",
4
+ "gitHead": "c0876969a14b2d6e66fd5105269e326581c0dde3",
5
5
  "private": false,
6
6
  "description": "Befly - 为 Bun 专属打造的 JavaScript API 接口框架核心引擎",
7
7
  "keywords": [