(dir)
| 180 | |
| 181 | /** @type {(dir: string) => Promise<void>} */ |
| 182 | const walk = async (dir) => { |
| 183 | const entries = await fs.readdir(dir); |
| 184 | const matched = entries.filter((f) => f === `${locale}.config` || f.endsWith(`.${locale}.config`)); |
| 185 | results.push(...matched); |
| 186 | |
| 187 | for (const e of entries) { |
| 188 | const p = `${dir}/${e}`; |
| 189 | const stat = await fs.stat(p); |
| 190 | if (stat.isDirectory()) { |
| 191 | walk(p); |
| 192 | } |
| 193 | } |
| 194 | }; |
| 195 | |
| 196 | await walk(LOCALES_ROOT); |
| 197 |