Align plugin monitor_port config

This commit is contained in:
zhi
2026-03-21 19:22:44 +00:00
parent 78a61e0fb2
commit 27b8b74d39
11 changed files with 119 additions and 115 deletions

View File

@@ -8,9 +8,18 @@ function getLivePluginConfig(api, fallback) {
const entry = entries['harbor-forge'] || {};
const cfg = entry.config || {};
if (Object.keys(cfg).length > 0 || Object.keys(entry).length > 0) {
const monitorPort = typeof cfg.monitor_port === 'number'
? cfg.monitor_port
: typeof cfg.monitorPort === 'number'
? cfg.monitorPort
: typeof fallback.monitor_port === 'number'
? fallback.monitor_port
: fallback.monitorPort;
return {
...fallback,
...cfg,
monitor_port: monitorPort,
monitorPort,
enabled: typeof cfg.enabled === 'boolean'
? cfg.enabled
: typeof entry.enabled === 'boolean'