diff --git a/.changeset/shiny-llamas-work.md b/.changeset/shiny-llamas-work.md new file mode 100644 index 00000000..9c2144ce --- /dev/null +++ b/.changeset/shiny-llamas-work.md @@ -0,0 +1,5 @@ +--- +"create-oberon-app": patch +--- + +Fix default disable custom plugins in development diff --git a/packages/create-oberon-app/plugins/send/custom.ts b/packages/create-oberon-app/plugins/send/custom.ts index 1d790aae..e064326e 100644 --- a/packages/create-oberon-app/plugins/send/custom.ts +++ b/packages/create-oberon-app/plugins/send/custom.ts @@ -1,6 +1,7 @@ import "server-cli-only" import { + USE_DEVELOPMENT_SEND_PLUGIN, notImplemented, type OberonPlugin, type OberonSendAdapter, @@ -11,6 +12,7 @@ const SEND_SECRET = process.env.SEND_SECRET export const plugin: OberonPlugin = () => ({ name: "Custom Send Plugin", + disabled: USE_DEVELOPMENT_SEND_PLUGIN, adapter: { sendVerificationRequest: async ({ email, diff --git a/packages/create-oberon-app/plugins/send/resend.ts b/packages/create-oberon-app/plugins/send/resend.ts index 545cc84b..6a2e42ac 100644 --- a/packages/create-oberon-app/plugins/send/resend.ts +++ b/packages/create-oberon-app/plugins/send/resend.ts @@ -1,13 +1,18 @@ import "server-cli-only" import { Resend } from "resend" -import type { OberonPlugin, OberonSendAdapter } from "@oberoncms/core" +import { + USE_DEVELOPMENT_SEND_PLUGIN, + type OberonPlugin, + type OberonSendAdapter, +} from "@oberoncms/core" const EMAIL_FROM = process.env.EMAIL_FROM const RESEND_SECRET = process.env.RESEND_SECRET || process.env.SEND_SECRET export const plugin: OberonPlugin = () => ({ name: "Resend", + disabled: USE_DEVELOPMENT_SEND_PLUGIN, adapter: { sendVerificationRequest: async ({ email, diff --git a/packages/create-oberon-app/plugins/send/sendgrid.ts b/packages/create-oberon-app/plugins/send/sendgrid.ts index b4451962..cf9746b6 100644 --- a/packages/create-oberon-app/plugins/send/sendgrid.ts +++ b/packages/create-oberon-app/plugins/send/sendgrid.ts @@ -1,13 +1,18 @@ import "server-cli-only" import sgMail from "@sendgrid/mail" -import type { OberonPlugin, OberonSendAdapter } from "@oberoncms/core" +import { + USE_DEVELOPMENT_SEND_PLUGIN, + type OberonPlugin, + type OberonSendAdapter, +} from "@oberoncms/core" const EMAIL_FROM = process.env.EMAIL_FROM const SENDGRID_API_KEY = process.env.SENDGRID_API_KEY || process.env.SEND_SECRET export const plugin: OberonPlugin = () => ({ name: "Sendgrid", + disabled: USE_DEVELOPMENT_SEND_PLUGIN, adapter: { sendVerificationRequest: async ({ email,