@live-change/email-service 0.8.53 → 0.8.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/render.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/email-service",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.55",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://www.viamage.com/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/framework": "^0.8.
|
|
24
|
+
"@live-change/framework": "^0.8.55",
|
|
25
25
|
"got": "^11.8.3",
|
|
26
26
|
"html-to-text": "8.1.0",
|
|
27
27
|
"inline-css": "4.0.2",
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"juice": "9.1.0",
|
|
30
30
|
"nodemailer": "^6.7.2"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "b2852afbfeceda54a0e3207ec92c9e86eaa0ebe2",
|
|
33
33
|
"type": "module"
|
|
34
34
|
}
|
package/render.js
CHANGED
|
@@ -99,7 +99,10 @@ async function renderEmail(data) {
|
|
|
99
99
|
})
|
|
100
100
|
//console.log("HTML", body)
|
|
101
101
|
const dom = new JSDOM(body)
|
|
102
|
-
const
|
|
102
|
+
const headersJson = dom.window.document.querySelector('[data-headers]').textContent
|
|
103
|
+
console.log("RENDER EMAIL HEADERS JSON:", headersJson)
|
|
104
|
+
const headers = JSON.parse(headersJson)
|
|
105
|
+
console.log("PARSED HEADERS", headers)
|
|
103
106
|
const messageElements = dom.window.document.querySelectorAll("[data-html],[data-text]")
|
|
104
107
|
const email = { ...headers }
|
|
105
108
|
const images = new Map()
|