perf(panel): optimize P1 hot paths and consolidate P2 shared primitives

This commit is contained in:
fish
2026-11-23 16:21:39 +09:00
parent 3a40bacc9d
commit 424ac73489
48 changed files with 4040 additions and 2745 deletions
+10
View File
@@ -13,6 +13,16 @@ function resolveHttpHelperPanelDir() {
return /[\\/]backend$/i.test(modDir) ? dirname(modDir) : modDir;
}
/**
* 判断输入值是否为非数组普通对象(Plain Object)。
*
* @param {unknown} v
* @returns {boolean}
*/
export function isPlainObject(v) {
return Boolean(v) && typeof v === 'object' && !Array.isArray(v);
}
/**
* 异步读取 `sidecars/panel` 目录下的静态资源文件(兼容单元测试同步沙箱)。
*