@emailens/engine 0.8.3 → 0.8.4
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/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6420,10 +6420,13 @@ function generateCompatibilityScore(warnings) {
|
|
|
6420
6420
|
const result = {};
|
|
6421
6421
|
for (const client of EMAIL_CLIENTS) {
|
|
6422
6422
|
const clientWarnings = warnings.filter((w) => w.client === client.id);
|
|
6423
|
-
const
|
|
6424
|
-
const
|
|
6425
|
-
const
|
|
6426
|
-
const
|
|
6423
|
+
const errorProps = new Set(clientWarnings.filter((w) => w.severity === "error").map((w) => w.property));
|
|
6424
|
+
const warnProps = new Set(clientWarnings.filter((w) => w.severity === "warning").map((w) => w.property));
|
|
6425
|
+
const infoProps = new Set(clientWarnings.filter((w) => w.severity === "info").map((w) => w.property));
|
|
6426
|
+
const errors = errorProps.size;
|
|
6427
|
+
const warns = warnProps.size;
|
|
6428
|
+
const info = infoProps.size;
|
|
6429
|
+
const score = Math.max(0, Math.min(100, 100 - errors * 10 - warns * 3));
|
|
6427
6430
|
result[client.id] = { score, errors, warnings: warns, info };
|
|
6428
6431
|
}
|
|
6429
6432
|
return result;
|