Raw
1 import { crawl } from "../utils"
2
3 /**
4 * Get i18n index files from sources
5 * Looks for src/admin/i18n/index.ts in each source
6 */
7 export async function getI18nIndexFilesFromSources(
8 sources: Set<string>
9 ): Promise<string[]> {
10 return (await Promise.all(
11 Array.from(sources).map(async (source) =>
12 crawl(`${source}/i18n`, "index", { min: 0, max: 0 })
13 )
14 )).flat()
15 }