@voltro/plugin-cdc-out 0.86.0 → 0.88.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.
package/dist/engine.js CHANGED
@@ -3,7 +3,7 @@ import { CDCOUT_OUTBOX_TABLE as t, toMs as n } from "./outbox.js";
3
3
  import { Duration as r, Effect as i, Result as a } from "effect";
4
4
  import { and as o, eq as s, inSet as c, lt as l } from "@voltro/database";
5
5
  import { withServerTracer as u } from "@voltro/runtime";
6
- //#region src/engine.ts
6
+ // src/engine.ts
7
7
  var d = (t, n, a) => i.suspend(() => {
8
8
  let o = new AbortController();
9
9
  return i.try(() => t.deliver(n, { signal: o.signal })).pipe(i.flatMap((e) => i.isEffect(e) ? e : i.tryPromise(() => e))).pipe(i.timeoutOrElse({
@@ -152,5 +152,4 @@ var d = (t, n, a) => i.suspend(() => {
152
152
  });
153
153
  }
154
154
  };
155
- //#endregion
156
155
  export { m as CdcOutEngine, d as deliverOnce, p as retryDelayMs };
package/dist/errors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Schema as e } from "effect";
2
- //#region src/errors.ts
2
+ // src/errors.ts
3
3
  var t = class extends e.TaggedError()("CdcConfigError", { message: e.String }) {}, n = class extends e.TaggedError()("CdcDeliveryError", {
4
4
  sink: e.String,
5
5
  reason: e.String
@@ -8,5 +8,4 @@ var t = class extends e.TaggedError()("CdcConfigError", { message: e.String }) {
8
8
  return `cdc-out delivery to '${this.sink}' failed: ${this.reason}`;
9
9
  }
10
10
  };
11
- //#endregion
12
11
  export { t as CdcConfigError, n as CdcDeliveryError };
package/dist/handoff.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/handoff.ts
1
+ // src/handoff.ts
2
2
  var e = class {
3
3
  #e = [];
4
4
  #t = 0;
@@ -33,5 +33,4 @@ var e = class {
33
33
  this.#e = n, this.#t = r;
34
34
  }
35
35
  };
36
- //#endregion
37
36
  export { e as HandoffBuffer };
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { memorySink as m, webhookSink as h } from "./sinks.js";
6
6
  import { Duration as g, Effect as _, Fiber as v, Schedule as y } from "effect";
7
7
  import { definePlugin as te, pluginInstanceName as ne } from "@voltro/protocol";
8
8
  import { OccurrenceCounter as re, and as b, changeDigest as ie, composeChangeKey as ae, count as oe, eq as x, inSet as S, lt as se, registerRetention as C, retentionTtlMsFromEnv as ce } from "@voltro/database";
9
- //#region src/index.ts
9
+ // src/index.ts
10
10
  var le = 100, ue = 5, de = 200, fe = 3e4, pe = 250, me = 1e4, w = 15e3, he = 72, ge = 6e4, _e = 1e4, ve = 1e3, T = (t) => {
11
11
  throw new e({ message: t });
12
12
  }, E = (e) => {
@@ -75,7 +75,7 @@ var le = 100, ue = 5, de = 200, fe = 3e4, pe = 250, me = 1e4, w = 15e3, he = 72,
75
75
  data: t.map ? t.map(e) : e
76
76
  }, a, o)];
77
77
  });
78
- return s.length > 0 && await e.insertMany(i, s), s.length;
78
+ return s.length > 0 && await e.insertMany(i, s, { returning: "none" }), s.length;
79
79
  }, j = "@voltro/plugin-cdc-out", M = (e) => {
80
80
  E(e);
81
81
  let t = e.name ?? "default", r = ne({
@@ -425,5 +425,4 @@ var le = 100, ue = 5, de = 200, fe = 3e4, pe = 250, me = 1e4, w = 15e3, he = 72,
425
425
  })
426
426
  });
427
427
  };
428
- //#endregion
429
428
  export { n as CDCOUT_CLAIMS_TABLE, r as CDCOUT_LEASES_TABLE, i as CDCOUT_OUTBOX_TABLE, e as CdcConfigError, t as CdcDeliveryError, a as CdcLeaseManager, d as CdcOutEngine, ee as HandoffBuffer, o as cdcOutClaimsTable, s as cdcOutLeasesTable, c as cdcOutOutboxTable, M as cdcOutPlugin, f as deliverOnce, A as enqueueBackfill, D as mapChange, m as memorySink, l as nextClaimId, u as nextOutboxId, k as outboxRowFor, O as pipeKey, p as retryDelayMs, E as validateCdcOutConfig, h as webhookSink };
package/dist/outbox.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { and as e, eq as t, generateId as n, id as r, integer as i, json as a, lt as o, table as s, text as c, timestamp as l } from "@voltro/database";
2
- //#region src/outbox.ts
2
+ // src/outbox.ts
3
3
  var u = "_voltro_cdcout_outbox", d = "_voltro_cdcout_leases", f = "_voltro_cdcout_claims", p = {
4
4
  kind: "typeid",
5
5
  prefix: "cdcout"
@@ -68,5 +68,4 @@ var u = "_voltro_cdcout_outbox", d = "_voltro_cdcout_leases", f = "_voltro_cdcou
68
68
  } catch {}
69
69
  }
70
70
  };
71
- //#endregion
72
71
  export { f as CDCOUT_CLAIMS_TABLE, d as CDCOUT_LEASES_TABLE, u as CDCOUT_OUTBOX_TABLE, x as CdcLeaseManager, v as cdcOutClaimsTable, y as cdcOutLeasesTable, _ as cdcOutOutboxTable, g as nextClaimId, h as nextOutboxId, b as toMs };
package/dist/sinks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CdcConfigError as e, CdcDeliveryError as t } from "./errors.js";
2
- //#region src/sinks.ts
2
+ // src/sinks.ts
3
3
  var n = (e = "memory") => {
4
4
  let t = [];
5
5
  return {
@@ -42,5 +42,4 @@ var n = (e = "memory") => {
42
42
  }
43
43
  };
44
44
  };
45
- //#endregion
46
45
  export { n as memorySink, r as webhookSink };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/plugin-cdc-out",
3
- "version": "0.86.0",
3
+ "version": "0.88.0",
4
4
  "description": "Declarative reverse-ETL: mirror framework table changes outward to external sinks (webhook, Kafka via @voltro/plugin-queue's kafkaSink, plus a CdcSink interface for custom sinks) through a durable outbox — ordered per pipe, at-least-once from enqueue, retried with backoff, dead-lettered.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -33,12 +33,12 @@
33
33
  "node": ">=24.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@voltro/database": "0.86.0",
37
- "@voltro/protocol": "0.86.0",
38
- "@voltro/runtime": "0.86.0"
36
+ "@voltro/database": "0.88.0",
37
+ "@voltro/protocol": "0.88.0",
38
+ "@voltro/runtime": "0.88.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "effect": "4.0.1"
41
+ "effect": "4.1.0"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"