@fedify/fedify 2.3.0-dev.1131 → 2.3.0-dev.1145

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.
Files changed (104) hide show
  1. package/README.md +3 -0
  2. package/dist/{assert-DikXweDx.mjs → assert-OguE97r2.mjs} +1 -1
  3. package/dist/{assert_instance_of-C4Ri6VuN.mjs → assert_instance_of-DBC5X09g.mjs} +1 -1
  4. package/dist/{assert_not_equals--wG9hV7u.mjs → assert_not_equals-DkVK8oqV.mjs} +1 -1
  5. package/dist/{assert_rejects-DQP-q39h.mjs → assert_rejects-DN60FHPX.mjs} +2 -2
  6. package/dist/{assert_strict_equals-Dmjbg-bA.mjs → assert_strict_equals-XEgZAlrj.mjs} +1 -1
  7. package/dist/{assert_throws-4NwKEy2q.mjs → assert_throws-BOkhLGYc.mjs} +1 -1
  8. package/dist/{builder-DckAhD27.mjs → builder-ShiR1K6b.mjs} +60 -41
  9. package/dist/compat/mod.d.cts +1 -1
  10. package/dist/compat/mod.d.ts +1 -1
  11. package/dist/compat/outgoing-jsonld.test.mjs +3 -3
  12. package/dist/compat/public-audience.test.mjs +3 -3
  13. package/dist/compat/transformers.test.mjs +5 -5
  14. package/dist/{context-Cq18Gplu.d.ts → context-DCtsSHDv.d.ts} +2 -86
  15. package/dist/{context-tc6VOOOL.d.cts → context-DI2gRbyN.d.cts} +1 -87
  16. package/dist/{context-BAE7AKLA.mjs → context-DVoTs_wM.mjs} +1 -1
  17. package/dist/{deno--CS-SBS9.mjs → deno-h0TWFuEz.mjs} +1 -1
  18. package/dist/{docloader-k6huZLQL.mjs → docloader-BdDN0Aqx.mjs} +3 -3
  19. package/dist/federation/builder.test.mjs +138 -10
  20. package/dist/federation/collection.test.mjs +3 -3
  21. package/dist/federation/handler.test.mjs +12 -12
  22. package/dist/federation/idempotency.test.mjs +6 -6
  23. package/dist/federation/inbox.test.mjs +3 -3
  24. package/dist/federation/keycache.test.mjs +5 -5
  25. package/dist/federation/kv.test.mjs +3 -3
  26. package/dist/federation/metrics.test.mjs +63 -4
  27. package/dist/federation/middleware.test.mjs +30 -18
  28. package/dist/federation/mod.cjs +155 -3
  29. package/dist/federation/mod.d.cts +2 -2
  30. package/dist/federation/mod.d.ts +2 -2
  31. package/dist/federation/mod.js +153 -1
  32. package/dist/federation/mq.test.mjs +5 -5
  33. package/dist/federation/negotiation.test.mjs +4 -4
  34. package/dist/federation/retry.test.mjs +3 -3
  35. package/dist/federation/router.test.mjs +190 -9
  36. package/dist/federation/send.test.mjs +16 -16
  37. package/dist/federation/webfinger.test.mjs +151 -6
  38. package/dist/{getMachineId-bsd-BY01PL1n.mjs → getMachineId-bsd-etIyxDet.mjs} +1 -1
  39. package/dist/{getMachineId-darwin-Dr1gkBkp.mjs → getMachineId-darwin-D23zTf4g.mjs} +1 -1
  40. package/dist/{getMachineId-win-QEYwcJiy.mjs → getMachineId-win-Dpap6v5i.mjs} +1 -1
  41. package/dist/{http-CJfvRL7D.cjs → http-7kAB7PVx.cjs} +53 -1
  42. package/dist/{http-cqujdCRz.js → http-B2hxA7dO.js} +48 -2
  43. package/dist/{http-IywnQdiX.mjs → http-QzW9IWfs.mjs} +4 -4
  44. package/dist/{key-Df3tMleh.mjs → key-Dh2OK1XQ.mjs} +2 -2
  45. package/dist/{kv-cache-L0SMQkcd.cjs → kv-cache-DCPp-MT0.cjs} +1 -1
  46. package/dist/{kv-cache-q9Ec2ryS.mjs → kv-cache-EZRIPZXD.mjs} +1 -1
  47. package/dist/{kv-cache-pEejzYq4.js → kv-cache-b22dNkjt.js} +1 -1
  48. package/dist/{ld-BGwiJpl3.mjs → ld-eZbar1rr.mjs} +3 -3
  49. package/dist/{metrics-BTOMkW8C.mjs → metrics-E0hAHtLZ.mjs} +48 -2
  50. package/dist/{middleware-B2rtdpFV.cjs → middleware-BUl1BH4x.cjs} +163 -212
  51. package/dist/{middleware-DtOddSVg.js → middleware-BrGIM_Ra.js} +127 -164
  52. package/dist/{middleware-BB0IbDow.mjs → middleware-CyJDCmNg.mjs} +89 -37
  53. package/dist/{middleware-Dnql59Y8.mjs → middleware-mToCR2tG.mjs} +1 -1
  54. package/dist/mod-CI9fduEi.d.cts +182 -0
  55. package/dist/mod-CkRiJHGA.d.ts +182 -0
  56. package/dist/mod.cjs +6 -6
  57. package/dist/mod.d.cts +2 -2
  58. package/dist/mod.d.ts +2 -2
  59. package/dist/mod.js +5 -5
  60. package/dist/nodeinfo/client.test.mjs +4 -4
  61. package/dist/nodeinfo/handler.test.mjs +5 -5
  62. package/dist/nodeinfo/types.test.mjs +4 -4
  63. package/dist/otel/exporter.test.mjs +3 -3
  64. package/dist/{outgoing-jsonld-BNL8AC14.mjs → outgoing-jsonld-BgFLCJQ_.mjs} +1 -1
  65. package/dist/{owner-CIt4hvmM.mjs → owner-ByO_Fw6U.mjs} +2 -2
  66. package/dist/{proof-DMGIjHYH.js → proof-BkRyFchv.js} +1 -1
  67. package/dist/{proof-BYlrRSmZ.mjs → proof-CSo0S8OK.mjs} +5 -5
  68. package/dist/{proof-B1_u25UV.cjs → proof-jVqClF49.cjs} +1 -1
  69. package/dist/{send-DJFpze7B.mjs → send-jzrTV1FU.mjs} +3 -3
  70. package/dist/sig/accept.test.mjs +1 -1
  71. package/dist/sig/http.test.mjs +9 -9
  72. package/dist/sig/key.test.mjs +6 -6
  73. package/dist/sig/ld.test.mjs +7 -7
  74. package/dist/sig/mod.cjs +2 -2
  75. package/dist/sig/mod.js +2 -2
  76. package/dist/sig/owner.test.mjs +6 -6
  77. package/dist/sig/proof.test.mjs +8 -8
  78. package/dist/{std__assert-BTEgfoJo.mjs → std__assert-BBjXFNOb.mjs} +4 -4
  79. package/dist/testing/mod.d.mts +1 -0
  80. package/dist/testing/mod.mjs +1 -1
  81. package/dist/utils/docloader.test.mjs +7 -7
  82. package/dist/utils/kv-cache.test.mjs +1 -1
  83. package/dist/utils/mod.cjs +1 -1
  84. package/dist/utils/mod.js +1 -1
  85. package/package.json +6 -7
  86. package/dist/mod-CajNYYkt.d.ts +0 -63
  87. package/dist/mod-DnzgcPcy.d.cts +0 -63
  88. package/dist/router-BT_F5748.mjs +0 -114
  89. /package/dist/{accept-CgDcxvjV.mjs → accept-CceiKpCy.mjs} +0 -0
  90. /package/dist/{activity-listener-BeTGV3wc.mjs → activity-listener-tztVvlNb.mjs} +0 -0
  91. /package/dist/{assert_equals-Ew3jOFa3.mjs → assert_equals-C-ZRDbaf.mjs} +0 -0
  92. /package/dist/{client-Bneh_DYR.mjs → client-B_A6mfn3.mjs} +0 -0
  93. /package/dist/{collection-Cc3DVAhE.mjs → collection-CA3V5zyK.mjs} +0 -0
  94. /package/dist/{esm-sdtqOUPu.mjs → esm-BQRw925N.mjs} +0 -0
  95. /package/dist/{execAsync-Dxb7rNf3.mjs → execAsync-DCBrgFiV.mjs} +0 -0
  96. /package/dist/{getMachineId-linux-Bbhofx-s.mjs → getMachineId-linux-ObI47Hql.mjs} +0 -0
  97. /package/dist/{getMachineId-unsupported-dIOte2Ct.mjs → getMachineId-unsupported-Ddu-PFeh.mjs} +0 -0
  98. /package/dist/{keycache-BeU0LCII.mjs → keycache-BYMd8q7F.mjs} +0 -0
  99. /package/dist/{keys-CSYsOMFG.mjs → keys-C3kae-6B.mjs} +0 -0
  100. /package/dist/{kv-QHE0oeM3.mjs → kv-x2IvBUyq.mjs} +0 -0
  101. /package/dist/{negotiation-DDstyBvc.mjs → negotiation-CDW-_gUU.mjs} +0 -0
  102. /package/dist/{public-audience-c9zmYKgA.mjs → public-audience-N3pyOx2p.mjs} +0 -0
  103. /package/dist/{retry-_VvV0h9f.mjs → retry-v_sGLH1d.mjs} +0 -0
  104. /package/dist/{types-D09GN0uZ.mjs → types-BFowWFTT.mjs} +0 -0
@@ -1,12 +1,12 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as RouterError } from "../router-BT_F5748.mjs";
5
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
- import { r as assertExists } from "../std__assert-BTEgfoJo.mjs";
7
- import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
8
- import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
9
- import { r as createFederationBuilder } from "../builder-DckAhD27.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { r as assertExists } from "../std__assert-BBjXFNOb.mjs";
6
+ import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
7
+ import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
8
+ import { r as createFederationBuilder } from "../builder-ShiR1K6b.mjs";
9
+ import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
10
10
  import { Activity, Note, Person } from "@fedify/vocab";
11
11
  import { test } from "@fedify/fixture";
12
12
  //#region src/federation/builder.test.ts
@@ -74,6 +74,21 @@ test("FederationBuilder", async (t) => {
74
74
  assertEquals(impl.router.build("inbox", { identifier: "user1" }), "/users/user1/inbox");
75
75
  await builder.build({ kv });
76
76
  });
77
+ await t.step("should snapshot router state on build", async () => {
78
+ const builder = createFederationBuilder();
79
+ const kv = new MemoryKvStore();
80
+ const noteRouteName = `object:${Note.typeId.href}`;
81
+ builder.setActorDispatcher("/users/{identifier}", () => null);
82
+ const impl1 = await builder.build({ kv });
83
+ builder.setObjectDispatcher(Note, "/notes/{id}", () => null);
84
+ assertEquals(impl1.router.route("/notes/1"), null);
85
+ const impl2 = await builder.build({ kv });
86
+ assertEquals(impl2.router.route("/notes/1")?.name, noteRouteName);
87
+ impl1.router.add("/leaked/{id}", "leaked");
88
+ assertEquals(impl1.router.route("/leaked/1")?.name, "leaked");
89
+ assertEquals(impl2.router.route("/leaked/1"), null);
90
+ assertEquals((await builder.build({ kv })).router.route("/leaked/1"), null);
91
+ });
77
92
  await t.step("should build with default options", async () => {
78
93
  const builder = createFederationBuilder();
79
94
  const kv = new MemoryKvStore();
@@ -89,15 +104,128 @@ test("FederationBuilder", async (t) => {
89
104
  assertThrows(() => builder.setOutboxListeners("/users/{identifier}/outbox/{extra}"), RouterError);
90
105
  assertThrows(() => builder.setOutboxListeners("/users/{identifier}/outbox/{identifier}"), RouterError);
91
106
  const builderAfterInvalid = createFederationBuilder();
92
- assertThrows(() => builderAfterInvalid.setOutboxListeners("/users/{identifier}/outbox/{extra}"), RouterError);
107
+ assertThrows(() => builderAfterInvalid.setOutboxListeners("/users/{identifier}/outbox/{extra}"), RouteTemplateOptionsNotMatchedError);
108
+ assertThrows(() => builderAfterInvalid.setOutboxListeners("/users/{identifier:3}/outbox"), DisallowedVarSpecModifierError);
109
+ assertThrows(() => builderAfterInvalid.setOutboxListeners("/users/{identifier*}/outbox"), DisallowedVarSpecModifierError);
110
+ assertThrows(() => builderAfterInvalid.setOutboxListeners("/users/{identifier,identifier}/outbox"), DuplicateRouteVariableError);
93
111
  builderAfterInvalid.setOutboxListeners("/users/{identifier}/outbox");
94
112
  const builder2 = createFederationBuilder();
95
- builder2.setOutboxListeners("/users{/identifier}/outbox");
113
+ builder2.setOutboxListeners("/users/{identifier}/outbox");
96
114
  assertThrows(() => builder2.setOutboxDispatcher("/actors/{identifier}/outbox", () => ({ items: [] })), RouterError);
97
115
  const builder3 = createFederationBuilder();
98
- assertThrows(() => builder3.setOutboxListeners("/users{?identifier}/outbox"), RouterError);
116
+ assertThrows(() => builder3.setOutboxListeners("/users{?identifier}/outbox"), DisallowedOperatorError);
117
+ const builder3a = createFederationBuilder();
118
+ assertThrows(() => builder3a.setOutboxListeners("/users{;identifier}/outbox"), DisallowedOperatorError);
119
+ const builder3b = createFederationBuilder();
120
+ assertThrows(() => builder3b.setOutboxListeners("/users{.identifier}/outbox"), DisallowedOperatorError);
99
121
  const builder4 = createFederationBuilder();
100
- assertThrows(() => builder4.setOutboxDispatcher("/users{?identifier}/outbox", () => ({ items: [] })), RouterError);
122
+ assertThrows(() => builder4.setOutboxDispatcher("/users{?identifier}/outbox", () => ({ items: [] })), DisallowedOperatorError);
123
+ const builder5 = createFederationBuilder();
124
+ assertThrows(() => builder5.setOutboxDispatcher("/users/{identifier:3}/outbox", () => ({ items: [] })), DisallowedVarSpecModifierError);
125
+ });
126
+ await t.step("rejects non-segment-boundary identifier operators at registration for required-identifier routes", () => {
127
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users{/identifier}", () => null), DisallowedOperatorError);
128
+ assertThrows(() => createFederationBuilder().setActorDispatcher("{/identifier}", () => null), DisallowedOperatorError);
129
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users/{/identifier}", () => null), DisallowedOperatorError);
130
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users{?identifier}", () => null), DisallowedOperatorError);
131
+ assertThrows(() => createFederationBuilder().setInboxListeners("/users{/identifier}/inbox"), DisallowedOperatorError);
132
+ assertThrows(() => createFederationBuilder().setOutboxListeners("/users{/identifier}/outbox"), DisallowedOperatorError);
133
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users/{identifier:3}", () => null), DisallowedVarSpecModifierError);
134
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users/{identifier*}", () => null), DisallowedVarSpecModifierError);
135
+ createFederationBuilder().setActorDispatcher("/users/{identifier}", () => null);
136
+ createFederationBuilder().setInboxListeners("/users/{identifier}/inbox");
137
+ });
138
+ await t.step("every required-identifier setter rejects every omissible operator", () => {
139
+ const omissibleExprs = [
140
+ "{/identifier}",
141
+ "{?identifier}",
142
+ "{;identifier}",
143
+ "{.identifier}"
144
+ ];
145
+ const registrars = [
146
+ ["setActorDispatcher", (expr) => createFederationBuilder().setActorDispatcher(`/users${expr}`, () => null)],
147
+ ["setInboxListeners", (expr) => createFederationBuilder().setInboxListeners(`/users${expr}/inbox`)],
148
+ ["setOutboxListeners", (expr) => createFederationBuilder().setOutboxListeners(`/users${expr}/outbox`)],
149
+ ["setOutboxDispatcher", (expr) => createFederationBuilder().setOutboxDispatcher(`/users${expr}/outbox`, () => ({ items: [] }))],
150
+ ["setFollowingDispatcher", (expr) => createFederationBuilder().setFollowingDispatcher(`/users${expr}/following`, () => ({ items: [] }))],
151
+ ["setFollowersDispatcher", (expr) => createFederationBuilder().setFollowersDispatcher(`/users${expr}/followers`, () => ({ items: [] }))],
152
+ ["setLikedDispatcher", (expr) => createFederationBuilder().setLikedDispatcher(`/users${expr}/liked`, () => ({ items: [] }))],
153
+ ["setFeaturedDispatcher", (expr) => createFederationBuilder().setFeaturedDispatcher(`/users${expr}/featured`, () => ({ items: [] }))],
154
+ ["setFeaturedTagsDispatcher", (expr) => createFederationBuilder().setFeaturedTagsDispatcher(`/users${expr}/tags`, () => ({ items: [] }))]
155
+ ];
156
+ for (const [name, register] of registrars) {
157
+ for (const expr of omissibleExprs) assertThrows(() => register(expr), DisallowedOperatorError, void 0, `${name} must reject ${expr} at registration`);
158
+ register("{identifier}");
159
+ }
160
+ });
161
+ await t.step("empty or missing identifier segments produce a runtime no-match", async () => {
162
+ const kv = new MemoryKvStore();
163
+ const builder = createFederationBuilder();
164
+ builder.setActorDispatcher("/users/{identifier}", () => null);
165
+ builder.setInboxListeners("/users/{identifier}/inbox");
166
+ builder.setOutboxDispatcher("/users/{identifier}/outbox", () => ({ items: [] }));
167
+ builder.setObjectDispatcher(Note, "/notes/{id}", () => null);
168
+ const impl = await builder.build({ kv });
169
+ assertEquals(impl.router.route("/users/alice")?.name, "actor");
170
+ assertEquals(impl.router.route("/users/alice/inbox")?.name, "inbox");
171
+ assertEquals(impl.router.route("/users/alice/outbox")?.name, "outbox");
172
+ assertEquals(impl.router.route("/notes/1")?.name, `object:${Note.typeId.href}`);
173
+ assertEquals(impl.router.route("/users/"), null);
174
+ assertEquals(impl.router.route("/users//inbox"), null);
175
+ assertEquals(impl.router.route("/users//outbox"), null);
176
+ assertEquals(impl.router.route("/notes/"), null);
177
+ });
178
+ await t.step("object dispatcher optional-operator routes no-match when unbound", async () => {
179
+ const kv = new MemoryKvStore();
180
+ const objectName = `object:${Note.typeId.href}`;
181
+ const query = createFederationBuilder();
182
+ query.setObjectDispatcher(Note, "/notes{?id}", () => null);
183
+ const queryImpl = await query.build({ kv });
184
+ assertEquals(queryImpl.router.route("/notes"), null);
185
+ assertEquals(queryImpl.router.route("/notes?id=1")?.name, objectName);
186
+ const matrix = createFederationBuilder();
187
+ matrix.setObjectDispatcher(Note, "/notes{;id}", () => null);
188
+ const matrixImpl = await matrix.build({ kv });
189
+ assertEquals(matrixImpl.router.route("/notes"), null);
190
+ assertEquals(matrixImpl.router.route("/notes;id=1")?.name, objectName);
191
+ const label = createFederationBuilder();
192
+ label.setObjectDispatcher(Note, "/notes{.id}", () => null);
193
+ const labelImpl = await label.build({ kv });
194
+ assertEquals(labelImpl.router.route("/notes"), null);
195
+ assertEquals(labelImpl.router.route("/notes.1")?.name, objectName);
196
+ });
197
+ await t.step("custom collection routes no-match empty or unbound variables", async () => {
198
+ const kv = new MemoryKvStore();
199
+ const builder = createFederationBuilder();
200
+ builder.setCollectionDispatcher("samples", Note, "/groups/{id}", () => ({ items: [] }));
201
+ builder.setCollectionDispatcher("optionals", Note, "/optional-groups{?id}", () => ({ items: [] }));
202
+ builder.setCollectionDispatcher("matrixOptionals", Note, "/matrix-groups{;id}", () => ({ items: [] }));
203
+ builder.setCollectionDispatcher("labelOptionals", Note, "/label-groups{.id}", () => ({ items: [] }));
204
+ const impl = await builder.build({ kv });
205
+ assertEquals(impl.router.route("/groups/1"), {
206
+ name: "collection:samples",
207
+ values: { id: "1" },
208
+ template: "/groups/{id}"
209
+ });
210
+ assertEquals(impl.router.route("/optional-groups?id=1"), {
211
+ name: "collection:optionals",
212
+ values: { id: "1" },
213
+ template: "/optional-groups{?id}"
214
+ });
215
+ assertEquals(impl.router.route("/matrix-groups;id=1"), {
216
+ name: "collection:matrixOptionals",
217
+ values: { id: "1" },
218
+ template: "/matrix-groups{;id}"
219
+ });
220
+ assertEquals(impl.router.route("/label-groups.1"), {
221
+ name: "collection:labelOptionals",
222
+ values: { id: "1" },
223
+ template: "/label-groups{.id}"
224
+ });
225
+ assertEquals(impl.router.route("/groups/"), null);
226
+ assertEquals(impl.router.route("/optional-groups"), null);
227
+ assertEquals(impl.router.route("/matrix-groups"), null);
228
+ assertEquals(impl.router.route("/label-groups"), null);
101
229
  });
102
230
  await t.step("should pass build options correctly", async () => {
103
231
  const builder = createFederationBuilder();
@@ -1,9 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-BTEgfoJo.mjs";
6
- import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-Cc3DVAhE.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import "../std__assert-BBjXFNOb.mjs";
6
+ import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-CA3V5zyK.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  import { decodeHex } from "byte-encodings/hex";
9
9
  //#region src/federation/collection.test.ts
@@ -1,18 +1,18 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-BAE7AKLA.mjs";
5
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
- import "../std__assert-BTEgfoJo.mjs";
7
- import { n as assertGreaterOrEqual } from "../assert_rejects-DQP-q39h.mjs";
8
- import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
9
- import { t as assert } from "../assert-DikXweDx.mjs";
10
- import { r as parseAcceptSignature } from "../accept-CgDcxvjV.mjs";
11
- import { s as signRequest } from "../http-IywnQdiX.mjs";
12
- import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-CSYsOMFG.mjs";
13
- import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
14
- import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-BB0IbDow.mjs";
15
- import { t as ActivityListenerSet } from "../activity-listener-BeTGV3wc.mjs";
4
+ import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-DVoTs_wM.mjs";
5
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
6
+ import "../std__assert-BBjXFNOb.mjs";
7
+ import { n as assertGreaterOrEqual } from "../assert_rejects-DN60FHPX.mjs";
8
+ import { t as assertInstanceOf } from "../assert_instance_of-DBC5X09g.mjs";
9
+ import { t as assert } from "../assert-OguE97r2.mjs";
10
+ import { r as parseAcceptSignature } from "../accept-CceiKpCy.mjs";
11
+ import { s as signRequest } from "../http-QzW9IWfs.mjs";
12
+ import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-C3kae-6B.mjs";
13
+ import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
14
+ import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-CyJDCmNg.mjs";
15
+ import { t as ActivityListenerSet } from "../activity-listener-tztVvlNb.mjs";
16
16
  import { Activity, Create, Note, Person, Tombstone } from "@fedify/vocab";
17
17
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
18
18
  import { FetchError } from "@fedify/vocab-runtime";
@@ -1,12 +1,12 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-BTEgfoJo.mjs";
6
- import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CSYsOMFG.mjs";
7
- import { r as signObject } from "../proof-BYlrRSmZ.mjs";
8
- import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
9
- import { o as createFederation } from "../middleware-BB0IbDow.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import "../std__assert-BBjXFNOb.mjs";
6
+ import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-C3kae-6B.mjs";
7
+ import { r as signObject } from "../proof-CSo0S8OK.mjs";
8
+ import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
9
+ import { o as createFederation } from "../middleware-CyJDCmNg.mjs";
10
10
  import { Create, Follow, Person } from "@fedify/vocab";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  //#region src/federation/idempotency.test.ts
@@ -1,9 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
6
- import { t as ActivityListenerSet } from "../activity-listener-BeTGV3wc.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
6
+ import { t as ActivityListenerSet } from "../activity-listener-tztVvlNb.mjs";
7
7
  import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/federation/inbox.test.ts
@@ -1,11 +1,11 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
6
- import { t as assert } from "../assert-DikXweDx.mjs";
7
- import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
8
- import { t as KvKeyCache } from "../keycache-BeU0LCII.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { t as assertInstanceOf } from "../assert_instance_of-DBC5X09g.mjs";
6
+ import { t as assert } from "../assert-OguE97r2.mjs";
7
+ import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
8
+ import { t as KvKeyCache } from "../keycache-BYMd8q7F.mjs";
9
9
  import { CryptographicKey, Multikey } from "@fedify/vocab";
10
10
  import { test } from "@fedify/fixture";
11
11
  //#region src/federation/keycache.test.ts
@@ -1,9 +1,9 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-BTEgfoJo.mjs";
6
- import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import "../std__assert-BBjXFNOb.mjs";
6
+ import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  //#region src/federation/kv.test.ts
9
9
  test("MemoryKvStore", async (t) => {
@@ -1,10 +1,10 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-BTEgfoJo.mjs";
6
- import { t as assertRejects } from "../assert_rejects-DQP-q39h.mjs";
7
- import { a as instrumentDocumentLoader, c as recordDocumentCache, d as recordInboxActivity, f as recordKeyLookup, l as recordDocumentFetch, m as recordOutboxEnqueue, p as recordOutboxActivity, t as classifyFetchError, u as recordFanoutRecipients } from "../metrics-BTOMkW8C.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import "../std__assert-BBjXFNOb.mjs";
6
+ import { t as assertRejects } from "../assert_rejects-DN60FHPX.mjs";
7
+ import { a as instrumentDocumentLoader, c as recordDocumentCache, d as recordInboxActivity, f as recordKeyLookup, h as recordWebFingerHandle, l as recordDocumentFetch, m as recordOutboxEnqueue, p as recordOutboxActivity, t as classifyFetchError, u as recordFanoutRecipients } from "../metrics-E0hAHtLZ.mjs";
8
8
  import { createTestMeterProvider, test } from "@fedify/fixture";
9
9
  import { FetchError } from "@fedify/vocab-runtime";
10
10
  //#region src/federation/metrics.test.ts
@@ -213,6 +213,65 @@ test("recordDocumentCache() records hit and miss as a counter", () => {
213
213
  assertEquals(measurements[1].attributes["activitypub.lookup.result"], "miss");
214
214
  assertEquals(measurements[1].attributes["activitypub.remote.host"], "w3id.org");
215
215
  });
216
+ test("recordWebFingerHandle() records counter and duration with all attributes", () => {
217
+ const [meterProvider, recorder] = createTestMeterProvider();
218
+ recordWebFingerHandle(meterProvider, {
219
+ durationMs: 17,
220
+ result: "resolved",
221
+ scheme: "acct",
222
+ statusCode: 200
223
+ });
224
+ const counters = recorder.getMeasurements("webfinger.handle");
225
+ assertEquals(counters.length, 1);
226
+ assertEquals(counters[0].type, "counter");
227
+ assertEquals(counters[0].value, 1);
228
+ assertEquals(counters[0].attributes["webfinger.handle.result"], "resolved");
229
+ assertEquals(counters[0].attributes["webfinger.resource.scheme"], "acct");
230
+ assertEquals(counters[0].attributes["http.response.status_code"], 200);
231
+ const durations = recorder.getMeasurements("webfinger.handle.duration");
232
+ assertEquals(durations.length, 1);
233
+ assertEquals(durations[0].type, "histogram");
234
+ assertEquals(durations[0].value, 17);
235
+ assertEquals(durations[0].attributes["webfinger.handle.result"], "resolved");
236
+ assertEquals(durations[0].attributes["webfinger.resource.scheme"], "acct");
237
+ assertEquals(durations[0].attributes["http.response.status_code"], 200);
238
+ });
239
+ test("recordWebFingerHandle() records each non-resolved result with the matching status code", () => {
240
+ const [meterProvider, recorder] = createTestMeterProvider();
241
+ for (const [result, statusCode] of [
242
+ ["invalid", 400],
243
+ ["not_found", 404],
244
+ ["tombstoned", 410]
245
+ ]) recordWebFingerHandle(meterProvider, {
246
+ durationMs: 1,
247
+ result,
248
+ scheme: "acct",
249
+ statusCode
250
+ });
251
+ const counters = recorder.getMeasurements("webfinger.handle");
252
+ assertEquals(counters.length, 3);
253
+ assertEquals(counters.map((m) => m.attributes["webfinger.handle.result"]), [
254
+ "invalid",
255
+ "not_found",
256
+ "tombstoned"
257
+ ]);
258
+ assertEquals(counters.map((m) => m.attributes["http.response.status_code"]), [
259
+ 400,
260
+ 404,
261
+ 410
262
+ ]);
263
+ });
264
+ test("recordWebFingerHandle() omits optional attributes when not provided", () => {
265
+ const [meterProvider, recorder] = createTestMeterProvider();
266
+ recordWebFingerHandle(meterProvider, {
267
+ durationMs: 0,
268
+ result: "error"
269
+ });
270
+ const counter = recorder.getMeasurement("webfinger.handle");
271
+ assertEquals(counter?.attributes["webfinger.handle.result"], "error");
272
+ assertEquals("webfinger.resource.scheme" in (counter?.attributes ?? {}), false);
273
+ assertEquals("http.response.status_code" in (counter?.attributes ?? {}), false);
274
+ });
216
275
  test("classifyFetchError() classifies FetchError with 404 as not_found", () => {
217
276
  assertEquals(classifyFetchError(new FetchError("https://example.com/k", "not found", new Response("", { status: 404 }))), {
218
277
  result: "not_found",
@@ -1,25 +1,25 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as RouterError } from "../router-BT_F5748.mjs";
5
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
- import { r as assertExists } from "../std__assert-BTEgfoJo.mjs";
7
- import { r as assertFalse, t as assertRejects } from "../assert_rejects-DQP-q39h.mjs";
8
- import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
9
- import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
10
- import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
11
- import { t as assertStrictEquals } from "../assert_strict_equals-Dmjbg-bA.mjs";
12
- import { t as assert } from "../assert-DikXweDx.mjs";
13
- import { t as esm_default } from "../esm-sdtqOUPu.mjs";
14
- import { l as verifyRequest, s as signRequest } from "../http-IywnQdiX.mjs";
15
- import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CSYsOMFG.mjs";
16
- import { t as getAuthenticatedDocumentLoader } from "../docloader-k6huZLQL.mjs";
17
- import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-BGwiJpl3.mjs";
18
- import { t as doesActorOwnKey } from "../owner-CIt4hvmM.mjs";
19
- import { i as verifyObject, r as signObject } from "../proof-BYlrRSmZ.mjs";
20
- import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
21
- import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-BB0IbDow.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { r as assertExists } from "../std__assert-BBjXFNOb.mjs";
6
+ import { r as assertFalse, t as assertRejects } from "../assert_rejects-DN60FHPX.mjs";
7
+ import { t as assertInstanceOf } from "../assert_instance_of-DBC5X09g.mjs";
8
+ import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
9
+ import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
10
+ import { t as assertStrictEquals } from "../assert_strict_equals-XEgZAlrj.mjs";
11
+ import { t as assert } from "../assert-OguE97r2.mjs";
12
+ import { t as esm_default } from "../esm-BQRw925N.mjs";
13
+ import { l as verifyRequest, s as signRequest } from "../http-QzW9IWfs.mjs";
14
+ import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-C3kae-6B.mjs";
15
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-BdDN0Aqx.mjs";
16
+ import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-eZbar1rr.mjs";
17
+ import { t as doesActorOwnKey } from "../owner-ByO_Fw6U.mjs";
18
+ import { i as verifyObject, r as signObject } from "../proof-CSo0S8OK.mjs";
19
+ import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
20
+ import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-CyJDCmNg.mjs";
22
21
  import { configure, reset } from "@logtape/logtape";
22
+ import { RouterError } from "@fedify/uri-template";
23
23
  import * as vocab from "@fedify/vocab";
24
24
  import { getTypeId, lookupObject } from "@fedify/vocab";
25
25
  import { SpanStatusCode } from "@opentelemetry/api";
@@ -938,6 +938,18 @@ test("Federation.fetch()", async (t) => {
938
938
  assertEquals(inbox, []);
939
939
  assertEquals(response.status, 404);
940
940
  });
941
+ await t.step("empty identifier segment is Not Found, dispatcher not invoked", async () => {
942
+ const { federation, dispatches } = createTestContext();
943
+ assertEquals((await federation.fetch(new Request("https://example.com/users/", {
944
+ method: "GET",
945
+ headers: { "Accept": "application/activity+json" }
946
+ }), { contextData: void 0 })).status, 404);
947
+ assertEquals((await federation.fetch(new Request("https://example.com/users//inbox", {
948
+ method: "POST",
949
+ headers: { "accept": "application/ld+json" }
950
+ }), { contextData: void 0 })).status, 404);
951
+ assertEquals(dispatches.includes(""), false);
952
+ });
941
953
  await t.step("onNotAcceptable with GET", async () => {
942
954
  const { federation } = createTestContext();
943
955
  let notAcceptableCalled = false;
@@ -2,7 +2,9 @@ const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("../chunk-DDcVe30Y.cjs");
5
- const require_middleware = require("../middleware-B2rtdpFV.cjs");
5
+ const require_middleware = require("../middleware-BUl1BH4x.cjs");
6
+ let _logtape_logtape = require("@logtape/logtape");
7
+ let _fedify_uri_template = require("@fedify/uri-template");
6
8
  let es_toolkit = require("es-toolkit");
7
9
  //#region src/federation/kv.ts
8
10
  /**
@@ -347,11 +349,161 @@ var ParallelMessageQueue = class ParallelMessageQueue {
347
349
  }
348
350
  };
349
351
  //#endregion
352
+ //#region src/federation/router.ts
353
+ const logger = (0, _logtape_logtape.getLogger)([
354
+ "fedify",
355
+ "federation",
356
+ "router",
357
+ "deprecated"
358
+ ]);
359
+ let deprecationWarned = false;
360
+ function warnDeprecated() {
361
+ if (deprecationWarned) return;
362
+ deprecationWarned = true;
363
+ logger.warn("The `Router` and `RouterError` classes from `@fedify/fedify` are deprecated. Please use `Router` from `@fedify/uri-template` instead.");
364
+ }
365
+ /**
366
+ * URL router and constructor based on URI Template
367
+ * ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
368
+ *
369
+ * @deprecated Import `Router` from `@fedify/uri-template` instead. This class
370
+ * remains only for compatibility with older Fedify code. The
371
+ * `@fedify/uri-template` router is the replacement implementation
372
+ * and should be used directly in new code.
373
+ */
374
+ var Router = class Router {
375
+ #router;
376
+ /**
377
+ * Create a new {@link Router}.
378
+ * @param options Options for the router.
379
+ * @deprecated Use `new Router(options)` from `@fedify/uri-template`
380
+ * instead.
381
+ */
382
+ constructor(options) {
383
+ this.#router = convertRouterError(() => new _fedify_uri_template.Router(options));
384
+ }
385
+ /**
386
+ * Whether to ignore trailing slashes when matching paths.
387
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. This
388
+ * accessor forwards to the underlying `@fedify/uri-template`
389
+ * router so that post-construction mutation keeps working as
390
+ * in older Fedify code.
391
+ */
392
+ get trailingSlashInsensitive() {
393
+ return this.#router.trailingSlashInsensitive;
394
+ }
395
+ set trailingSlashInsensitive(value) {
396
+ this.#router.trailingSlashInsensitive = value;
397
+ }
398
+ /**
399
+ * Clones this router.
400
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
401
+ */
402
+ clone() {
403
+ return convertRouterError(() => {
404
+ const clone = new Router();
405
+ clone.#router = this.#router.clone();
406
+ return clone;
407
+ });
408
+ }
409
+ /**
410
+ * Checks if a path name exists in the router.
411
+ * @param name The name of the path.
412
+ * @returns `true` if the path name exists, otherwise `false`.
413
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
414
+ */
415
+ has(name) {
416
+ return convertRouterError(() => this.#router.has(name));
417
+ }
418
+ /**
419
+ * Adds a new path rule to the router.
420
+ * @param template The path pattern.
421
+ * @param name The name of the path.
422
+ * @returns The names of the variables in the path pattern.
423
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. In this
424
+ * compatibility class, `add()` both registers the route and
425
+ * returns the variables in the path pattern. In
426
+ * `@fedify/uri-template`, these two responsibilities are split:
427
+ * `router.add(template, name)` registers the route and returns
428
+ * `void`, while the pure static method
429
+ * `Router.variables(template)` returns the variable names. To
430
+ * migrate, call `Router.variables(template)` when variables are
431
+ * needed, then call `router.add(template, name)` to register the
432
+ * route.
433
+ */
434
+ add(template, name) {
435
+ return convertRouterError(() => {
436
+ (0, _fedify_uri_template.assertPath)(template);
437
+ this.#router.add(template, name);
438
+ return _fedify_uri_template.Router.variables(template);
439
+ });
440
+ }
441
+ /**
442
+ * Resolves a path name and values from a URL, if any match.
443
+ * @param url The URL to resolve.
444
+ * @returns The name of the path and its values, if any match. Otherwise,
445
+ * `null`.
446
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. Unlike the
447
+ * stricter `@fedify/uri-template` router, this compatibility
448
+ * method keeps the old Fedify 2.x contract of returning `null`
449
+ * (rather than throwing) for inputs that are not router paths.
450
+ */
451
+ route(url) {
452
+ return convertRouterError(() => {
453
+ if (!(0, _fedify_uri_template.isPath)(url)) return null;
454
+ return this.#router.route(url);
455
+ });
456
+ }
457
+ /**
458
+ * Constructs a URL/path from a path name and values.
459
+ * @param name The name of the path.
460
+ * @param values The values to expand the path with.
461
+ * @returns The URL/path, if the name exists. Otherwise, `null`.
462
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
463
+ */
464
+ build(name, values) {
465
+ return convertRouterError(() => this.#router.build(name, values));
466
+ }
467
+ };
468
+ /**
469
+ * An error thrown by the {@link Router}.
470
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
471
+ */
472
+ var RouterError = class extends _fedify_uri_template.RouterError {
473
+ /**
474
+ * Treats every `RouterError` from `@fedify/uri-template` as an instance of
475
+ * this deprecated class.
476
+ *
477
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
478
+ */
479
+ static [Symbol.hasInstance](instance) {
480
+ return instance instanceof _fedify_uri_template.RouterError;
481
+ }
482
+ /**
483
+ * Create a new {@link RouterError}.
484
+ * @param message The error message.
485
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
486
+ */
487
+ constructor(message) {
488
+ super(message);
489
+ warnDeprecated();
490
+ }
491
+ };
492
+ function convertRouterError(func) {
493
+ try {
494
+ warnDeprecated();
495
+ return func();
496
+ } catch (error) {
497
+ if (error instanceof _fedify_uri_template.RouterError) throw new RouterError(error.message);
498
+ throw error;
499
+ }
500
+ }
501
+ //#endregion
350
502
  exports.InProcessMessageQueue = InProcessMessageQueue;
351
503
  exports.MemoryKvStore = MemoryKvStore;
352
504
  exports.ParallelMessageQueue = ParallelMessageQueue;
353
- exports.Router = require_middleware.Router;
354
- exports.RouterError = require_middleware.RouterError;
505
+ exports.Router = Router;
506
+ exports.RouterError = RouterError;
355
507
  exports.SendActivityError = require_middleware.SendActivityError;
356
508
  exports.buildCollectionSynchronizationHeader = require_middleware.buildCollectionSynchronizationHeader;
357
509
  exports.createExponentialBackoffPolicy = require_middleware.createExponentialBackoffPolicy;
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as CollectionCursor, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as ActorDispatcher, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CollectionCounter, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as ActorKeyPairsDispatcher, Y as ActorHandleMapper, Z as AuthorizePredicate, _ as Federatable, _t as SendActivityError, a as GetSignedKeyOptions, at as InboxListener, b as FederationFetchOptions, bt as buildCollectionSynchronizationHeader, c as ParseUriResult, ct as ObjectDispatcher, d as SendActivityOptions, dt as OutboxListenerErrorHandler, et as CollectionDispatcher, f as SendActivityOptionsForCollection, ft as OutboxPermanentFailureHandler, g as CustomCollectionCallbackSetters, gt as WebFingerLinksDispatcher, h as ConstructorWithTypeId, ht as UnverifiedActivityReason, i as GetActorOptions, it as InboxErrorHandler, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as OutboxErrorHandler, m as CollectionCallbackSetters, mt as UnverifiedActivityHandler, n as Context, nt as CustomCollectionCursor, o as InboxContext, ot as NodeInfoDispatcher, p as ActorCallbackSetters, pt as SharedInboxKeyDispatcher, q as ActorAliasMapper, r as ForwardActivityOptions, rt as CustomCollectionDispatcher, s as OutboxContext, st as ObjectAuthorizePredicate, t as ActorKeyPair, tt as CustomCollectionCounter, u as RouteActivityOptions, ut as OutboxListener, v as Federation, vt as SenderKeyPair, w as IdempotencyStrategy, x as FederationOptions, xt as digest, y as FederationBuilder, yt as PageItems, z as createFederationBuilder } from "../context-tc6VOOOL.cjs";
2
+ import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "../context-DI2gRbyN.cjs";
3
3
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-gJ8LYbxX.cjs";
4
4
  import { a as MessageQueueEnqueueOptions, i as MessageQueueDepth, n as InProcessMessageQueueOptions, o as MessageQueueListenOptions, r as MessageQueue, s as ParallelMessageQueue, t as InProcessMessageQueue } from "../mq-D8uSFzxe.cjs";
5
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-DnzgcPcy.cjs";
5
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-CI9fduEi.cjs";
6
6
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };