@remit/backend 0.0.61 → 0.0.63

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/backend",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "description": "Remit Mail Inspector API backend",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "scripts": {
36
36
  "test:typecheck": "tsgo --noEmit",
37
- "test:run": "node --env-file .env.test --import tsx --experimental-test-coverage --test-coverage-include='src/**' --test-coverage-exclude='src/**/*.test.ts' --test-coverage-exclude='src/**/*.test.tsx' --test-coverage-lines=76 --test 'src/**/*.test.ts' 'dev-server/**/*.test.ts'",
37
+ "test:run": "node $NODE_TEST_FLAGS --env-file .env.test --import tsx --experimental-test-coverage --test-coverage-include='src/**' --test-coverage-exclude='src/**/*.test.ts' --test-coverage-exclude='src/**/*.test.tsx' --test-coverage-lines=76 --test 'src/**/*.test.ts' 'dev-server/**/*.test.ts'",
38
38
  "test": "npm run test:typecheck && npm run test:run",
39
39
  "bundle": "esbuild 'src/index.ts' --sourcemap --bundle --platform=node --outfile=dist/index.js",
40
40
  "dev": "node --env-file .env.test --watch --import tsx dev-server/server.ts",
@@ -25,6 +25,7 @@ import {
25
25
  OutboxAttachmentRepo,
26
26
  OutboxMessageRepo,
27
27
  QuarantineRepo,
28
+ SenderSignerStandingRepo,
28
29
  } from "@remit/drizzle-service";
29
30
  import { env } from "expect-env";
30
31
  import {
@@ -73,6 +74,7 @@ export const buildSqliteClient = async (): Promise<RemitClient> => {
73
74
  filterAnchorTransaction: new DrizzleFilterAnchorTransaction(genericDb),
74
75
  label: new LabelRepo(genericDb),
75
76
  messageLabel: new MessageLabelRepo(genericDb),
77
+ senderSignerStanding: new SenderSignerStandingRepo(genericDb),
76
78
  unitOfWork: new DrizzleUnitOfWork(messageDataDb),
77
79
  };
78
80
 
@@ -21,6 +21,7 @@ import type {
21
21
  IOutboxAttachmentRepository,
22
22
  IOutboxMessageRepository,
23
23
  IQuarantineRepository,
24
+ ISenderSignerStandingRepository,
24
25
  IThreadMessageRepository,
25
26
  IUnitOfWork,
26
27
  } from "@remit/data-ports";
@@ -102,6 +103,12 @@ export interface RemitClient {
102
103
  label: ILabelRepository;
103
104
  messageLabel: IMessageLabelRepository;
104
105
 
106
+ // How often a sender has been seen arriving under one DKIM signing identity,
107
+ // per account. Read by the authenticity derivation to tell a familiar
108
+ // third-party signer from a first sighting; written once per message by
109
+ // body-sync, which is its only writer.
110
+ senderSignerStanding: ISenderSignerStandingRepository;
111
+
105
112
  // Atomic write set for a message save. Present on the relational backend (real
106
113
  // transaction); absent on DynamoDB, where callers fall back to per-repo
107
114
  // writes with that backend's own (non-transactional) guarantees.
@@ -182,6 +189,7 @@ export interface RemitClientRepositories {
182
189
  filterAnchorTransaction: IFilterAnchorTransaction;
183
190
  label: ILabelRepository;
184
191
  messageLabel: IMessageLabelRepository;
192
+ senderSignerStanding: ISenderSignerStandingRepository;
185
193
  unitOfWork?: IUnitOfWork;
186
194
  }
187
195
 
@@ -403,6 +411,7 @@ export const createRemitClient = (deps: RemitClientDeps): RemitClient => {
403
411
  filterAnchorTransaction: repositories.filterAnchorTransaction,
404
412
  label: repositories.label,
405
413
  messageLabel: repositories.messageLabel,
414
+ senderSignerStanding: repositories.senderSignerStanding,
406
415
  unitOfWork: repositories.unitOfWork,
407
416
 
408
417
  storage,