()
| 55 | // sync IO — settings pipeline is sync. fileRead and jsonRead are leaves; |
| 56 | // file.ts and json.ts both sit in the settings SCC. |
| 57 | function loadSettings(): SettingsJson | null { |
| 58 | try { |
| 59 | const content = readFileSync(getSettingsPath()) |
| 60 | const data: unknown = jsonParse(stripBOM(content)) |
| 61 | if (!data || typeof data !== 'object' || Array.isArray(data)) { |
| 62 | return null |
| 63 | } |
| 64 | return data as SettingsJson |
| 65 | } catch { |
| 66 | return null |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | export function getRemoteManagedSettingsSyncFromCache(): SettingsJson | null { |
| 71 | if (eligible !== true) return null |
no test coverage detected