(ext: string)
| 74 | } |
| 75 | |
| 76 | async function getFormatter(ext: string) { |
| 77 | const formatters = await state().then((x) => x.formatters) |
| 78 | const result = [] |
| 79 | for (const item of Object.values(formatters)) { |
| 80 | log.info("checking", { name: item.name, ext }) |
| 81 | if (!item.extensions.includes(ext)) continue |
| 82 | if (!(await isEnabled(item))) continue |
| 83 | log.info("enabled", { name: item.name, ext }) |
| 84 | result.push(item) |
| 85 | } |
| 86 | return result |
| 87 | } |
| 88 | |
| 89 | export async function status() { |
| 90 | const s = await state() |