Skip to content

Commit

Permalink
[vercel only smtp] comment out mjml lib
Browse files Browse the repository at this point in the history
  • Loading branch information
lkostrowski committed Jun 20, 2024
1 parent 4e755e0 commit ce17fb5
Show file tree
Hide file tree
Showing 3 changed files with 549 additions and 48 deletions.
4 changes: 2 additions & 2 deletions apps/smtp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"handlebars": "^4.7.7",
"html-to-text": "^9.0.3",
"jsdom": "^20.0.3",
"mjml": "^4.13.0",
"mjml": "4.15.3",
"modern-errors": "7.0.0",
"modern-errors-serialize": "6.0.0",
"neverthrow": "6.2.1",
Expand Down Expand Up @@ -80,7 +80,7 @@
"@testing-library/react": "^14.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@types/html-to-text": "^9.0.0",
"@types/mjml": "^4.7.0",
"@types/mjml": "4.7.4",
"@types/nodemailer": "^6.4.7",
"@types/react": "18.2.5",
"@types/react-dom": "18.2.5",
Expand Down
7 changes: 5 additions & 2 deletions apps/smtp/src/modules/smtp/services/mjml-compiler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import mjml2html from "mjml";
// import mjml2html from "mjml";
import { createLogger } from "../../../logger";
import { err, fromThrowable, ok, Result } from "neverthrow";
import { BaseError } from "../../../errors";
Expand All @@ -17,7 +17,10 @@ export class MjmlCompiler implements IMjmlCompiler {
this.logger.debug("Trying to compile MJML template");

const safeCompile = fromThrowable(
mjml2html,
(s: string) => ({
errors: [],
html: "",
}),
(error) =>
new MjmlCompiler.FailedToCompileError("Failed to compile MJML", {
errors: [error],
Expand Down
Loading

0 comments on commit ce17fb5

Please sign in to comment.