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