(state)
| 68 | } |
| 69 | |
| 70 | function writeState(state) { |
| 71 | try { |
| 72 | const dir = getEvolutionDir(); |
| 73 | if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true }); |
| 74 | fs.writeFileSync(getStatePath(), JSON.stringify(state, null, 2) + '\n'); |
| 75 | } catch (_) {} |
| 76 | } |
| 77 | |
| 78 | function truncateNodeId(nodeId) { |
| 79 | if (!nodeId || typeof nodeId !== 'string') return 'unknown'; |
no test coverage detected