@fedify/fedify 1.8.1-pr.315.1090 → 1.8.1-pr.318.1225

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 (130) hide show
  1. package/README.md +4 -1
  2. package/dist/{actor-BX-pKSuT.js → actor-C5n4A944.js} +1 -4
  3. package/dist/{actor-1rvS-py8.d.ts → actor-CWNAGvnO.d.ts} +2 -2
  4. package/dist/{actor-C02Getjh.js → actor-s5mQBwHr.js} +179 -179
  5. package/dist/{assert_rejects-DceVjUlD.js → assert_rejects-AjlKk-Vo.js} +1 -1
  6. package/dist/{assert_throws-DTDC_gwN.js → assert_throws-CqMKbTh_.js} +1 -1
  7. package/dist/{authdocloader-BZs3nvC8.js → authdocloader-4RSyvLgz.js} +4 -5
  8. package/dist/{authdocloader-BbVFhkcz.js → authdocloader-CPaXUreA.js} +4 -4
  9. package/dist/{builder-DuW8p2S3.js → builder-CChGxW97.js} +74 -5
  10. package/dist/{client-BD0mI7gk.js → client-49mgdebk.js} +2 -2
  11. package/dist/{client-DK4qnXK0.d.ts → client-B0IOer6B.d.ts} +1 -1
  12. package/dist/compat/mod.d.ts +11 -11
  13. package/dist/compat/mod.js +1 -1
  14. package/dist/compat/transformers.test.js +20 -27
  15. package/dist/{context-BhO5LP_t.d.ts → context-BNA3vzcr.d.ts} +273 -60
  16. package/dist/{docloader-DtGccyuM.d.ts → docloader-CLolPVL_.d.ts} +2 -11
  17. package/dist/{docloader-umQd797n.js → docloader-DfooRmPz.js} +26 -13
  18. package/dist/{esm-d-9EVGaP.js → esm-3l5DpT9c.js} +1 -1
  19. package/dist/federation/builder.test.js +30 -16
  20. package/dist/federation/collection.test.js +9 -7
  21. package/dist/federation/handler.test.js +336 -35
  22. package/dist/federation/inbox.test.js +6 -10
  23. package/dist/federation/keycache.test.js +4 -7
  24. package/dist/federation/kv.test.js +8 -6
  25. package/dist/federation/middleware.test.js +58 -35
  26. package/dist/federation/mod.d.ts +11 -11
  27. package/dist/federation/mod.js +11 -11
  28. package/dist/federation/mq.test.js +10 -8
  29. package/dist/federation/retry.test.js +5 -3
  30. package/dist/federation/router.test.js +8 -7
  31. package/dist/federation/send.test.js +15 -21
  32. package/dist/{http-Cp-0z2Ja.d.ts → http-COez3YdK.d.ts} +4 -4
  33. package/dist/{http-CkS9JLmm.js → http-CsGPBDOo.js} +5 -4
  34. package/dist/{http-D59x3pzl.js → http-DyZD6UXI.js} +4 -4
  35. package/dist/{inbox-BjyNe-HL.js → inbox-DVl0Nqfm.js} +1 -3
  36. package/dist/{key-Btkh3AwY.js → key-CNNi5ktf.js} +3 -3
  37. package/dist/{key-jxin-rRq.js → key-CvnCx-As.js} +3 -4
  38. package/dist/{key-Cf8lNopw.js → key-MvqIkRnS.js} +4 -4
  39. package/dist/key-X4-XaJF1.js +10 -0
  40. package/dist/{keycache-BC5bL06g.js → keycache-BZR7b67J.js} +1 -1
  41. package/dist/{keys-Dfntfi5m.js → keys-CFFCiRYU.js} +1 -1
  42. package/dist/{kv-DDdb1hMa.d.ts → kv-BqOK6zss.d.ts} +1 -1
  43. package/dist/{ld-DwoZFwEd.js → ld-BDA3JCwf.js} +2 -4
  44. package/dist/{lookup-CAXRxPZ3.js → lookup-DcB1UuZA.js} +116 -10
  45. package/dist/{lookup-gQIU9tXW.js → lookup-mq8Ba5Kb.js} +2 -3
  46. package/dist/{lookup-m3U6KA0u.d.ts → lookup-tSXYzgYs.d.ts} +1 -7
  47. package/dist/{middleware-BOHju0mN.js → middleware-BKoKlIe8.js} +617 -12
  48. package/dist/middleware-CJiChbvg.js +26 -0
  49. package/dist/middleware-D6H2vPkH.js +17 -0
  50. package/dist/{middleware-cN6r9o1m.js → middleware-XOfMDFVl.js} +556 -25
  51. package/dist/{mod-yPzXIjJX.d.ts → mod-Bf-mThHd.d.ts} +4 -4
  52. package/dist/{mod-BqCBztub.d.ts → mod-C2jQirfr.d.ts} +2 -7
  53. package/dist/{mod-nlVEnYuj.d.ts → mod-CxD6XXBN.d.ts} +5 -5
  54. package/dist/{mod-c1I-Ydch.d.ts → mod-UTC30uNC.d.ts} +2 -2
  55. package/dist/mod.d.ts +14 -14
  56. package/dist/mod.js +11 -11
  57. package/dist/nodeinfo/client.test.js +11 -11
  58. package/dist/nodeinfo/handler.test.js +25 -34
  59. package/dist/nodeinfo/mod.d.ts +3 -3
  60. package/dist/nodeinfo/mod.js +2 -2
  61. package/dist/nodeinfo/semver.test.js +9 -7
  62. package/dist/nodeinfo/types.test.js +10 -8
  63. package/dist/{owner-BK4eWKBp.d.ts → owner-BlxMNrL4.d.ts} +3 -3
  64. package/dist/{owner-BrSLT3By.js → owner-D_-GBbn-.js} +2 -3
  65. package/dist/{proof-u4rhYX_R.js → proof-BnFHVB6H.js} +3 -5
  66. package/dist/{proof-BDYegzwN.js → proof-C94_doNG.js} +4 -4
  67. package/dist/runtime/authdocloader.test.js +14 -20
  68. package/dist/runtime/docloader.test.js +9 -10
  69. package/dist/runtime/key.test.js +10 -15
  70. package/dist/runtime/langstr.test.js +8 -7
  71. package/dist/runtime/mod.d.ts +5 -5
  72. package/dist/runtime/mod.js +6 -6
  73. package/dist/runtime/multibase/multibase.test.js +8 -7
  74. package/dist/runtime/url.test.js +5 -4
  75. package/dist/{send-DRDKgORs.js → send-DcuZAIY1.js} +2 -2
  76. package/dist/sig/http.test.js +36 -19
  77. package/dist/sig/key.test.js +11 -17
  78. package/dist/sig/ld.test.js +10 -16
  79. package/dist/sig/mod.d.ts +7 -7
  80. package/dist/sig/mod.js +6 -6
  81. package/dist/sig/owner.test.js +12 -19
  82. package/dist/sig/proof.test.js +12 -18
  83. package/dist/testing/docloader.test.js +8 -7
  84. package/dist/testing/mod.d.ts +8599 -1
  85. package/dist/testing/mod.js +4 -2
  86. package/dist/testing-C4oxyGxC.js +302 -0
  87. package/dist/{transformers-ghwJuzGY.js → transformers-DJRB0yFF.js} +3 -3
  88. package/dist/{vocab-C4cyrUaT.js → type-CFzYOYUt.js} +5255 -183
  89. package/dist/{types-D1lhruqy.js → types-Cr8o5d6d.js} +1 -1
  90. package/dist/{types-C7C_l-jz.js → types-n7HI7VFr.js} +1 -1
  91. package/dist/vocab/actor.test.js +10 -16
  92. package/dist/vocab/lookup.test.js +11 -86
  93. package/dist/vocab/mod.d.ts +5 -5
  94. package/dist/vocab/mod.js +4 -4
  95. package/dist/vocab/type.test.js +3 -7
  96. package/dist/vocab/vocab.test.js +9 -13
  97. package/dist/{vocab-BaWeqg9y.js → vocab-BwGxoM8R.js} +6 -7
  98. package/dist/{vocab-B52eQhpN.d.ts → vocab-Cyrb7_co.d.ts} +1 -1
  99. package/dist/webfinger/handler.test.js +25 -34
  100. package/dist/webfinger/lookup.test.js +9 -64
  101. package/dist/webfinger/mod.d.ts +3 -3
  102. package/dist/webfinger/mod.js +2 -2
  103. package/dist/x/cfworkers.d.ts +1 -1
  104. package/dist/x/cfworkers.test.js +8 -6
  105. package/dist/x/hono.d.ts +14 -14
  106. package/dist/x/hono.js +2 -2
  107. package/dist/x/sveltekit.d.ts +11 -11
  108. package/dist/x/sveltekit.js +1 -1
  109. package/package.json +1 -1
  110. package/dist/chunk-HsBuZ-b2.js +0 -41
  111. package/dist/context-V7yd31ov.js +0 -108
  112. package/dist/docloader-Bh-sDknx.js +0 -68
  113. package/dist/docloader-D5BOqs-9.js +0 -4514
  114. package/dist/key-DqZKjPjH.js +0 -16
  115. package/dist/langstr-DbWheeIS.js +0 -33
  116. package/dist/lookup-DvfZUKur.js +0 -133
  117. package/dist/middleware-31SyXabg.js +0 -33
  118. package/dist/middleware-CGl-YyTa.js +0 -17
  119. package/dist/multibase-DeCHcK8L.js +0 -316
  120. package/dist/router-D3UybECj.js +0 -118
  121. package/dist/testing-BZ0dJ4qn.js +0 -143
  122. package/dist/type-D2s5lmbZ.js +0 -14
  123. package/dist/url-kTAI6_KP.js +0 -68
  124. /package/dist/{assert_is_error-DQdKoRgb.js → assert_is_error-CeVBLPsZ.js} +0 -0
  125. /package/dist/{assert_not_equals-7pyUM3Ib.js → assert_not_equals-D2R2nl5h.js} +0 -0
  126. /package/dist/{collection-Dfb0TPno.js → collection-D5V3UzU3.js} +0 -0
  127. /package/dist/{denokv-QWKsIqML.js → denokv-DK9P5Jq7.js} +0 -0
  128. /package/dist/{retry-BiIhZWgD.js → retry-BnpVRGFC.js} +0 -0
  129. /package/dist/{semver-DWClQt_5.js → semver-DCqorrj5.js} +0 -0
  130. /package/dist/{std__assert-B3iAixc-.js → std__assert-BQdmxyzF.js} +0 -0
@@ -3,45 +3,37 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-CFzYOYUt.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import { assert } from "../assert-DwEa6glZ.js";
8
9
  import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
9
10
  import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
10
- import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-cN6r9o1m.js";
11
- import { FetchError, fetchDocumentLoader } from "../docloader-D5BOqs-9.js";
12
- import "../url-kTAI6_KP.js";
13
- import "../semver-DWClQt_5.js";
14
- import "../client-BD0mI7gk.js";
15
- import { RouterError } from "../router-D3UybECj.js";
16
- import "../types-C7C_l-jz.js";
17
- import "../multibase-DeCHcK8L.js";
18
- import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-C4cyrUaT.js";
19
- import "../langstr-DbWheeIS.js";
20
- import "../lookup-DvfZUKur.js";
21
- import { getTypeId } from "../type-D2s5lmbZ.js";
22
- import "../actor-BX-pKSuT.js";
23
- import "../key-jxin-rRq.js";
24
- import { signRequest, verifyRequest } from "../http-D59x3pzl.js";
25
- import { getAuthenticatedDocumentLoader } from "../authdocloader-BZs3nvC8.js";
26
- import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-DwoZFwEd.js";
27
- import { doesActorOwnKey } from "../owner-BrSLT3By.js";
28
- import { signObject, verifyObject } from "../proof-u4rhYX_R.js";
29
- import { lookupObject } from "../lookup-CAXRxPZ3.js";
30
- import "../inbox-BjyNe-HL.js";
31
- import "../builder-DuW8p2S3.js";
32
- import "../collection-Dfb0TPno.js";
33
- import "../keycache-BC5bL06g.js";
34
- import "../retry-BiIhZWgD.js";
35
- import "../send-DRDKgORs.js";
36
- import { test } from "../testing-BZ0dJ4qn.js";
37
- import { assertStrictEquals } from "../std__assert-B3iAixc-.js";
38
- import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
39
- import "../assert_is_error-DQdKoRgb.js";
40
- import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
41
- import { assertThrows } from "../assert_throws-DTDC_gwN.js";
42
- import { mockDocumentLoader } from "../docloader-Bh-sDknx.js";
43
- import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-Dfntfi5m.js";
44
- import { esm_default } from "../esm-d-9EVGaP.js";
11
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-XOfMDFVl.js";
12
+ import "../semver-DCqorrj5.js";
13
+ import "../client-49mgdebk.js";
14
+ import { RouterError, lookupObject } from "../lookup-DcB1UuZA.js";
15
+ import "../types-n7HI7VFr.js";
16
+ import "../actor-C5n4A944.js";
17
+ import "../key-CvnCx-As.js";
18
+ import { signRequest, verifyRequest } from "../http-DyZD6UXI.js";
19
+ import { getAuthenticatedDocumentLoader } from "../authdocloader-4RSyvLgz.js";
20
+ import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-BDA3JCwf.js";
21
+ import { doesActorOwnKey } from "../owner-D_-GBbn-.js";
22
+ import { signObject, verifyObject } from "../proof-BnFHVB6H.js";
23
+ import "../inbox-DVl0Nqfm.js";
24
+ import "../builder-CChGxW97.js";
25
+ import "../collection-D5V3UzU3.js";
26
+ import "../keycache-BZR7b67J.js";
27
+ import "../retry-BnpVRGFC.js";
28
+ import "../send-DcuZAIY1.js";
29
+ import { mockDocumentLoader, test } from "../testing-C4oxyGxC.js";
30
+ import { assertStrictEquals } from "../std__assert-BQdmxyzF.js";
31
+ import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
32
+ import "../assert_is_error-CeVBLPsZ.js";
33
+ import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
34
+ import { assertThrows } from "../assert_throws-CqMKbTh_.js";
35
+ import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-CFFCiRYU.js";
36
+ import { esm_default } from "../esm-3l5DpT9c.js";
45
37
 
46
38
  //#region testing/fixtures/example.com/person.json
47
39
  var __context$1 = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"];
@@ -272,6 +264,7 @@ test({
272
264
  assertThrows(() => ctx.getLikedUri("handle"), RouterError);
273
265
  assertThrows(() => ctx.getFeaturedUri("handle"), RouterError);
274
266
  assertThrows(() => ctx.getFeaturedTagsUri("handle"), RouterError);
267
+ assertThrows(() => ctx.getCollectionUri("test", { id: "123" }), RouterError);
275
268
  assertEquals(ctx.parseUri(new URL("https://example.com/")), null);
276
269
  assertEquals(ctx.parseUri(null), null);
277
270
  assertEquals(await ctx.getActorKeyPairs("handle"), []);
@@ -1634,6 +1627,36 @@ test({
1634
1627
  ]);
1635
1628
  }
1636
1629
  });
1630
+ test("ContextImpl.getCollectionUri()", () => {
1631
+ const federation = new FederationImpl({ kv: new MemoryKvStore() });
1632
+ const base = "https://example.com";
1633
+ const ctx = new ContextImpl({
1634
+ url: new URL(base),
1635
+ federation,
1636
+ data: void 0,
1637
+ documentLoader: mockDocumentLoader,
1638
+ contextLoader: fetchDocumentLoader
1639
+ });
1640
+ const values = { id: "123" };
1641
+ const dispatcher = (_ctx, _values) => ({ items: [] });
1642
+ let url;
1643
+ const strName = "registered";
1644
+ federation.setCollectionDispatcher(strName, Object$1, "/string-route/{id}", dispatcher);
1645
+ url = ctx.getCollectionUri(strName, values);
1646
+ assertEquals(url.href, `${base}/string-route/123`);
1647
+ const unnamedSymName = Symbol(strName);
1648
+ federation.setCollectionDispatcher(unnamedSymName, Object$1, "/symbol-route/{id}", dispatcher);
1649
+ url = ctx.getCollectionUri(unnamedSymName, values);
1650
+ assertEquals(url.href, `${base}/symbol-route/123`);
1651
+ const namedSymName = Symbol.for(strName);
1652
+ federation.setCollectionDispatcher(namedSymName, Object$1, "/named-symbol-route/{id}", dispatcher);
1653
+ url = ctx.getCollectionUri(namedSymName, values);
1654
+ assertEquals(url.href, `${base}/named-symbol-route/123`);
1655
+ const notReg = "not-registered";
1656
+ assertThrows(() => ctx.getCollectionUri(notReg, values));
1657
+ assertThrows(() => ctx.getCollectionUri(Symbol(notReg), values));
1658
+ assertThrows(() => ctx.getCollectionUri(Symbol.for(notReg), values));
1659
+ });
1637
1660
  test("InboxContextImpl.forwardActivity()", async (t) => {
1638
1661
  esm_default.spyGlobal();
1639
1662
  let verified = null;
@@ -1,15 +1,15 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "../kv-DDdb1hMa.js";
4
- import "../docloader-DtGccyuM.js";
5
- import "../client-DK4qnXK0.js";
6
- import "../vocab-B52eQhpN.js";
7
- import "../actor-1rvS-py8.js";
8
- import "../http-Cp-0z2Ja.js";
9
- import "../owner-BK4eWKBp.js";
10
- import "../mod-BqCBztub.js";
11
- import "../lookup-m3U6KA0u.js";
12
- import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-BhO5LP_t.js";
3
+ import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "../kv-BqOK6zss.js";
4
+ import "../docloader-CLolPVL_.js";
5
+ import "../client-B0IOer6B.js";
6
+ import "../vocab-Cyrb7_co.js";
7
+ import "../actor-CWNAGvnO.js";
8
+ import "../http-COez3YdK.js";
9
+ import "../owner-BlxMNrL4.js";
10
+ import "../mod-C2jQirfr.js";
11
+ import "../lookup-tSXYzgYs.js";
12
+ import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-BNA3vzcr.js";
13
13
  import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "../mq-DYKDDJmp.js";
14
14
  import "../mod-g0xFzAP9.js";
15
- export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
15
+ export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
@@ -2,17 +2,17 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../transformers-ghwJuzGY.js";
6
- import "../docloader-umQd797n.js";
7
- import "../actor-C02Getjh.js";
8
- import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-BOHju0mN.js";
9
- import "../lookup-gQIU9tXW.js";
10
- import "../key-Btkh3AwY.js";
11
- import "../http-CkS9JLmm.js";
12
- import "../proof-BDYegzwN.js";
5
+ import "../transformers-DJRB0yFF.js";
6
+ import "../docloader-DfooRmPz.js";
7
+ import "../actor-s5mQBwHr.js";
8
+ import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-BKoKlIe8.js";
9
+ import "../lookup-mq8Ba5Kb.js";
10
+ import "../key-CNNi5ktf.js";
11
+ import "../http-CsGPBDOo.js";
12
+ import "../proof-C94_doNG.js";
13
13
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-C44ekWNP.js";
14
- import "../types-D1lhruqy.js";
15
- import "../authdocloader-BbVFhkcz.js";
16
- import "../vocab-BaWeqg9y.js";
14
+ import "../types-Cr8o5d6d.js";
15
+ import "../authdocloader-CPaXUreA.js";
16
+ import "../vocab-BwGxoM8R.js";
17
17
 
18
18
  export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
@@ -3,15 +3,17 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import "../type-CFzYOYUt.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import { assert } from "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import { test } from "../testing-BZ0dJ4qn.js";
10
- import { assertGreater, assertGreaterOrEqual } from "../std__assert-B3iAixc-.js";
11
- import { assertFalse } from "../assert_rejects-DceVjUlD.js";
12
- import "../assert_is_error-DQdKoRgb.js";
13
- import "../assert_not_equals-7pyUM3Ib.js";
14
- import "../assert_throws-DTDC_gwN.js";
10
+ import "../lookup-DcB1UuZA.js";
11
+ import { test } from "../testing-C4oxyGxC.js";
12
+ import { assertGreater, assertGreaterOrEqual } from "../std__assert-BQdmxyzF.js";
13
+ import { assertFalse } from "../assert_rejects-AjlKk-Vo.js";
14
+ import "../assert_is_error-CeVBLPsZ.js";
15
+ import "../assert_not_equals-D2R2nl5h.js";
16
+ import "../assert_throws-CqMKbTh_.js";
15
17
  import { delay } from "es-toolkit";
16
18
 
17
19
  //#region federation/mq.ts
@@ -225,7 +227,7 @@ test("InProcessMessageQueue", async (t) => {
225
227
  });
226
228
  test("MessageQueue.nativeRetrial", async (t) => {
227
229
  if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") await t.step("DenoKvMessageQueue", async () => {
228
- const { DenoKvMessageQueue } = await import("../denokv-QWKsIqML.js");
230
+ const { DenoKvMessageQueue } = await import("../denokv-DK9P5Jq7.js");
229
231
  const mq = new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
230
232
  assert(mq.nativeRetrial);
231
233
  if (Symbol.dispose in mq) {
@@ -264,7 +266,7 @@ test("MessageQueue.nativeRetrial", async (t) => {
264
266
  });
265
267
  const queues = { InProcessMessageQueue: () => Promise.resolve(new InProcessMessageQueue()) };
266
268
  if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") {
267
- const { DenoKvMessageQueue } = await import("../denokv-QWKsIqML.js");
269
+ const { DenoKvMessageQueue } = await import("../denokv-DK9P5Jq7.js");
268
270
  queues.DenoKvMessageQueue = async () => new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
269
271
  }
270
272
  for (const mqName in queues) test({
@@ -3,10 +3,12 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import "../type-CFzYOYUt.js";
6
7
  import { AssertionError, assertEquals } from "../assert_equals-C5gKCm6A.js";
7
- import { createExponentialBackoffPolicy } from "../retry-BiIhZWgD.js";
8
- import { test } from "../testing-BZ0dJ4qn.js";
9
- import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
8
+ import "../lookup-DcB1UuZA.js";
9
+ import { createExponentialBackoffPolicy } from "../retry-BnpVRGFC.js";
10
+ import { test } from "../testing-C4oxyGxC.js";
11
+ import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
10
12
 
11
13
  //#region federation/retry.test.ts
12
14
  test("createExponentialBackoffPolicy()", () => {
@@ -3,16 +3,17 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import "../type-CFzYOYUt.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import { assert } from "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import { Router, RouterError } from "../router-D3UybECj.js";
10
- import { test } from "../testing-BZ0dJ4qn.js";
11
- import "../std__assert-B3iAixc-.js";
12
- import { assertFalse } from "../assert_rejects-DceVjUlD.js";
13
- import "../assert_is_error-DQdKoRgb.js";
14
- import "../assert_not_equals-7pyUM3Ib.js";
15
- import { assertThrows } from "../assert_throws-DTDC_gwN.js";
10
+ import { Router, RouterError } from "../lookup-DcB1UuZA.js";
11
+ import { test } from "../testing-C4oxyGxC.js";
12
+ import "../std__assert-BQdmxyzF.js";
13
+ import { assertFalse } from "../assert_rejects-AjlKk-Vo.js";
14
+ import "../assert_is_error-CeVBLPsZ.js";
15
+ import "../assert_not_equals-D2R2nl5h.js";
16
+ import { assertThrows } from "../assert_throws-CqMKbTh_.js";
16
17
 
17
18
  //#region federation/router.test.ts
18
19
  function setUp(options = {}) {
@@ -3,30 +3,24 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Activity, Application, Endpoints, Group, Person, Service } from "../type-CFzYOYUt.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import { assert } from "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import "../docloader-D5BOqs-9.js";
10
- import "../url-kTAI6_KP.js";
11
- import "../multibase-DeCHcK8L.js";
12
- import { Activity, Application, Endpoints, Group, Person, Service } from "../vocab-C4cyrUaT.js";
13
- import "../langstr-DbWheeIS.js";
14
- import "../lookup-DvfZUKur.js";
15
- import "../type-D2s5lmbZ.js";
16
- import "../actor-BX-pKSuT.js";
17
- import "../key-jxin-rRq.js";
18
- import { verifyRequest } from "../http-D59x3pzl.js";
19
- import { doesActorOwnKey } from "../owner-BrSLT3By.js";
20
- import { extractInboxes, sendActivity } from "../send-DRDKgORs.js";
21
- import { test } from "../testing-BZ0dJ4qn.js";
22
- import "../std__assert-B3iAixc-.js";
23
- import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
24
- import "../assert_is_error-DQdKoRgb.js";
25
- import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
26
- import "../assert_throws-DTDC_gwN.js";
27
- import { mockDocumentLoader } from "../docloader-Bh-sDknx.js";
28
- import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-Dfntfi5m.js";
29
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import "../lookup-DcB1UuZA.js";
11
+ import "../actor-C5n4A944.js";
12
+ import "../key-CvnCx-As.js";
13
+ import { verifyRequest } from "../http-DyZD6UXI.js";
14
+ import { doesActorOwnKey } from "../owner-D_-GBbn-.js";
15
+ import { extractInboxes, sendActivity } from "../send-DcuZAIY1.js";
16
+ import { mockDocumentLoader, test } from "../testing-C4oxyGxC.js";
17
+ import "../std__assert-BQdmxyzF.js";
18
+ import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
19
+ import "../assert_is_error-CeVBLPsZ.js";
20
+ import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
21
+ import "../assert_throws-CqMKbTh_.js";
22
+ import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-CFFCiRYU.js";
23
+ import { esm_default } from "../esm-3l5DpT9c.js";
30
24
 
31
25
  //#region federation/send.test.ts
32
26
  test("extractInboxes()", () => {
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { DocumentLoader } from "./docloader-DtGccyuM.js";
4
- import { CryptographicKey, Multikey } from "./vocab-B52eQhpN.js";
3
+ import { DocumentLoader } from "./docloader-CLolPVL_.js";
4
+ import { CryptographicKey, Multikey } from "./vocab-Cyrb7_co.js";
5
5
  import { TracerProvider } from "@opentelemetry/api";
6
6
 
7
7
  //#region sig/key.d.ts
@@ -75,7 +75,7 @@ interface FetchKeyResult<T extends CryptographicKey | Multikey> {
75
75
  * Fetches a {@link CryptographicKey} or {@link Multikey} from the given URL.
76
76
  * If the given URL contains an {@link Actor} object, it tries to find
77
77
  * the corresponding key in the `publicKey` or `assertionMethod` property.
78
- * @typeParam T The type of the key to fetch. Either {@link CryptographicKey}
78
+ * @template T The type of the key to fetch. Either {@link CryptographicKey}
79
79
  * or {@link Multikey}.
80
80
  * @param keyId The URL of the key.
81
81
  * @param cls The class of the key to fetch. Either {@link CryptographicKey}
@@ -150,7 +150,7 @@ interface SignRequestOptions {
150
150
  currentTime?: Temporal.Instant;
151
151
  /**
152
152
  * The request body as ArrayBuffer. If provided, avoids cloning the request body.
153
- * @since 1.8.0
153
+ * @since 1.7.7
154
154
  */
155
155
  body?: ArrayBuffer | null;
156
156
  /**
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { deno_default } from "./docloader-umQd797n.js";
6
- import { CryptographicKey } from "./actor-C02Getjh.js";
7
- import { fetchKey, validateCryptoKey } from "./key-Btkh3AwY.js";
5
+ import { deno_default } from "./docloader-DfooRmPz.js";
6
+ import { CryptographicKey } from "./actor-s5mQBwHr.js";
7
+ import { fetchKey, validateCryptoKey } from "./key-CNNi5ktf.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
10
10
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
@@ -651,7 +651,8 @@ async function verifyRequestRfc9421(request, span, { documentLoader, contextLoad
651
651
  * @returns A new Request object for the redirect.
652
652
  */
653
653
  function createRedirectRequest(request, location, body) {
654
- return new Request(location, {
654
+ const url = new URL(location, request.url);
655
+ return new Request(url, {
655
656
  method: request.method,
656
657
  headers: request.headers,
657
658
  body,
@@ -3,9 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default } from "./docloader-D5BOqs-9.js";
7
- import { CryptographicKey } from "./vocab-C4cyrUaT.js";
8
- import { fetchKey, validateCryptoKey } from "./key-jxin-rRq.js";
6
+ import { CryptographicKey, deno_default } from "./type-CFzYOYUt.js";
7
+ import { fetchKey, validateCryptoKey } from "./key-CvnCx-As.js";
9
8
  import { getLogger } from "@logtape/logtape";
10
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
11
10
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
@@ -652,7 +651,8 @@ async function verifyRequestRfc9421(request, span, { documentLoader, contextLoad
652
651
  * @returns A new Request object for the redirect.
653
652
  */
654
653
  function createRedirectRequest(request, location, body) {
655
- return new Request(location, {
654
+ const url = new URL(location, request.url);
655
+ return new Request(url, {
656
656
  method: request.method,
657
657
  headers: request.headers,
658
658
  body,
@@ -3,9 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default } from "./docloader-D5BOqs-9.js";
7
- import { Activity } from "./vocab-C4cyrUaT.js";
8
- import { getTypeId } from "./type-D2s5lmbZ.js";
6
+ import { Activity, deno_default, getTypeId } from "./type-CFzYOYUt.js";
9
7
  import { getLogger } from "@logtape/logtape";
10
8
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
11
9
 
@@ -2,8 +2,8 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { deno_default, getDocumentLoader } from "./docloader-umQd797n.js";
6
- import { CryptographicKey, Object as Object$1, isActor } from "./actor-C02Getjh.js";
5
+ import { deno_default, getDocumentLoader } from "./docloader-DfooRmPz.js";
6
+ import { CryptographicKey, Object as Object$1, isActor } from "./actor-s5mQBwHr.js";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
9
9
 
@@ -91,7 +91,7 @@ async function importJwk(jwk, type) {
91
91
  * Fetches a {@link CryptographicKey} or {@link Multikey} from the given URL.
92
92
  * If the given URL contains an {@link Actor} object, it tries to find
93
93
  * the corresponding key in the `publicKey` or `assertionMethod` property.
94
- * @typeParam T The type of the key to fetch. Either {@link CryptographicKey}
94
+ * @template T The type of the key to fetch. Either {@link CryptographicKey}
95
95
  * or {@link Multikey}.
96
96
  * @param keyId The URL of the key.
97
97
  * @param cls The class of the key to fetch. Either {@link CryptographicKey}
@@ -3,9 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default, getDocumentLoader } from "./docloader-D5BOqs-9.js";
7
- import { CryptographicKey, Object as Object$1 } from "./vocab-C4cyrUaT.js";
8
- import { isActor } from "./actor-BX-pKSuT.js";
6
+ import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-CFzYOYUt.js";
7
+ import { isActor } from "./actor-C5n4A944.js";
9
8
  import { getLogger } from "@logtape/logtape";
10
9
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
11
10
 
@@ -93,7 +92,7 @@ async function importJwk(jwk, type) {
93
92
  * Fetches a {@link CryptographicKey} or {@link Multikey} from the given URL.
94
93
  * If the given URL contains an {@link Actor} object, it tries to find
95
94
  * the corresponding key in the `publicKey` or `assertionMethod` property.
96
- * @typeParam T The type of the key to fetch. Either {@link CryptographicKey}
95
+ * @template T The type of the key to fetch. Either {@link CryptographicKey}
97
96
  * or {@link Multikey}.
98
97
  * @param keyId The URL of the key.
99
98
  * @param cls The class of the key to fetch. Either {@link CryptographicKey}
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "./docloader-umQd797n.js";
6
- import "./actor-C02Getjh.js";
7
- import "./lookup-gQIU9tXW.js";
8
- import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-Btkh3AwY.js";
5
+ import "./docloader-DfooRmPz.js";
6
+ import "./actor-s5mQBwHr.js";
7
+ import "./lookup-mq8Ba5Kb.js";
8
+ import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-CNNi5ktf.js";
9
9
 
10
10
  export { validateCryptoKey };
@@ -0,0 +1,10 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+ globalThis.addEventListener = () => {};
5
+
6
+ import "./type-CFzYOYUt.js";
7
+ import "./actor-C5n4A944.js";
8
+ import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-CvnCx-As.js";
9
+
10
+ export { validateCryptoKey };
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { CryptographicKey, Multikey } from "./vocab-C4cyrUaT.js";
6
+ import { CryptographicKey, Multikey } from "./type-CFzYOYUt.js";
7
7
 
8
8
  //#region federation/keycache.ts
9
9
  var KvKeyCache = class {
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { CryptographicKey, Multikey, importSpki } from "./vocab-C4cyrUaT.js";
6
+ import { CryptographicKey, Multikey, importSpki } from "./type-CFzYOYUt.js";
7
7
 
8
8
  //#region testing/keys.ts
9
9
  const rsaPublicKey1 = new CryptographicKey({
@@ -29,7 +29,7 @@ interface KvStore {
29
29
  * Gets the value for the given key.
30
30
  * @param key The key to get the value for.
31
31
  * @returns The value for the key, or `undefined` if the key does not exist.
32
- * @typeParam T The type of the value to get.
32
+ * @template T The type of the value to get.
33
33
  */
34
34
  get<T = unknown>(key: KvKey): Promise<T | undefined>;
35
35
  /**
@@ -3,10 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default, getDocumentLoader } from "./docloader-D5BOqs-9.js";
7
- import { Activity, CryptographicKey, Object as Object$1 } from "./vocab-C4cyrUaT.js";
8
- import { getTypeId } from "./type-D2s5lmbZ.js";
9
- import { fetchKey, validateCryptoKey } from "./key-jxin-rRq.js";
6
+ import { Activity, CryptographicKey, Object as Object$1, deno_default, getDocumentLoader, getTypeId } from "./type-CFzYOYUt.js";
7
+ import { fetchKey, validateCryptoKey } from "./key-CvnCx-As.js";
10
8
  import { getLogger } from "@logtape/logtape";
11
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
12
10
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";