(name, attempts = 20)
| 160 | } |
| 161 | |
| 162 | function waitForRegistry(name, attempts = 20) { |
| 163 | process.stdout.write(` … waiting for ${name} to appear on npm`) |
| 164 | for (let i = 0; i < attempts; i++) { |
| 165 | if (existsOnRegistry(name)) { |
| 166 | process.stdout.write(' ok\n') |
| 167 | return |
| 168 | } |
| 169 | process.stdout.write('.') |
| 170 | sleep(3000) |
| 171 | } |
| 172 | process.stdout.write('\n') |
| 173 | throw new Error(`${name} did not show up on the registry in time`) |
| 174 | } |
| 175 | |
| 176 | function whoami() { |
| 177 | try { |
no test coverage detected