(url: string)
| 19 | const LOGIN_TIMEOUT_MS = 2 * 60 * 1000; |
| 20 | |
| 21 | function openBrowser(url: string): void { |
| 22 | if (process.platform === "win32") { |
| 23 | const child = execFile("cmd", ["/c", "start", "", url], (err) => { |
| 24 | if (err) { |
| 25 | process.stderr.write(`Could not open browser. Visit manually: ${url}\n`); |
| 26 | } |
| 27 | }); |
| 28 | child.unref(); |
| 29 | return; |
| 30 | } |
| 31 | |
| 32 | const cmd = process.platform === "darwin" ? "open" : "xdg-open"; |
| 33 | const child = execFile(cmd, [url], (err) => { |
| 34 | if (err) { |
| 35 | process.stderr.write(`Could not open browser. Visit manually: ${url}\n`); |
| 36 | } |
| 37 | }); |
| 38 | child.unref(); |
| 39 | } |
| 40 | |
| 41 | function renderCallbackPage(title: string, message: string): string { |
| 42 | return `<!doctype html> |
no outgoing calls
no test coverage detected