(index, arg)
| 64 | return reverse; |
| 65 | } |
| 66 | |
| 67 | function resolveFile(index, arg) { |
| 68 | const want = toPosix(arg); |
| 69 | if (index.files && index.files[want]) return want; |
| 70 | // tolerate a partial/suffix path the agent typed by hand |
| 71 | const matches = Object.keys(index.files || {}).filter((f) => f === want || f.endsWith('/' + want) || f.endsWith(want)); |
| 72 | return matches.length === 1 ? matches[0] : matches.length ? matches : null; |
| 73 | } |
| 74 | |
| 75 | function riskFor(fanIn, role) { |
no test coverage detected