Align plugin monitor_port config
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user