perf: 支持部署到飞牛OS

This commit is contained in:
xiaojunnuo
2025-06-03 23:52:43 +08:00
parent 37edbf5824
commit ddfd0fb81d
6 changed files with 236 additions and 46 deletions

View File

@@ -56,8 +56,15 @@ export function buildLogger(write: (text: string) => void) {
if (item == null) {
continue;
}
//换成同长度的*号, item可能有多行
text = text.replaceAll(item, "*".repeat(item.length));
if (item.includes(text)) {
//整个包含
text = "*".repeat(text.length);
continue;
}
if (text.includes(item)) {
//换成同长度的*号, item可能有多行
text = text.replaceAll(item, "*".repeat(item.length));
}
}
write(text);
},