(path: string, message: object)
| 110 | } |
| 111 | |
| 112 | function appendToLog(path: string, message: object): void { |
| 113 | if (process.env.USER_TYPE !== 'ant') { |
| 114 | return |
| 115 | } |
| 116 | |
| 117 | const messageWithTimestamp = { |
| 118 | timestamp: new Date().toISOString(), |
| 119 | ...message, |
| 120 | cwd: getFsImplementation().cwd(), |
| 121 | userType: process.env.USER_TYPE, |
| 122 | sessionId: getSessionId(), |
| 123 | version: MACRO.VERSION, |
| 124 | } |
| 125 | |
| 126 | getLogWriter(path).write(messageWithTimestamp) |
| 127 | } |
| 128 | |
| 129 | function extractServerMessage(data: unknown): string | undefined { |
| 130 | if (typeof data === 'string') { |
no test coverage detected