Added display values for all general.json settings
This commit is contained in:
@@ -409,6 +409,8 @@ export interface ODCheckerStructureOptions {
|
||||
cliDisplayName?:string
|
||||
/**The description of this config in the Interactive Setup CLI. */
|
||||
cliDisplayDescription?:string
|
||||
/**Hide the description of this config in the Interactive Setup CLI parent view/list. */
|
||||
cliHideDescriptionInParent?:boolean
|
||||
/**The default value of this variable when creating it in the Interactive Setup CLI. When not specified, the user will be asked to insert a value. */
|
||||
cliInitDefaultValue?:ODValidJsonType
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ async function renderConfigObjectStructureSelector(checker:api.ODChecker,backFn:
|
||||
const list = structure.options.children.filter((child) => !child.cliHideInEditMode)
|
||||
const nameList = list.map((child) => (child.checker.options.cliDisplayName ? child.checker.options.cliDisplayName : child.key))
|
||||
const nameLength = utilities.getLongestLength(nameList)
|
||||
const finalnameList = nameList.map((name,index) => name.padEnd(nameLength+5," ")+ansis.gray(list[index].checker.options.cliDisplayDescription ? "=> "+list[index].checker.options.cliDisplayDescription : ""))
|
||||
const finalnameList = nameList.map((name,index) => name.padEnd(nameLength+5," ")+ansis.gray((!list[index].checker.options.cliHideDescriptionInParent && list[index].checker.options.cliDisplayDescription) ? "=> "+list[index].checker.options.cliDisplayDescription : ""))
|
||||
|
||||
|
||||
const answer = await terminal.singleColumnMenu(finalnameList,{
|
||||
|
||||
Reference in New Issue
Block a user