@postalsys/email-text-tools 2.4.25 → 2.5.0

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +10 -0
  3. package/dist/cjs/index.d.ts +18 -0
  4. package/dist/cjs/index.js +28 -0
  5. package/dist/cjs/lib/commonjs.cjs +17 -0
  6. package/dist/cjs/lib/commonjs.d.cts +4 -0
  7. package/dist/cjs/lib/format-date.d.ts +15 -0
  8. package/dist/cjs/lib/format-date.js +60 -0
  9. package/dist/cjs/lib/html-guard.d.ts +3 -0
  10. package/dist/cjs/lib/html-guard.js +119 -0
  11. package/dist/cjs/lib/html-to-text.d.ts +1 -0
  12. package/dist/cjs/lib/html-to-text.js +49 -0
  13. package/dist/cjs/lib/inline-html.d.ts +19 -0
  14. package/dist/cjs/lib/inline-html.js +150 -0
  15. package/dist/cjs/lib/inline-text.d.ts +3 -0
  16. package/dist/cjs/lib/inline-text.js +111 -0
  17. package/dist/cjs/lib/juice-worker.d.ts +1 -0
  18. package/dist/cjs/lib/juice-worker.js +19 -0
  19. package/dist/cjs/lib/mime-html.d.ts +34 -0
  20. package/dist/cjs/lib/mime-html.js +529 -0
  21. package/dist/cjs/lib/text-to-html.d.ts +1 -0
  22. package/dist/cjs/lib/text-to-html.js +182 -0
  23. package/dist/cjs/lib/worker-pool.d.ts +61 -0
  24. package/dist/cjs/lib/worker-pool.js +229 -0
  25. package/dist/cjs/package.json +3 -0
  26. package/dist/esm/index.d.ts +18 -0
  27. package/dist/esm/index.js +12 -0
  28. package/dist/esm/lib/commonjs.cjs +17 -0
  29. package/dist/esm/lib/commonjs.d.cts +4 -0
  30. package/dist/esm/lib/format-date.d.ts +15 -0
  31. package/{lib → dist/esm/lib}/format-date.js +8 -16
  32. package/dist/esm/lib/html-guard.d.ts +3 -0
  33. package/{lib → dist/esm/lib}/html-guard.js +8 -24
  34. package/dist/esm/lib/html-to-text.d.ts +1 -0
  35. package/{lib → dist/esm/lib}/html-to-text.js +2 -14
  36. package/dist/esm/lib/inline-html.d.ts +19 -0
  37. package/{lib → dist/esm/lib}/inline-html.js +17 -55
  38. package/dist/esm/lib/inline-text.d.ts +3 -0
  39. package/{lib → dist/esm/lib}/inline-text.js +8 -31
  40. package/dist/esm/lib/juice-worker.d.ts +1 -0
  41. package/{lib → dist/esm/lib}/juice-worker.js +7 -8
  42. package/dist/esm/lib/mime-html.d.ts +34 -0
  43. package/{lib → dist/esm/lib}/mime-html.js +79 -127
  44. package/dist/esm/lib/text-to-html.d.ts +1 -0
  45. package/{lib → dist/esm/lib}/text-to-html.js +35 -63
  46. package/dist/esm/lib/worker-pool.d.ts +61 -0
  47. package/{lib → dist/esm/lib}/worker-pool.js +18 -64
  48. package/dist/esm/package.json +3 -0
  49. package/package.json +72 -10
  50. package/.eslintrc +0 -15
  51. package/.github/VULNERABILITY_REPORT.yml +0 -75
  52. package/.github/workflows/release.yaml +0 -37
  53. package/.github/workflows/test.yaml +0 -31
  54. package/.ncurc.js +0 -22
  55. package/.prettierignore +0 -14
  56. package/.prettierrc.js +0 -8
  57. package/.release-please-manifest.json +0 -3
  58. package/benchmark/benchmark.js +0 -358
  59. package/benchmark/concurrency-benchmark.js +0 -176
  60. package/benchmark/quick-benchmark.js +0 -200
  61. package/benchmark/quick-concurrency.js +0 -64
  62. package/benchmark/real-world-benchmark.js +0 -267
  63. package/docs/PERFORMANCE.md +0 -262
  64. package/eslint.config.js +0 -52
  65. package/examples/failing.html +0 -617
  66. package/examples/fixtures/message-1.json +0 -74
  67. package/examples/inline-html.js +0 -24
  68. package/examples/inline-text.js +0 -24
  69. package/examples/mime-html.js +0 -284
  70. package/index.js +0 -22
  71. package/release-please-config.json +0 -10
  72. package/test/comprehensive.test.js +0 -358
  73. package/test/containment.test.js +0 -128
  74. package/test/edge-cases.test.js +0 -62
  75. package/test/hardening.test.js +0 -504
  76. package/test/html-to-text.test.js +0 -253
  77. package/test/inline-html.test.js +0 -230
  78. package/test/inline-text.test.js +0 -204
  79. package/test/mime-html-extra.test.js +0 -39
  80. package/test/mime-html.test.js +0 -302
  81. package/test/text-to-html-extra.test.js +0 -42
  82. package/test/worker-pool-extra.test.js +0 -132
  83. package/test/worker-pool-regression.test.js +0 -128
  84. package/test/worker-pool.test.js +0 -282
@@ -1,74 +0,0 @@
1
- {
2
- "id": "AAAADQAABlw",
3
- "uid": 1628,
4
- "path": "INBOX",
5
- "date": "2022-07-06T14:12:30.000Z",
6
- "flags": ["\\Seen"],
7
- "size": 4400,
8
- "subject": "Re: proovikiri",
9
- "from": {
10
- "name": "Andris Reinman",
11
- "address": "andris.reinman@gmail.com"
12
- },
13
- "replyTo": [
14
- {
15
- "name": "Andris Reinman",
16
- "address": "andris.reinman@gmail.com"
17
- }
18
- ],
19
- "sender": {
20
- "name": "Andris Reinman",
21
- "address": "andris.reinman@gmail.com"
22
- },
23
- "to": [
24
- {
25
- "name": "andris",
26
- "address": "andris@ekiri.ee"
27
- }
28
- ],
29
- "messageId": "<A768E075-1C9F-4483-A04A-943FA920BFC5@gmail.com>",
30
- "inReplyTo": "<CAPFU5tRb4fM+4d74kkb5bjGuFr7n3kFF_TNXK=67ki93CLzGFw@mail.gmail.com>",
31
- "headers": {
32
- "return-path": ["<andris.reinman@gmail.com>"],
33
- "delivered-to": ["andris@ekiri.ee"],
34
- "received": [
35
- "from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by uvn-67-33.tll01.zonevs.eu (Postfix) with ESMTPS id 44342821FF for <andris@ekiri.ee>; Wed, 6 Jul 2022 17:12:33 +0300 (EEST)",
36
- "by mail-lj1-f179.google.com with SMTP id w2so2284874ljj.7 for <andris@ekiri.ee>; Wed, 06 Jul 2022 07:12:33 -0700 (PDT)",
37
- "from smtpclient.apple (39-152-191-90.dyn.estpak.ee. [90.191.152.39]) by smtp.gmail.com with ESMTPSA id z8-20020a05651c022800b0025d37955bc7sm947119ljn.74.2022.07.06.07.12.30 for <andris@ekiri.ee> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jul 2022 07:12:31 -0700 (PDT)"
38
- ],
39
- "authentication-results": [
40
- "uvn-67-33.tll01.zonevs.eu; dkim=pass reason=\"2048-bit key; insecure key\" header.d=gmail.com header.i=@gmail.com header.b=E9nmrfaB; dkim-adsp=pass; dkim-atps=neutral"
41
- ],
42
- "dkim-signature": [
43
- "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=us7LzUXeWkaVy96MNsqMB7vDjhaZ9hRrGPgxXc9icYc=; b=E9nmrfaBGUMEisRJCJy674YfEQyu2oXIF/1E7AcyGAit26CPU+vfpL3XGXmMzwWKTd S+EjMUwCc4xn4wkmxYl3nxcd3EQr1XpIpp42fK4wEfaAt7Nb3Wp+uV1pBej6Slh2TgBf j7NWyea3gyh/m09OqKAijYesJYw9YGmo+6Y7lgiNFFuIeuJRUrg5htvc6eNzoSQfnIIl QiUptLnrFFfgMRsaBkIsd4ie1/1HnLoa7ngopIRVARKRrrCNRhTqkiM93BUf8nBUDjb7 QPh8PBzzGrVvA9nDLjlSsF8t0s8Nwk9f7HApzFKAra3dzv8VnFY6zQxBm26yCjnrCxbH 8dyA=="
44
- ],
45
- "x-google-dkim-signature": [
46
- "v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=us7LzUXeWkaVy96MNsqMB7vDjhaZ9hRrGPgxXc9icYc=; b=0hw1EbIluZO7ZAuzBIRNVqHtNAHviTJ0RXDtefUWxyfjaaTnKkmnwPum49KIf5gGu+ J7r9tw4rGvQKLjmM1runJiZFZHq7afV3MmR4wGjjvLRA62MAdIcpAT5u8ElxjHf0nhhM OO7Yf+mYwqsB6KDeZQ5JF9LCNBvpe+TQpSXMlHANyWvh5Ofp6ugH+gLEx+8QIJHIcGBi 6cXu+pPb1GsE+M3bWY7DEiYeTDy6QQfxRZSdi9vSHFb4h/R8K6Z1/heJN+RlEGmUU2M7 fQbEuCcHfObhWMe5AmLfDXIlrx+wKxVyVxpafkLSiMQnRSvqhxVSWcUKjzr20TlHT/qH ca9g=="
47
- ],
48
- "x-gm-message-state": ["AJIora/2p0hYvgtQ3eBu7h9wBVVfY6UdVx4BO6QA32p0fTru+yWtItsi GdXLS5baocCqlr3JhbHd4ORKCa46iqRbZA=="],
49
- "x-google-smtp-source": ["AGRyM1s3m/T3Exsg6pXn6DGV9dmrrt5GV7nTjah/wAyWp+fel/88cNszkKiPBCE/I3u1VEiSO1zJMw=="],
50
- "x-received": [
51
- "by 2002:a05:651c:1032:b0:25a:780b:7140 with SMTP id w18-20020a05651c103200b0025a780b7140mr23860776ljm.319.1657116752521; Wed, 06 Jul 2022 07:12:32 -0700 (PDT)"
52
- ],
53
- "from": ["Andris Reinman <andris.reinman@gmail.com>"],
54
- "content-type": ["multipart/alternative; boundary=\"Apple-Mail=_650C0B0C-FF20-4BA0-B542-9025E8199E24\""],
55
- "mime-version": ["1.0 (Mac OS X Mail 16.0 \\(3696.100.31\\))"],
56
- "subject": ["Re: proovikiri"],
57
- "date": ["Wed, 6 Jul 2022 17:12:30 +0300"],
58
- "references": ["<CAPFU5tRb4fM+4d74kkb5bjGuFr7n3kFF_TNXK=67ki93CLzGFw@mail.gmail.com>"],
59
- "to": ["andris <andris@ekiri.ee>"],
60
- "in-reply-to": ["<CAPFU5tRb4fM+4d74kkb5bjGuFr7n3kFF_TNXK=67ki93CLzGFw@mail.gmail.com>"],
61
- "message-id": ["<A768E075-1C9F-4483-A04A-943FA920BFC5@gmail.com>"],
62
- "x-mailer": ["Apple Mail (2.3696.100.31)"]
63
- },
64
- "text": {
65
- "id": "AAAADQAABlyTkaExkaEykA",
66
- "encodedSize": {
67
- "plain": 123,
68
- "html": 590
69
- },
70
- "plain": "multi pultiu 3\n\n> On 6. Jul 2022, at 16:34, Andris Reinman <andris@postalsys.com> wrote:\n> \n> See on lihtsalt proov\n\n",
71
- "html": "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=us-ascii\"></head><body style=\"word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;\" class=\"\">multi <b class=\"\">pultiu 3</b><br class=\"\"><div><br class=\"\"><blockquote type=\"cite\" class=\"\"><div class=\"\">On 6. Jul 2022, at 16:34, Andris Reinman &lt;<a href=\"mailto:andris@postalsys.com\" class=\"\">andris@postalsys.com</a>&gt; wrote:</div><br class=\"Apple-interchange-newline\"><div class=\"\"><div dir=\"ltr\" class=\"\">See on lihtsalt proov</div>\n</div></blockquote></div><br class=\"\"></body></html>",
72
- "hasMore": false
73
- }
74
- }
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- const sourceMessage = require('./fixtures/message-1.json');
4
-
5
- const { inlineHtml } = require('..');
6
-
7
- const messageContent = `<h1>Hello world!</h1>
8
-
9
- <p>Sent from my iPhone</p>`;
10
-
11
- let messageData = {
12
- text: sourceMessage.text && sourceMessage.text.plain,
13
- html: sourceMessage.text && sourceMessage.text.html
14
- };
15
- for (let key of ['from', 'to', 'cc', 'bcc', 'date', 'subject']) {
16
- messageData[key] = sourceMessage[key];
17
- }
18
-
19
- let inlinedHtml = inlineHtml('forward', messageContent, messageData, {
20
- locale: 'et',
21
- tz: 'Europe/Tallinn'
22
- });
23
-
24
- console.log(inlinedHtml);
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- const sourceMessage = require('./fixtures/message-1.json');
4
-
5
- const { inlineText } = require('..');
6
-
7
- const messageContent = `Hello world!
8
-
9
- Sent from my iPhone`;
10
-
11
- let messageData = {
12
- //text: sourceMessage.text && sourceMessage.text.plain,
13
- html: sourceMessage.text && sourceMessage.text.html
14
- };
15
- for (let key of ['from', 'to', 'cc', 'bcc', 'date', 'subject']) {
16
- messageData[key] = sourceMessage[key];
17
- }
18
-
19
- let inlinedHtml = inlineText('forward', messageContent, messageData, {
20
- locale: 'et',
21
- tz: 'Europe/Tallinn'
22
- });
23
-
24
- console.log(inlinedHtml);
@@ -1,284 +0,0 @@
1
- 'use strict';
2
-
3
- const mimeHtml = require('../lib/mime-html');
4
- const fs = require('fs');
5
-
6
- const type = process.argv[3] || 'html';
7
- const file = fs.readFileSync(process.argv[2]);
8
-
9
- const HTML_TEMPLATE = `<!doctype html><html lang="und" dir="auto" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" style="background-color: #fff;"><head>
10
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Neue Nachricht!</title>
11
- <!--[if !mso]><!-->
12
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
13
- <!--<![endif]-->
14
-
15
- <meta name="viewport" content="width=device-width, initial-scale=1">
16
- <style type="text/css">
17
- #outlook a { padding:0; }
18
- body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }
19
- table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }
20
- img { border:0;height:auto;line-height:100%; outline:none;text-decoration:none;-ms-interpolation-mode:bicubic; }
21
- p { display:block;margin:13px 0; }
22
- </style>
23
- <!--[if mso]>
24
- <noscript>
25
- <xml>
26
- <o:OfficeDocumentSettings>
27
- <o:AllowPNG/>
28
- <o:PixelsPerInch>96</o:PixelsPerInch>
29
- </o:OfficeDocumentSettings>
30
- </xml>
31
- </noscript>
32
- <![endif]-->
33
- <!--[if lte mso 11]>
34
- <style type="text/css">
35
- .mj-outlook-group-fix { width:100% !important; }
36
- </style>
37
- <![endif]-->
38
-
39
- <!--[if !mso]><!-->
40
- <link href="https://fonts.googleapis.com/css?family=Inter:400,600" rel="stylesheet" type="text/css">
41
- <style type="text/css">
42
- @import url(https://fonts.googleapis.com/css?family=Inter:400,600);
43
- </style>
44
- <!--<![endif]-->
45
-
46
-
47
-
48
- <style type="text/css">
49
- @media only screen and (min-width:480px) {
50
- .mj-column-per-100 { width:100% !important; max-width: 100%; }
51
- }
52
- </style>
53
- <style media="screen and (min-width:480px)">
54
- .moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; }
55
- </style>
56
-
57
-
58
-
59
-
60
- <style type="text/css">
61
-
62
- @media only screen and (max-width:479px) {
63
- table.mj-full-width-mobile { width: 100% !important; }
64
- td.mj-full-width-mobile { width: auto !important; }
65
- }
66
-
67
- </style>
68
-
69
- <style type="text/css">
70
- .wfix {
71
- max-width: 600px !important;
72
- }
73
-
74
- @media(max-width: 480px) {
75
- .body-image-mobile-width-14 td { width: 14px !important; }
76
- .body-image td { max-width: 100% !important; }
77
- .body-image img { box-sizing: border-box; }
78
- .social-icon-mobile-spacer {
79
- display: inline-block !important;
80
- }
81
- }
82
-
83
- .mobile-only { display: none !important; } .desktop-only { display: block !important; }
84
- @media(max-width: 480px) { .column-stack { width: 100% !important; max-width: 100% !important; display: block !important; } .column-stack td,.column-stack th { padding-left: 0 !important; padding-right: 0 !important; } .mobile-only { display: block !important; } .desktop-only { display: none !important; } }
85
- </style>
86
- <style>
87
- .wrapper {
88
- padding: 0 12px;
89
- }
90
-
91
- /* Superhuman selector */
92
- .ShadowHTML .wrapper {
93
- padding: 0 !important;
94
- }
95
-
96
-
97
-
98
-
99
- .ShadowHTML :is(.styleUnquotedContent .unquoted-content, .styleUnquotedContent .sh-unquoted-content, .styleQuotedContent .sh-quoted-content, .sh-signature, .Signature-settings) :is(td.column-container, div[class^="mj-column-per-"]){font-size:0!important}
100
- html.sh-color :is(td.column-container, div[class^="mj-column-per-"], div.mj-column-per-100.mj-outlook-group-fix){font-size:0!important}
101
- @media(max-width:480px){
102
- html.sh-color .column-stack{width:100%!important;max-width:100%!important;display:block!important}
103
- html.sh-color :is(.column-stack td,.column-stack th){padding-left:0!important;padding-right:0!important;width:100%!important;max-width:100%!important;display:block!important}
104
- html.sh-color :is(.column-stack, .column-stack *){word-break:break-word!important;overflow-wrap:anywhere!important}
105
- html.sh-color :is(.column-persist, .column-persist *){word-break:break-word!important;overflow-wrap:anywhere!important}
106
- }
107
- html.sh-color a[href^="tel:"]{color:inherit!important;text-decoration:none!important;font-size:inherit!important;line-height:inherit!important;letter-spacing:inherit!important;vertical-align:baseline!important}
108
-
109
-
110
- .isMarketing { background-color: #fff !important; }
111
- .isMarketing .styled-primary-column { background-color: #fff !important; border-radius: 0px; }
112
-
113
-
114
- [class~="x_social-icon-dark-mode"] { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; }
115
-
116
- /* Gmail selectors */
117
- u + .body .wrapper {
118
- padding: 0 !important;
119
- }
120
- div > u + .body .wrapper {
121
- padding: 0 !important;
122
- }
123
-
124
- a { text-decoration: none; color: #333; }
125
-
126
-
127
-
128
-
129
- .link-unsubscribe { color: #9ca3af !important; }
130
- </style>
131
- <meta name="color-scheme" content="light">
132
- <meta name="supported-color-schemes" content="light">
133
- </head>
134
- <body class="body" style="word-spacing:normal;background-color:#ffffff;">
135
-
136
-
137
- <div class="email-body" style="background-color:#ffffff;" lang="und" dir="auto">
138
- <!--[if mso]><style type="text/css"> a { text-decoration: underline !important; } .button a { text-decoration: none !important; } .outlook-list-fix { margin-left:4px !important; } .outlook-break-full-link { word-break: break-all !important; } .outlook-hide-social-icon { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; } .outlook-hide-social-icon * { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; } .outlook-hide-social-icon table { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; } .outlook-hide-social-icon tbody { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; } .outlook-hide-social-icon tr { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; } .outlook-hide-social-icon td { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; } .outlook-hide-social-icon img { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; } .outlook-hide-social-icon a { display: none !important; mso-hide:all; width: 0px !important; padding: 0px !important; }
139
- </style><table align="center" border="0" cellpadding="0" cellspacing="0" class="wfix-outlook gmail-no-padding-outlook wrapper-outlook" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
140
-
141
-
142
- <div class="wfix gmail-no-padding wrapper" style="margin:0px auto;max-width:600px;">
143
-
144
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
145
- <tbody>
146
- <tr>
147
- <td style="direction:ltr;font-size:0px;padding:20px 0;padding-top:0;text-align:center;">
148
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="wfix-outlook" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="wfix-outlook" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
149
-
150
-
151
- <div class="wfix" style="margin:0px auto;max-width:600px;">
152
-
153
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
154
- <tbody>
155
- <tr>
156
- <td style="direction:ltr;font-size:0px;padding:20px 0;padding-bottom:30px;padding-left:0px;padding-right:0px;padding-top:30px;text-align:center;">
157
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" class="wfix-outlook rounded-corners-outlook styled-primary-column-outlook" style="vertical-align:top;width:600px;" ><![endif]-->
158
-
159
- <div class="mj-column-per-100 mj-outlook-group-fix wfix rounded-corners styled-primary-column" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
160
-
161
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="border-collapse: separate;">
162
- <tbody>
163
- <tr>
164
- <td style="background-color:#ffffff;border-radius:0px;vertical-align:top;padding-top:0px;padding-right:15px;padding-bottom:0px;padding-left:15px;">
165
-
166
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="" width="100%">
167
- <tbody>
168
-
169
- <tr>
170
- <td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
171
-
172
- <div style="font-family:Inter, ui-sans-serif, sans-serif;font-size:14px;letter-spacing:0px;line-height:21px !important;text-align:left;color:#666666;"><span>&nbsp;</span></div>
173
-
174
- </td>
175
- </tr>
176
-
177
- <tr>
178
- <td align="left" class="body-image body-image-mobile-width-14" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
179
-
180
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
181
- <tbody>
182
- <tr>
183
- <td style="width:14px;">
184
-
185
- <a href="https://framer.com" target="_blank" style="text-decoration: none; color: #333;">
186
-
187
- <img alt="Framer Logo" src="https://d3b9kr64nievew.cloudfront.net/cm915sac71jhgzjjtr8rmq42q/cmb54yn83cy1vzx0ib1pj5jrq.png" style="border:0;border-radius:0px;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="14" height="auto">
188
-
189
- </a>
190
-
191
- </td>
192
- </tr>
193
- </tbody>
194
- </table>
195
-
196
- </td>
197
- </tr>
198
-
199
- <tr>
200
- <td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
201
-
202
- <div style="font-family:Inter, ui-sans-serif, sans-serif;font-size:14px;letter-spacing:0px;line-height:21px !important;text-align:left;color:#666666;"><span>&nbsp;</span></div>
203
-
204
- </td>
205
- </tr>
206
-
207
- <tr>
208
- <td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
209
-
210
- <div style="font-family:Inter, ui-sans-serif, sans-serif;font-size:14px;letter-spacing:0px;line-height:21px !important;text-align:left;color:#666666;"><span style="line-height: 21px !important; font-size: 14px; font-size: 14px !important; white-space: pre-wrap;">Sie haben eine neue Nachricht über das Kontaktformular auf der Webseite erhalten!</span></div>
211
-
212
- </td>
213
- </tr>
214
-
215
- <tr>
216
- <td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
217
-
218
- <div style="font-family:Inter, ui-sans-serif, sans-serif;font-size:14px;letter-spacing:0px;line-height:22px !important;text-align:left;color:#666666;"><span>&nbsp;</span></div>
219
-
220
- </td>
221
- </tr>
222
-
223
- <tr>
224
- <td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
225
-
226
- <div style="font-family:Inter, ui-sans-serif, sans-serif;font-size:14px;letter-spacing:0px;line-height:21px !important;text-align:left;color:#666666;"><span style="line-height: 21px !important; font-size: 14px; font-size: 14px !important; white-space: pre-wrap;"><style type="text/css">a:link {text-decoration: none !important; }</style><div style="line-height:19px;padding-bottom:5px"><span style="color:#999999">Location: </span>Haus kaufen</div><div style="line-height:19px;padding-bottom:5px"><span style="color:#999999">Name: </span>Hayati Kaya</div><div style="line-height:19px;padding-bottom:5px"><span style="color:#999999">Phone Number: </span>+41796336385</div><div style="line-height:19px;padding-bottom:5px"><span style="color:#999999">Email Address: </span>kayahayati@windowslive.com</div><div style="line-height:19px;padding-bottom:5px"><span style="color:#999999">Message: </span>Ich bin an diesem Objekt in Remetchwil interessiert, für das Frau Rudhani zuständig ist, und würde es gerne besichtigen.</div></span></div>
227
-
228
- </td>
229
- </tr>
230
-
231
- <tr>
232
- <td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
233
-
234
- <div style="font-family:Inter, ui-sans-serif, sans-serif;font-size:14px;letter-spacing:0px;line-height:21px !important;text-align:left;color:#666666;"><span>&nbsp;</span></div>
235
-
236
- </td>
237
- </tr>
238
-
239
- <tr>
240
- <td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
241
-
242
- <div style="font-family:Inter, ui-sans-serif, sans-serif;font-size:14px;letter-spacing:0px;line-height:21px !important;text-align:left;color:#666666;"><span>&nbsp;</span></div>
243
-
244
- </td>
245
- </tr>
246
-
247
- </tbody>
248
- </table>
249
-
250
- </td>
251
- </tr>
252
- </tbody>
253
- </table>
254
-
255
- </div>
256
-
257
- <!--[if mso | IE]></td></tr></table><![endif]-->
258
- </td>
259
- </tr>
260
- </tbody>
261
- </table>
262
-
263
- </div>
264
-
265
-
266
- <!--[if mso | IE]></td></tr></table></td></tr></table><![endif]-->
267
- </td>
268
- </tr>
269
- </tbody>
270
- </table>
271
-
272
- </div>
273
-
274
-
275
- <!--[if mso | IE]></td></tr></table><![endif]-->
276
-
277
-
278
- </div>
279
-
280
- </body>
281
- </html>
282
- `;
283
-
284
- console.log(HTML_TEMPLATE.replace(/HTML_BODY/g, mimeHtml({ [type]: file })));
package/index.js DELETED
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- const textToHtml = require('./lib/text-to-html');
4
- const htmlToText = require('./lib/html-to-text');
5
- const inlineHtml = require('./lib/inline-html');
6
- const inlineText = require('./lib/inline-text');
7
-
8
- module.exports = {
9
- textToHtml,
10
- htmlToText,
11
- inlineHtml,
12
- inlineText
13
- };
14
-
15
- // mimeHtml loads jsdom, which costs tens of megabytes of heap, so it is only loaded on first
16
- // access and callers that only need the other helpers never pay for it.
17
- Object.defineProperty(module.exports, 'mimeHtml', {
18
- enumerable: true,
19
- get() {
20
- return require('./lib/mime-html');
21
- }
22
- });
@@ -1,10 +0,0 @@
1
- {
2
- "packages": {
3
- ".": {
4
- "release-type": "node",
5
- "package-name": "@postalsys/email-text-tools",
6
- "pull-request-title-pattern": "chore${scope}: release ${version} [skip-ci]",
7
- "include-component-in-tag": false
8
- }
9
- }
10
- }