From a8a17443c2d070d2d23920ffff7e4a43c905698c Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Wed, 23 Apr 2025 17:27:55 -0700 Subject: Refactor for everywhere to use sendEmailFromTemplate everywhere * Created a singleton to house handlebars so req doesn't need to be passed everywhere (should make unit testing easier later) * Subjectline for sendgrid and nodemailer are both always prefixed in sendEmail() * removed prefix subjectline from all other email places * added a couple if (!event) { return 404 } to help make typescript happy * some minor eslint auto fixes (looks like let => const where it can) --- pnpm-lock.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pnpm-lock.yaml') diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5139a4a..0ac81b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@sendgrid/helpers': + specifier: ^8.0.0 + version: 8.0.0 '@sendgrid/mail': specifier: ^6.5.5 version: 6.5.5 @@ -370,6 +373,10 @@ packages: resolution: {integrity: sha512-uRFEanalfss5hDsuzVXZ1wm7i7eEXHh1py80piOXjobiQ+MxmtR19EU+gDSXZ+uMcEehBGhxnb7QDNN0q65qig==} engines: {node: '>= 6.0.0'} + '@sendgrid/helpers@8.0.0': + resolution: {integrity: sha512-Ze7WuW2Xzy5GT5WRx+yEv89fsg/pgy3T1E3FS0QEx0/VvRmigMZ5qyVGhJz4SxomegDkzXv/i0aFPpHKN8qdAA==} + engines: {node: '>= 12.0.0'} + '@sendgrid/mail@6.5.5': resolution: {integrity: sha512-DSu8oTPI0BJFH60jMOG9gM+oeNMoRALFmdAYg2PIXpL+Zbxd7L2GzQZtmf1jLy/8UBImkbB3D74TjiOBiLRK1w==} engines: {node: '>=6.0.0'} @@ -2661,6 +2668,10 @@ snapshots: chalk: 2.4.2 deepmerge: 4.3.1 + '@sendgrid/helpers@8.0.0': + dependencies: + deepmerge: 4.3.1 + '@sendgrid/mail@6.5.5': dependencies: '@sendgrid/client': 6.5.5 -- cgit v1.2.3 From 53e7e321d20cd7071ff617ecfcf42f6122020bcd Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Mon, 28 Apr 2025 19:16:28 -0700 Subject: switch to 3rd party merge which doesn't mutate config --- pnpm-lock.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pnpm-lock.yaml') diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0ac81b2..11f04d9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,9 @@ importers: toml: specifier: ^3.0.0 version: 3.0.0 + ts-deepmerge: + specifier: ^7.0.2 + version: 7.0.2 typescript: specifier: ^5.4.5 version: 5.4.5 @@ -2130,6 +2133,10 @@ packages: resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} engines: {node: '>=14'} + ts-deepmerge@7.0.2: + resolution: {integrity: sha512-akcpDTPuez4xzULo5NwuoKwYRtjQJ9eoNfBACiBMaXwNAx7B1PKfe5wqUFJuW5uKzQ68YjDFwPaWHDG1KnFGsA==} + engines: {node: '>=14.13.1'} + tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} @@ -4574,6 +4581,8 @@ snapshots: dependencies: punycode: 2.3.1 + ts-deepmerge@7.0.2: {} + tslib@1.14.1: {} tslib@2.6.2: {} -- cgit v1.2.3