Add arg parameters to allow settings through CLI

This commit is contained in:
Alt 2022-08-28 18:12:09 +02:00 committed by GitHub
parent 5520fa3430
commit 8f47520a63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,8 @@ export let config = convict({
allowDeletingFiles: { allowDeletingFiles: {
doc: 'Allow deleting files in game if they get deleted off disk.', doc: 'Allow deleting files in game if they get deleted off disk.',
format: 'Boolean', format: 'Boolean',
default: false default: false,
arg: 'allowDeletingFiles',
}, },
port: { port: {
doc: 'The port to bind to.', doc: 'The port to bind to.',
@ -25,19 +26,21 @@ export let config = convict({
format: 'String', format: 'String',
default: '.', default: '.',
env: 'BB_SCRIPTFOLDER', env: 'BB_SCRIPTFOLDER',
arg: "folder" arg: 'folder'
}, },
quiet: { quiet: {
doc: 'Log less internal events to stdout.', doc: 'Log less internal events to stdout.',
format: 'Boolean', format: 'Boolean',
env: 'BB_VERBOSE', env: 'BB_VERBOSE',
default: false default: false,
arg: 'quiet'
}, },
dry: { dry: {
doc: 'Only print the files to be synchronised.', doc: 'Only print the files to be synchronised.',
format: 'Boolean', format: 'Boolean',
env: 'BB_DRY', env: 'BB_DRY',
default: false default: false,
arg: 'dry'
}, },
definitionFile: { definitionFile: {
update: { update: {
@ -57,7 +60,8 @@ export let config = convict({
doc: 'Push all files when initial connection is made.', doc: 'Push all files when initial connection is made.',
format: 'Boolean', format: 'Boolean',
env: 'BB_CON_PUSH', env: 'BB_CON_PUSH',
default: false default: false,
arg: 'pushAllOnConnection'
} }
}); });