From 41e2f2826cd70b6f37e523de4278c1b69e7df408 Mon Sep 17 00:00:00 2001 From: Charlie Lamb Date: Wed, 28 Jan 2026 13:05:03 +0000 Subject: [PATCH] chore: email path fix for deployed server --- server/emails/OTPEmail.tsx | 57 ------------------ server/src/internal/emails/OTPEmail.tsx | 56 +++++++++++++++++ server/src/internal/emails/sendOTPEmail.ts | 2 +- server/tsconfig.json | 70 +++++++++++----------- 4 files changed, 91 insertions(+), 94 deletions(-) delete mode 100644 server/emails/OTPEmail.tsx create mode 100644 server/src/internal/emails/OTPEmail.tsx diff --git a/server/emails/OTPEmail.tsx b/server/emails/OTPEmail.tsx deleted file mode 100644 index 152a13afa..000000000 --- a/server/emails/OTPEmail.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import * as React from "react"; -import { - Html, - Head, - Body, - Container, - Section, - Text, - Heading, - Tailwind, -} from "@react-email/components"; - -const OTPEmail = (props: { otpCode: string }) => { - return ( - - - - - - - Verification code - - - - Enter the following verification code when prompted: - - - - {props.otpCode} - - - - To protect your account, do not share this code. - - - {/* Footer */} -
- - Autumn -
- 2261 Market Street STE 22390 -
- San Francisco, CA, US, 94114 -
-
-
- -
- - ); -}; - -OTPEmail.PreviewProps = { - otpCode: "884085", -}; - -export default OTPEmail; diff --git a/server/src/internal/emails/OTPEmail.tsx b/server/src/internal/emails/OTPEmail.tsx new file mode 100644 index 000000000..86d6be1d8 --- /dev/null +++ b/server/src/internal/emails/OTPEmail.tsx @@ -0,0 +1,56 @@ +import { + Body, + Container, + Head, + Heading, + Html, + Section, + Tailwind, + Text, +} from "@react-email/components"; + +const OTPEmail = (props: { otpCode: string }) => { + return ( + + + + + + + Verification code + + + + Enter the following verification code when prompted: + + + + {props.otpCode} + + + + To protect your account, do not share this code. + + + {/* Footer */} +
+ + Autumn +
+ 2261 Market Street STE 22390 +
+ San Francisco, CA, US, 94114 +
+
+
+ +
+ + ); +}; + +OTPEmail.PreviewProps = { + otpCode: "884085", +}; + +export default OTPEmail; diff --git a/server/src/internal/emails/sendOTPEmail.ts b/server/src/internal/emails/sendOTPEmail.ts index 37e91c5f8..a5531b505 100644 --- a/server/src/internal/emails/sendOTPEmail.ts +++ b/server/src/internal/emails/sendOTPEmail.ts @@ -1,7 +1,7 @@ -import OTPEmail from "@emails/otpemail.js"; import { logger } from "@/external/logtail/logtailUtils.js"; import { createResendCli } from "@/external/resend/resendUtils.js"; import { FROM_AUTUMN } from "./constants.js"; +import OTPEmail from "./OTPEmail.js"; const sendOTPEmail = async ({ email, otp }: { email: string; otp: string }) => { if (!process.env.RESEND_API_KEY || !process.env.RESEND_DOMAIN) { diff --git a/server/tsconfig.json b/server/tsconfig.json index 833b5afa3..66738afcc 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -1,40 +1,38 @@ { - "ts-node": { - "esm": true, - "experimentalSpecifier": true - }, - "compilerOptions": { - "target": "ES2020", - "moduleResolution": "bundler", - "module": "Preserve", + "ts-node": { + "esm": true, + "experimentalSpecifier": true + }, + "compilerOptions": { + "target": "ES2020", + "moduleResolution": "bundler", + "module": "Preserve", - // "declaration": true, - "jsx": "react-jsx", - "rootDir": ".", - "outDir": "./dist", - "strict": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "paths": { - "@/*": ["./src/*"], - "@server/*": ["./src/*"], - "@shared/*": ["../shared/*"], - "@emails/*": ["./emails/*"], - "@scripts/*": ["./scripts/*"], - "@lua/*": ["./src/_luaScripts/*"], - "@tests/*": ["./tests/*"], + // "declaration": true, + "jsx": "react-jsx", + "rootDir": ".", + "outDir": "./dist", + "strict": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@/*": ["./src/*"], + "@server/*": ["./src/*"], + "@shared/*": ["../shared/*"], + "@scripts/*": ["./scripts/*"], + "@lua/*": ["./src/_luaScripts/*"], + "@tests/*": ["./tests/*"], - - // From shared package? - "@autumn/shared": ["../shared/index.ts"], - "@autumn/shared/*": ["../shared/*"], - "@api/*": ["../shared/api/*"], - "@models/*": ["../shared/models/*"], - "@utils/*": ["../shared/utils/*"], - } - }, - "include": ["src", "tests", "scripts", "emails", "experiments"], - "exclude": ["node_modules", "dist", "tests/archives"] + // From shared package? + "@autumn/shared": ["../shared/index.ts"], + "@autumn/shared/*": ["../shared/*"], + "@api/*": ["../shared/api/*"], + "@models/*": ["../shared/models/*"], + "@utils/*": ["../shared/utils/*"] + } + }, + "include": ["src", "tests", "scripts", "experiments"], + "exclude": ["node_modules", "dist", "tests/archives"] }