From ecaba351a31b7a94f0da67d19b253457e8419f83 Mon Sep 17 00:00:00 2001 From: p-sw Date: Sat, 15 Jun 2024 03:39:06 +0900 Subject: [PATCH] feat(cli): make getDirComponentURL return each filenames --- 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 abdb475..5ce8545 100644 --- a/packages/cli/src/helpers/registry.ts +++ b/packages/cli/src/helpers/registry.ts @@ -30,8 +30,8 @@ export async function getDirComponentURL( registry: Registry, component: RegistryComponent & {type: 'dir'}, files?: string[], -): Promise { +): Promise<[string, string][]> { const base = registry.base + registry.paths.components.replace('{componentName}', component.name) - return (files ?? component.files).map((filename) => base + '/' + filename) + return (files ?? component.files).map((filename) => [filename, base + '/' + filename]) }