()
| 83 | } |
| 84 | |
| 85 | async function readWorkspaceLocations() { |
| 86 | const chunks = []; |
| 87 | for await (const chunk of process.stdin) { |
| 88 | chunks.push(chunk); |
| 89 | } |
| 90 | return chunks |
| 91 | .join('') |
| 92 | .trim() |
| 93 | .split('\n') |
| 94 | .filter(Boolean) |
| 95 | .map(line => JSON.parse(line)) |
| 96 | .filter(ws => ws.name && ws.location && ws.location !== '.') |
| 97 | .map(ws => ws.location); |
| 98 | } |
| 99 | |
| 100 | async function pool(items, worker, size) { |
| 101 | const results = []; |