@fedify/fedify 2.1.25 → 2.1.27

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 (76) hide show
  1. package/dist/{builder-DsBAef6b.mjs → builder-CKQkP3a2.mjs} +11 -3
  2. package/dist/compat/mod.d.cts +1 -1
  3. package/dist/compat/mod.d.ts +1 -1
  4. package/dist/compat/transformers.test.mjs +2 -2
  5. package/dist/{context-D4s0Wk3N.d.cts → context-BNwv9Q1v.d.cts} +1 -1
  6. package/dist/{context-BgU5UWTx.d.ts → context-DLLaDau8.d.ts} +1 -1
  7. package/dist/{deno-9AaebKOA.mjs → deno-BR2CGENT.mjs} +1 -1
  8. package/dist/{docloader-DX96uPUj.mjs → docloader-BDHKVMoV.mjs} +2 -2
  9. package/dist/federation/builder.test.mjs +38 -3
  10. package/dist/federation/collection.test.mjs +1 -1
  11. package/dist/federation/handler.test.mjs +7 -7
  12. package/dist/federation/idempotency.test.mjs +3 -3
  13. package/dist/federation/inbox.test.mjs +1 -1
  14. package/dist/federation/keycache.test.mjs +33 -2
  15. package/dist/federation/kv.test.mjs +1 -1
  16. package/dist/federation/middleware.test.mjs +122 -7
  17. package/dist/federation/mod.cjs +1 -1
  18. package/dist/federation/mod.d.cts +3 -3
  19. package/dist/federation/mod.d.ts +3 -3
  20. package/dist/federation/mod.js +1 -1
  21. package/dist/federation/send.test.mjs +3 -3
  22. package/dist/federation/temporal.test.mjs +1 -1
  23. package/dist/federation/webfinger.test.mjs +2 -2
  24. package/dist/{http-BJEMpnnY.cjs → http-CsQRvInz.cjs} +1 -1
  25. package/dist/{http-CdJ6n4rA.js → http-DQVY5EMT.js} +1 -1
  26. package/dist/{http-B5qAeoJd.mjs → http-QzHm1vsW.mjs} +2 -2
  27. package/dist/{inbox-BSyjaFbo.mjs → inbox-DEXoNgGa.mjs} +1 -1
  28. package/dist/{key-x9f-H7eO.mjs → key-CDIMbgsc.mjs} +1 -1
  29. package/dist/{keycache-CaO7wyQA.mjs → keycache-RFlZObU3.mjs} +23 -2
  30. package/dist/{kv-gJ8LYbxX.d.cts → kv-CZKl1IUS.d.cts} +3 -2
  31. package/dist/{kv-D6hNiMTK.d.ts → kv-CxaI4eGo.d.ts} +3 -2
  32. package/dist/{kv-cache-BDp2c_QE.cjs → kv-cache-FfmHQljR.cjs} +1 -1
  33. package/dist/{kv-cache-Dx3QwNBI.js → kv-cache-cTsPZ49Z.js} +1 -1
  34. package/dist/{ld-cfUwoi0C.mjs → ld-BpkaBh2H.mjs} +2 -2
  35. package/dist/{middleware-XXuSt_6b.cjs → middleware-Bla8jBXk.cjs} +43 -12
  36. package/dist/{middleware-DDT9ljTQ.mjs → middleware-C9vVE-6R.mjs} +1 -1
  37. package/dist/{middleware-DHHRwSZH.mjs → middleware-DVaturw-.mjs} +24 -21
  38. package/dist/{middleware-BXJpAXhO.cjs → middleware-Ddrg18eD.cjs} +1 -1
  39. package/dist/{middleware-CP35ElZv.js → middleware-DwEVn3gK.js} +42 -11
  40. package/dist/{mod-Bx80LUTA.d.cts → mod-BmlfRBmU.d.cts} +1 -1
  41. package/dist/{mod-DcAiY74j.d.ts → mod-CWJNbyju.d.ts} +1 -1
  42. package/dist/{mod-DkE98l_7.d.cts → mod-Cn9GJ5ex.d.cts} +1 -1
  43. package/dist/{mod-DqkY4FDr.d.ts → mod-DNEgTI8M.d.ts} +1 -1
  44. package/dist/mod.cjs +4 -4
  45. package/dist/mod.d.cts +4 -4
  46. package/dist/mod.d.ts +4 -4
  47. package/dist/mod.js +4 -4
  48. package/dist/nodeinfo/client.test.mjs +1 -1
  49. package/dist/nodeinfo/handler.test.mjs +2 -2
  50. package/dist/nodeinfo/types.test.mjs +1 -1
  51. package/dist/otel/exporter.test.mjs +1 -1
  52. package/dist/otel/mod.d.cts +1 -1
  53. package/dist/otel/mod.d.ts +1 -1
  54. package/dist/{owner-DklgvZXn.mjs → owner-DnOwKsK6.mjs} +2 -2
  55. package/dist/{proof-CI4rsVLu.mjs → proof-CShmVLWt.mjs} +2 -2
  56. package/dist/{proof-DzFzyfIc.cjs → proof-JfqNWc2E.cjs} +1 -1
  57. package/dist/{proof-Dsa_ZC-M.js → proof-uEay4EIq.js} +1 -1
  58. package/dist/{send-DJmW6Z-I.mjs → send-DCg0WblG.mjs} +2 -2
  59. package/dist/sig/http.test.mjs +62 -3
  60. package/dist/sig/key.test.mjs +1 -1
  61. package/dist/sig/ld.test.mjs +2 -2
  62. package/dist/sig/mod.cjs +2 -2
  63. package/dist/sig/mod.js +2 -2
  64. package/dist/sig/owner.test.mjs +1 -1
  65. package/dist/sig/proof.test.mjs +1 -1
  66. package/dist/{temporal-BanFifxu.mjs → temporal-C96jXvaM.mjs} +1 -1
  67. package/dist/utils/docloader.test.mjs +2 -2
  68. package/dist/utils/mod.cjs +1 -1
  69. package/dist/utils/mod.d.cts +1 -1
  70. package/dist/utils/mod.d.ts +1 -1
  71. package/dist/utils/mod.js +1 -1
  72. package/package.json +5 -5
  73. /package/dist/{client-DM72NZuk.mjs → client-CjDMsn4a.mjs} +0 -0
  74. /package/dist/{collection-ChgDTHLz.mjs → collection-BD6-SZ6O.mjs} +0 -0
  75. /package/dist/{kv-BrZHNugx.mjs → kv-HvthQAHr.mjs} +0 -0
  76. /package/dist/{types-C37hquWI.mjs → types-DCP0WLdt.mjs} +0 -0
@@ -2,8 +2,8 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as RouterError, t as Router } from "./router-CrMLXoOr.mjs";
5
- import { n as version, t as name } from "./deno-9AaebKOA.mjs";
6
- import { t as InboxListenerSet } from "./inbox-BSyjaFbo.mjs";
5
+ import { n as version, t as name } from "./deno-BR2CGENT.mjs";
6
+ import { t as InboxListenerSet } from "./inbox-DEXoNgGa.mjs";
7
7
  import { getTypeId } from "@fedify/vocab";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  import { getLogger } from "@logtape/logtape";
@@ -35,6 +35,7 @@ var FederationBuilderImpl = class {
35
35
  * Symbol registry for unique identification of unnamed symbols.
36
36
  */
37
37
  #symbolRegistry = /* @__PURE__ */ new Map();
38
+ #collectionNames = /* @__PURE__ */ new Map();
38
39
  constructor() {
39
40
  this.router = new Router();
40
41
  this.objectCallbacks = {};
@@ -43,7 +44,7 @@ var FederationBuilderImpl = class {
43
44
  this.collectionTypeIds = {};
44
45
  }
45
46
  async build(options) {
46
- const { FederationImpl } = await import("./middleware-DDT9ljTQ.mjs");
47
+ const { FederationImpl } = await import("./middleware-C9vVE-6R.mjs");
47
48
  const f = new FederationImpl(options);
48
49
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
49
50
  f.router = this.router.clone();
@@ -56,6 +57,8 @@ var FederationBuilderImpl = class {
56
57
  f.objectTypeIds = { ...this.objectTypeIds };
57
58
  f.collectionCallbacks = { ...this.collectionCallbacks };
58
59
  f.collectionTypeIds = { ...this.collectionTypeIds };
60
+ f.#symbolRegistry = new Map(this.#symbolRegistry);
61
+ f.#collectionNames = new Map(this.#collectionNames);
59
62
  f.inboxPath = this.inboxPath;
60
63
  f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
61
64
  f.outboxCallbacks = this.outboxCallbacks == null ? void 0 : { ...this.outboxCallbacks };
@@ -468,6 +471,7 @@ var FederationBuilderImpl = class {
468
471
  if (this.router.has(routeName)) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
469
472
  if (this.collectionCallbacks[name] != null) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
470
473
  if (this.router.add(path, routeName).size < 1) throw new RouterError("Path for collection dispatcher must have at least one variable.");
474
+ this.#collectionNames.set(routeName, name);
471
475
  const callbacks = { dispatcher };
472
476
  this.collectionCallbacks[name] = callbacks;
473
477
  this.collectionTypeIds[name] = itemType;
@@ -504,6 +508,10 @@ var FederationBuilderImpl = class {
504
508
  const routeName = this.#uniqueCollectionId(name);
505
509
  return this.router.build(`collection:${routeName}`, values) ?? this.router.build(`orderedCollection:${routeName}`, values);
506
510
  }
511
+ /** Resolves a custom collection route to its original name. */
512
+ getCollectionName(routeName) {
513
+ return this.#collectionNames.get(routeName) ?? routeName.replace(/^(collection|orderedCollection):/, "");
514
+ }
507
515
  setOutboxPermanentFailureHandler(handler) {
508
516
  this.outboxPermanentFailureHandler = handler;
509
517
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Ct as ActivityTransformer, n as Context } from "../context-D4s0Wk3N.cjs";
2
+ import { Ct as ActivityTransformer, n as Context } from "../context-BNwv9Q1v.cjs";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Ct as ActivityTransformer, n as Context } from "../context-BgU5UWTx.js";
2
+ import { Ct as ActivityTransformer, n as Context } from "../context-DLLaDau8.js";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
6
- import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
7
- import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-DHHRwSZH.mjs";
6
+ import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
7
+ import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-DVaturw-.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  import { Follow, Person } from "@fedify/vocab";
10
10
  //#region src/compat/transformers.test.ts
@@ -2,7 +2,7 @@
2
2
  import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-CAM_bQXx.cjs";
3
3
  import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from "./http-DqZhyEso.cjs";
4
4
  import { n as GetKeyOwnerOptions } from "./owner-B3hNQCG8.cjs";
5
- import { n as KvStore, t as KvKey } from "./kv-gJ8LYbxX.cjs";
5
+ import { n as KvStore, t as KvKey } from "./kv-CZKl1IUS.cjs";
6
6
  import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, TraverseCollectionOptions } from "@fedify/vocab";
7
7
  import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
8
8
  import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
@@ -2,7 +2,7 @@
2
2
  import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-CSddvgWN.js";
3
3
  import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from "./http-Dl00HXr4.js";
4
4
  import { n as GetKeyOwnerOptions } from "./owner-CiBPcC6F.js";
5
- import { n as KvStore, t as KvKey } from "./kv-D6hNiMTK.js";
5
+ import { n as KvStore, t as KvKey } from "./kv-CxaI4eGo.js";
6
6
  import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, TraverseCollectionOptions } from "@fedify/vocab";
7
7
  import { Span, Tracer, TracerProvider } from "@opentelemetry/api";
8
8
  import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
@@ -3,6 +3,6 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  //#region deno.json
5
5
  var name = "@fedify/fedify";
6
- var version = "2.1.25";
6
+ var version = "2.1.27";
7
7
  //#endregion
8
8
  export { version as n, name as t };
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { s as validateCryptoKey } from "./key-x9f-H7eO.mjs";
5
- import { n as doubleKnock } from "./http-B5qAeoJd.mjs";
4
+ import { s as validateCryptoKey } from "./key-CDIMbgsc.mjs";
5
+ import { n as doubleKnock } from "./http-QzHm1vsW.mjs";
6
6
  import { curry } from "es-toolkit";
7
7
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
8
8
  import { getLogger } from "@logtape/logtape";
@@ -2,10 +2,10 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import { i as assertExists } from "../std__assert-BUOJXi-Z.mjs";
5
+ import { i as assertExists, n as assertStrictEquals } from "../std__assert-BUOJXi-Z.mjs";
6
6
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
7
- import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
8
- import { n as createFederationBuilder } from "../builder-DsBAef6b.mjs";
7
+ import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
8
+ import { n as createFederationBuilder } from "../builder-CKQkP3a2.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  import { Activity, Note, Person } from "@fedify/vocab";
11
11
  //#region src/federation/builder.test.ts
@@ -168,6 +168,41 @@ test("FederationBuilder", async (t) => {
168
168
  assertEquals(impl.collectionTypeIds["test"], Note);
169
169
  assertEquals((await impl.fetch(new Request("https://example.com/c/x", { headers: { accept: "application/activity+json" } }), { contextData: void 0 })).status, 200);
170
170
  });
171
+ await t.step("preserves symbol-named collections through build()", async () => {
172
+ const builder = createFederationBuilder();
173
+ const collection = Symbol("saved");
174
+ const ordered = Symbol("saved");
175
+ builder.setCollectionDispatcher(collection, Note, "/users/{identifier}/saved", () => ({ items: [] }));
176
+ builder.setOrderedCollectionDispatcher(ordered, Note, "/users/{identifier}/ordered-saved", () => ({ items: [] }));
177
+ for (let build = 0; build < 2; build++) {
178
+ const federation = await builder.build({ kv: new MemoryKvStore() });
179
+ const ctx = federation.createContext(new URL("https://example.com/"));
180
+ for (const [name, path, type] of [[
181
+ collection,
182
+ "/users/alice/saved",
183
+ "collection"
184
+ ], [
185
+ ordered,
186
+ "/users/alice/ordered-saved",
187
+ "orderedCollection"
188
+ ]]) {
189
+ const uri = ctx.getCollectionUri(name, { identifier: "alice" });
190
+ assertEquals(uri.pathname, path);
191
+ const parsed = ctx.parseUri(uri);
192
+ assertEquals(parsed?.type, type);
193
+ if (parsed?.type !== "collection" && parsed?.type !== "orderedCollection") throw new Error("Expected a custom collection URI");
194
+ assertStrictEquals(parsed.name, name);
195
+ assertStrictEquals(parsed.class, Note);
196
+ assertEquals(parsed.values, { identifier: "alice" });
197
+ for (const cursor of [null, "next"]) {
198
+ const pageUri = new URL(uri);
199
+ if (cursor != null) pageUri.searchParams.set("cursor", cursor);
200
+ assertEquals((await federation.fetch(new Request(pageUri, { headers: { accept: "application/activity+json" } }), { contextData: void 0 })).status, 200);
201
+ }
202
+ }
203
+ assertThrows(() => federation.setCollectionDispatcher(collection, Note, "/users/{identifier}/duplicate", () => ({ items: [] })));
204
+ }
205
+ });
171
206
  });
172
207
  //#endregion
173
208
  export {};
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-BUOJXi-Z.mjs";
6
- import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-ChgDTHLz.mjs";
6
+ import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-BD6-SZ6O.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  import { decodeHex } from "byte-encodings/hex";
9
9
  //#region src/federation/collection.test.ts
@@ -7,14 +7,14 @@ import "../std__assert-BUOJXi-Z.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
8
8
  import { t as assert } from "../assert-BhQd8QHP.mjs";
9
9
  import { r as parseAcceptSignature } from "../accept-BavzedPB.mjs";
10
- import { a as generateCryptoKeyPair } from "../key-x9f-H7eO.mjs";
11
- import { s as signRequest } from "../http-B5qAeoJd.mjs";
10
+ import { a as generateCryptoKeyPair } from "../key-CDIMbgsc.mjs";
11
+ import { s as signRequest } from "../http-QzHm1vsW.mjs";
12
12
  import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
13
- import { a as compactJsonLd, f as signJsonLd } from "../ld-cfUwoi0C.mjs";
14
- import { n as signObject } from "../proof-CI4rsVLu.mjs";
15
- import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
16
- import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-DHHRwSZH.mjs";
17
- import { t as InboxListenerSet } from "../inbox-BSyjaFbo.mjs";
13
+ import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
14
+ import { a as compactJsonLd, f as signJsonLd } from "../ld-BpkaBh2H.mjs";
15
+ import { n as signObject } from "../proof-CShmVLWt.mjs";
16
+ import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-DVaturw-.mjs";
17
+ import { t as InboxListenerSet } from "../inbox-DEXoNgGa.mjs";
18
18
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
19
19
  import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
20
20
  import { FetchError } from "@fedify/vocab-runtime";
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-BUOJXi-Z.mjs";
6
6
  import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
7
- import { n as signObject } from "../proof-CI4rsVLu.mjs";
8
- import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
9
- import { a as createFederation } from "../middleware-DHHRwSZH.mjs";
7
+ import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
8
+ import { n as signObject } from "../proof-CShmVLWt.mjs";
9
+ import { a as createFederation } from "../middleware-DVaturw-.mjs";
10
10
  import { mockDocumentLoader, test } from "@fedify/fixture";
11
11
  import { Create, Follow, Person } from "@fedify/vocab";
12
12
  //#region src/federation/idempotency.test.ts
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
6
- import { t as InboxListenerSet } from "../inbox-BSyjaFbo.mjs";
6
+ import { t as InboxListenerSet } from "../inbox-DEXoNgGa.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
9
9
  //#region src/federation/inbox.test.ts
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
6
- import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
7
- import { t as KvKeyCache } from "../keycache-CaO7wyQA.mjs";
6
+ import { t as KvKeyCache } from "../keycache-RFlZObU3.mjs";
7
+ import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  import { CryptographicKey, Multikey } from "@fedify/vocab";
10
10
  //#region src/federation/keycache.test.ts
@@ -101,6 +101,37 @@ test("KvKeyCache fetch error metadata", async () => {
101
101
  await cache.setFetchError(keyId, null);
102
102
  assertEquals(await cache.getFetchError(keyId), void 0);
103
103
  });
104
+ test("KvKeyCache reads legacy fetch errors", async () => {
105
+ const kv = new MemoryKvStore();
106
+ const keyId = new URL("https://example.com/key");
107
+ await kv.set([
108
+ "pk",
109
+ "__fetchError",
110
+ keyId.href
111
+ ], {
112
+ errorName: "FetchError",
113
+ errorMessage: "Legacy failure"
114
+ });
115
+ const result = await new KvKeyCache(kv, ["pk"]).getFetchError(keyId);
116
+ assert(result != null && "error" in result);
117
+ assertEquals(result.error.constructor, Error);
118
+ assertEquals(result.error.name, "FetchError");
119
+ assertEquals(result.error.message, "Legacy failure");
120
+ assertEquals(result.error.cause, void 0);
121
+ });
122
+ test("KvKeyCache keeps unknown error types generic", async () => {
123
+ class CustomError extends Error {}
124
+ const kv = new MemoryKvStore();
125
+ const keyId = new URL("https://example.com/key");
126
+ const error = new CustomError("Custom failure");
127
+ error.name = "FetchError";
128
+ await new KvKeyCache(kv, ["pk"]).setFetchError(keyId, { error });
129
+ const result = await new KvKeyCache(kv, ["pk"]).getFetchError(keyId);
130
+ assert(result != null && "error" in result);
131
+ assertEquals(result.error.constructor, Error);
132
+ assertEquals(result.error.name, "FetchError");
133
+ assertEquals(result.error.message, "Custom failure");
134
+ });
104
135
  test("KvKeyCache unavailable entries expire", async () => {
105
136
  const cache = new KvKeyCache(new MemoryKvStore(), ["pk"], { unavailableKeyTtl: Temporal.Duration.from({ milliseconds: 1 }) });
106
137
  const keyId = new URL("https://example.com/expired");
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-BUOJXi-Z.mjs";
6
- import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
6
+ import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  //#region src/federation/kv.test.ts
9
9
  test("MemoryKvStore", async (t) => {
@@ -9,14 +9,14 @@ import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z
9
9
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
10
10
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
11
11
  import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
12
- import { l as verifyRequest, s as signRequest } from "../http-B5qAeoJd.mjs";
12
+ import { l as verifyRequest, s as signRequest } from "../http-QzHm1vsW.mjs";
13
13
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
14
- import { t as getAuthenticatedDocumentLoader } from "../docloader-DX96uPUj.mjs";
15
- import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-cfUwoi0C.mjs";
16
- import { t as doesActorOwnKey } from "../owner-DklgvZXn.mjs";
17
- import { n as signObject, r as verifyObject } from "../proof-CI4rsVLu.mjs";
18
- import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
19
- import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-DHHRwSZH.mjs";
14
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-BDHKVMoV.mjs";
15
+ import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
16
+ import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-BpkaBh2H.mjs";
17
+ import { t as doesActorOwnKey } from "../owner-DnOwKsK6.mjs";
18
+ import { n as signObject, r as verifyObject } from "../proof-CShmVLWt.mjs";
19
+ import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-DVaturw-.mjs";
20
20
  import { mockDocumentLoader, test } from "@fedify/fixture";
21
21
  import * as vocab from "@fedify/vocab";
22
22
  import { Create, Offer, Person, getTypeId, lookupObject } from "@fedify/vocab";
@@ -3797,6 +3797,80 @@ test({
3797
3797
  ]);
3798
3798
  }
3799
3799
  });
3800
+ for (const queued of [false, true]) test(`ContextImpl.routeActivity() routes the fetched document (queued: ${queued})`, async () => {
3801
+ const id = new URL("https://example.com/verified-create");
3802
+ const genuine = new Create({
3803
+ id,
3804
+ actor: new URL("https://example.com/person"),
3805
+ object: new vocab.Note({ content: "Genuine content" }),
3806
+ to: new URL("https://example.com/recipient")
3807
+ });
3808
+ const genuineJson = await genuine.toJsonLd({ contextLoader: mockDocumentLoader });
3809
+ const forged = new Create({
3810
+ id,
3811
+ actor: new URL("https://victim.example/actor"),
3812
+ object: new vocab.Note({ content: "Forged content" }),
3813
+ to: new URL("https://attacker.example/recipient")
3814
+ });
3815
+ const messages = [];
3816
+ const queue = {
3817
+ enqueue(message) {
3818
+ messages.push(message);
3819
+ return Promise.resolve();
3820
+ },
3821
+ async listen() {}
3822
+ };
3823
+ const federation = createFederation({
3824
+ kv: new MemoryKvStore(),
3825
+ documentLoaderFactory: () => async (url, options) => url === id.href ? {
3826
+ document: genuineJson,
3827
+ documentUrl: id.href,
3828
+ contextUrl: null
3829
+ } : await mockDocumentLoader(url, options),
3830
+ contextLoaderFactory: () => mockDocumentLoader,
3831
+ queue: {
3832
+ inbox: queued ? queue : void 0,
3833
+ outbox: queue
3834
+ },
3835
+ manuallyStartQueue: true
3836
+ });
3837
+ const received = [];
3838
+ const contextDocuments = [];
3839
+ federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").on(Create, async (ctx, activity) => {
3840
+ received.push(await activity.toJsonLd({ contextLoader: mockDocumentLoader }));
3841
+ assertInstanceOf(ctx, InboxContextImpl);
3842
+ contextDocuments.push(ctx.activity);
3843
+ await ctx.forwardActivity({
3844
+ privateKey: ed25519PrivateKey,
3845
+ keyId: ed25519Multikey.id
3846
+ }, {
3847
+ id: new URL("https://example.com/recipient"),
3848
+ inboxId: new URL("https://example.com/inbox")
3849
+ });
3850
+ });
3851
+ const ctx = federation.createContext(new URL("https://local.example/"));
3852
+ async function processInbox() {
3853
+ const inboxMessages = messages.filter((message) => message.type === "inbox");
3854
+ for (const message of inboxMessages) await federation.processQueuedTask(void 0, message);
3855
+ }
3856
+ assert(await ctx.routeActivity(null, forged));
3857
+ if (queued) {
3858
+ assertEquals(received, []);
3859
+ assertEquals(messages.length, 1);
3860
+ assertEquals(messages[0].activity, genuineJson);
3861
+ await processInbox();
3862
+ }
3863
+ assertEquals(received, [genuineJson]);
3864
+ assertEquals(contextDocuments, [genuineJson]);
3865
+ const forwarded = messages.filter((message) => message.type === "outbox");
3866
+ assertEquals(forwarded.length, 1);
3867
+ assertEquals(forwarded[0].activity, genuineJson);
3868
+ assert(await ctx.routeActivity(null, genuine));
3869
+ if (queued) await processInbox();
3870
+ assertEquals(received, [genuineJson]);
3871
+ assertEquals(contextDocuments, [genuineJson]);
3872
+ assertEquals(messages.filter((message) => message.type === "outbox").length, 1);
3873
+ });
3800
3874
  test("ContextImpl.routeActivity() marks queued signed activities as non-LDS", async () => {
3801
3875
  let queuedMessage = null;
3802
3876
  const federation = new FederationImpl({
@@ -3856,6 +3930,47 @@ test("ContextImpl.getCollectionUri()", () => {
3856
3930
  assertThrows(() => ctx.getCollectionUri(Symbol(notReg), values));
3857
3931
  assertThrows(() => ctx.getCollectionUri(Symbol.for(notReg), values));
3858
3932
  });
3933
+ test("symbol-named custom collections are served and parsed", async () => {
3934
+ const federation = createFederation({ kv: new MemoryKvStore() });
3935
+ const names = [Symbol("bookmarks"), Symbol("bookmarks")];
3936
+ const paths = ["bookmarks", "ordered-bookmarks"];
3937
+ const calls = [];
3938
+ federation.setCollectionDispatcher(names[0], vocab.Object, "/users/{identifier}/bookmarks", (_ctx, _values, cursor) => {
3939
+ calls.push([0, cursor]);
3940
+ return { items: [] };
3941
+ });
3942
+ federation.setOrderedCollectionDispatcher(names[1], vocab.Object, "/users/{identifier}/ordered-bookmarks", (_ctx, _values, cursor) => {
3943
+ calls.push([1, cursor]);
3944
+ return { items: [] };
3945
+ });
3946
+ const ctx = federation.createContext(new URL("https://example.com/"));
3947
+ for (const [index, name] of names.entries()) {
3948
+ const uri = ctx.getCollectionUri(name, { identifier: "alice" });
3949
+ assertEquals(uri.pathname, `/users/alice/${paths[index]}`);
3950
+ const parsed = ctx.parseUri(uri);
3951
+ assertEquals(parsed?.type, index === 0 ? "collection" : "orderedCollection");
3952
+ if (parsed?.type !== "collection" && parsed?.type !== "orderedCollection") throw new Error("Expected a custom collection URI");
3953
+ assertStrictEquals(parsed.name, name);
3954
+ assertStrictEquals(parsed.class, vocab.Object);
3955
+ assertEquals(parsed.typeId, vocab.Object.typeId);
3956
+ assertEquals(parsed.values, { identifier: "alice" });
3957
+ for (const cursor of [null, "next"]) {
3958
+ const pageUri = new URL(uri);
3959
+ if (cursor != null) pageUri.searchParams.set("cursor", cursor);
3960
+ const response = await federation.fetch(new Request(pageUri, { headers: { accept: "application/activity+json" } }), { contextData: void 0 });
3961
+ assertEquals(response.status, 200);
3962
+ const body = await response.json();
3963
+ assert(body !== null && typeof body === "object" && "type" in body);
3964
+ assertEquals(body.type, `${index === 0 ? "Collection" : "OrderedCollection"}${cursor == null ? "" : "Page"}`);
3965
+ }
3966
+ }
3967
+ assertEquals(calls, [
3968
+ [0, null],
3969
+ [0, "next"],
3970
+ [1, null],
3971
+ [1, "next"]
3972
+ ]);
3973
+ });
3859
3974
  test("InboxContextImpl.forwardActivity()", async (t) => {
3860
3975
  esm_default.spyGlobal();
3861
3976
  let verified = null;
@@ -2,7 +2,7 @@ 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-XXuSt_6b.cjs");
5
+ const require_middleware = require("../middleware-Bla8jBXk.cjs");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  //#region src/federation/kv.ts
8
8
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "../context-D4s0Wk3N.cjs";
3
- import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-gJ8LYbxX.cjs";
4
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-Bx80LUTA.cjs";
2
+ import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "../context-BNwv9Q1v.cjs";
3
+ import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-CZKl1IUS.cjs";
4
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-BmlfRBmU.cjs";
5
5
  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, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, 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 };
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "../context-BgU5UWTx.js";
3
- import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-D6hNiMTK.js";
4
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-DcAiY74j.js";
2
+ import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "../context-DLLaDau8.js";
3
+ import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-CxaI4eGo.js";
4
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-CWJNbyju.js";
5
5
  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, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, 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 };
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-CP35ElZv.js";
3
+ import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-DwEVn3gK.js";
4
4
  import { isEqual } from "es-toolkit";
5
5
  //#region src/federation/kv.ts
6
6
  /**
@@ -7,10 +7,10 @@ import "../std__assert-BUOJXi-Z.mjs";
7
7
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
8
8
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
9
9
  import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
10
- import { l as verifyRequest } from "../http-B5qAeoJd.mjs";
10
+ import { l as verifyRequest } from "../http-QzHm1vsW.mjs";
11
11
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
12
- import { t as doesActorOwnKey } from "../owner-DklgvZXn.mjs";
13
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-DJmW6Z-I.mjs";
12
+ import { t as doesActorOwnKey } from "../owner-DnOwKsK6.mjs";
13
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-DCg0WblG.mjs";
14
14
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
15
15
  import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
16
16
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import "../std__assert-BUOJXi-Z.mjs";
5
5
  import { n as assertFalse } from "../assert_rejects-B-qJtC9Z.mjs";
6
6
  import { t as assert } from "../assert-BhQd8QHP.mjs";
7
- import { t as hasMalformedKnownTemporalLiteral } from "../temporal-BanFifxu.mjs";
7
+ import { t as hasMalformedKnownTemporalLiteral } from "../temporal-C96jXvaM.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/federation/temporal.test.ts
10
10
  test("hasMalformedKnownTemporalLiteral() detects expanded proof timestamps", async () => {
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
4
4
  import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-BUOJXi-Z.mjs";
7
- import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
8
- import { a as createFederation, o as handleWebFinger } from "../middleware-DHHRwSZH.mjs";
7
+ import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
8
+ import { a as createFederation, o as handleWebFinger } from "../middleware-DVaturw-.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  import { Image, Link, Person } from "@fedify/vocab";
11
11
  //#region src/federation/webfinger.test.ts
@@ -11,7 +11,7 @@ let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conve
11
11
  let byte_encodings_base64 = require("byte-encodings/base64");
12
12
  //#region deno.json
13
13
  var name = "@fedify/fedify";
14
- var version = "2.1.25";
14
+ var version = "2.1.27";
15
15
  //#endregion
16
16
  //#region src/sig/accept.ts
17
17
  /**
@@ -10,7 +10,7 @@ import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } fro
10
10
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "2.1.25";
13
+ var version = "2.1.27";
14
14
  //#endregion
15
15
  //#region src/sig/accept.ts
16
16
  /**
@@ -1,9 +1,9 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-9AaebKOA.mjs";
4
+ import { n as version, t as name } from "./deno-BR2CGENT.mjs";
5
5
  import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature } from "./accept-BavzedPB.mjs";
6
- import { i as fetchKeyDetailed, s as validateCryptoKey } from "./key-x9f-H7eO.mjs";
6
+ import { i as fetchKeyDetailed, s as validateCryptoKey } from "./key-CDIMbgsc.mjs";
7
7
  import { CryptographicKey } from "@fedify/vocab";
8
8
  import { SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  import { FetchError } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-9AaebKOA.mjs";
4
+ import { n as version, t as name } from "./deno-BR2CGENT.mjs";
5
5
  import { Activity, getTypeId } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
7
7
  import { getLogger } from "@logtape/logtape";
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-9AaebKOA.mjs";
4
+ import { n as version, t as name } from "./deno-BR2CGENT.mjs";
5
5
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";