(cache)
| 148 | } |
| 149 | |
| 150 | function writeTokenCache(cache) { |
| 151 | try { |
| 152 | fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8"); |
| 153 | } catch (e) { |
| 154 | $.log(`写入token缓存失败: ${e.message || e}`); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | function shortToken(token = "") { |
| 159 | const value = String(token).replace(/^Token\s+/i, ""); |
no test coverage detected