(content: string, _path: string)
| 495 | |
| 496 | // Helper to check size limit (defense-in-depth, matches backend limit) |
| 497 | const exceedsSizeLimit = (content: string, _path: string): boolean => { |
| 498 | const sizeBytes = Buffer.byteLength(content, 'utf8') |
| 499 | if (sizeBytes > MAX_FILE_SIZE_BYTES) { |
| 500 | logForDiagnosticsNoPII('info', 'settings_sync_file_too_large', { |
| 501 | sizeBytes, |
| 502 | maxBytes: MAX_FILE_SIZE_BYTES, |
| 503 | }) |
| 504 | return true |
| 505 | } |
| 506 | return false |
| 507 | } |
| 508 | |
| 509 | // Apply global user settings |
| 510 | const userSettingsContent = entries[SYNC_KEYS.USER_SETTINGS] |
no test coverage detected