()
| 39 | const defaultUserAgent = USER_AGENT; |
| 40 | |
| 41 | function readTokenCache() { |
| 42 | try { |
| 43 | if (!fs.existsSync(TOKEN_CACHE_FILE)) return {}; |
| 44 | return JSON.parse(fs.readFileSync(TOKEN_CACHE_FILE, "utf8")) || {}; |
| 45 | } catch (e) { |
| 46 | return {}; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | function writeTokenCache(cache) { |
| 51 | try { |
no outgoing calls
no test coverage detected