midday-ai / v1

An open-source starter kit based on Midday.
https://v1.run
MIT License
3.18k stars 285 forks source link

How are supabase edge functions meant to be deployed? #57

Open giulioco opened 1 month ago

giulioco commented 1 month ago

I noticed there's no CI/CD flow to deploy supabase edge functions, nor is there a specific script in apps/api/package.json. Is the assumption that the user just deploys them manually with supabase functions deploy or am I missing something?

giulioco commented 1 month ago

Also, are the npm imports for deno deploys working for anyone? Meaning imports like

import { WelcomeEmail } from "@v1/emails/welcome";
import React from "react";
import { render } from "react-email/components";
import { Resend } from "resend";
import { Webhook } from "standardwebhooks";

in apps/api/supabase/functions/send-email/index.ts

seems to not working when deployed with supabase functions deploy :

Bundling Function: send-email
Error: failed to create the graph

Caused by:
    Relative import path "@v1/emails/welcome" not prefixed with / or ./ or ../ and not in import map from "file:///Users/username/git/v1/apps/api/supabase/functions/send-email/index.ts"
        at file:///Users/username/git/v1/apps/api/supabase/functions/send-email/index.ts:2:26

and same on VS code:

Relative import path "@v1/emails/waitlisted" not prefixed with / or ./ or ../
  hint: If you want to use a JSR or npm package, try running