basalt / mailer/src / renderPreviewResponse
Function: renderPreviewResponse()
> renderPreviewResponse(previews, mailer, pathname, query?): PreviewResponse
Defined in: mailer/src/preview.ts:60
Pure request router for the preview UI. createMailPreviewServer is a thin node:http wrapper over this — keep the logic here so it stays testable.
/→ the app shell (sidebar + preview pane)/raw/<name>/html→ the layout-wrapped HTML body (for theiframe)/raw/<name>/text→ the plaintext body
Parameters
previews
MailPreview<unknown>[]
mailer
pathname
string
query?
URLSearchParams = ...