mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-23 22:51:02 +00:00
feat: add standalone dashboard for bot monitoring and control
- Introduced a new dashboard feature with endpoints for bot status, account management, logs, and configuration. - Added support for starting the dashboard server via command line and configuration options. - Implemented WebSocket support for real-time log streaming to the dashboard. - Enhanced configuration management to include dashboard settings. - Updated package.json to include new dependencies and scripts for dashboard functionality. - Added tests for dashboard state management and functionality.
This commit is contained in:
@@ -187,6 +187,13 @@ function normalizeConfig(raw: unknown): Config {
|
||||
skipCompletedAccounts: jobStateRaw.skipCompletedAccounts !== false
|
||||
}
|
||||
|
||||
const dashboardRaw = (n.dashboard ?? {}) as Record<string, unknown>
|
||||
const dashboard = {
|
||||
enabled: dashboardRaw.enabled === true,
|
||||
port: typeof dashboardRaw.port === 'number' ? dashboardRaw.port : 3000,
|
||||
host: typeof dashboardRaw.host === 'string' ? dashboardRaw.host : '127.0.0.1'
|
||||
}
|
||||
|
||||
const cfg: Config = {
|
||||
baseURL: n.baseURL ?? 'https://rewards.bing.com',
|
||||
sessionPath: n.sessionPath ?? 'sessions',
|
||||
@@ -216,7 +223,8 @@ function normalizeConfig(raw: unknown): Config {
|
||||
crashRecovery: n.crashRecovery || {},
|
||||
riskManagement,
|
||||
dryRun,
|
||||
queryDiversity
|
||||
queryDiversity,
|
||||
dashboard
|
||||
}
|
||||
|
||||
return cfg
|
||||
|
||||
Reference in New Issue
Block a user