(targets)
| 1977 | } |
| 1978 | |
| 1979 | const normalizePinokioInjectTargetRegistrations = (targets) => { |
| 1980 | const values = Array.isArray(targets) ? targets : [] |
| 1981 | const normalized = [] |
| 1982 | for (const target of values) { |
| 1983 | if (!target || typeof target !== 'object' || Array.isArray(target)) { |
| 1984 | continue |
| 1985 | } |
| 1986 | const name = typeof target.name === 'string' ? target.name.trim() : '' |
| 1987 | const src = normalizeInspectorUrl(typeof target.src === 'string' ? target.src.trim() : '') |
| 1988 | if (!name && !src) { |
| 1989 | continue |
| 1990 | } |
| 1991 | normalized.push({ |
| 1992 | name, |
| 1993 | src, |
| 1994 | inject: Array.isArray(target.inject) |
| 1995 | ? target.inject.map((entry) => normalizePinokioInjectDescriptor(entry)).filter(Boolean) |
| 1996 | : [] |
| 1997 | }) |
| 1998 | } |
| 1999 | return normalized |
| 2000 | } |
| 2001 | |
| 2002 | const findFramePath = (frame, target, trail = []) => { |
| 2003 | if (!frame || !target) { |
no test coverage detected