@live-change/email-service 0.8.54 → 0.8.56
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 +6 -2
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.56",
|
|
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.56",
|
|
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": "49e333f2c288e58e0151a3a74fec2e16d96f26cb",
|
|
33
33
|
"type": "module"
|
|
34
34
|
}
|
package/render.js
CHANGED
|
@@ -97,9 +97,13 @@ async function renderEmail(data) {
|
|
|
97
97
|
else resolve(html)
|
|
98
98
|
})
|
|
99
99
|
})
|
|
100
|
-
//console.log("HTML", body)
|
|
100
|
+
//console.log("RENDER EMAIL HTML", body)
|
|
101
101
|
const dom = new JSDOM(body)
|
|
102
|
-
|
|
102
|
+
console.log("RENDER EMAIL HEADERS HTML:", dom.window.document.querySelector('[data-headers]').innerHTML)
|
|
103
|
+
const headersJson = dom.window.document.querySelector('[data-headers]').textContent
|
|
104
|
+
console.log("RENDER EMAIL HEADERS JSON:", headersJson)
|
|
105
|
+
const headers = JSON.parse(headersJson)
|
|
106
|
+
console.log("PARSED HEADERS", headers)
|
|
103
107
|
const messageElements = dom.window.document.querySelectorAll("[data-html],[data-text]")
|
|
104
108
|
const email = { ...headers }
|
|
105
109
|
const images = new Map()
|