stack/apps/backend
Aman Ganapathy ba38f26014
Update email rendering code to use latest version of freestyle and to have a fallback with vercel sandbox (#1091)
Previously, we were using an old version of `freestyle.sh` and
experienced issues with it failing. We want to update it to the latest
API and also introduce a fallback that can be used when freestyle fails
to improve reliability. We refactor the `freestyle.tsx` wrapper code
around `freestyle` to a `js-execution-engine`, which also offers
opportunities to extend the email rendering engine abstraction in the
future. If `freestyle` encounters runtime errors while running the code
or fails, we retry once and then default to `Vercel sandbox`. Note that
we also introduce a sanity test: 5% of the time, we will run the code
through both `freestyle` and the `Vercel Sandbox` and log it if the
results don't match.

As a chore, we also up the time limit on a `failed-email-digest.test.ts`
test to make it less flakey.
2026-01-14 10:53:16 -08:00
..
prisma Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00
scripts Speed up tests (#1063) 2025-12-28 11:25:04 -08:00
src Update email rendering code to use latest version of freestyle and to have a fallback with vercel sandbox (#1091) 2026-01-14 10:53:16 -08:00
.env Update email rendering code to use latest version of freestyle and to have a fallback with vercel sandbox (#1091) 2026-01-14 10:53:16 -08:00
.env.development Support async replicas (#1097) 2026-01-12 15:07:08 -08:00
.eslintrc.cjs tsup for stack-shared (#647) 2025-04-28 21:26:52 -07:00
.gitignore Migrations toolkit (#409) 2025-02-01 17:46:21 -08:00
instrumentation-client.ts Upgrade backend to Next.js 16 2025-12-12 16:59:07 -08:00
LICENSE Split backend and dashboard (#83) 2024-06-18 15:49:31 +02:00
next.config.mjs Upgrade Prisma to v7 (#1064) 2025-12-26 08:13:34 -08:00
package.json Update email rendering code to use latest version of freestyle and to have a fallback with vercel sandbox (#1091) 2026-01-14 10:53:16 -08:00
prisma.config.ts Upgrade Prisma to v7 (#1064) 2025-12-26 08:13:34 -08:00
tsconfig.json fix flaky typecheck test (#1072) 2025-12-17 12:26:12 -08:00
vercel.json Update vercel.json 2025-12-16 12:02:11 -08:00
vitest.config.ts Customizable ports (#962) 2025-10-20 15:24:47 -07:00
vitest.setup.ts Customizable ports (#962) 2025-10-20 15:24:47 -07:00