Finished display names + descriptions (Part 4)
This commit is contained in:
@@ -529,7 +529,9 @@ export interface ODCheckerStringStructureOptions extends ODCheckerStructureOptio
|
||||
/**The string needs to match this regex */
|
||||
regex?:RegExp,
|
||||
/**Provide an optional list for autocomplete when using the Interactive Setup CLI. Defaults to the `choices` option. */
|
||||
cliAutocompleteList?:string[]
|
||||
cliAutocompleteList?:string[],
|
||||
/**Dynamically provide a list for autocomplete items when using the Interactive Setup CLI. */
|
||||
cliAutocompleteFunc?:() => Promise<string[]|null>
|
||||
}
|
||||
|
||||
/**## ODCheckerStringStructure `class`
|
||||
|
||||
@@ -388,7 +388,8 @@ async function renderConfigStringStructureEditor(checker:api.ODChecker,backFn:((
|
||||
terminal.gray("Description: "+ansis.bold(structure.options.cliDisplayDescription ?? "/")+"\n")
|
||||
|
||||
const customExtraOptions = (structure instanceof api.ODCheckerCustomStructure_DiscordId) ? structure.extraOptions : undefined
|
||||
const autocompleteList = (structure.options.cliAutocompleteList ?? customExtraOptions) ?? structure.options.choices
|
||||
const customAutocompleteFunc = structure.options.cliAutocompleteFunc ? await structure.options.cliAutocompleteFunc() : null
|
||||
const autocompleteList = ((customAutocompleteFunc ?? structure.options.cliAutocompleteList) ?? customExtraOptions) ?? structure.options.choices
|
||||
const autoCompleteMenuOpts: Terminal.SingleLineMenuOptions = {
|
||||
style:terminal.white,
|
||||
selectedStyle:terminal.bgBlue.white
|
||||
@@ -810,7 +811,8 @@ async function renderAdditionConfigStringStructure(checker:api.ODChecker,backFn:
|
||||
terminal.gray("Description: "+ansis.bold(structure.options.cliDisplayDescription ?? "/")+"\n")
|
||||
|
||||
const customExtraOptions = (structure instanceof api.ODCheckerCustomStructure_DiscordId) ? structure.extraOptions : undefined
|
||||
const autocompleteList = (structure.options.cliAutocompleteList ?? customExtraOptions) ?? structure.options.choices
|
||||
const customAutocompleteFunc = structure.options.cliAutocompleteFunc ? await structure.options.cliAutocompleteFunc() : null
|
||||
const autocompleteList = ((customAutocompleteFunc ?? structure.options.cliAutocompleteList) ?? customExtraOptions) ?? structure.options.choices
|
||||
const autoCompleteMenuOpts: Terminal.SingleLineMenuOptions = {
|
||||
style:terminal.white,
|
||||
selectedStyle:terminal.bgBlue.white
|
||||
|
||||
Reference in New Issue
Block a user