fix: 用 js-yaml 正确解析 config.yaml 获取 dashboard token

替换正则提取方式,使用 js-yaml 解析 YAML 文件,
通过 config.gateway.auth.token 和 config.gateway.port 读取字段。

Made-with: Cursor
This commit is contained in:
stswangzhiping
2026-03-24 17:00:33 +08:00
parent cdb2ddc688
commit 935d5ba176
3 changed files with 25 additions and 5 deletions

View File

@@ -21,6 +21,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"js-yaml": "^4.1.1",
"ssh2": "^1.17.0",
"systeminformation": "^5.25.0",
"ws": "^8.18.0"