MCPcopy Index your code
hub / github.com/simstudioai/sim / getFeatureFlags

Function getFeatureFlags

apps/sim/lib/core/config/feature-flags.ts:202–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200 * flag's on/off state from its registered fallback secret ({@link fallbackFlags}).
201 */
202export async function getFeatureFlags(): Promise<FeatureFlagsConfig> {
203 if (!isAppConfigEnabled) return fallbackFlags()
204
205 const value = await fetchAppConfigProfile(
206 {
207 application: env.APPCONFIG_APPLICATION as string,
208 environment: env.APPCONFIG_ENVIRONMENT as string,
209 profile: FEATURE_FLAGS_PROFILE,
210 },
211 parseConfig
212 )
213
214 return value ?? fallbackFlags()
215}
216
217/** Resolve a single flag for a context. Admin status is resolved internally from `userId`. */
218export async function isFeatureEnabled(

Callers 2

isFeatureEnabledFunction · 0.85

Calls 2

fetchAppConfigProfileFunction · 0.90
fallbackFlagsFunction · 0.85

Tested by

no test coverage detected