(...args: unknown[])
| 46 | |
| 47 | // This goes straight to Node’s stdout, avoiding Jest's verbose output: |
| 48 | export const debugPrint = (...args: unknown[]) => { |
| 49 | const prettyArgs = args |
| 50 | .map((arg) => |
| 51 | typeof arg === 'string' |
| 52 | ? arg |
| 53 | : inspect(arg, { colors: process.stdout.isTTY }) |
| 54 | ) |
| 55 | .join(' ') |
| 56 | |
| 57 | const timestamp = new Date().toISOString().split('T')[1] |
| 58 | |
| 59 | return process.stdout.write(`[${timestamp}] ${prettyArgs}\n`) |
| 60 | } |
| 61 | |
| 62 | export function initNextServerScript( |
| 63 | scriptPath: string, |