befly 3.5.6 → 3.5.7

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/lib/database.ts CHANGED
@@ -62,7 +62,7 @@ export class Database {
62
62
  }
63
63
 
64
64
  try {
65
- const timeout = options.connectionTimeout ?? 5000;
65
+ const timeout = options.connectionTimeout ?? 30000;
66
66
 
67
67
  const healthCheckPromise = (async () => {
68
68
  let version = '';
@@ -174,7 +174,7 @@ export class Database {
174
174
  const url = `redis://${auth}${REDIS_HOST}:${REDIS_PORT}/${REDIS_DB}`;
175
175
 
176
176
  const redis = new RedisClient(url, {
177
- connectionTimeout: 10000,
177
+ connectionTimeout: 30000,
178
178
  idleTimeout: 0,
179
179
  autoReconnect: true,
180
180
  maxRetries: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "3.5.6",
3
+ "version": "3.5.7",
4
4
  "description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
5
5
  "type": "module",
6
6
  "private": false,
@@ -80,5 +80,5 @@
80
80
  "es-toolkit": "^1.41.0",
81
81
  "pathe": "^2.0.3"
82
82
  },
83
- "gitHead": "7ef2b7ddf3c66a79d3d0af5e6f9653d7d7d02fdb"
83
+ "gitHead": "00363a4b337d54d88822e284dcd555b3f678a630"
84
84
  }
package/plugins/db.ts CHANGED
@@ -24,7 +24,7 @@ const dbPlugin: Plugin = {
24
24
  if (Env.DB_ENABLE === 1) {
25
25
  // 创建 Bun SQL 客户端(内置连接池),并确保连接验证成功后再继续
26
26
  // 从环境变量读取连接超时配置
27
- const connectionTimeout = Env.DB_CONNECTION_TIMEOUT ? parseInt(Env.DB_CONNECTION_TIMEOUT) : 5000;
27
+ const connectionTimeout = Env.DB_CONNECTION_TIMEOUT ? parseInt(Env.DB_CONNECTION_TIMEOUT) : 30000;
28
28
 
29
29
  sql = await Database.connectSql({
30
30
  connectionTimeout
@@ -168,7 +168,7 @@ export interface SqlClientOptions {
168
168
  max?: number;
169
169
  /** 是否使用 BigInt */
170
170
  bigint?: boolean;
171
- /** 连接超时时间(毫秒),默认 5000ms */
171
+ /** 连接超时时间(毫秒),默认 30000ms */
172
172
  connectionTimeout?: number;
173
173
  /** 其他自定义选项 */
174
174
  [key: string]: any;