@fedify/fedify 2.4.0-dev.2010 → 2.4.0-dev.2030

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 (100) hide show
  1. package/dist/{assert-CebeUf0C.mjs → assert-D1Eafmd_.mjs} +1 -1
  2. package/dist/{assert_equals-CBlRfA-_.mjs → assert_equals-Z6IcEbWU.mjs} +2 -28
  3. package/dist/{assert_exists-DtzkXC47.mjs → assert_exists-cffSpJ7X.mjs} +1 -1
  4. package/dist/{assert_false-3pLLLsO4.mjs → assert_false-CPdRnc3E.mjs} +1 -1
  5. package/dist/{assert_greater_or_equal-BApOTh1h.mjs → assert_greater_or_equal-BlafOF4-.mjs} +2 -1
  6. package/dist/{assert_instance_of-g3WcyYNR.mjs → assert_instance_of-mrXWWNY-.mjs} +1 -1
  7. package/dist/{assert_not_equals-BN7yDMWe.mjs → assert_not_equals-CpPK2t89.mjs} +2 -1
  8. package/dist/{assert_rejects-wFbSPn1O.mjs → assert_rejects-CTptdYck.mjs} +2 -2
  9. package/dist/{assert_strict_equals-Bpjl4Psw.mjs → assert_strict_equals-CYvBmkpC.mjs} +2 -1
  10. package/dist/{assert_throws-BJ5wuvR2.mjs → assert_throws-BYITOvPO.mjs} +2 -1
  11. package/dist/assertion_error-B-cx0fFA.mjs +31 -0
  12. package/dist/{builder-asm96yV1.mjs → builder-BYJ5otJa.mjs} +2 -2
  13. package/dist/compat/outgoing-jsonld.test.mjs +71 -3
  14. package/dist/compat/public-audience.test.mjs +3 -3
  15. package/dist/compat/secured-document.test.d.mts +2 -0
  16. package/dist/compat/secured-document.test.mjs +58 -0
  17. package/dist/compat/transformers.test.mjs +4 -4
  18. package/dist/{compound-proof-7UIAueLV.mjs → compound-proof-BIvUoJxm.mjs} +74 -2
  19. package/dist/{deno-Ckq9TwCv.mjs → deno-Vj_9wePq.mjs} +1 -1
  20. package/dist/{docloader-DUKEPG-O.mjs → docloader-qUudHZVH.mjs} +2 -2
  21. package/dist/federation/builder.test.mjs +5 -5
  22. package/dist/federation/circuit-breaker.test.mjs +3 -3
  23. package/dist/federation/collection.test.mjs +2 -2
  24. package/dist/federation/compound-fanout.test.d.mts +2 -0
  25. package/dist/federation/compound-fanout.test.mjs +228 -0
  26. package/dist/federation/handler-compound-proof.test.mjs +5 -5
  27. package/dist/federation/handler.test.mjs +11 -11
  28. package/dist/federation/idempotency.test.mjs +4 -4
  29. package/dist/federation/inbox.test.mjs +2 -2
  30. package/dist/federation/keycache.test.mjs +3 -3
  31. package/dist/federation/kv.test.mjs +2 -2
  32. package/dist/federation/metrics.test.mjs +4 -4
  33. package/dist/federation/middleware.test.mjs +17 -17
  34. package/dist/federation/mod.cjs +1 -1
  35. package/dist/federation/mod.js +1 -1
  36. package/dist/federation/mq.test.mjs +7 -6
  37. package/dist/federation/negotiation.test.mjs +3 -3
  38. package/dist/federation/outgoing-proof.test.d.mts +2 -0
  39. package/dist/federation/outgoing-proof.test.mjs +396 -0
  40. package/dist/federation/retry.test.mjs +3 -2
  41. package/dist/federation/router.test.mjs +5 -5
  42. package/dist/federation/send.test.mjs +11 -11
  43. package/dist/federation/tasks/enqueue.test.mjs +1 -1
  44. package/dist/federation/tasks/tasks.test.mjs +2 -2
  45. package/dist/federation/temporal.test.mjs +4 -4
  46. package/dist/federation/webfinger.test.mjs +4 -4
  47. package/dist/{federation-CgbvMauV.cjs → federation-CTnaljmy.cjs} +203 -37
  48. package/dist/{http-DQBfmkrS.cjs → http-B5F1JMh0.cjs} +1 -1
  49. package/dist/{http-DQA2JOEJ.js → http-By8tnmEr.js} +1 -1
  50. package/dist/{http-DZaAutqg.mjs → http-D4WPcJUe.mjs} +3 -3
  51. package/dist/{key-zxzx01Ec.mjs → key-B_Zc5Jbd.mjs} +2 -2
  52. package/dist/{kv-cache-sy8OMNT8.cjs → kv-cache-8K70pjtX.cjs} +1 -1
  53. package/dist/{kv-cache-CbrUX90H.mjs → kv-cache-BXdT7pJQ.mjs} +1 -1
  54. package/dist/{kv-cache-BBoePTOJ.js → kv-cache-BswMKQjC.js} +1 -1
  55. package/dist/{ld-CD_TN0e8.mjs → ld-B16KUSIQ.mjs} +3 -3
  56. package/dist/{metrics-B47Cm5gK.mjs → metrics-DpQqUAmh.mjs} +1 -1
  57. package/dist/{middleware-U_Gannqi.mjs → middleware-BL5HFFVU.mjs} +1 -1
  58. package/dist/{middleware-pHwDTAnq.mjs → middleware-C7_hqDnl.mjs} +143 -49
  59. package/dist/{middleware-U0OIuqwD.js → middleware-Cxto6Bq2.js} +204 -38
  60. package/dist/{mod-UDwMjuHM.d.ts → mod-CNRAxXEb.d.ts} +1 -5
  61. package/dist/{mod-CbKDOnCt.d.cts → mod-CVQFWefn.d.cts} +1 -5
  62. package/dist/mod.cjs +4 -4
  63. package/dist/mod.d.cts +1 -1
  64. package/dist/mod.d.ts +1 -1
  65. package/dist/mod.js +4 -4
  66. package/dist/nodeinfo/client.test.mjs +2 -2
  67. package/dist/nodeinfo/handler.test.mjs +3 -3
  68. package/dist/nodeinfo/types.test.mjs +3 -3
  69. package/dist/otel/exporter.test.mjs +2 -2
  70. package/dist/{outgoing-jsonld-B5Ne7JoL.mjs → outgoing-jsonld-4IJqPYos.mjs} +11 -9
  71. package/dist/{owner-u3IJRhVx.mjs → owner-BIOIhZoM.mjs} +2 -2
  72. package/dist/{owner-BNKC3s6G.js → owner-D-E0bT2O.js} +127 -35
  73. package/dist/{owner--mNatWct.cjs → owner-WUYke16i.cjs} +126 -34
  74. package/dist/{proof-D3te0SP-.mjs → proof-BVxJu5vv.mjs} +80 -23
  75. package/dist/{public-audience-Cc2YJ3ip.mjs → public-audience--klBIOk1.mjs} +13 -9
  76. package/dist/secured-document-CxzZZ9nL.mjs +35 -0
  77. package/dist/{send-CDr0Zivk.mjs → send-Cr5FJ7iu.mjs} +3 -3
  78. package/dist/sig/compound-proof-discovery.test.mjs +3 -3
  79. package/dist/sig/compound-proof-producer.test.d.mts +2 -0
  80. package/dist/sig/compound-proof-producer.test.mjs +107 -0
  81. package/dist/sig/compound-proof-verification.test.mjs +5 -5
  82. package/dist/sig/compound-proof.test.mjs +145 -58
  83. package/dist/sig/http.test.mjs +11 -10
  84. package/dist/sig/key.test.mjs +6 -6
  85. package/dist/sig/ld.test.mjs +9 -9
  86. package/dist/sig/mod.cjs +2 -2
  87. package/dist/sig/mod.d.cts +1 -1
  88. package/dist/sig/mod.d.ts +1 -1
  89. package/dist/sig/mod.js +2 -2
  90. package/dist/sig/owner.test.mjs +5 -5
  91. package/dist/sig/proof.test.mjs +9 -9
  92. package/dist/std__assert-DvMDRPes.mjs +8 -0
  93. package/dist/{temporal-DKhVF_Uk.mjs → temporal-CCf0lZV3.mjs} +1 -1
  94. package/dist/testing/kv.test.mjs +2 -2
  95. package/dist/utils/docloader.test.mjs +5 -5
  96. package/dist/utils/kv-cache.test.mjs +1 -1
  97. package/dist/utils/mod.cjs +1 -1
  98. package/dist/utils/mod.js +1 -1
  99. package/package.json +6 -6
  100. package/dist/std__assert-CxFT0MNt.mjs +0 -8
@@ -0,0 +1,228 @@
1
+ import { Temporal } from "temporal-polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
5
+ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
+ import "../std__assert-DvMDRPes.mjs";
8
+ import { t as assert } from "../assert-D1Eafmd_.mjs";
9
+ import { t as exportJwk } from "../key-B_Zc5Jbd.mjs";
10
+ import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
11
+ import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
12
+ import { n as FederationImpl } from "../middleware-C7_hqDnl.mjs";
13
+ import { c as verifyProof, r as signObject } from "../proof-BVxJu5vv.mjs";
14
+ import { Create, DataIntegrityProof, Note } from "@fedify/vocab";
15
+ import { mockDocumentLoader, test } from "@fedify/fixture";
16
+ import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
17
+ import serialize from "json-canon";
18
+ //#region src/federation/compound-fanout.test.ts
19
+ const options = {
20
+ contextLoader: mockDocumentLoader,
21
+ documentLoader: mockDocumentLoader
22
+ };
23
+ const context = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"];
24
+ const childContext = [...context, { ex: "https://example.com/ns#" }];
25
+ async function parseProof(document) {
26
+ const proof = document.proof;
27
+ return await DataIntegrityProof.fromJsonLd({
28
+ "@context": document["@context"],
29
+ ...proof
30
+ }, options);
31
+ }
32
+ test("fanout delivery keeps an embedded signed child intact", async () => {
33
+ const created = Temporal.Instant.from("2023-02-24T23:36:38Z");
34
+ const childDid = await exportDidKey(ed25519PublicKey.publicKey);
35
+ const childKeyId = new URL(`${childDid}#${childDid.substring(8)}`);
36
+ const child = await signObject(new Note({
37
+ id: parseIri(`ap+ef61://${childDid}/objects/fanned-out`),
38
+ attribution: parseIri(`ap+ef61://${childDid}/actor`),
39
+ content: "A portable note carried through the fanout queue"
40
+ }), ed25519PrivateKey, childKeyId, {
41
+ ...options,
42
+ context: childContext,
43
+ created
44
+ });
45
+ const compound = await normalizeOutgoingActivityJsonLd(await (await signObject(new Create({
46
+ id: new URL("https://example.com/activities/fanned-out"),
47
+ actor: new URL("https://example.com/person"),
48
+ object: child
49
+ }), ed25519PrivateKey, childKeyId, {
50
+ ...options,
51
+ context,
52
+ created
53
+ })).toJsonLd({
54
+ format: "compact",
55
+ ...options,
56
+ context
57
+ }), mockDocumentLoader, { preserveNestedSecuredDocuments: true });
58
+ const securedChild = compound.object;
59
+ assertEquals(securedChild["@context"], childContext);
60
+ esm_default.spyGlobal();
61
+ try {
62
+ let delivered = null;
63
+ esm_default.post("https://example.com/inbox", async (cl) => {
64
+ delivered = await cl.request.json();
65
+ return new Response(null, { status: 202 });
66
+ });
67
+ const federation = new FederationImpl({
68
+ kv: new MemoryKvStore(),
69
+ contextLoaderFactory: () => mockDocumentLoader
70
+ });
71
+ federation.setInboxListeners("/users/{identifier}/inbox", "/inbox");
72
+ const message = {
73
+ type: "fanout",
74
+ id: crypto.randomUUID(),
75
+ baseUrl: "https://example.com",
76
+ keys: [{
77
+ keyId: rsaPublicKey2.id.href,
78
+ privateKey: await exportJwk(rsaPrivateKey2)
79
+ }],
80
+ inboxes: { "https://example.com/inbox": {
81
+ actorIds: ["https://example.com/recipient"],
82
+ sharedInbox: false
83
+ } },
84
+ activity: compound,
85
+ activityId: "https://example.com/activities/fanned-out",
86
+ activityType: "https://www.w3.org/ns/activitystreams#Create",
87
+ normalizeExistingProofs: true,
88
+ traceContext: {}
89
+ };
90
+ await federation.processQueuedTask(void 0, message);
91
+ assert(delivered != null);
92
+ const body = delivered;
93
+ delete body.signature;
94
+ assertEquals(serialize(body), serialize(compound));
95
+ const embedded = body.object;
96
+ assertEquals((await verifyProof(embedded, await parseProof(embedded), options))?.id, childKeyId);
97
+ assertEquals((await verifyProof(body, await parseProof(body), options))?.id, childKeyId);
98
+ } finally {
99
+ esm_default.hardReset();
100
+ }
101
+ });
102
+ test("forced fanout signs before serializing so the child survives", async () => {
103
+ const created = Temporal.Instant.from("2023-02-24T23:36:38Z");
104
+ const childDid = await exportDidKey(ed25519PublicKey.publicKey);
105
+ const childKeyId = new URL(`${childDid}#${childDid.substring(8)}`);
106
+ const child = await signObject(new Note({
107
+ id: parseIri(`ap+ef61://${childDid}/objects/forced-fanout`),
108
+ attribution: parseIri(`ap+ef61://${childDid}/actor`),
109
+ content: "A portable note sent through a forced fanout"
110
+ }), ed25519PrivateKey, childKeyId, {
111
+ ...options,
112
+ context: childContext,
113
+ created
114
+ });
115
+ const activity = new Create({
116
+ id: new URL("https://example.com/activities/forced-fanout"),
117
+ actor: new URL("https://example.com/person"),
118
+ object: child
119
+ });
120
+ esm_default.spyGlobal();
121
+ try {
122
+ let delivered = null;
123
+ esm_default.post("https://example.com/inbox", async (cl) => {
124
+ delivered = await cl.request.json();
125
+ return new Response(null, { status: 202 });
126
+ });
127
+ const queued = [];
128
+ const federation = new FederationImpl({
129
+ kv: new MemoryKvStore(),
130
+ queue: {
131
+ enqueue(message) {
132
+ queued.push(message);
133
+ return Promise.resolve();
134
+ },
135
+ listen() {
136
+ return Promise.resolve();
137
+ }
138
+ },
139
+ manuallyStartQueue: true,
140
+ contextLoaderFactory: () => mockDocumentLoader
141
+ });
142
+ federation.setInboxListeners("/users/{identifier}/inbox", "/inbox");
143
+ await federation.createContext(new URL("https://example.com/")).sendActivity({
144
+ keyId: childKeyId,
145
+ privateKey: ed25519PrivateKey
146
+ }, {
147
+ id: new URL("https://example.com/users/bob"),
148
+ inboxId: new URL("https://example.com/inbox")
149
+ }, activity, { fanout: "force" });
150
+ assertEquals(queued.length, 1);
151
+ for (let i = 0; i < queued.length; i++) await federation.processQueuedTask(void 0, queued[i]);
152
+ assert(delivered != null);
153
+ const body = delivered;
154
+ delete body.signature;
155
+ const embedded = body.object;
156
+ assertEquals(embedded["@context"], childContext);
157
+ assertEquals((await verifyProof(embedded, await parseProof(embedded), options))?.id, childKeyId);
158
+ assertEquals((await verifyProof(body, await parseProof(body), options))?.id, childKeyId);
159
+ } finally {
160
+ esm_default.hardReset();
161
+ }
162
+ });
163
+ test("an already signed activity keeps its single proof through fanout", async () => {
164
+ const created = Temporal.Instant.from("2023-02-24T23:36:38Z");
165
+ const childDid = await exportDidKey(ed25519PublicKey.publicKey);
166
+ const childKeyId = new URL(`${childDid}#${childDid.substring(8)}`);
167
+ const child = await signObject(new Note({
168
+ id: parseIri(`ap+ef61://${childDid}/objects/pre-signed`),
169
+ attribution: parseIri(`ap+ef61://${childDid}/actor`),
170
+ content: "A portable note in a pre-signed activity"
171
+ }), ed25519PrivateKey, childKeyId, {
172
+ ...options,
173
+ context: childContext,
174
+ created
175
+ });
176
+ const activity = await signObject(new Create({
177
+ id: new URL("https://example.com/activities/pre-signed"),
178
+ actor: new URL("https://example.com/person"),
179
+ object: child
180
+ }), ed25519PrivateKey, childKeyId, {
181
+ ...options,
182
+ created
183
+ });
184
+ esm_default.spyGlobal();
185
+ try {
186
+ let delivered = null;
187
+ esm_default.post("https://example.com/inbox", async (cl) => {
188
+ delivered = await cl.request.json();
189
+ return new Response(null, { status: 202 });
190
+ });
191
+ const queued = [];
192
+ const federation = new FederationImpl({
193
+ kv: new MemoryKvStore(),
194
+ queue: {
195
+ enqueue(message) {
196
+ queued.push(message);
197
+ return Promise.resolve();
198
+ },
199
+ listen() {
200
+ return Promise.resolve();
201
+ }
202
+ },
203
+ manuallyStartQueue: true,
204
+ contextLoaderFactory: () => mockDocumentLoader
205
+ });
206
+ federation.setInboxListeners("/users/{identifier}/inbox", "/inbox");
207
+ await federation.createContext(new URL("https://example.com/")).sendActivity({
208
+ keyId: childKeyId,
209
+ privateKey: ed25519PrivateKey
210
+ }, {
211
+ id: new URL("https://example.com/users/bob"),
212
+ inboxId: new URL("https://example.com/inbox")
213
+ }, activity, { fanout: "force" });
214
+ for (let i = 0; i < queued.length; i++) await federation.processQueuedTask(void 0, queued[i]);
215
+ assert(delivered != null);
216
+ const body = delivered;
217
+ delete body.signature;
218
+ assert(!Array.isArray(body.proof));
219
+ assertEquals((await verifyProof(body, await parseProof(body), options))?.id, childKeyId);
220
+ const embedded = body.object;
221
+ assertEquals(embedded["@context"], childContext);
222
+ assertEquals((await verifyProof(embedded, await parseProof(embedded), options))?.id, childKeyId);
223
+ } finally {
224
+ esm_default.hardReset();
225
+ }
226
+ });
227
+ //#endregion
228
+ export {};
@@ -3,12 +3,12 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { r as createRequestContext, t as createInboxContext } from "../context-CbS35fLr.mjs";
5
5
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
- import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
7
- import "../std__assert-CxFT0MNt.mjs";
8
- import { s as signRequest } from "../http-DZaAutqg.mjs";
6
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
+ import "../std__assert-DvMDRPes.mjs";
8
+ import { s as signRequest } from "../http-D4WPcJUe.mjs";
9
9
  import { a as rsaPrivateKey3, c as rsaPublicKey3 } from "../keys-DIJNHW-Y.mjs";
10
- import { d as handleInbox, o as createFederation } from "../middleware-pHwDTAnq.mjs";
11
- import { p as signJsonLd } from "../ld-CD_TN0e8.mjs";
10
+ import { d as handleInbox, o as createFederation } from "../middleware-C7_hqDnl.mjs";
11
+ import { p as signJsonLd } from "../ld-B16KUSIQ.mjs";
12
12
  import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
13
13
  import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
14
14
  import { Create } from "@fedify/vocab";
@@ -3,19 +3,19 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-CbS35fLr.mjs";
5
5
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
- import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
7
- import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BApOTh1h.mjs";
8
- import { t as assertInstanceOf } from "../assert_instance_of-g3WcyYNR.mjs";
9
- import "../std__assert-CxFT0MNt.mjs";
10
- import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
11
- import { t as assert } from "../assert-CebeUf0C.mjs";
6
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
+ import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BlafOF4-.mjs";
8
+ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
9
+ import "../std__assert-DvMDRPes.mjs";
10
+ import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
11
+ import { t as assert } from "../assert-D1Eafmd_.mjs";
12
12
  import { r as parseAcceptSignature } from "../accept-CPVqki78.mjs";
13
- import { a as generateCryptoKeyPair } from "../key-zxzx01Ec.mjs";
14
- import { s as signRequest } from "../http-DZaAutqg.mjs";
13
+ import { a as generateCryptoKeyPair } from "../key-B_Zc5Jbd.mjs";
14
+ import { s as signRequest } from "../http-D4WPcJUe.mjs";
15
15
  import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
16
- 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-pHwDTAnq.mjs";
17
- import { a as compactJsonLd, p as signJsonLd } from "../ld-CD_TN0e8.mjs";
18
- import { r as signObject } from "../proof-D3te0SP-.mjs";
16
+ 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-C7_hqDnl.mjs";
17
+ import { a as compactJsonLd, p as signJsonLd } from "../ld-B16KUSIQ.mjs";
18
+ import { r as signObject } from "../proof-BVxJu5vv.mjs";
19
19
  import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
20
20
  import { Activity, Create, CryptographicKey, Multikey, Note, Person, Tombstone } from "@fedify/vocab";
21
21
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -2,11 +2,11 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
5
- import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
6
- import "../std__assert-CxFT0MNt.mjs";
5
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
+ import "../std__assert-DvMDRPes.mjs";
7
7
  import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
8
- import { o as createFederation } from "../middleware-pHwDTAnq.mjs";
9
- import { r as signObject } from "../proof-D3te0SP-.mjs";
8
+ import { o as createFederation } from "../middleware-C7_hqDnl.mjs";
9
+ import { r as signObject } from "../proof-BVxJu5vv.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,8 +1,8 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
5
- import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
4
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
+ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
6
6
  import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
7
7
  import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
8
8
  import { test } from "@fedify/fixture";
@@ -3,9 +3,9 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
5
5
  import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
6
- import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
7
- import { t as assertInstanceOf } from "../assert_instance_of-g3WcyYNR.mjs";
8
- import { t as assert } from "../assert-CebeUf0C.mjs";
6
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
+ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
8
+ import { t as assert } from "../assert-D1Eafmd_.mjs";
9
9
  import { t as KvKeyCache } from "../keycache-BUDHB5rY.mjs";
10
10
  import { CryptographicKey, Multikey } from "@fedify/vocab";
11
11
  import { test } from "@fedify/fixture";
@@ -2,8 +2,8 @@ import { Temporal } from "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
5
- import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
6
- import "../std__assert-CxFT0MNt.mjs";
5
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
+ import "../std__assert-DvMDRPes.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 "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
5
- import "../std__assert-CxFT0MNt.mjs";
6
- import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
7
- import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-B47Cm5gK.mjs";
4
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
+ import "../std__assert-DvMDRPes.mjs";
6
+ import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
7
+ import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-DpQqUAmh.mjs";
8
8
  import { createTestMeterProvider, test } from "@fedify/fixture";
9
9
  import { FetchError } from "@fedify/vocab-runtime";
10
10
  import { DataPointType, MeterProvider, MetricReader } from "@opentelemetry/sdk-metrics";
@@ -6,24 +6,24 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
7
7
  import { a as numberSchema, r as envelopeSchema, t as MockQueue } from "../tasks-dbCShlCb.mjs";
8
8
  import "../testing-hbky2gMN.mjs";
9
- import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
10
- import { t as assertExists } from "../assert_exists-DtzkXC47.mjs";
11
- import { t as assertFalse } from "../assert_false-3pLLLsO4.mjs";
12
- import { t as assertInstanceOf } from "../assert_instance_of-g3WcyYNR.mjs";
13
- import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
14
- import { t as assertNotEquals } from "../assert_not_equals-BN7yDMWe.mjs";
15
- import "../std__assert-CxFT0MNt.mjs";
16
- import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
17
- import { t as assertStrictEquals } from "../assert_strict_equals-Bpjl4Psw.mjs";
18
- import { t as assert } from "../assert-CebeUf0C.mjs";
19
- import { g as recordInboxActivity } from "../metrics-B47Cm5gK.mjs";
20
- import { l as verifyRequest, s as signRequest } from "../http-DZaAutqg.mjs";
9
+ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
10
+ import { t as assertExists } from "../assert_exists-cffSpJ7X.mjs";
11
+ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
12
+ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
13
+ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
14
+ import { t as assertNotEquals } from "../assert_not_equals-CpPK2t89.mjs";
15
+ import "../std__assert-DvMDRPes.mjs";
16
+ import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
17
+ import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
18
+ import { t as assert } from "../assert-D1Eafmd_.mjs";
19
+ import { g as recordInboxActivity } from "../metrics-DpQqUAmh.mjs";
20
+ import { l as verifyRequest, s as signRequest } from "../http-D4WPcJUe.mjs";
21
21
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
22
- import { t as getAuthenticatedDocumentLoader } from "../docloader-DUKEPG-O.mjs";
23
- import { g as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-pHwDTAnq.mjs";
24
- import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-CD_TN0e8.mjs";
25
- import { t as doesActorOwnKey } from "../owner-u3IJRhVx.mjs";
26
- import { a as verifyObject, r as signObject } from "../proof-D3te0SP-.mjs";
22
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-qUudHZVH.mjs";
23
+ import { g as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-C7_hqDnl.mjs";
24
+ import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-B16KUSIQ.mjs";
25
+ import { t as doesActorOwnKey } from "../owner-BIOIhZoM.mjs";
26
+ import { a as verifyObject, r as signObject } from "../proof-BVxJu5vv.mjs";
27
27
  import { t as CircuitBreaker } from "../circuit-breaker-C5NqoLBJ.mjs";
28
28
  import { t as TaskCodec } from "../codec-C6rTrpIp.mjs";
29
29
  import { t as markCircuitBreakerLegacySweepDone } from "../circuit-breaker-test-utils-DW6YC_Pe.mjs";
@@ -1,6 +1,6 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_federation = require("../federation-CgbvMauV.cjs");
3
+ const require_federation = require("../federation-CTnaljmy.cjs");
4
4
  exports.CircuitBreaker = require_federation.CircuitBreaker;
5
5
  exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
6
6
  exports.MemoryKvStore = require_federation.MemoryKvStore;
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "../middleware-U0OIuqwD.js";
3
+ import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "../middleware-Cxto6Bq2.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Router as Router$1, RouterError as RouterError$1, assertPath, isPath } from "@fedify/uri-template";
6
6
  import { isEqual } from "es-toolkit";
@@ -1,12 +1,13 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { l as AssertionError, s as format, t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
5
- import { t as assertFalse } from "../assert_false-3pLLLsO4.mjs";
6
- import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BApOTh1h.mjs";
7
- import "../std__assert-CxFT0MNt.mjs";
8
- import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
9
- import { t as assert } from "../assert-CebeUf0C.mjs";
4
+ import { t as AssertionError } from "../assertion_error-B-cx0fFA.mjs";
5
+ import { s as format, t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
+ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
7
+ import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BlafOF4-.mjs";
8
+ import "../std__assert-DvMDRPes.mjs";
9
+ import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
10
+ import { t as assert } from "../assert-D1Eafmd_.mjs";
10
11
  import { n as ParallelMessageQueue, t as InProcessMessageQueue } from "../mq-Dm1Wmtm-.mjs";
11
12
  import { delay } from "es-toolkit";
12
13
  import { test } from "@fedify/fixture";
@@ -1,9 +1,9 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertFalse } from "../assert_false-3pLLLsO4.mjs";
5
- import "../std__assert-CxFT0MNt.mjs";
6
- import { t as assert } from "../assert-CebeUf0C.mjs";
4
+ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
5
+ import "../std__assert-DvMDRPes.mjs";
6
+ import { t as assert } from "../assert-D1Eafmd_.mjs";
7
7
  import { t as acceptsJsonLd } from "../negotiation-CCocWT_N.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/federation/negotiation.test.ts
@@ -0,0 +1,2 @@
1
+ import { Temporal } from "temporal-polyfill";
2
+ import { URLPattern } from "urlpattern-polyfill";