(message: string, data?: { [key: string]: unknown })
| 961 | }): Promise<Omit<Record, "providerID" | "providerName" | "fetchedAt">> { |
| 962 | const debugFile = path.join(Global.Path.log, "google-usage-debug.log") |
| 963 | const logDebug = async (message: string, data?: { [key: string]: unknown }) => { |
| 964 | const safe = data ? JSON.stringify(data) : "" |
| 965 | const line = `[${new Date().toISOString()}] ${message}${safe ? ` ${safe}` : ""}\n` |
| 966 | await fs.appendFile(debugFile, line).catch(() => {}) |
| 967 | } |
| 968 | |
| 969 | const readResponseBody = async (response: any): Promise<string> => { |
| 970 | if (response && typeof response.text === "function") { |
no outgoing calls
no test coverage detected