* @returns {Promise }
()
| 156 | * @returns {Promise<string[]>} |
| 157 | */ |
| 158 | async function getSupportedLocales() { |
| 159 | const fileList = await fs.readdir(LOCALES_ROOT); |
| 160 | |
| 161 | /** @type {string[]} */ |
| 162 | const locales = []; |
| 163 | |
| 164 | for (const file of fileList) { |
| 165 | if (file.endsWith('.config')) { |
| 166 | const locale = file.substring(0, file.lastIndexOf('.config')); |
| 167 | locales.push(locale); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | return locales; |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * @returns {Promise<string[]>} |
no outgoing calls
no test coverage detected
searching dependent graphs…