- Add @bytelyst/backend-flags and @bytelyst/backend-telemetry packages - Create feature-flags.ts and telemetry.ts wrappers using shared packages - Add TELEMETRY_ENABLED and FEATURE_FLAGS_ENABLED config fields - Default DB_PROVIDER to memory (fixes test failures without env vars) - Add JWT_SECRET dev default and PLATFORM_SERVICE_URL - 176/176 tests pass
16 lines
424 B
TypeScript
16 lines
424 B
TypeScript
import { createFlagRegistry } from '@bytelyst/backend-flags';
|
|
import { config } from './config.js';
|
|
|
|
const registry = createFlagRegistry({
|
|
defaults: {
|
|
'timers.cascade': true,
|
|
'timers.linked': true,
|
|
'routines.enabled': true,
|
|
'households.enabled': true,
|
|
'shared_timers.enabled': true,
|
|
},
|
|
enabled: config.FEATURE_FLAGS_ENABLED,
|
|
});
|
|
|
|
export const { isFeatureEnabled, getAllFlags, setFlag } = registry;
|