@voltro/plugin-broadcast 0.87.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/CHANGELOG.md +169 -6
- package/THIRD-PARTY-NOTICES.md +3 -1346
- package/dist/bus.js +1 -2
- package/dist/namespace.js +1 -2
- package/dist/plugin.js +1 -2
- package/dist/providers.js +1 -2
- package/dist/publishQueue.js +1 -2
- package/dist/resolve.js +1 -2
- package/dist/types.js +1 -2
- package/package.json +5 -5
package/dist/bus.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BROADCAST_CHANNEL as e } from "./types.js";
|
|
2
2
|
import { createPublishQueue as t } from "./publishQueue.js";
|
|
3
3
|
import { Effect as n, Metric as r } from "effect";
|
|
4
|
-
|
|
4
|
+
// src/bus.ts
|
|
5
5
|
var i = ({ origin: e, ...t }) => t, a = (e) => Math.min(500 * 2 ** Math.min(Math.max(e, 1) - 1, 5), 1e4), o = {
|
|
6
6
|
info: () => {},
|
|
7
7
|
warn: () => {},
|
|
@@ -177,5 +177,4 @@ var i = ({ origin: e, ...t }) => t, a = (e) => Math.min(500 * 2 ** Math.min(Math
|
|
|
177
177
|
})(), N)
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
|
-
//#endregion
|
|
181
180
|
export { s as attachBroadcastBus, a as subscribeRetryDelayMs, i as withoutWireOrigin };
|
package/dist/namespace.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/namespace.ts
|
|
2
2
|
var e = "voltro", t = (e) => e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, ""), n = (e) => {
|
|
3
3
|
let n = r(e), i = [e.option, e.env].find((e) => e !== void 0 && t(e).length > 0);
|
|
4
4
|
return {
|
|
@@ -18,5 +18,4 @@ var e = "voltro", t = (e) => e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-"
|
|
|
18
18
|
}
|
|
19
19
|
return e;
|
|
20
20
|
}, i = (e, t) => `${e}:${t}`, a = (e, n) => `${i(e, "events")}:${t(n)}`;
|
|
21
|
-
//#endregion
|
|
22
21
|
export { e as DEFAULT_BROADCAST_NAMESPACE, i as channelFor, n as describeNamespaceResolution, a as eventChannelFor, r as resolveBroadcastNamespace };
|
package/dist/plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveBroadcastProvider as e } from "./resolve.js";
|
|
2
2
|
import { Effect as t } from "effect";
|
|
3
3
|
import { definePlugin as n } from "@voltro/protocol";
|
|
4
|
-
|
|
4
|
+
// src/plugin.ts
|
|
5
5
|
var r = ["network:outbound:*"], i = [
|
|
6
6
|
{
|
|
7
7
|
name: "BROADCAST_NATS_URL",
|
|
@@ -82,5 +82,4 @@ var r = ["network:outbound:*"], i = [
|
|
|
82
82
|
for (let t of e) if (s(t)) return t;
|
|
83
83
|
return null;
|
|
84
84
|
}, s = (e) => typeof e.broadcast == "object" && e.broadcast !== null && typeof e.broadcast.provider == "object";
|
|
85
|
-
//#endregion
|
|
86
85
|
export { a as broadcastPlugin, o as getBroadcastPlugin };
|
package/dist/providers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BroadcastError as e } from "./types.js";
|
|
2
2
|
import { Effect as t } from "effect";
|
|
3
|
-
|
|
3
|
+
// src/providers.ts
|
|
4
4
|
var n = (t, n, r) => new e({
|
|
5
5
|
provider: t,
|
|
6
6
|
message: n,
|
|
@@ -91,5 +91,4 @@ var n = (t, n, r) => new e({
|
|
|
91
91
|
})()))
|
|
92
92
|
};
|
|
93
93
|
}, u = (e) => l("redis", e), d = (e) => l("nats", e);
|
|
94
|
-
//#endregion
|
|
95
94
|
export { c as memoryProvider, d as natsProvider, u as redisProvider, s as resetMemoryBus };
|
package/dist/publishQueue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect as e } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/publishQueue.ts
|
|
3
3
|
var t = (t, n, r, i, a = {}, o = () => {}) => {
|
|
4
4
|
let s = a.maxMessages ?? 1024, c = a.maxBytes ?? 8388608, l = a.timeoutMs ?? 5e3, u = a.shutdownTimeoutMs ?? 1e3;
|
|
5
5
|
for (let [e, t] of Object.entries({
|
|
@@ -60,5 +60,4 @@ var t = (t, n, r, i, a = {}, o = () => {}) => {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
//#endregion
|
|
64
63
|
export { t as createPublishQueue };
|
package/dist/resolve.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { memoryProvider as e, natsProvider as t, redisProvider as n } from "./providers.js";
|
|
2
2
|
import { Effect as r } from "effect";
|
|
3
|
-
|
|
3
|
+
// src/resolve.ts
|
|
4
4
|
var i = (e) => {
|
|
5
5
|
if (!/^(redis|nats):[A-Za-z][A-Za-z0-9_-]*$/.test(e)) throw Error("Broadcast connections require redis:name or nats:name references");
|
|
6
6
|
return e.startsWith("nats:") ? "nats" : "redis";
|
|
@@ -66,5 +66,4 @@ var i = (e) => {
|
|
|
66
66
|
selections: c
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
|
-
//#endregion
|
|
70
69
|
export { a as resolveBroadcastProvider };
|
package/dist/types.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { DEFAULT_BROADCAST_NAMESPACE as e, channelFor as t } from "./namespace.js";
|
|
2
2
|
import { Schema as n } from "effect";
|
|
3
|
-
|
|
3
|
+
// src/types.ts
|
|
4
4
|
var r = class extends n.TaggedError()("BroadcastError", {
|
|
5
5
|
provider: n.String,
|
|
6
6
|
message: n.String,
|
|
7
7
|
transient: n.Boolean,
|
|
8
8
|
cause: n.optional(n.Unknown)
|
|
9
9
|
}) {}, i = t(e, "changes");
|
|
10
|
-
//#endregion
|
|
11
10
|
export { i as BROADCAST_CHANNEL, r as BroadcastError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/plugin-broadcast",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "Cross-replica reactivity — a pub/sub message bus (Redis / NATS / memory) that fans out app-mutation ChangeEvents to every replica behind a load balancer. ADDITIVE to inline emit: local reactivity survives a broker outage; cross-replica degrades gracefully. Closes the single-instance gap for every non-postgres dialect (postgres keeps native LISTEN/NOTIFY).",
|
|
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.
|
|
37
|
-
"@voltro/protocol": "0.
|
|
38
|
-
"@voltro/kv": "0.
|
|
36
|
+
"@voltro/database": "0.88.0",
|
|
37
|
+
"@voltro/protocol": "0.88.0",
|
|
38
|
+
"@voltro/kv": "0.88.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"effect": "4.0
|
|
41
|
+
"effect": "4.1.0"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|