From ea9b70bcc605064524d473cdbf71807e4e595273 Mon Sep 17 00:00:00 2001 From: p-sw Date: Sat, 15 Jun 2024 03:43:23 +0900 Subject: [PATCH] fix(cli): replace old getAvailableComponentNames to Object.keys --- packages/cli/src/commands/list.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/commands/list.ts b/packages/cli/src/commands/list.ts index 647baa6..3573cd5 100644 --- a/packages/cli/src/commands/list.ts +++ b/packages/cli/src/commands/list.ts @@ -4,7 +4,7 @@ import treeify from 'treeify' import {loadConfig, validateConfig} from '../helpers/config.js' import {getComponentsInstalled} from '../helpers/path.js' -import {getAvailableComponentNames, getComponentRealname, getComponentURL, getRegistry} from '../helpers/registry.js' +import {getComponentRealname, getComponentURL, getRegistry} from '../helpers/registry.js' export default class List extends Command { static override description = 'Prints all available components in registry and components installed in this project.' @@ -37,9 +37,9 @@ export default class List extends Command { } const {registry} = unsafeRegistry - registrySpinner.succeed(`Fetched ${Object.keys(registry.components).length} components.`) + const names = Object.keys(registry.components) - const names = await getAvailableComponentNames(registry) + registrySpinner.succeed(`Fetched ${names.length} components.`) getInstalledSpinner.start() const installedNames = await getComponentsInstalled(