* Write the complete remoteEvalFeatureValues map to disk. Called exactly * once per successful processRemoteEvalPayload — never from a failure path, * so init-timeout poisoning is structurally impossible (the .catch() at init * never reaches here). * * Wholesale replace (not merge): features de
()
| 405 | * process's SDK key. |
| 406 | */ |
| 407 | function syncRemoteEvalToDisk(): void { |
| 408 | const fresh = Object.fromEntries(remoteEvalFeatureValues) |
| 409 | const config = getGlobalConfig() |
| 410 | if (isEqual(config.cachedGrowthBookFeatures, fresh)) { |
| 411 | return |
| 412 | } |
| 413 | saveGlobalConfig(current => ({ |
| 414 | ...current, |
| 415 | cachedGrowthBookFeatures: fresh, |
| 416 | })) |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * Check if GrowthBook operations should be enabled |
no test coverage detected