91cf1e97c329ba0dc5c7fa7989ca7d6034cedfbb
Credit: thanks @SlayTheDragons whose PR https://github.com/dyad-sh/dyad/pull/1665 paved the way for this implementation. <!-- CURSOR_SUMMARY --> > [!NOTE] > Adds _shared module support for Supabase edge functions with import-map packaging and automatic redeploys; updates deployment to include full function directories plus shared files, and adds path utilities and tests. > > - **Supabase Edge Functions** > - **Shared Modules Support**: Detect `_shared` changes and redeploy all functions; regular function changes deploy only that function. > - **Deployment Overhaul**: `deploySupabaseFunctions` now uploads full function directories plus `_shared` files via multipart form-data, sets `entrypoint_path`, and writes `import_map.json` (`_shared/` → `../_shared/`). > - **Function Discovery & Packaging**: Add file collection helpers (`listFilesWithStats`, `loadZipEntries`) and path utilities (`toPosixPath`, `findFunctionDirectory`, `stripSupabaseFunctionsPrefix`) with signature-based caching for `_shared`. > - **APIs & Utils**: Introduce `isSharedServerModule`, refine `isServerFunction` (excludes `_shared`), add `extractFunctionNameFromPath`, and `buildSignature`. > - **IPC Changes** > - Update file edit/rename/delete flows to track shared module edits and trigger full redeploys; otherwise deploy per-function using extracted name and `appPath`. > - **Prompts** > - Document `_shared` usage and import pattern in Supabase prompt. > - **Tests** > - Add tests for function/shared detection, name extraction, path handling, and signature building. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f35599ec0e708e2ef6b7e78ae7901b29953a6dff. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds support for shared modules for Supabase edge functions. Shared code in supabase/functions/_shared is now bundled via an import map and triggers redeploys across all functions when changed. - **New Features** - Detects shared modules in supabase/functions/_shared and redeploys all functions when they change. - Deploys full function directories plus shared files, and writes an import_map.json that resolves "_shared/" imports. - Auto-deploys only the affected function on file changes; switches to redeploy-all when a shared module is touched. - **Refactors** - deploySupabaseFunction now uploads multiple files (function + shared) using multipart form-data and sets entrypoint/import map. - Added file collection, path utilities, and shared-file caching via content signatures to reduce redundant reads. - Updated deployAllSupabaseFunctions to skip non-function dirs (e.g., _shared) and use functionPath. - Added tests for function/shared detection, path handling, and signature building. <sup>Written for commit 302d84625d9e61477db9ada052a027b29ff18cef. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
Dyad
Dyad is a local, open-source AI app builder. It's fast, private, and fully under your control — like Lovable, v0, or Bolt, but running right on your machine.
More info at: https://dyad.sh/
🚀 Features
- ⚡️ Local: Fast, private and no lock-in.
- 🛠 Bring your own keys: Use your own AI API keys — no vendor lock-in.
- 🖥️ Cross-platform: Easy to run on Mac or Windows.
📦 Download
No sign-up required. Just download and go.
👉 Download for your platform
🤝 Community
Join our growing community of AI app builders on Reddit: r/dyadbuilders - share your projects and get help from the community!
🛠️ Contributing
Dyad is open-source (Apache 2.0 licensed).
If you're interested in contributing to dyad, please read our contributing doc.
License
- All the code in this repo outside of
src/prois open-source and licensed under Apache 2.0 - see LICENSE. - All the code in this repo within
src/prois fair-source and licensed under Functional Source License 1.1 Apache 2.0 - see LICENSE.
Description
Languages
TypeScript
97.6%
JavaScript
1.4%
CSS
0.5%
Shell
0.4%