mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05:00
fix(server): cannot render email template (#13957)
This commit is contained in:
parent
8d8becd0f7
commit
ebf06dc12e
3 changed files with 174 additions and 67 deletions
165
server/package-lock.json
generated
165
server/package-lock.json
generated
|
@ -23,7 +23,7 @@
|
|||
"@opentelemetry/context-async-hooks": "^1.24.0",
|
||||
"@opentelemetry/exporter-prometheus": "^0.54.0",
|
||||
"@opentelemetry/sdk-node": "^0.54.0",
|
||||
"@react-email/components": "^0.0.26",
|
||||
"@react-email/components": "^0.0.25",
|
||||
"@socket.io/redis-adapter": "^8.3.0",
|
||||
"archiver": "^7.0.0",
|
||||
"async-lock": "^1.4.0",
|
||||
|
@ -2643,7 +2643,8 @@
|
|||
"node_modules/@one-ini/wasm": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz",
|
||||
"integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw=="
|
||||
"integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@opentelemetry/api": {
|
||||
"version": "1.8.0",
|
||||
|
@ -3966,9 +3967,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@react-email/button": {
|
||||
"version": "0.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/button/-/button-0.0.18.tgz",
|
||||
"integrity": "sha512-uNUnpeDzz1o9HAky47JSTsUN/Ih0A3Az165AAOgAy8XOVzQJPrltUBRzHkScSVJTwRqKLASkie1yZbtNGIcRdA==",
|
||||
"version": "0.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/button/-/button-0.0.17.tgz",
|
||||
"integrity": "sha512-ioHdsk+BpGS/PqjU6JS7tUrVy9yvbUx92Z+Cem2+MbYp55oEwQ9VHf7u4f5NoM0gdhfKSehBwRdYlHt/frEMcg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
|
@ -4013,12 +4015,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@react-email/components": {
|
||||
"version": "0.0.26",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/components/-/components-0.0.26.tgz",
|
||||
"integrity": "sha512-FqxCGnQiI4zztEBAXPfjovIQ9e1l7NJNMgE8hSaH7slWySFn/PpPRQFYpxyCFNr9DqPVHtKYtpo8xvUYx2LdTg==",
|
||||
"version": "0.0.25",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/components/-/components-0.0.25.tgz",
|
||||
"integrity": "sha512-lnfVVrThEcET5NPoeaXvrz9UxtWpGRcut2a07dLbyKgNbP7vj/cXTI5TuHtanCvhCddFpMDnElNRghDOfPzwUg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@react-email/body": "0.0.10",
|
||||
"@react-email/button": "0.0.18",
|
||||
"@react-email/button": "0.0.17",
|
||||
"@react-email/code-block": "0.0.9",
|
||||
"@react-email/code-inline": "0.0.4",
|
||||
"@react-email/column": "0.0.12",
|
||||
|
@ -4029,13 +4032,13 @@
|
|||
"@react-email/hr": "0.0.10",
|
||||
"@react-email/html": "0.0.10",
|
||||
"@react-email/img": "0.0.10",
|
||||
"@react-email/link": "0.0.11",
|
||||
"@react-email/link": "0.0.10",
|
||||
"@react-email/markdown": "0.0.12",
|
||||
"@react-email/preview": "0.0.11",
|
||||
"@react-email/render": "1.0.2",
|
||||
"@react-email/row": "0.0.11",
|
||||
"@react-email/section": "0.0.15",
|
||||
"@react-email/tailwind": "1.0.0",
|
||||
"@react-email/render": "1.0.1",
|
||||
"@react-email/row": "0.0.10",
|
||||
"@react-email/section": "0.0.14",
|
||||
"@react-email/tailwind": "0.1.0",
|
||||
"@react-email/text": "0.0.10"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -4120,9 +4123,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@react-email/link": {
|
||||
"version": "0.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/link/-/link-0.0.11.tgz",
|
||||
"integrity": "sha512-o1/BgPn2Fi+bN4Nh+P64t4tulaOyPhkBNSpNmiYL1Ar+ilw8q0BmUAqM+lvHy8Qr/4K7BjkgFoc4GoYkoEjOig==",
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/link/-/link-0.0.10.tgz",
|
||||
"integrity": "sha512-tva3wvAWSR10lMJa9fVA09yRn7pbEki0ZZpHE6GD1jKbFhmzt38VgLO9B797/prqoDZdAr4rVK7LJFcdPx3GwA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
|
@ -4156,9 +4160,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@react-email/render": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/render/-/render-1.0.2.tgz",
|
||||
"integrity": "sha512-q82eBd39TepzA/xjlm8szqJlrQk/gh7mgtxXMGlJ4dcdx89go1m9YBDpZY98SFy+2r2KAOd5A1mxvUbsPwoATg==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/render/-/render-1.0.1.tgz",
|
||||
"integrity": "sha512-W3gTrcmLOVYnG80QuUp22ReIT/xfLsVJ+n7ghSlG2BITB8evNABn1AO2rGQoXuK84zKtDAlxCdm3hRyIpZdGSA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"html-to-text": "9.0.5",
|
||||
"js-beautify": "^1.14.11",
|
||||
|
@ -4173,9 +4178,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@react-email/row": {
|
||||
"version": "0.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/row/-/row-0.0.11.tgz",
|
||||
"integrity": "sha512-ra09h7BMoGa14ds3vh7KVuj1N3astTstEC1YbMdCiHcx/nxylglNaT7qJXU74ZTzyHiGabyiNuyabTS+HLoMCA==",
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/row/-/row-0.0.10.tgz",
|
||||
"integrity": "sha512-jPyEhG3gsLX+Eb9U+A30fh0gK6hXJwF4ghJ+ZtFQtlKAKqHX+eCpWlqB3Xschd/ARJLod8WAswg0FB+JD9d0/A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
|
@ -4184,9 +4190,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@react-email/section": {
|
||||
"version": "0.0.15",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/section/-/section-0.0.15.tgz",
|
||||
"integrity": "sha512-xfM3Qy5eU7fbkwvktlTeQgad7uo+1Z7YVh1aowSZaRBvKbkEXgoH/XssRYQmQL8ZrZGXbEJMujwtf4fsQL6vrg==",
|
||||
"version": "0.0.14",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/section/-/section-0.0.14.tgz",
|
||||
"integrity": "sha512-+fYWLb4tPU1A/+GE5J1+SEMA7/wR3V30lQ+OR9t2kAJqNrARDbMx0bLnYnR1QL5TiFRz0pCF05SQUobk6gHEDQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
|
@ -4195,9 +4202,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@react-email/tailwind": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/tailwind/-/tailwind-1.0.0.tgz",
|
||||
"integrity": "sha512-LV0SflR0aI5Sjxyp8upyPL8Ctwj+7aqwTgCDO9yZuOI6KpXbBGaYz8bSofe8oaVc/BmymZ5O3+/7FjQexbW+Yg==",
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/tailwind/-/tailwind-0.1.0.tgz",
|
||||
"integrity": "sha512-qysVUEY+M3SKUvu35XDpzn7yokhqFOT3tPU6Mj/pgc62TL5tQFj6msEbBtwoKs2qO3WZvai0DIHdLhaOxBQSow==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
|
@ -4468,6 +4476,7 @@
|
|||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz",
|
||||
"integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"domhandler": "^5.0.3",
|
||||
"selderee": "^0.11.0"
|
||||
|
@ -7059,6 +7068,7 @@
|
|||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
|
||||
"integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ini": "^1.3.4",
|
||||
"proto-list": "~1.2.1"
|
||||
|
@ -7553,6 +7563,7 @@
|
|||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
|
||||
"integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.3.0",
|
||||
"domhandler": "^5.0.2",
|
||||
|
@ -7571,12 +7582,14 @@
|
|||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fb55"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/domhandler": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
|
||||
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.3.0"
|
||||
},
|
||||
|
@ -7591,6 +7604,7 @@
|
|||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
|
||||
"integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"dom-serializer": "^2.0.0",
|
||||
"domelementtype": "^2.3.0",
|
||||
|
@ -7620,6 +7634,7 @@
|
|||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz",
|
||||
"integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@one-ini/wasm": "0.1.1",
|
||||
"commander": "^10.0.0",
|
||||
|
@ -7637,6 +7652,7 @@
|
|||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
|
@ -7645,6 +7661,7 @@
|
|||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
|
||||
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
|
@ -7653,6 +7670,7 @@
|
|||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
|
||||
"integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
|
@ -7740,6 +7758,7 @@
|
|||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
||||
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
},
|
||||
|
@ -9072,6 +9091,7 @@
|
|||
"version": "9.0.5",
|
||||
"resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz",
|
||||
"integrity": "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@selderee/plugin-htmlparser2": "^0.11.0",
|
||||
"deepmerge": "^4.3.1",
|
||||
|
@ -9094,6 +9114,7 @@
|
|||
"url": "https://github.com/sponsors/fb55"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.3.0",
|
||||
"domhandler": "^5.0.3",
|
||||
|
@ -9239,7 +9260,8 @@
|
|||
"node_modules/ini": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/inquirer": {
|
||||
"version": "8.2.6",
|
||||
|
@ -9537,6 +9559,7 @@
|
|||
"version": "1.15.1",
|
||||
"resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.1.tgz",
|
||||
"integrity": "sha512-ESjNzSlt/sWE8sciZH8kBF8BPlwXPwhR6pWKAw8bw4Bwj+iZcnKW6ONWUutJ7eObuBZQpiIb8S7OYspWrKt7rA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"config-chain": "^1.1.13",
|
||||
"editorconfig": "^1.0.4",
|
||||
|
@ -9557,14 +9580,16 @@
|
|||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz",
|
||||
"integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/js-beautify/node_modules/nopt": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz",
|
||||
"integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==",
|
||||
"version": "7.2.1",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz",
|
||||
"integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"abbrev": "^2.0.0"
|
||||
},
|
||||
|
@ -9579,6 +9604,7 @@
|
|||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz",
|
||||
"integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
|
@ -9722,6 +9748,7 @@
|
|||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/leac/-/leac-0.6.0.tgz",
|
||||
"integrity": "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/killymxi"
|
||||
}
|
||||
|
@ -10873,6 +10900,7 @@
|
|||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz",
|
||||
"integrity": "sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"leac": "^0.6.0",
|
||||
"peberminta": "^0.9.0"
|
||||
|
@ -10995,6 +11023,7 @@
|
|||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.9.0.tgz",
|
||||
"integrity": "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/killymxi"
|
||||
}
|
||||
|
@ -11455,7 +11484,8 @@
|
|||
"node_modules/proto-list": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
|
||||
"integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA=="
|
||||
"integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/protobufjs": {
|
||||
"version": "7.4.0",
|
||||
|
@ -12118,6 +12148,7 @@
|
|||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/react-promise-suspense/-/react-promise-suspense-0.3.4.tgz",
|
||||
"integrity": "sha512-I42jl7L3Ze6kZaq+7zXWSunBa3b1on5yfvUW6Eo/3fFOj6dZ5Bqmcd264nJbTK/gn1HjjILAjSwnZbV4RpSaNQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^2.0.1"
|
||||
}
|
||||
|
@ -12125,7 +12156,8 @@
|
|||
"node_modules/react-promise-suspense/node_modules/fast-deep-equal": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
|
||||
"integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w=="
|
||||
"integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/read-cache": {
|
||||
"version": "1.0.0",
|
||||
|
@ -12765,6 +12797,7 @@
|
|||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz",
|
||||
"integrity": "sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"parseley": "^0.12.0"
|
||||
},
|
||||
|
@ -17450,9 +17483,9 @@
|
|||
"requires": {}
|
||||
},
|
||||
"@react-email/button": {
|
||||
"version": "0.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/button/-/button-0.0.18.tgz",
|
||||
"integrity": "sha512-uNUnpeDzz1o9HAky47JSTsUN/Ih0A3Az165AAOgAy8XOVzQJPrltUBRzHkScSVJTwRqKLASkie1yZbtNGIcRdA==",
|
||||
"version": "0.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/button/-/button-0.0.17.tgz",
|
||||
"integrity": "sha512-ioHdsk+BpGS/PqjU6JS7tUrVy9yvbUx92Z+Cem2+MbYp55oEwQ9VHf7u4f5NoM0gdhfKSehBwRdYlHt/frEMcg==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-email/code-block": {
|
||||
|
@ -17476,12 +17509,12 @@
|
|||
"requires": {}
|
||||
},
|
||||
"@react-email/components": {
|
||||
"version": "0.0.26",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/components/-/components-0.0.26.tgz",
|
||||
"integrity": "sha512-FqxCGnQiI4zztEBAXPfjovIQ9e1l7NJNMgE8hSaH7slWySFn/PpPRQFYpxyCFNr9DqPVHtKYtpo8xvUYx2LdTg==",
|
||||
"version": "0.0.25",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/components/-/components-0.0.25.tgz",
|
||||
"integrity": "sha512-lnfVVrThEcET5NPoeaXvrz9UxtWpGRcut2a07dLbyKgNbP7vj/cXTI5TuHtanCvhCddFpMDnElNRghDOfPzwUg==",
|
||||
"requires": {
|
||||
"@react-email/body": "0.0.10",
|
||||
"@react-email/button": "0.0.18",
|
||||
"@react-email/button": "0.0.17",
|
||||
"@react-email/code-block": "0.0.9",
|
||||
"@react-email/code-inline": "0.0.4",
|
||||
"@react-email/column": "0.0.12",
|
||||
|
@ -17492,13 +17525,13 @@
|
|||
"@react-email/hr": "0.0.10",
|
||||
"@react-email/html": "0.0.10",
|
||||
"@react-email/img": "0.0.10",
|
||||
"@react-email/link": "0.0.11",
|
||||
"@react-email/link": "0.0.10",
|
||||
"@react-email/markdown": "0.0.12",
|
||||
"@react-email/preview": "0.0.11",
|
||||
"@react-email/render": "1.0.2",
|
||||
"@react-email/row": "0.0.11",
|
||||
"@react-email/section": "0.0.15",
|
||||
"@react-email/tailwind": "1.0.0",
|
||||
"@react-email/render": "1.0.1",
|
||||
"@react-email/row": "0.0.10",
|
||||
"@react-email/section": "0.0.14",
|
||||
"@react-email/tailwind": "0.1.0",
|
||||
"@react-email/text": "0.0.10"
|
||||
}
|
||||
},
|
||||
|
@ -17545,9 +17578,9 @@
|
|||
"requires": {}
|
||||
},
|
||||
"@react-email/link": {
|
||||
"version": "0.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/link/-/link-0.0.11.tgz",
|
||||
"integrity": "sha512-o1/BgPn2Fi+bN4Nh+P64t4tulaOyPhkBNSpNmiYL1Ar+ilw8q0BmUAqM+lvHy8Qr/4K7BjkgFoc4GoYkoEjOig==",
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/link/-/link-0.0.10.tgz",
|
||||
"integrity": "sha512-tva3wvAWSR10lMJa9fVA09yRn7pbEki0ZZpHE6GD1jKbFhmzt38VgLO9B797/prqoDZdAr4rVK7LJFcdPx3GwA==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-email/markdown": {
|
||||
|
@ -17565,9 +17598,9 @@
|
|||
"requires": {}
|
||||
},
|
||||
"@react-email/render": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/render/-/render-1.0.2.tgz",
|
||||
"integrity": "sha512-q82eBd39TepzA/xjlm8szqJlrQk/gh7mgtxXMGlJ4dcdx89go1m9YBDpZY98SFy+2r2KAOd5A1mxvUbsPwoATg==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/render/-/render-1.0.1.tgz",
|
||||
"integrity": "sha512-W3gTrcmLOVYnG80QuUp22ReIT/xfLsVJ+n7ghSlG2BITB8evNABn1AO2rGQoXuK84zKtDAlxCdm3hRyIpZdGSA==",
|
||||
"requires": {
|
||||
"html-to-text": "9.0.5",
|
||||
"js-beautify": "^1.14.11",
|
||||
|
@ -17575,21 +17608,21 @@
|
|||
}
|
||||
},
|
||||
"@react-email/row": {
|
||||
"version": "0.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/row/-/row-0.0.11.tgz",
|
||||
"integrity": "sha512-ra09h7BMoGa14ds3vh7KVuj1N3astTstEC1YbMdCiHcx/nxylglNaT7qJXU74ZTzyHiGabyiNuyabTS+HLoMCA==",
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/row/-/row-0.0.10.tgz",
|
||||
"integrity": "sha512-jPyEhG3gsLX+Eb9U+A30fh0gK6hXJwF4ghJ+ZtFQtlKAKqHX+eCpWlqB3Xschd/ARJLod8WAswg0FB+JD9d0/A==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-email/section": {
|
||||
"version": "0.0.15",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/section/-/section-0.0.15.tgz",
|
||||
"integrity": "sha512-xfM3Qy5eU7fbkwvktlTeQgad7uo+1Z7YVh1aowSZaRBvKbkEXgoH/XssRYQmQL8ZrZGXbEJMujwtf4fsQL6vrg==",
|
||||
"version": "0.0.14",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/section/-/section-0.0.14.tgz",
|
||||
"integrity": "sha512-+fYWLb4tPU1A/+GE5J1+SEMA7/wR3V30lQ+OR9t2kAJqNrARDbMx0bLnYnR1QL5TiFRz0pCF05SQUobk6gHEDQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-email/tailwind": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/tailwind/-/tailwind-1.0.0.tgz",
|
||||
"integrity": "sha512-LV0SflR0aI5Sjxyp8upyPL8Ctwj+7aqwTgCDO9yZuOI6KpXbBGaYz8bSofe8oaVc/BmymZ5O3+/7FjQexbW+Yg==",
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-email/tailwind/-/tailwind-0.1.0.tgz",
|
||||
"integrity": "sha512-qysVUEY+M3SKUvu35XDpzn7yokhqFOT3tPU6Mj/pgc62TL5tQFj6msEbBtwoKs2qO3WZvai0DIHdLhaOxBQSow==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-email/text": {
|
||||
|
@ -21551,9 +21584,9 @@
|
|||
"integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ=="
|
||||
},
|
||||
"nopt": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz",
|
||||
"integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==",
|
||||
"version": "7.2.1",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz",
|
||||
"integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==",
|
||||
"requires": {
|
||||
"abbrev": "^2.0.0"
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
"@opentelemetry/context-async-hooks": "^1.24.0",
|
||||
"@opentelemetry/exporter-prometheus": "^0.54.0",
|
||||
"@opentelemetry/sdk-node": "^0.54.0",
|
||||
"@react-email/components": "^0.0.26",
|
||||
"@react-email/components": "^0.0.25",
|
||||
"@socket.io/redis-adapter": "^8.3.0",
|
||||
"archiver": "^7.0.0",
|
||||
"async-lock": "^1.4.0",
|
||||
|
|
74
server/src/repositories/notification.repository.spec.ts
Normal file
74
server/src/repositories/notification.repository.spec.ts
Normal file
|
@ -0,0 +1,74 @@
|
|||
import { ILoggerRepository } from 'src/interfaces/logger.interface';
|
||||
import { EmailRenderRequest, EmailTemplate } from 'src/interfaces/notification.interface';
|
||||
import { NotificationRepository } from 'src/repositories/notification.repository';
|
||||
import { Mocked } from 'vitest';
|
||||
|
||||
describe(NotificationRepository.name, () => {
|
||||
let sut: NotificationRepository;
|
||||
let loggerMock: Mocked<ILoggerRepository>;
|
||||
|
||||
beforeEach(() => {
|
||||
loggerMock = {
|
||||
setContext: vitest.fn(),
|
||||
debug: vitest.fn(),
|
||||
} as unknown as Mocked<ILoggerRepository>;
|
||||
|
||||
sut = new NotificationRepository(loggerMock);
|
||||
});
|
||||
|
||||
describe('renderEmail', () => {
|
||||
it('should render the email correctly for TEST_EMAIL template', async () => {
|
||||
const request: EmailRenderRequest = {
|
||||
template: EmailTemplate.TEST_EMAIL,
|
||||
data: { displayName: 'Alen Turing', baseUrl: 'http://localhost' },
|
||||
};
|
||||
|
||||
const result = await sut.renderEmail(request);
|
||||
|
||||
expect(result.html).toContain('<!DOCTYPE html PUBLIC');
|
||||
expect(result.text).toContain('test email');
|
||||
});
|
||||
|
||||
it('should render the email correctly for WELCOME template', async () => {
|
||||
const request: EmailRenderRequest = {
|
||||
template: EmailTemplate.WELCOME,
|
||||
data: { displayName: 'Alen Turing', username: 'turing', baseUrl: 'http://localhost' },
|
||||
};
|
||||
|
||||
const result = await sut.renderEmail(request);
|
||||
|
||||
expect(result.html).toContain('<!DOCTYPE html PUBLIC');
|
||||
expect(result.text).toContain('A new account has been created for you');
|
||||
});
|
||||
|
||||
it('should render the email correctly for ALBUM_INVITE template', async () => {
|
||||
const request: EmailRenderRequest = {
|
||||
template: EmailTemplate.ALBUM_INVITE,
|
||||
data: {
|
||||
albumName: 'Vacation',
|
||||
albumId: '123',
|
||||
senderName: 'John',
|
||||
recipientName: 'Jane',
|
||||
baseUrl: 'http://localhost',
|
||||
},
|
||||
};
|
||||
|
||||
const result = await sut.renderEmail(request);
|
||||
|
||||
expect(result.html).toContain('<!DOCTYPE html PUBLIC');
|
||||
expect(result.text).toContain('Vacation');
|
||||
});
|
||||
|
||||
it('should render the email correctly for ALBUM_UPDATE template', async () => {
|
||||
const request: EmailRenderRequest = {
|
||||
template: EmailTemplate.ALBUM_UPDATE,
|
||||
data: { albumName: 'Holiday', albumId: '123', recipientName: 'Jane', baseUrl: 'http://localhost' },
|
||||
};
|
||||
|
||||
const result = await sut.renderEmail(request);
|
||||
|
||||
expect(result.html).toContain('<!DOCTYPE html PUBLIC');
|
||||
expect(result.text).toContain('Holiday');
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Reference in a new issue