Add method for specifying the branding type

This commit is contained in:
trickypr 2022-06-22 14:03:12 +10:00
parent f5bf98d03a
commit 3d3eb547f7
7 changed files with 75 additions and 9 deletions

21
src/commands/set.ts Normal file
View file

@ -0,0 +1,21 @@
import { log } from '../log'
import { dynamicConfig } from '../utils'
export const set = (key: string, value?: string) => {
if (key in dynamicConfig.defaultValues) {
log.warning(`The key ${key} is not found within the dynamic config options`)
return
}
if (value) {
dynamicConfig.set(key as dynamicConfig.DefaultValuesKeys, value)
log.info(`Set ${key} to ${value}`)
return
}
log.info(
`The key '${key}' has ${dynamicConfig.get(
key as dynamicConfig.DefaultValuesKeys
)}`
)
}