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