befly 1.2.4 → 1.2.5

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.
Files changed (2) hide show
  1. package/main.js +2 -2
  2. package/package.json +2 -2
package/main.js CHANGED
@@ -255,8 +255,8 @@ class Befly {
255
255
  if (isType(api.name, 'string') === false || api.name.trim() === '') {
256
256
  throw new Error(`接口 ${apiPath} 的 name 属性必须是非空字符串`);
257
257
  }
258
- if (api.auth !== false && api.auth !== true && Array.isArray(api.auth) === false) {
259
- throw new Error(`接口 ${apiPath} 的 auth 属性必须是布尔值或字符串数组`);
258
+ if (isType(api.auth, 'boolean') === false && isType(api.auth, 'array') === false && isType(api.auth, 'string') === false) {
259
+ throw new Error(`接口 ${apiPath} 的 auth 属性必须是布尔值或字符串或字符串数组`);
260
260
  }
261
261
  if (isType(api.fields, 'object') === false) {
262
262
  throw new Error(`接口 ${apiPath} 的 fields 属性必须是对象`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Buma - 为 Bun 专属打造的 API 接口框架核心引擎",
5
5
  "type": "module",
6
6
  "private": false,
@@ -49,5 +49,5 @@
49
49
  "README.md",
50
50
  "vitest.config.js"
51
51
  ],
52
- "gitHead": "2615f45da0551949dee6f75123c54259b91c05ef"
52
+ "gitHead": "a84c6e80313a7485fee34aee89d1359d7cf6100f"
53
53
  }