mailery 0.2.0 → 0.2.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.
@@ -1,5 +1,5 @@
1
1
  import { Db } from 'mongodb';
2
- import { C as ContactAdapter, a as Contact, A as AdapterFilter, c as Mailer, r as NullProvider } from './null-CWw3Gpbl.cjs';
2
+ import { C as ContactAdapter, a as Contact, A as AdapterFilter, c as Mailer, r as NullProvider } from './null-DaisDvB_.cjs';
3
3
  import 'zod';
4
4
  import 'handlebars';
5
5
  import 'ioredis';
package/dist/testing.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Db } from 'mongodb';
2
- import { C as ContactAdapter, a as Contact, A as AdapterFilter, c as Mailer, r as NullProvider } from './null-CWw3Gpbl.js';
2
+ import { C as ContactAdapter, a as Contact, A as AdapterFilter, c as Mailer, r as NullProvider } from './null-DaisDvB_.js';
3
3
  import 'zod';
4
4
  import 'handlebars';
5
5
  import 'ioredis';
package/dist/testing.js CHANGED
@@ -15933,6 +15933,25 @@ async function promoteSoftBounces(ctx) {
15933
15933
  // src/server/runner/tick.ts
15934
15934
  var STRANDED_SEND_THRESHOLD_MS = 5 * 60 * 1e3;
15935
15935
  async function runTick(ctx) {
15936
+ await ctx.collections.health.updateOne(
15937
+ { _id: "singleton" },
15938
+ {
15939
+ $set: { updatedAt: /* @__PURE__ */ new Date() },
15940
+ $setOnInsert: {
15941
+ _id: "singleton",
15942
+ windowStartedAt: /* @__PURE__ */ new Date(),
15943
+ windowDurationMs: ctx.config.circuitBreaker.windowMinutes * 60 * 1e3,
15944
+ status: "healthy",
15945
+ trippedAt: null,
15946
+ trippedReason: null,
15947
+ manuallyResumedAt: null,
15948
+ counters: { sent: 0, delivered: 0, bounced: 0, hardBounced: 0, softBounced: 0, complained: 0, failedToSend: 0 },
15949
+ rates: { bounceRate: 0, hardBounceRate: 0, complaintRate: 0, failureRate: 0 }
15950
+ }
15951
+ },
15952
+ { upsert: true }
15953
+ ).catch(() => {
15954
+ });
15936
15955
  await processNewlyFiredEventTriggers(ctx).catch((err) => {
15937
15956
  console.error("mailery: triggers scan failed", err);
15938
15957
  });