(options: { targets: string[]; start: string; stop?: string })
| 27 | } |
| 28 | |
| 29 | export async function* up(options: { targets: string[]; start: string; stop?: string }) { |
| 30 | const { targets, start, stop } = options |
| 31 | let current = start |
| 32 | while (true) { |
| 33 | for (const target of targets) { |
| 34 | const search = join(current, target) |
| 35 | if (await exists(search)) yield search |
| 36 | } |
| 37 | if (stop === current) break |
| 38 | const parent = dirname(current) |
| 39 | if (parent === current) break |
| 40 | current = parent |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | export async function globUp(pattern: string, start: string, stop?: string) { |
| 45 | let current = start |
nothing calls this directly
no outgoing calls
no test coverage detected