refactor(cli): update validateConfig parameter in add and list commands
Replaced direct log reference in validateConfig function calls with an anonymous function that logs a message. This change has been made in the add and list commands of the CLI package to ensure proper logging.
This commit is contained in:
parent
a751336b84
commit
263bbcbaa4
@ -31,7 +31,7 @@ export default class Add extends Command {
|
|||||||
this.error('No component name provided. Please provide name of component you want to be installed.')
|
this.error('No component name provided. Please provide name of component you want to be installed.')
|
||||||
}
|
}
|
||||||
|
|
||||||
const resolvedConfig = await validateConfig(this.log, await loadConfig(flags.config))
|
const resolvedConfig = await validateConfig((message: string) => this.log(message), await loadConfig(flags.config))
|
||||||
const componentFolder = join(process.cwd(), resolvedConfig.paths.components)
|
const componentFolder = join(process.cwd(), resolvedConfig.paths.components)
|
||||||
const sharedFile = join(process.cwd(), resolvedConfig.paths.shared)
|
const sharedFile = join(process.cwd(), resolvedConfig.paths.shared)
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ export default class List extends Command {
|
|||||||
const registrySpinner = ora('Fetching registry...')
|
const registrySpinner = ora('Fetching registry...')
|
||||||
const getInstalledSpinner = ora('Getting installed components...')
|
const getInstalledSpinner = ora('Getting installed components...')
|
||||||
|
|
||||||
const loadedConfig = await validateConfig(this.log, await loadConfig(flags.config))
|
const loadedConfig = await validateConfig((message: string) => this.log(message), await loadConfig(flags.config))
|
||||||
|
|
||||||
registrySpinner.start()
|
registrySpinner.start()
|
||||||
const unsafeRegistry = await getRegistry()
|
const unsafeRegistry = await getRegistry()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user