( filePath: string, content: string, )
| 456 | } |
| 457 | |
| 458 | async function writeFileForSync( |
| 459 | filePath: string, |
| 460 | content: string, |
| 461 | ): Promise<boolean> { |
| 462 | try { |
| 463 | const parentDir = dirname(filePath) |
| 464 | if (parentDir) { |
| 465 | await mkdir(parentDir, { recursive: true }) |
| 466 | } |
| 467 | |
| 468 | await writeFile(filePath, content, 'utf8') |
| 469 | logForDiagnosticsNoPII('info', 'settings_sync_file_written') |
| 470 | return true |
| 471 | } catch { |
| 472 | logForDiagnosticsNoPII('warn', 'settings_sync_file_write_failed') |
| 473 | return false |
| 474 | } |
| 475 | } |
| 476 | |
| 477 | /** |
| 478 | * Apply remote entries to local files (CCR pull pattern). |
no test coverage detected