(cache)
| 45 | } |
| 46 | |
| 47 | function writeTokenCache(cache) { |
| 48 | try { |
| 49 | fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8"); |
| 50 | } catch (e) { |
| 51 | $.log(`写入token缓存失败: ${e.message || e}`); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | function shortToken(token = "") { |
| 56 | const value = String(token || "").replace(/^Mer/i, ""); |
no test coverage detected