MCPcopy Index your code
hub / github.com/codeaashu/claude-code / syncRemoteEvalToDisk

Function syncRemoteEvalToDisk

src/services/analytics/growthbook.ts:407–417  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

405 * process's SDK key.
406 */
407function 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

Callers 2

growthbook.tsFile · 0.85

Calls 2

getGlobalConfigFunction · 0.85
saveGlobalConfigFunction · 0.85

Tested by

no test coverage detected