fix: estabiliza templates de e-mail no CI
- Usa @react-email/components nos templates para evitar módulos ausentes no Bun 1.3.1\n- Ajusta preload do bun test para expor global Element (evita crash do PrismJS)
This commit is contained in:
parent
88a9ef454e
commit
548c2e44d4
5 changed files with 12 additions and 20 deletions
|
|
@ -1,12 +1,5 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { Body } from "@react-email/body"
|
import { Body, Container, Head, Html, Img, Preview, Section, Text } from "@react-email/components"
|
||||||
import { Container } from "@react-email/container"
|
|
||||||
import { Head } from "@react-email/head"
|
|
||||||
import { Html } from "@react-email/html"
|
|
||||||
import { Img } from "@react-email/img"
|
|
||||||
import { Preview } from "@react-email/preview"
|
|
||||||
import { Section } from "@react-email/section"
|
|
||||||
import { Text } from "@react-email/text"
|
|
||||||
|
|
||||||
import { EMAIL_COLORS } from "./tokens"
|
import { EMAIL_COLORS } from "./tokens"
|
||||||
import { getEmailAssetUrl } from "./utils"
|
import { getEmailAssetUrl } from "./utils"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { Section } from "@react-email/section"
|
import { Section, Text } from "@react-email/components"
|
||||||
import { Text } from "@react-email/text"
|
|
||||||
|
|
||||||
import { EMAIL_COLORS } from "./tokens"
|
import { EMAIL_COLORS } from "./tokens"
|
||||||
import { formatPriority, formatStatus } from "./utils"
|
import { formatPriority, formatStatus } from "./utils"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { Button } from "@react-email/button"
|
import { Button, Heading, Hr, Section, Text } from "@react-email/components"
|
||||||
import { Heading } from "@react-email/heading"
|
|
||||||
import { Hr } from "@react-email/hr"
|
|
||||||
import { Section } from "@react-email/section"
|
|
||||||
import { Text } from "@react-email/text"
|
|
||||||
|
|
||||||
import { RavenEmailLayout } from "./_components/layout"
|
import { RavenEmailLayout } from "./_components/layout"
|
||||||
import { EMAIL_COLORS } from "./_components/tokens"
|
import { EMAIL_COLORS } from "./_components/tokens"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { Button } from "@react-email/button"
|
import { Button, Heading, Hr, Section, Text } from "@react-email/components"
|
||||||
import { Heading } from "@react-email/heading"
|
|
||||||
import { Hr } from "@react-email/hr"
|
|
||||||
import { Section } from "@react-email/section"
|
|
||||||
import { Text } from "@react-email/text"
|
|
||||||
|
|
||||||
import { RavenEmailLayout } from "./_components/layout"
|
import { RavenEmailLayout } from "./_components/layout"
|
||||||
import { EMAIL_COLORS } from "./_components/tokens"
|
import { EMAIL_COLORS } from "./_components/tokens"
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,14 @@ if (typeof window === "undefined" || typeof document === "undefined") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const globalTarget = globalThis as Record<string, unknown>
|
||||||
|
if (typeof globalTarget.Element === "undefined") {
|
||||||
|
const win = globalTarget.window as undefined | { Element?: unknown }
|
||||||
|
if (win?.Element) {
|
||||||
|
globalTarget.Element = win.Element
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const applyFixedDate = () => {
|
const applyFixedDate = () => {
|
||||||
if (fixedTimestamp === null) {
|
if (fixedTimestamp === null) {
|
||||||
globalThis.Date = OriginalDate
|
globalThis.Date = OriginalDate
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue