(args: unknown)
| 18 | ]); |
| 19 | |
| 20 | export function extractFilePathsFromArgs(args: unknown): string[] { |
| 21 | if (!args || typeof args !== 'object') return []; |
| 22 | const out: string[] = []; |
| 23 | for (const [k, v] of Object.entries(args as Record<string, unknown>)) { |
| 24 | if (!FILE_PATH_ARG_KEYS.has(k)) continue; |
| 25 | if (typeof v === 'string') out.push(v); |
| 26 | else if (Array.isArray(v)) { |
| 27 | for (const item of v) if (typeof item === 'string') out.push(item); |
| 28 | } |
| 29 | } |
| 30 | return out; |
| 31 | } |
| 32 | |
| 33 | export class HooksManager { |
| 34 | constructor(private cfg: HooksConfig = {}) {} |
no test coverage detected