(raw: string, onInvalid: (f: string) => never)
| 26 | type Action = (typeof ACTIONS)[number]; |
| 27 | |
| 28 | function buildFormats(raw: string, onInvalid: (f: string) => never): FormatConfig[] { |
| 29 | return raw |
| 30 | .split(",") |
| 31 | .map((f) => f.trim()) |
| 32 | .filter(Boolean) |
| 33 | .map((f) => { |
| 34 | if (!BASE_FORMATS.includes(f as BaseFormat)) onInvalid(f); |
| 35 | return buildBaseFormat(f as BaseFormat); |
| 36 | }); |
| 37 | } |
| 38 | |
| 39 | export default defineCommand({ |
| 40 | meta: { |
no test coverage detected