Deprecate legacy feature flags, use ALWRITY_ENABLED_FEATURES only
- Remove fallback to ALWRITY_FEATURE_PROFILE, ALWRITY_ROUTER_PROFILE - Primary env var is now ALWRITY_ENABLED_FEATURES (backend) - Primary env var is REACT_APP_ENABLED_FEATURES (frontend) - Add deprecation comments to all get_enabled_features() functions - Update demoMode.ts with clear deprecation notes Usage: ALWRITY_ENABLED_FEATURES=podcast # Podcast only ALWRITY_ENABLED_FEATURES=all # All features (default)
This commit is contained in:
@@ -83,17 +83,16 @@ class RouterManager:
|
||||
|
||||
@staticmethod
|
||||
def get_enabled_features() -> set:
|
||||
"""Get enabled features from environment variable.
|
||||
"""Get enabled features from ALWRITY_ENABLED_FEATURES env var.
|
||||
|
||||
ALWRITY_ENABLED_FEATURES can be:
|
||||
Values:
|
||||
- "all" - enable all features (default)
|
||||
- comma-separated list: "podcast,blog-writer,youtube"
|
||||
- comma-separated: "podcast,blog-writer,youtube"
|
||||
- single feature: "podcast"
|
||||
|
||||
DEPRECATED: ALWRITY_FEATURE_PROFILE, ALWRITY_ROUTER_PROFILE, ALWRITY_FEATURE_TO_ENABLE
|
||||
"""
|
||||
env_value = os.getenv(
|
||||
"ALWRITY_ENABLED_FEATURES",
|
||||
os.getenv("ALWRITY_FEATURE_PROFILE", os.getenv("ALWRITY_ROUTER_PROFILE", "all"))
|
||||
).strip().lower()
|
||||
env_value = os.getenv("ALWRITY_ENABLED_FEATURES", "all").strip().lower()
|
||||
|
||||
if not env_value or env_value == "all":
|
||||
return {"all"}
|
||||
|
||||
Reference in New Issue
Block a user