befly 3.8.11 → 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/loader/loadApis.ts +2 -2
- package/package.json +2 -2
package/loader/loadApis.ts
CHANGED
|
@@ -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 || {})
|
|
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.
|
|
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": "
|
|
68
|
+
"gitHead": "f3f4db9f70580b0103c9dab3891c816ed6b03135"
|
|
69
69
|
}
|