(cache)
| 44 | } |
| 45 | |
| 46 | function writeTokenCache(cache) { |
| 47 | try { |
| 48 | fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8"); |
| 49 | } catch (e) { |
| 50 | $.log(`写入token缓存失败: ${e.message || e}`); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | function formatDate(date = new Date(), separator = "-") { |
| 55 | const y = date.getFullYear(); |
no test coverage detected