befly 3.9.9 → 3.9.10
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/checks/checkApi.ts +3 -2
- package/package.json +2 -2
package/checks/checkApi.ts
CHANGED
|
@@ -67,8 +67,9 @@ export async function checkApi(): Promise<void> {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// 验证可选属性的类型(如果提供了)
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
const validMethods = ['GET', 'POST', 'GET,POST', 'POST,GET'];
|
|
71
|
+
if (api.method && !validMethods.includes(api.method.toUpperCase())) {
|
|
72
|
+
Logger.warn(`[${item.displayName}] 接口 ${apiPath} 的 method 属性必须是有效的 HTTP 方法 (GET, POST, GET,POST, POST,GET)`);
|
|
72
73
|
}
|
|
73
74
|
if (api.auth !== undefined && typeof api.auth !== 'boolean') {
|
|
74
75
|
Logger.warn(`[${item.displayName}] 接口 ${apiPath} 的 auth 属性必须是布尔值 (true=需登录, false=公开)`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.10",
|
|
4
4
|
"description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"pino": "^10.1.0",
|
|
75
75
|
"pino-roll": "^4.0.0"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "c521a468291c1555672e972db43021dda1763402",
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"typescript": "^5.9.3"
|
|
80
80
|
}
|