From 090fada7cd6333fa8bbc7052434c732f5f80ae3a Mon Sep 17 00:00:00 2001 From: p-sw Date: Tue, 11 Jun 2024 13:25:23 +0900 Subject: [PATCH] refactor(cli): update references to component name Update the functions `getComponentURL` and `getComponentRealname` in the CLI helper `registry.ts` to access the component name through the 'name' property of each component object in the registry, instead of directly accessing the component name. --- packages/cli/src/helpers/registry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/helpers/registry.ts b/packages/cli/src/helpers/registry.ts index 9c015dc..dcecebd 100644 --- a/packages/cli/src/helpers/registry.ts +++ b/packages/cli/src/helpers/registry.ts @@ -21,12 +21,12 @@ export async function getAvailableComponentNames(registry: Registry): Promise { - return registry.base + registry.paths.components.replace('{componentName}', registry.components[componentName]) + return registry.base + registry.paths.components.replace('{componentName}', registry.components[componentName].name) } export async function getComponentRealname( registry: Registry, componentName: keyof Registry['components'], ): Promise { - return registry.components[componentName] + return registry.components[componentName].name }