(m)
| 21 | // log to count injections); off by default so the shipped hook writes nothing extra. |
| 22 | const DBG = process.env.CG_FRONTLOAD_DEBUG; |
| 23 | const dbg = (m) => { if (!DBG) return; try { appendFileSync(DBG, `[${new Date().toISOString()}] ${m}\n`); } catch { /* ignore */ } }; |
| 24 | |
| 25 | let input = {}; |
| 26 | try { input = JSON.parse(readFileSync(0, 'utf8')); } catch (e) { dbg('stdin parse fail: ' + e.message); } |