@remit/backend 3.1.1 → 3.1.2

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.
@@ -58,7 +58,8 @@ export const organizePredicateRejection = (predicate) => bodyContentRejection(pr
58
58
  */
59
59
  const matchLiteral = async (deps, accountConfigId, predicate, limit, scope) => {
60
60
  const clauses = predicate.literalClauses;
61
- const narrowing = literalClauseTerms(clauses, predicate.matchOperator);
61
+ const { getDomain } = await import("tldts");
62
+ const narrowing = literalClauseTerms(clauses, predicate.matchOperator, getDomain);
62
63
  if (!narrowing)
63
64
  return [];
64
65
  const matched = [];
@@ -75,7 +76,7 @@ const matchLiteral = async (deps, accountConfigId, predicate, limit, scope) => {
75
76
  if (seen.has(messageId))
76
77
  continue;
77
78
  seen.add(messageId);
78
- if (!literalClausesMatch(clauses, predicate.matchOperator, message)) {
79
+ if (!literalClausesMatch(clauses, predicate.matchOperator, message, getDomain)) {
79
80
  continue;
80
81
  }
81
82
  matched.push(messageId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/backend",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Remit Mail Inspector API backend",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -123,6 +123,7 @@
123
123
  "expect-env": "^1.0.1",
124
124
  "openapi-backend": "^5.18.0",
125
125
  "p-map": "^2.1.0",
126
+ "tldts": "^7.4.9",
126
127
  "@types/aws-lambda": "^8.10.162",
127
128
  "@types/better-sqlite3": "^7.6.13",
128
129
  "@remit/logger": "*",