|
|
@ -3,15 +3,13 @@ import fetch from 'node-fetch'; |
|
|
|
import * as cfg from './cfg'; |
|
|
|
import { stringify as stringifyQuery } from 'querystring'; |
|
|
|
|
|
|
|
const stdin = process.openStdin(); |
|
|
|
|
|
|
|
function readEmail () { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
process.stdout.write('> Enter your email address: '); |
|
|
|
stdin.on('data', (d) => { |
|
|
|
stdin.destroy(); |
|
|
|
process.stdin.on('data', (d) => { |
|
|
|
process.stdin.pause(); |
|
|
|
resolve(d.toString().trim()); |
|
|
|
}); |
|
|
|
}).resume(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|