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