@fedify/fedify 2.0.35-dev.2465 → 2.0.35-dev.2469

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 (58) hide show
  1. package/dist/{builder-COVPHcS_.mjs → builder-vEXq-lKC.mjs} +3 -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 +1 -1
  5. package/dist/{context-DDPUfQkR.d.ts → context-B2iX3heK.d.ts} +26 -0
  6. package/dist/{context-C-KTxW8v.d.cts → context-r8sjhltN.d.cts} +26 -0
  7. package/dist/{deno-ClkjKd1Y.mjs → deno-HyjpIMD2.mjs} +1 -1
  8. package/dist/{docloader-CEKVqrZZ.mjs → docloader-C3V1CA__.mjs} +2 -2
  9. package/dist/federation/builder.test.mjs +1 -1
  10. package/dist/federation/handler.test.mjs +6 -6
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/inbox.test.mjs +1 -1
  13. package/dist/federation/middleware.test.mjs +330 -7
  14. package/dist/federation/mod.cjs +1 -1
  15. package/dist/federation/mod.d.cts +2 -2
  16. package/dist/federation/mod.d.ts +2 -2
  17. package/dist/federation/mod.js +1 -1
  18. package/dist/federation/send.test.mjs +3 -3
  19. package/dist/federation/temporal.test.mjs +1 -1
  20. package/dist/federation/webfinger.test.mjs +1 -1
  21. package/dist/{http-BxzEYou1.js → http-B9yJ1OGG.js} +1 -1
  22. package/dist/{http-ByWYcKft.cjs → http-B_JXxsg0.cjs} +1 -1
  23. package/dist/{http-BbieND-q.mjs → http-xlEvsjp2.mjs} +2 -2
  24. package/dist/{inbox-CUDMg8zO.mjs → inbox-Ca4SopAP.mjs} +1 -1
  25. package/dist/{key-C0z4FgyY.mjs → key-CLtu73m3.mjs} +1 -1
  26. package/dist/{kv-cache-BaAaam2u.cjs → kv-cache-BzxVosc_.cjs} +1 -1
  27. package/dist/{kv-cache-D3IyjhlK.js → kv-cache-ibNSFaaR.js} +1 -1
  28. package/dist/{ld-jTWJ8N8H.mjs → ld-CwZHzx6E.mjs} +2 -2
  29. package/dist/{middleware-7c0Theyb.mjs → middleware-B-PC2OBb.mjs} +60 -20
  30. package/dist/{middleware-DKxi2SGD.mjs → middleware-BE2KpCCl.mjs} +1 -1
  31. package/dist/{middleware-CUBeZq0G.cjs → middleware-BfYt2ccy.cjs} +1 -1
  32. package/dist/{middleware-CpGD9Bck.js → middleware-DKzhsZ6a.js} +52 -12
  33. package/dist/{middleware-CQXidl_F.cjs → middleware-DegTN2kB.cjs} +53 -13
  34. package/dist/{mod-CI9TwVC1.d.ts → mod-CM_eR8hQ.d.ts} +1 -1
  35. package/dist/{mod-CgIgPN_a.d.cts → mod-DDTLbfce.d.cts} +1 -1
  36. package/dist/mod.cjs +4 -4
  37. package/dist/mod.d.cts +2 -2
  38. package/dist/mod.d.ts +2 -2
  39. package/dist/mod.js +4 -4
  40. package/dist/nodeinfo/handler.test.mjs +1 -1
  41. package/dist/{owner-D8l8hvDa.mjs → owner-CI6RnH-j.mjs} +2 -2
  42. package/dist/{proof-Rh4dH22e.cjs → proof-BIaI6Y0n.cjs} +1 -1
  43. package/dist/{proof-BNRoUaAq.js → proof-C7JS7QMS.js} +1 -1
  44. package/dist/{proof-C-TDIi4A.mjs → proof-CDgXDfMX.mjs} +2 -2
  45. package/dist/{send-BaY30BkB.mjs → send-7rCQ8WKw.mjs} +2 -2
  46. package/dist/sig/http.test.mjs +2 -2
  47. package/dist/sig/key.test.mjs +2 -2
  48. package/dist/sig/ld.test.mjs +2 -2
  49. package/dist/sig/mod.cjs +2 -2
  50. package/dist/sig/mod.js +2 -2
  51. package/dist/sig/owner.test.mjs +1 -1
  52. package/dist/sig/proof.test.mjs +1 -1
  53. package/dist/{temporal-DlKY37eA.mjs → temporal-DsnplmHX.mjs} +1 -1
  54. package/dist/testing/mod.d.mts +26 -0
  55. package/dist/utils/docloader.test.mjs +2 -2
  56. package/dist/utils/mod.cjs +1 -1
  57. package/dist/utils/mod.js +1 -1
  58. package/package.json +6 -6
@@ -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-ClkjKd1Y.mjs";
6
- import { t as InboxListenerSet } from "./inbox-CUDMg8zO.mjs";
5
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
6
+ import { t as InboxListenerSet } from "./inbox-Ca4SopAP.mjs";
7
7
  import { getTypeId } from "@fedify/vocab";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  import { getLogger } from "@logtape/logtape";
@@ -43,7 +43,7 @@ var FederationBuilderImpl = class {
43
43
  this.collectionTypeIds = {};
44
44
  }
45
45
  async build(options) {
46
- const { FederationImpl } = await import("./middleware-DKxi2SGD.mjs");
46
+ const { FederationImpl } = await import("./middleware-BE2KpCCl.mjs");
47
47
  const f = new FederationImpl(options);
48
48
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
49
49
  f.router = this.router.clone();
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { bt as ActivityTransformer, n as Context } from "../context-C-KTxW8v.cjs";
2
+ import { bt as ActivityTransformer, n as Context } from "../context-r8sjhltN.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 { bt as ActivityTransformer, n as Context } from "../context-DDPUfQkR.js";
2
+ import { bt as ActivityTransformer, n as Context } from "../context-B2iX3heK.js";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -4,7 +4,7 @@ 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
6
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
7
- import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-7c0Theyb.mjs";
7
+ import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-B-PC2OBb.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  import { Follow, Person } from "@fedify/vocab";
10
10
  //#region src/compat/transformers.test.ts
@@ -2204,6 +2204,11 @@ interface RequestContext<TContextData> extends Context<TContextData> {
2204
2204
  * Gets the public key of the sender, if any exists and it is verified.
2205
2205
  * Otherwise, `null` is returned.
2206
2206
  *
2207
+ * Successful results are reused for this request regardless of the options.
2208
+ * Pending checks and `null` results are reused for the same effective
2209
+ * document and context loaders, including failed lookups. Rejected checks
2210
+ * can be retried. Shared work uses the first caller's tracer provider.
2211
+ *
2207
2212
  * This can be used for implementing [authorized fetch] (also known as
2208
2213
  * secure mode) in ActivityPub.
2209
2214
  *
@@ -2217,6 +2222,11 @@ interface RequestContext<TContextData> extends Context<TContextData> {
2217
2222
  * Gets the public key of the sender, if any exists and it is verified.
2218
2223
  * Otherwise, `null` is returned.
2219
2224
  *
2225
+ * Successful results are reused for this request regardless of the options.
2226
+ * Pending checks and `null` results are reused for the same effective
2227
+ * document and context loaders, including failed lookups. Rejected checks
2228
+ * can be retried. Shared work uses the first caller's tracer provider.
2229
+ *
2220
2230
  * This can be used for implementing [authorized fetch] (also known as
2221
2231
  * secure mode) in ActivityPub.
2222
2232
  *
@@ -2236,6 +2246,14 @@ interface RequestContext<TContextData> extends Context<TContextData> {
2236
2246
  * Gets the owner of the signed key, if any exists and it is verified.
2237
2247
  * Otherwise, `null` is returned.
2238
2248
  *
2249
+ * Verified keys and owners are reused for this request regardless of the
2250
+ * options. Pending checks are shared for the same effective document and
2251
+ * context loaders. A `null` result from an owner lookup after key
2252
+ * verification is retained for those loaders. A `null` result caused by
2253
+ * an unverified key is not retained, allowing an owner lookup after another
2254
+ * loader verifies the key. Rejected checks can be retried. Shared work
2255
+ * uses the first caller's tracer provider.
2256
+ *
2239
2257
  * This can be used for implementing [authorized fetch] (also known as
2240
2258
  * secure mode) in ActivityPub.
2241
2259
  *
@@ -2250,6 +2268,14 @@ interface RequestContext<TContextData> extends Context<TContextData> {
2250
2268
  * Gets the owner of the signed key, if any exists and it is verified.
2251
2269
  * Otherwise, `null` is returned.
2252
2270
  *
2271
+ * Verified keys and owners are reused for this request regardless of the
2272
+ * options. Pending checks are shared for the same effective document and
2273
+ * context loaders. A `null` result from an owner lookup after key
2274
+ * verification is retained for those loaders. A `null` result caused by
2275
+ * an unverified key is not retained, allowing an owner lookup after another
2276
+ * loader verifies the key. Rejected checks can be retried. Shared work
2277
+ * uses the first caller's tracer provider.
2278
+ *
2253
2279
  * This can be used for implementing [authorized fetch] (also known as
2254
2280
  * secure mode) in ActivityPub.
2255
2281
  *
@@ -2204,6 +2204,11 @@ interface RequestContext<TContextData> extends Context<TContextData> {
2204
2204
  * Gets the public key of the sender, if any exists and it is verified.
2205
2205
  * Otherwise, `null` is returned.
2206
2206
  *
2207
+ * Successful results are reused for this request regardless of the options.
2208
+ * Pending checks and `null` results are reused for the same effective
2209
+ * document and context loaders, including failed lookups. Rejected checks
2210
+ * can be retried. Shared work uses the first caller's tracer provider.
2211
+ *
2207
2212
  * This can be used for implementing [authorized fetch] (also known as
2208
2213
  * secure mode) in ActivityPub.
2209
2214
  *
@@ -2217,6 +2222,11 @@ interface RequestContext<TContextData> extends Context<TContextData> {
2217
2222
  * Gets the public key of the sender, if any exists and it is verified.
2218
2223
  * Otherwise, `null` is returned.
2219
2224
  *
2225
+ * Successful results are reused for this request regardless of the options.
2226
+ * Pending checks and `null` results are reused for the same effective
2227
+ * document and context loaders, including failed lookups. Rejected checks
2228
+ * can be retried. Shared work uses the first caller's tracer provider.
2229
+ *
2220
2230
  * This can be used for implementing [authorized fetch] (also known as
2221
2231
  * secure mode) in ActivityPub.
2222
2232
  *
@@ -2236,6 +2246,14 @@ interface RequestContext<TContextData> extends Context<TContextData> {
2236
2246
  * Gets the owner of the signed key, if any exists and it is verified.
2237
2247
  * Otherwise, `null` is returned.
2238
2248
  *
2249
+ * Verified keys and owners are reused for this request regardless of the
2250
+ * options. Pending checks are shared for the same effective document and
2251
+ * context loaders. A `null` result from an owner lookup after key
2252
+ * verification is retained for those loaders. A `null` result caused by
2253
+ * an unverified key is not retained, allowing an owner lookup after another
2254
+ * loader verifies the key. Rejected checks can be retried. Shared work
2255
+ * uses the first caller's tracer provider.
2256
+ *
2239
2257
  * This can be used for implementing [authorized fetch] (also known as
2240
2258
  * secure mode) in ActivityPub.
2241
2259
  *
@@ -2250,6 +2268,14 @@ interface RequestContext<TContextData> extends Context<TContextData> {
2250
2268
  * Gets the owner of the signed key, if any exists and it is verified.
2251
2269
  * Otherwise, `null` is returned.
2252
2270
  *
2271
+ * Verified keys and owners are reused for this request regardless of the
2272
+ * options. Pending checks are shared for the same effective document and
2273
+ * context loaders. A `null` result from an owner lookup after key
2274
+ * verification is retained for those loaders. A `null` result caused by
2275
+ * an unverified key is not retained, allowing an owner lookup after another
2276
+ * loader verifies the key. Rejected checks can be retried. Shared work
2277
+ * uses the first caller's tracer provider.
2278
+ *
2253
2279
  * This can be used for implementing [authorized fetch] (also known as
2254
2280
  * secure mode) in ActivityPub.
2255
2281
  *
@@ -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.0.35-dev.2465+5a048d17";
6
+ var version = "2.0.35-dev.2469+53a29875";
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 { o as validateCryptoKey } from "./key-C0z4FgyY.mjs";
5
- import { n as doubleKnock } from "./http-BbieND-q.mjs";
4
+ import { o as validateCryptoKey } from "./key-CLtu73m3.mjs";
5
+ import { n as doubleKnock } from "./http-xlEvsjp2.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";
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { i as assertExists, n as assertStrictEquals } from "../std__assert-DflMZha5.mjs";
6
6
  import { t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
8
- import { n as createFederationBuilder } from "../builder-COVPHcS_.mjs";
8
+ import { n as createFederationBuilder } from "../builder-vEXq-lKC.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
@@ -6,14 +6,14 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-DflMZha5.mjs";
7
7
  import { t as assert } from "../assert-BhQd8QHP.mjs";
8
8
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
9
- import { i as generateCryptoKeyPair } from "../key-C0z4FgyY.mjs";
10
- import { s as signRequest } from "../http-BbieND-q.mjs";
9
+ import { i as generateCryptoKeyPair } from "../key-CLtu73m3.mjs";
10
+ import { s as signRequest } from "../http-xlEvsjp2.mjs";
11
11
  import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
12
- import { a as compactJsonLd, f as signJsonLd } from "../ld-jTWJ8N8H.mjs";
13
- import { n as signObject } from "../proof-C-TDIi4A.mjs";
12
+ import { a as compactJsonLd, f as signJsonLd } from "../ld-CwZHzx6E.mjs";
13
+ import { n as signObject } from "../proof-CDgXDfMX.mjs";
14
14
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
15
- 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-7c0Theyb.mjs";
16
- import { t as InboxListenerSet } from "../inbox-CUDMg8zO.mjs";
15
+ 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-B-PC2OBb.mjs";
16
+ import { t as InboxListenerSet } from "../inbox-Ca4SopAP.mjs";
17
17
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
18
18
  import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
19
19
  //#region src/federation/handler.test.ts
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-DflMZha5.mjs";
6
6
  import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
7
- import { n as signObject } from "../proof-C-TDIi4A.mjs";
7
+ import { n as signObject } from "../proof-CDgXDfMX.mjs";
8
8
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
9
- import { a as createFederation } from "../middleware-7c0Theyb.mjs";
9
+ import { a as createFederation } from "../middleware-B-PC2OBb.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 { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
6
- import { n as actorsHaveSameOrigin, t as InboxListenerSet } from "../inbox-CUDMg8zO.mjs";
6
+ import { n as actorsHaveSameOrigin, t as InboxListenerSet } from "../inbox-Ca4SopAP.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
@@ -9,15 +9,15 @@ import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.m
9
9
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
10
10
  import { t as assertNotEquals } from "../assert_not_equals-BkxW5QJI.mjs";
11
11
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
12
- import { l as verifyRequest, s as signRequest } from "../http-BbieND-q.mjs";
12
+ import { l as verifyRequest, s as signRequest } from "../http-xlEvsjp2.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-CCxRJhWa.mjs";
14
- import { t as getAuthenticatedDocumentLoader } from "../docloader-CEKVqrZZ.mjs";
15
- import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-jTWJ8N8H.mjs";
16
- import { t as doesActorOwnKey } from "../owner-D8l8hvDa.mjs";
17
- import { n as signObject, r as verifyObject } from "../proof-C-TDIi4A.mjs";
14
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-C3V1CA__.mjs";
15
+ import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-CwZHzx6E.mjs";
16
+ import { t as doesActorOwnKey } from "../owner-CI6RnH-j.mjs";
17
+ import { n as signObject, r as verifyObject } from "../proof-CDgXDfMX.mjs";
18
18
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
19
- import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-7c0Theyb.mjs";
20
- import { mockDocumentLoader, test } from "@fedify/fixture";
19
+ import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-B-PC2OBb.mjs";
20
+ import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
21
21
  import * as vocab from "@fedify/vocab";
22
22
  import { Create, Offer, Person, getTypeId, lookupObject } from "@fedify/vocab";
23
23
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -705,6 +705,329 @@ test({
705
705
  esm_default.hardReset();
706
706
  }
707
707
  });
708
+ test("RequestContext signature checks", async (t) => {
709
+ const [tracerProvider, exporter] = createTestTracerProvider();
710
+ const keyId = rsaPublicKey3.id.href;
711
+ const ownerId = rsaPublicKey3.ownerId.href;
712
+ const request = await signRequest(new Request("https://example.com/"), rsaPrivateKey3, rsaPublicKey3.id);
713
+ function setup(options = {}) {
714
+ const loads = {
715
+ key: 0,
716
+ owner: 0
717
+ };
718
+ const loader = async (url, loaderOptions) => {
719
+ if (url === keyId) loads.key++;
720
+ else if (url === ownerId) loads.owner++;
721
+ await options.gate;
722
+ return await (options.load ?? mockDocumentLoader)(url, loaderOptions);
723
+ };
724
+ const federation = createFederation({
725
+ kv: new MemoryKvStore(),
726
+ documentLoaderFactory: () => loader,
727
+ contextLoaderFactory: () => mockDocumentLoader,
728
+ tracerProvider: options.tracerProvider ?? tracerProvider
729
+ });
730
+ return {
731
+ ctx: federation.createContext(options.request ?? new Request(request), void 0),
732
+ loads,
733
+ loader,
734
+ federation
735
+ };
736
+ }
737
+ try {
738
+ for (const mode of [
739
+ "keys",
740
+ "owners",
741
+ "warm owners",
742
+ "mixed"
743
+ ]) await t.step(`coalesces ${mode}`, async () => {
744
+ exporter.clear();
745
+ let release;
746
+ const { ctx, loads, loader } = setup({ gate: new Promise((resolve) => release = resolve) });
747
+ if (mode === "warm owners") {
748
+ release();
749
+ assert(await ctx.getSignedKey());
750
+ }
751
+ const results = Promise.all(Array.from({ length: 8 }, (_, i) => {
752
+ const options = i % 2 === 0 ? {} : {
753
+ documentLoader: loader,
754
+ contextLoader: ctx.contextLoader,
755
+ tracerProvider
756
+ };
757
+ return mode === "keys" || mode === "mixed" && i % 2 === 0 ? ctx.getSignedKey(options) : ctx.getSignedKeyOwner(options);
758
+ }));
759
+ release();
760
+ for (const result of await results) assert(result != null);
761
+ assertEquals(loads, {
762
+ key: 1,
763
+ owner: mode === "keys" ? 0 : 1
764
+ });
765
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 1);
766
+ assert(await ctx.getSignedKey());
767
+ if (mode !== "keys") assert(await ctx.getSignedKeyOwner());
768
+ assertEquals(loads, {
769
+ key: 1,
770
+ owner: mode === "keys" ? 0 : 1
771
+ });
772
+ });
773
+ await t.step("memoizes null keys", async () => {
774
+ exporter.clear();
775
+ const { ctx, loads } = setup({ load: () => Promise.reject(/* @__PURE__ */ new Error("unavailable")) });
776
+ for (let i = 0; i < 3; i++) {
777
+ assertEquals(await ctx.getSignedKey(), null);
778
+ assertEquals(await ctx.getSignedKeyOwner(), null);
779
+ }
780
+ assertEquals(loads, {
781
+ key: 1,
782
+ owner: 0
783
+ });
784
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 1);
785
+ assert(await ctx.getSignedKey({ documentLoader: mockDocumentLoader }));
786
+ assert(await ctx.getSignedKeyOwner({ documentLoader: mockDocumentLoader }));
787
+ });
788
+ await t.step("memoizes unsigned requests", async () => {
789
+ exporter.clear();
790
+ const { ctx, loads } = setup({ request: new Request("https://example.com/") });
791
+ for (let i = 0; i < 3; i++) {
792
+ assertEquals(await ctx.getSignedKey(), null);
793
+ assertEquals(await ctx.getSignedKeyOwner(), null);
794
+ }
795
+ assertEquals(loads, {
796
+ key: 0,
797
+ owner: 0
798
+ });
799
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 1);
800
+ });
801
+ await t.step("memoizes null owners without trusting a key's owner claim", async () => {
802
+ const { ctx, loads } = setup({ load: async (url, options) => url === ownerId ? {
803
+ documentUrl: url,
804
+ contextUrl: null,
805
+ document: {
806
+ ...person2_default,
807
+ publicKey: []
808
+ }
809
+ } : await mockDocumentLoader(url, options) });
810
+ assert(await ctx.getSignedKey());
811
+ assertEquals(await Promise.all(Array.from({ length: 8 }, () => ctx.getSignedKeyOwner())), Array(8).fill(null));
812
+ for (let i = 0; i < 3; i++) assertEquals(await ctx.getSignedKeyOwner(), null);
813
+ assertEquals(loads, {
814
+ key: 1,
815
+ owner: 1
816
+ });
817
+ assert(await ctx.getSignedKeyOwner({ documentLoader: mockDocumentLoader }));
818
+ assert(await ctx.getSignedKeyOwner());
819
+ });
820
+ await t.step("isolates concurrent document loaders before success", async () => {
821
+ const { ctx, loads } = setup();
822
+ let otherLoads = 0;
823
+ const otherLoader = async (url, options) => {
824
+ otherLoads++;
825
+ if (url === ownerId) return {
826
+ documentUrl: url,
827
+ contextUrl: null,
828
+ document: {
829
+ ...person2_default,
830
+ name: "Other view"
831
+ }
832
+ };
833
+ return await mockDocumentLoader(url, options);
834
+ };
835
+ const [first, second] = await Promise.all([ctx.getSignedKeyOwner(), ctx.getSignedKeyOwner({ documentLoader: otherLoader })]);
836
+ assertEquals(first?.name, "Jane Doe");
837
+ assertEquals(second?.name, "Other view");
838
+ const cached = await ctx.getSignedKeyOwner();
839
+ assert(cached === first || cached === second);
840
+ assertStrictEquals(await ctx.getSignedKeyOwner({ documentLoader: otherLoader }), cached);
841
+ assertEquals(loads, {
842
+ key: 1,
843
+ owner: 1
844
+ });
845
+ assertEquals(otherLoads, 2);
846
+ });
847
+ await t.step("preserves in-flight null while another loader succeeds", async () => {
848
+ exporter.clear();
849
+ let release;
850
+ const gate = new Promise((resolve) => release = resolve);
851
+ const { ctx, loads } = setup({ load: async () => {
852
+ await gate;
853
+ throw new TypeError("fetch failed");
854
+ } });
855
+ const failed = Promise.all([ctx.getSignedKey(), ctx.getSignedKeyOwner()]);
856
+ const owner = await ctx.getSignedKeyOwner({ documentLoader: mockDocumentLoader });
857
+ assert(owner);
858
+ release();
859
+ assertEquals(await failed, [null, null]);
860
+ assertStrictEquals(await ctx.getSignedKeyOwner(), owner);
861
+ assert(await ctx.getSignedKey());
862
+ assertEquals(loads, {
863
+ key: 1,
864
+ owner: 0
865
+ });
866
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 2);
867
+ });
868
+ await t.step("isolates context loaders", async () => {
869
+ exporter.clear();
870
+ const { ctx, loads } = setup();
871
+ const otherContextLoader = (url, options) => mockDocumentLoader(url, options);
872
+ await Promise.all([ctx.getSignedKeyOwner(), ctx.getSignedKeyOwner({ contextLoader: otherContextLoader })]);
873
+ assertEquals(loads, {
874
+ key: 2,
875
+ owner: 2
876
+ });
877
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 2);
878
+ });
879
+ await t.step("shares work across tracer providers", async () => {
880
+ exporter.clear();
881
+ const [otherProvider, otherExporter] = createTestTracerProvider();
882
+ try {
883
+ const { ctx, loads } = setup();
884
+ await Promise.all([
885
+ ctx.getSignedKeyOwner(),
886
+ ctx.getSignedKeyOwner({ tracerProvider: otherProvider }),
887
+ ctx.getSignedKey(),
888
+ ctx.getSignedKey({ tracerProvider: otherProvider })
889
+ ]);
890
+ assert(await ctx.getSignedKeyOwner({ tracerProvider: otherProvider }));
891
+ assertEquals(loads, {
892
+ key: 1,
893
+ owner: 1
894
+ });
895
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 1);
896
+ assertEquals(otherExporter.getSpans("http_signatures.verify").length, 0);
897
+ } finally {
898
+ await otherProvider.shutdown();
899
+ }
900
+ });
901
+ await t.step("reuses success with a fresh authorization loader", async () => {
902
+ exporter.clear();
903
+ const { ctx, loads } = setup();
904
+ let freshLoads = 0;
905
+ const freshLoader = (url, options) => {
906
+ freshLoads++;
907
+ return mockDocumentLoader(url, options);
908
+ };
909
+ const key = await ctx.getSignedKey({ documentLoader: freshLoader });
910
+ assert(key);
911
+ assertStrictEquals(await ctx.getSignedKey(), key);
912
+ const owner = await ctx.getSignedKeyOwner();
913
+ assert(owner);
914
+ assertStrictEquals(await ctx.getSignedKeyOwner({ documentLoader: freshLoader }), owner);
915
+ assertEquals(loads, {
916
+ key: 0,
917
+ owner: 1
918
+ });
919
+ assertEquals(freshLoads, 1);
920
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 1);
921
+ });
922
+ await t.step("retains a transient owner lookup failure as null", async () => {
923
+ let fail = true;
924
+ const { ctx, loads } = setup({ load: async (url, options) => {
925
+ if (url === ownerId && fail) throw new TypeError("fetch failed");
926
+ return await mockDocumentLoader(url, options);
927
+ } });
928
+ assert(await ctx.getSignedKey());
929
+ assertEquals(await ctx.getSignedKeyOwner(), null);
930
+ fail = false;
931
+ assertEquals(await ctx.getSignedKeyOwner(), null);
932
+ assertEquals(loads, {
933
+ key: 1,
934
+ owner: 1
935
+ });
936
+ assert(await ctx.getSignedKeyOwner({ documentLoader: mockDocumentLoader }));
937
+ });
938
+ await t.step("rechecks an owner after another loader verifies the key", async () => {
939
+ let fail = true;
940
+ const { ctx, loads } = setup({ load: async (url, options) => {
941
+ if (url === keyId && fail) throw new TypeError("fetch failed");
942
+ return await mockDocumentLoader(url, options);
943
+ } });
944
+ assertEquals(await ctx.getSignedKeyOwner(), null);
945
+ fail = false;
946
+ assertEquals(await ctx.getSignedKeyOwner(), null);
947
+ assertEquals(loads, {
948
+ key: 1,
949
+ owner: 0
950
+ });
951
+ assert(await ctx.getSignedKey({ documentLoader: mockDocumentLoader }));
952
+ assertEquals((await ctx.getSignedKeyOwner())?.id?.href, ownerId);
953
+ assertEquals(loads, {
954
+ key: 1,
955
+ owner: 1
956
+ });
957
+ });
958
+ await t.step("retries unexpected key rejections from a rejection handler", async () => {
959
+ exporter.clear();
960
+ const failure = /* @__PURE__ */ new Error("transient context loader failure");
961
+ let rejectContext = true;
962
+ const contextLoader = async (url, options) => {
963
+ if (rejectContext) throw failure;
964
+ return await mockDocumentLoader(url, options);
965
+ };
966
+ const { ctx, loads } = setup();
967
+ const options = { contextLoader };
968
+ const failedKeys = Promise.allSettled([
969
+ ctx.getSignedKey(options),
970
+ ctx.getSignedKeyOwner(options),
971
+ ctx.getSignedKey(options)
972
+ ]);
973
+ const recovery = ctx.getSignedKey(options).catch(() => {
974
+ rejectContext = false;
975
+ return ctx.getSignedKey(options);
976
+ });
977
+ for (const result of await failedKeys) assertEquals(result.status, "rejected");
978
+ assert(await recovery);
979
+ assertEquals(loads, {
980
+ key: 2,
981
+ owner: 0
982
+ });
983
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 2);
984
+ });
985
+ await t.step("retries owner rejections while retaining the verified key", async () => {
986
+ exporter.clear();
987
+ let rejectContext = false;
988
+ const contextLoader = async (url, options) => {
989
+ if (rejectContext) throw new Error("transient owner context failure");
990
+ return await mockDocumentLoader(url, options);
991
+ };
992
+ const { ctx, loads } = setup();
993
+ const options = { contextLoader };
994
+ assert(await ctx.getSignedKey(options));
995
+ assertEquals(loads, {
996
+ key: 1,
997
+ owner: 0
998
+ });
999
+ rejectContext = true;
1000
+ const failures = await Promise.allSettled([ctx.getSignedKeyOwner(options), ctx.getSignedKeyOwner(options)]);
1001
+ for (const result of failures) assertEquals(result.status, "rejected");
1002
+ assertEquals(loads, {
1003
+ key: 1,
1004
+ owner: 1
1005
+ });
1006
+ rejectContext = false;
1007
+ assert(await ctx.getSignedKeyOwner(options));
1008
+ assertEquals(loads, {
1009
+ key: 1,
1010
+ owner: 2
1011
+ });
1012
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 1);
1013
+ });
1014
+ await t.step("keeps clones and separate requests independent", async () => {
1015
+ exporter.clear();
1016
+ const { ctx, loads, federation } = setup();
1017
+ assert(await ctx.getSignedKeyOwner());
1018
+ const clone = ctx.clone(void 0);
1019
+ const separate = federation.createContext(new Request(request), void 0);
1020
+ await Promise.all([clone.getSignedKeyOwner(), separate.getSignedKeyOwner()]);
1021
+ assertEquals(loads, {
1022
+ key: 3,
1023
+ owner: 3
1024
+ });
1025
+ assertEquals(exporter.getSpans("http_signatures.verify").length, 3);
1026
+ });
1027
+ } finally {
1028
+ await tracerProvider.shutdown();
1029
+ }
1030
+ });
708
1031
  test("Federation.fetch() [rfc9421] multiple POST signatures", async (t) => {
709
1032
  for (const validSecond of [true, false]) await t.step(validSecond ? "valid second signature" : "both signatures invalid", async () => {
710
1033
  const inbox = [];
@@ -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-CQXidl_F.cjs");
5
+ const require_middleware = require("../middleware-DegTN2kB.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 AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-C-KTxW8v.cjs";
2
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-r8sjhltN.cjs";
3
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-CgIgPN_a.cjs";
4
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-DDTLbfce.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, 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, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-DDPUfQkR.js";
2
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-B2iX3heK.js";
3
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-CI9TwVC1.js";
4
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-CM_eR8hQ.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, 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, 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-CpGD9Bck.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-DKzhsZ6a.js";
4
4
  import { isEqual } from "es-toolkit";
5
5
  //#region src/federation/kv.ts
6
6
  /**