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