(code: string)
| 161 | } |
| 162 | |
| 163 | const importSpecifiers = (code: string) => { |
| 164 | const re = |
| 165 | /(?:import|export)\s+(?:[^'"]*from\s*)?["']([^"']+)["']|import\(\s*["']([^"']+)["']\s*\)/g |
| 166 | const set = new Set<string>() |
| 167 | let m |
| 168 | while ((m = re.exec(code))) set.add((m[1] || m[2]).trim()) |
| 169 | return [...set] |
| 170 | } |
| 171 | |
| 172 | const resolveLocalPath = async (fromFile: string, spec: string) => { |
| 173 | const base = path.dirname(fromFile) |
no outgoing calls
no test coverage detected