(port)
| 177 | } |
| 178 | |
| 179 | async function targetSnapshot(port) { |
| 180 | const r = await httpGet(`http://127.0.0.1:${port}/__computerd/stubs`); |
| 181 | if (r.statusCode !== 200) { |
| 182 | throw new Error(`/__computerd/stubs returned ${r.statusCode}: ${r.body.slice(0, 200)}`); |
| 183 | } |
| 184 | return JSON.parse(r.body); |
| 185 | } |
| 186 | |
| 187 | // ─────────────────────────────────────────────────────────────────── |
| 188 | // Main |