feat(cli): make getDirComponentURL return each filenames

This commit is contained in:
p-sw 2024-06-15 03:39:06 +09:00
parent e9c7281c33
commit ecaba351a3

View File

@ -30,8 +30,8 @@ export async function getDirComponentURL(
registry: Registry,
component: RegistryComponent & {type: 'dir'},
files?: string[],
): Promise<string[]> {
): 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])
}