befly 3.7.5 → 3.7.6

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.
@@ -44,7 +44,7 @@ export const RedisHelper = {
44
44
  const pkey = `${prefix}${key}`;
45
45
 
46
46
  if (ttl) {
47
- return await client.setEx(pkey, ttl, data);
47
+ return await client.setex(pkey, ttl, data);
48
48
  }
49
49
  return await client.set(pkey, data);
50
50
  } catch (error: any) {
@@ -126,7 +126,7 @@ export const RedisHelper = {
126
126
  const key = `${prefix}time_id_counter:${timestamp}`;
127
127
 
128
128
  // 使用 INCRBY 一次性获取 N 个连续计数
129
- const startCounter = await client.incrBy(key, count);
129
+ const startCounter = await client.incrby(key, count);
130
130
  await client.expire(key, 1);
131
131
 
132
132
  // 生成 ID 数组
@@ -151,7 +151,7 @@ export const RedisHelper = {
151
151
  const client = getClient();
152
152
  const pkey = `${prefix}${key}`;
153
153
  if (ttl) {
154
- return await client.setEx(pkey, ttl, value);
154
+ return await client.setex(pkey, ttl, value);
155
155
  }
156
156
  return await client.set(pkey, value);
157
157
  } catch (error: any) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "3.7.5",
3
+ "version": "3.7.6",
4
4
  "description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
5
5
  "type": "module",
6
6
  "private": false,
@@ -69,5 +69,5 @@
69
69
  "es-toolkit": "^1.41.0",
70
70
  "pathe": "^2.0.3"
71
71
  },
72
- "gitHead": "389f7e3620a48a4fc7730519c05ab5b85b2c4179"
72
+ "gitHead": "4eea00fa16a2fe89457480d0460ea75a9b572255"
73
73
  }