Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hardillb committed Sep 4, 2024
1 parent 537ed67 commit 0da37e8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ Please ensure the parent directory is writable, or set a different path with -d`
return {
AgentManager,
webServer,
options
options: {
...ConfigLoader.defaults,
...options
}
}
}
return null
Expand Down
18 changes: 10 additions & 8 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ const yaml = require('yaml')
* @property {string} [deviceVersion] - The device version
* @property {string} [deviceDescription] - The device description
*/

const defaults = {
port: 1880,
ui: false,
uiHost: '0.0.0.0',
uiPort: 1879
}

module.exports = {
parseDeviceConfigFile,
parseDeviceConfig,
config
config,
defaults
}

/**
Expand Down Expand Up @@ -137,13 +146,6 @@ function config (options) {

const version = require('../package.json').version

const defaults = {
port: 1880,
ui: false,
'ui-host': '0.0.0.0',
'ui-port': 1879
}

return {
version,
...defaults,
Expand Down

0 comments on commit 0da37e8

Please sign in to comment.