in javascript/urlinfo.js [70:94]
function getCredentials(email) {
var awsCredentials = {}
return new Promise(function(resolve, reject) {
try {
var contents = fs.readFileSync(credentialsFile, 'utf-8');
awsCredentials = JSON.parse(contents);
} catch (err) {
awsCredentials = {'expireTime': new Date()};
}
var curTime = Date.now()
if (new Date(awsCredentials.expireTime).getTime() > curTime)
resolve(awsCredentials);
else {
const main = async () => {
console.log('Password: ')
const password = await hiddenQuestion('');
login(email, password)
.then( (credentials)=> resolve( credentials ))
.catch( (e)=> reject(e))
}
main();
}
})
}