befly 3.8.10 → 3.8.12

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
@@ -177,7 +177,7 @@ export class Database {
177
177
  connectionTimeout: 30000,
178
178
  idleTimeout: 0,
179
179
  autoReconnect: true,
180
- maxRetries: 0,
180
+ maxRetries: 3,
181
181
  enableOfflineQueue: true,
182
182
  enableAutoPipelining: true
183
183
  });
@@ -128,8 +128,8 @@ async function initApi(apiRoutes: Map<string, ApiRoute>, apiInfo: { file: string
128
128
  // 设置默认值
129
129
  api.method = api.method || 'POST';
130
130
  api.auth = api.auth !== undefined ? api.auth : true;
131
- // 合并默认字段:先设置自定义字段,再用默认字段覆盖(默认字段优先级更高)
132
- api.fields = { ...(api.fields || {}), ...DEFAULT_API_FIELDS };
131
+ // 合并默认字段:默认字段作为基础,API 自定义字段优先级更高
132
+ api.fields = { ...DEFAULT_API_FIELDS, ...(api.fields || {}) };
133
133
  api.required = api.required || [];
134
134
 
135
135
  // 构建路由
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "3.8.10",
3
+ "version": "3.8.12",
4
4
  "description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
5
5
  "type": "module",
6
6
  "private": false,
@@ -65,5 +65,5 @@
65
65
  "es-toolkit": "^1.41.0",
66
66
  "pathe": "^2.0.3"
67
67
  },
68
- "gitHead": "492e46d692787e6d141659fba27c26e030cd1181"
68
+ "gitHead": "f3f4db9f70580b0103c9dab3891c816ed6b03135"
69
69
  }