add flows/ directory structure with namespace imports for ControlPlane.serve()#441
Conversation
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
View your CI Pipeline Execution ↗ for commit ffdc2d0
☁️ Nx Cloud last updated this comment at |
| supabase: | ||
| specifier: ^2.34.3 | ||
| specifier: ^2.62.10 | ||
| version: 2.62.10 |
There was a problem hiding this comment.
Critical inconsistency: supabase dependency was removed from package.json (line 47) but pnpm-lock.yaml still contains it with an updated version. This means:
- The lock file is out of sync with package.json
- The package will still be installed despite being removed from dependencies
- Future
pnpm installruns may behave unexpectedly
Fix: Run pnpm install to regenerate the lock file after removing the dependency from package.json:
pnpm installThis will properly remove the supabase entry from pnpm-lock.yaml to match the package.json changes.
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
908b1ab to
ffdc2d0
Compare
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-441.pgflow.pages.dev 📝 Details:
_Last updated: _ |
Merge activity
|
…e.serve() (#441) # Reorganize Flow Directory Structure and Improve Import Patterns This PR introduces a new, more organized directory structure for pgflow projects by moving flow definitions from `supabase/functions/_flows/` to a dedicated top-level `supabase/flows/` directory. This change improves code organization and simplifies imports. Key changes: - Created a new `supabase/flows/` directory with an `index.ts` barrel file that re-exports all flows - Updated the Control Plane to use namespace imports (`import * as flows`) instead of individual imports - Modified `ControlPlane.serve()` to accept either an array of flows or a namespace object - Updated documentation and examples to use named exports instead of default exports - Removed the `supabase` CLI dependency from package.json (not needed) - Added comprehensive tests for the new namespace import pattern This new structure makes flows first-class citizens in the project, improves discoverability, and follows a more intuitive organization pattern. The barrel file pattern (`index.ts`) makes it easy to add new flows without modifying the Control Plane.

Reorganize Flow Directory Structure and Improve Import Patterns
This PR introduces a new, more organized directory structure for pgflow projects by moving flow definitions from
supabase/functions/_flows/to a dedicated top-levelsupabase/flows/directory. This change improves code organization and simplifies imports.Key changes:
supabase/flows/directory with anindex.tsbarrel file that re-exports all flowsimport * as flows) instead of individual importsControlPlane.serve()to accept either an array of flows or a namespace objectsupabaseCLI dependency from package.json (not needed)This new structure makes flows first-class citizens in the project, improves discoverability, and follows a more intuitive organization pattern. The barrel file pattern (
index.ts) makes it easy to add new flows without modifying the Control Plane.