befly 3.75.1 → 3.75.3
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/items.js +2 -0
- package/package.json +1 -1
package/checks/items.js
CHANGED
|
@@ -19,6 +19,8 @@ function checkItem(item) {
|
|
|
19
19
|
}
|
|
20
20
|
if (!isFunction(item.handler)) issues.push({ path: ["handler"], message: "必须是函数" });
|
|
21
21
|
if (!isFiniteNumber(item.order)) issues.push({ path: ["order"], message: "必须是有限数字" });
|
|
22
|
+
// 非核心(app)插件/钩子的 order 必须大于 1000,避免与核心区间(10~90)撞号
|
|
23
|
+
if (item.source === "app" && isFiniteNumber(item.order) && item.order <= 1000) issues.push({ path: ["order"], message: "非核心插件/钩子 order 必须大于 1000" });
|
|
22
24
|
return issues;
|
|
23
25
|
}
|
|
24
26
|
|