|
1 | 1 | import { dev } from '$app/environment'; |
2 | | -import { env } from '$env/dynamic/private'; |
| 2 | +import { config } from '$lib/server/config'; |
3 | 3 |
|
4 | 4 | export type FeatureFlag = |
5 | 5 | | 'pricingPage' |
@@ -30,17 +30,17 @@ export const FLAG_LABELS: Record<FeatureFlag, string> = { |
30 | 30 |
|
31 | 31 | /** Flags from environment variables (immutable, set at startup). */ |
32 | 32 | const envFlags: Record<FeatureFlag, boolean> = { |
33 | | - pricingPage: env.FF_PRICING_PAGE === 'true', |
34 | | - registration: env.FF_REGISTRATION === 'true', |
35 | | - portalApiKeys: env.FF_PORTAL_API_KEYS === 'true', |
36 | | - portalOrgInfo: env.FF_PORTAL_ORG_INFO === 'true', |
37 | | - portalEmailLog: env.FF_PORTAL_EMAIL_LOG === 'true', |
38 | | - portalDns: env.FF_PORTAL_DNS === 'true', |
39 | | - portalMembers: env.FF_PORTAL_MEMBERS === 'true', |
40 | | - adminPanel: env.FF_ADMIN_PANEL === 'true', |
41 | | - adminOrgStatus: env.FF_ADMIN_ORG_STATUS === 'true', |
42 | | - adminAuditLog: env.FF_ADMIN_AUDIT_LOG === 'true', |
43 | | - adminImpersonation: env.FF_ADMIN_IMPERSONATION === 'true' |
| 33 | + pricingPage: config.FF_PRICING_PAGE, |
| 34 | + registration: config.FF_REGISTRATION, |
| 35 | + portalApiKeys: config.FF_PORTAL_API_KEYS, |
| 36 | + portalOrgInfo: config.FF_PORTAL_ORG_INFO, |
| 37 | + portalEmailLog: config.FF_PORTAL_EMAIL_LOG, |
| 38 | + portalDns: config.FF_PORTAL_DNS, |
| 39 | + portalMembers: config.FF_PORTAL_MEMBERS, |
| 40 | + adminPanel: config.FF_ADMIN_PANEL, |
| 41 | + adminOrgStatus: config.FF_ADMIN_ORG_STATUS, |
| 42 | + adminAuditLog: config.FF_ADMIN_AUDIT_LOG, |
| 43 | + adminImpersonation: config.FF_ADMIN_IMPERSONATION |
44 | 44 | }; |
45 | 45 |
|
46 | 46 | /** Runtime overrides — only used in dev mode. */ |
|
0 commit comments