You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: simplify environment detection for flow compilation mode (#475)
# Refactor Flow Compilation Environment Detection
This PR improves how we detect local/development environments for flow compilation by:
1. Adding an explicit `isLocalEnvironment` property to the `PlatformAdapter` interface
2. Replacing the environment variable-based detection with a cleaner approach that:
- Removes direct access to environment variables in `FlowWorkerLifecycle`
- Adds a new `isLocalSupabaseEnv()` function for checking environment records
- Simplifies the flow compilation mode detection logic
The changes make the code more maintainable by:
- Adding a helpful comment about FlowShape JSON serialization
- Improving log messages during flow compilation
- Updating tests to use the new approach for environment detection
- Making the environment detection more explicit and testable
This refactoring maintains the same behavior while making the code more robust and easier to understand.
0 commit comments