@fedify/fedify 1.8.1-pr.315.1091 → 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-C_d9cZrz.js → actor-C5n4A944.js} +1 -4
  3. package/dist/{actor-1rvS-py8.d.ts → actor-CWNAGvnO.d.ts} +2 -2
  4. package/dist/{actor-DLZ25ttS.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-DUnUXs5R.js → authdocloader-4RSyvLgz.js} +4 -5
  8. package/dist/{authdocloader-CLixqGPW.js → authdocloader-CPaXUreA.js} +4 -4
  9. package/dist/{builder-Js_TKEl1.js → builder-CChGxW97.js} +74 -5
  10. package/dist/{client-Cu9HMcIJ.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-BindvZ7y.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-DIyD7he1.js → http-CsGPBDOo.js} +5 -4
  34. package/dist/{http-BigTqmE7.js → http-DyZD6UXI.js} +4 -4
  35. package/dist/{inbox-BB6ajp8P.js → inbox-DVl0Nqfm.js} +1 -3
  36. package/dist/{key-BfI9Ju0m.js → key-CNNi5ktf.js} +3 -3
  37. package/dist/{key-D9LuuzMv.js → key-CvnCx-As.js} +3 -4
  38. package/dist/{key-DlkWX5Fp.js → key-MvqIkRnS.js} +4 -4
  39. package/dist/key-X4-XaJF1.js +10 -0
  40. package/dist/{keycache-C4C7f09E.js → keycache-BZR7b67J.js} +1 -1
  41. package/dist/{keys-BjET3ZIs.js → keys-CFFCiRYU.js} +1 -1
  42. package/dist/{kv-DDdb1hMa.d.ts → kv-BqOK6zss.d.ts} +1 -1
  43. package/dist/{ld-CYqXYuyr.js → ld-BDA3JCwf.js} +2 -4
  44. package/dist/{lookup-BYiP0j0F.js → lookup-DcB1UuZA.js} +116 -10
  45. package/dist/{lookup-_XgQq_BY.js → lookup-mq8Ba5Kb.js} +2 -3
  46. package/dist/{lookup-m3U6KA0u.d.ts → lookup-tSXYzgYs.d.ts} +1 -7
  47. package/dist/{middleware-e74I4DJ9.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-VSdfWI3m.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-D7RvVquY.js → owner-D_-GBbn-.js} +2 -3
  65. package/dist/{proof-D4z1cLgw.js → proof-BnFHVB6H.js} +3 -5
  66. package/dist/{proof-ChRSmA_D.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-DmlRAY0X.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-dw0HG0EQ.js → type-CFzYOYUt.js} +5255 -183
  89. package/dist/{types-DuZ6KMHu.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 -110
  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-CI5oydJj.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-CXi1nrZE.js +0 -108
  112. package/dist/docloader-Bh-sDknx.js +0 -68
  113. package/dist/docloader-CJ7eOrpZ.js +0 -4514
  114. package/dist/key-DG7lKWv0.js +0 -16
  115. package/dist/langstr-DbWheeIS.js +0 -33
  116. package/dist/lookup-CEbB0_t_.js +0 -133
  117. package/dist/middleware-Dd2mc8-e.js +0 -33
  118. package/dist/middleware-DjA978L0.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
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { getUserAgent } from "./docloader-BindvZ7y.js";
5
+ import { getUserAgent } from "./docloader-DfooRmPz.js";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
 
8
8
  //#region nodeinfo/semver.ts
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { formatSemVer } from "./semver-DWClQt_5.js";
6
+ import { formatSemVer } from "./semver-DCqorrj5.js";
7
7
 
8
8
  //#region nodeinfo/types.ts
9
9
  /**
@@ -3,25 +3,19 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { __export } from "../chunk-HsBuZ-b2.js";
6
+ import { Application, Group, Organization, Person, Service, __export } from "../type-CFzYOYUt.js";
7
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
8
8
  import { assert } from "../assert-DwEa6glZ.js";
9
9
  import "../assert_instance_of-C9QtN-X9.js";
10
- import "../docloader-CJ7eOrpZ.js";
11
- import "../url-kTAI6_KP.js";
12
- import "../multibase-DeCHcK8L.js";
13
- import { Application, Group, Organization, Person, Service } from "../vocab-dw0HG0EQ.js";
14
- import "../langstr-DbWheeIS.js";
15
- import "../lookup-CEbB0_t_.js";
16
- import "../type-D2s5lmbZ.js";
17
- import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-C_d9cZrz.js";
18
- import { test } from "../testing-BZ0dJ4qn.js";
19
- import { assertStrictEquals } from "../std__assert-B3iAixc-.js";
20
- import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
21
- import "../assert_is_error-DQdKoRgb.js";
22
- import "../assert_not_equals-7pyUM3Ib.js";
23
- import { assertThrows } from "../assert_throws-DTDC_gwN.js";
24
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import "../lookup-DcB1UuZA.js";
11
+ import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-C5n4A944.js";
12
+ import { test } from "../testing-C4oxyGxC.js";
13
+ import { assertStrictEquals } from "../std__assert-BQdmxyzF.js";
14
+ import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
15
+ import "../assert_is_error-CeVBLPsZ.js";
16
+ import "../assert_not_equals-D2R2nl5h.js";
17
+ import { assertThrows } from "../assert_throws-CqMKbTh_.js";
18
+ import { esm_default } from "../esm-3l5DpT9c.js";
25
19
 
26
20
  //#region ../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js
27
21
  var PreconditionFailure = class PreconditionFailure extends Error {
@@ -3,31 +3,21 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Collection, Note, Object as Object$1, Person } from "../type-CFzYOYUt.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
9
- import "../docloader-CJ7eOrpZ.js";
10
- import "../url-kTAI6_KP.js";
11
- import "../multibase-DeCHcK8L.js";
12
- import { Collection, Note, Object as Object$1, Person } from "../vocab-dw0HG0EQ.js";
13
- import "../langstr-DbWheeIS.js";
14
- import "../lookup-CEbB0_t_.js";
15
- import "../type-D2s5lmbZ.js";
16
- import { lookupObject, traverseCollection } from "../lookup-BYiP0j0F.js";
17
- import { test } from "../testing-BZ0dJ4qn.js";
18
- import "../std__assert-B3iAixc-.js";
19
- import "../assert_rejects-DceVjUlD.js";
20
- import "../assert_is_error-DQdKoRgb.js";
21
- import "../assert_not_equals-7pyUM3Ib.js";
22
- import "../assert_throws-DTDC_gwN.js";
23
- import { mockDocumentLoader } from "../docloader-Bh-sDknx.js";
24
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import { lookupObject, traverseCollection } from "../lookup-DcB1UuZA.js";
11
+ import { mockDocumentLoader, test } from "../testing-C4oxyGxC.js";
12
+ import "../std__assert-BQdmxyzF.js";
13
+ import "../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";
17
+ import { esm_default } from "../esm-3l5DpT9c.js";
25
18
 
26
19
  //#region vocab/lookup.test.ts
27
- test("lookupObject()", {
28
- sanitizeResources: false,
29
- sanitizeOps: false
30
- }, async (t) => {
20
+ test("lookupObject()", async (t) => {
31
21
  esm_default.spyGlobal();
32
22
  esm_default.get("begin:https://example.com/.well-known/webfinger", {
33
23
  subject: "acct:johndoe@example.com",
@@ -90,98 +80,9 @@ test("lookupObject()", {
90
80
  assertEquals(await lookupObject("janedoe@example.com", options), null);
91
81
  assertEquals(await lookupObject("https://example.com/404", options), null);
92
82
  });
93
- esm_default.removeRoutes();
94
- esm_default.get("begin:https://example.com/.well-known/webfinger", () => new Promise((resolve) => {
95
- setTimeout(() => {
96
- resolve({
97
- subject: "acct:johndoe@example.com",
98
- links: [{
99
- rel: "self",
100
- href: "https://example.com/person",
101
- type: "application/activity+json"
102
- }]
103
- });
104
- }, 1e3);
105
- }));
106
- await t.step("request cancellation", async () => {
107
- const controller = new AbortController();
108
- const promise = lookupObject("johndoe@example.com", {
109
- ...options,
110
- signal: controller.signal
111
- });
112
- controller.abort();
113
- assertEquals(await promise, null);
114
- });
115
- esm_default.removeRoutes();
116
- esm_default.get("begin:https://example.com/.well-known/webfinger", {
117
- subject: "acct:johndoe@example.com",
118
- links: [{
119
- rel: "self",
120
- href: "https://example.com/person",
121
- type: "application/activity+json"
122
- }]
123
- });
124
- await t.step("successful request with signal", async () => {
125
- const controller = new AbortController();
126
- const person = await lookupObject("johndoe@example.com", {
127
- ...options,
128
- signal: controller.signal
129
- });
130
- assertInstanceOf(person, Person);
131
- assertEquals(person.id, new URL("https://example.com/person"));
132
- });
133
- esm_default.removeRoutes();
134
- esm_default.get("begin:https://example.com/.well-known/webfinger", () => new Promise((resolve) => {
135
- setTimeout(() => {
136
- resolve({
137
- subject: "acct:johndoe@example.com",
138
- links: [{
139
- rel: "self",
140
- href: "https://example.com/person",
141
- type: "application/activity+json"
142
- }]
143
- });
144
- }, 500);
145
- }));
146
- await t.step("cancellation with immediate abort", async () => {
147
- const controller = new AbortController();
148
- controller.abort();
149
- const result = await lookupObject("johndoe@example.com", {
150
- ...options,
151
- signal: controller.signal
152
- });
153
- assertEquals(result, null);
154
- });
155
- esm_default.removeRoutes();
156
- esm_default.get("https://example.com/slow-object", () => new Promise((resolve) => {
157
- setTimeout(() => {
158
- resolve({
159
- status: 200,
160
- headers: { "Content-Type": "application/activity+json" },
161
- body: {
162
- "@context": "https://www.w3.org/ns/activitystreams",
163
- type: "Note",
164
- content: "Slow response"
165
- }
166
- });
167
- }, 1e3);
168
- }));
169
- await t.step("direct object fetch cancellation", async () => {
170
- const controller = new AbortController();
171
- const promise = lookupObject("https://example.com/slow-object", {
172
- contextLoader: mockDocumentLoader,
173
- signal: controller.signal
174
- });
175
- controller.abort();
176
- assertEquals(await promise, null);
177
- });
178
83
  esm_default.hardReset();
179
- esm_default.removeRoutes();
180
84
  });
181
- test("traverseCollection()", {
182
- sanitizeResources: false,
183
- sanitizeOps: false
184
- }, async () => {
85
+ test("traverseCollection()", async () => {
185
86
  const options = {
186
87
  documentLoader: mockDocumentLoader,
187
88
  contextLoader: mockDocumentLoader
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import "../kv-DDdb1hMa.js";
4
- import "../docloader-DtGccyuM.js";
5
- import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "../vocab-B52eQhpN.js";
6
- import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-1rvS-py8.js";
7
- import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../mod-BqCBztub.js";
3
+ import "../kv-BqOK6zss.js";
4
+ import "../docloader-CLolPVL_.js";
5
+ import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "../vocab-Cyrb7_co.js";
6
+ import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-CWNAGvnO.js";
7
+ import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../mod-C2jQirfr.js";
8
8
  export { Accept, Activity, Actor, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, LookupObjectOptions, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Recipient, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
package/dist/vocab/mod.js CHANGED
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../docloader-BindvZ7y.js";
6
- import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-DLZ25ttS.js";
7
- import "../lookup-_XgQq_BY.js";
8
- import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-CI5oydJj.js";
5
+ import "../docloader-DfooRmPz.js";
6
+ import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-s5mQBwHr.js";
7
+ import "../lookup-mq8Ba5Kb.js";
8
+ import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-BwGxoM8R.js";
9
9
 
10
10
  export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
@@ -3,14 +3,10 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Person, getTypeId } from "../type-CFzYOYUt.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
- import "../docloader-CJ7eOrpZ.js";
8
- import "../url-kTAI6_KP.js";
9
- import "../multibase-DeCHcK8L.js";
10
- import { Person } from "../vocab-dw0HG0EQ.js";
11
- import "../langstr-DbWheeIS.js";
12
- import { getTypeId } from "../type-D2s5lmbZ.js";
13
- import { test } from "../testing-BZ0dJ4qn.js";
8
+ import "../lookup-DcB1UuZA.js";
9
+ import { test } from "../testing-C4oxyGxC.js";
14
10
 
15
11
  //#region vocab/type.test.ts
16
12
  test("getTypeId()", () => {
@@ -3,22 +3,18 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, LanguageString, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, decode, vocab_exports } 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
- import "../docloader-CJ7eOrpZ.js";
10
- import "../url-kTAI6_KP.js";
11
- import { decode } from "../multibase-DeCHcK8L.js";
12
- import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "../vocab-dw0HG0EQ.js";
13
- import { LanguageString } from "../langstr-DbWheeIS.js";
14
- import { test } from "../testing-BZ0dJ4qn.js";
15
- import "../std__assert-B3iAixc-.js";
16
- import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
17
- import "../assert_is_error-DQdKoRgb.js";
18
- import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
19
- import { assertThrows } from "../assert_throws-DTDC_gwN.js";
20
- import { mockDocumentLoader } from "../docloader-Bh-sDknx.js";
21
- import { ed25519PublicKey, rsaPublicKey1 } from "../keys-BjET3ZIs.js";
10
+ import "../lookup-DcB1UuZA.js";
11
+ import { mockDocumentLoader, test } from "../testing-C4oxyGxC.js";
12
+ import "../std__assert-BQdmxyzF.js";
13
+ import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
14
+ import "../assert_is_error-CeVBLPsZ.js";
15
+ import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
16
+ import { assertThrows } from "../assert_throws-CqMKbTh_.js";
17
+ import { ed25519PublicKey, rsaPublicKey1 } from "../keys-CFFCiRYU.js";
22
18
  import { pascalCase } from "es-toolkit";
23
19
  import { parseLanguageTag } from "@phensley/language-tag";
24
20
  import { Validator } from "@cfworker/json-schema";
@@ -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, getDocumentLoader } from "./docloader-BindvZ7y.js";
6
- import { Object as Object$1, getTypeId } from "./actor-DLZ25ttS.js";
7
- import { lookupWebFinger } from "./lookup-_XgQq_BY.js";
5
+ import { deno_default, getDocumentLoader } from "./docloader-DfooRmPz.js";
6
+ import { Object as Object$1, getTypeId } from "./actor-s5mQBwHr.js";
7
+ import { lookupWebFinger } from "./lookup-mq8Ba5Kb.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
10
10
  import { delay } from "es-toolkit";
@@ -154,7 +154,7 @@ async function lookupObjectInternal(identifier, options = {}) {
154
154
  if (typeof identifier === "string") identifier = toAcctUrl(identifier) ?? new URL(identifier);
155
155
  let document = null;
156
156
  if (identifier.protocol === "http:" || identifier.protocol === "https:") try {
157
- const remoteDoc = await documentLoader(identifier.href, { signal: options.signal });
157
+ const remoteDoc = await documentLoader(identifier.href);
158
158
  document = remoteDoc.document;
159
159
  } catch (error) {
160
160
  logger.debug("Failed to fetch remote document:\n{error}", { error });
@@ -163,14 +163,13 @@ async function lookupObjectInternal(identifier, options = {}) {
163
163
  const jrd = await lookupWebFinger(identifier, {
164
164
  userAgent: options.userAgent,
165
165
  tracerProvider: options.tracerProvider,
166
- allowPrivateAddress: "allowPrivateAddress" in options && options.allowPrivateAddress === true,
167
- signal: options.signal
166
+ allowPrivateAddress: "allowPrivateAddress" in options && options.allowPrivateAddress === true
168
167
  });
169
168
  if (jrd?.links == null) return null;
170
169
  for (const l of jrd.links) {
171
170
  if (l.type !== "application/activity+json" && !l.type?.match(/application\/ld\+json;\s*profile="https:\/\/www.w3.org\/ns\/activitystreams"/) || l.rel !== "self") continue;
172
171
  try {
173
- const remoteDoc = await documentLoader(l.href, { signal: options.signal });
172
+ const remoteDoc = await documentLoader(l.href);
174
173
  document = remoteDoc.document;
175
174
  break;
176
175
  } catch (error) {
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { DocumentLoader } from "./docloader-DtGccyuM.js";
3
+ import { DocumentLoader } from "./docloader-CLolPVL_.js";
4
4
  import { Span, TracerProvider } from "@opentelemetry/api";
5
5
  import { LanguageTag } from "@phensley/language-tag";
6
6
 
@@ -3,44 +3,35 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Image, Link, Person } from "../type-CFzYOYUt.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
10
  import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
10
- import { createFederation, handleWebFinger } from "../middleware-VSdfWI3m.js";
11
- import "../docloader-CJ7eOrpZ.js";
12
- import "../url-kTAI6_KP.js";
13
- import "../semver-DWClQt_5.js";
14
- import "../client-Cu9HMcIJ.js";
15
- import "../router-D3UybECj.js";
16
- import "../types-C7C_l-jz.js";
17
- import "../multibase-DeCHcK8L.js";
18
- import { Image, Link, Person } from "../vocab-dw0HG0EQ.js";
19
- import "../langstr-DbWheeIS.js";
20
- import "../lookup-CEbB0_t_.js";
21
- import "../type-D2s5lmbZ.js";
22
- import "../actor-C_d9cZrz.js";
23
- import "../key-D9LuuzMv.js";
24
- import "../http-BigTqmE7.js";
25
- import "../authdocloader-DUnUXs5R.js";
26
- import "../ld-CYqXYuyr.js";
27
- import "../owner-D7RvVquY.js";
28
- import "../proof-D4z1cLgw.js";
29
- import "../lookup-BYiP0j0F.js";
30
- import "../inbox-BB6ajp8P.js";
31
- import "../builder-Js_TKEl1.js";
32
- import "../collection-Dfb0TPno.js";
33
- import "../keycache-C4C7f09E.js";
34
- import "../retry-BiIhZWgD.js";
35
- import "../send-DmlRAY0X.js";
36
- import { test } from "../testing-BZ0dJ4qn.js";
37
- import "../std__assert-B3iAixc-.js";
38
- import "../assert_rejects-DceVjUlD.js";
39
- import "../assert_is_error-DQdKoRgb.js";
40
- import "../assert_not_equals-7pyUM3Ib.js";
41
- import "../assert_throws-DTDC_gwN.js";
42
- import "../docloader-Bh-sDknx.js";
43
- import { createRequestContext } from "../context-CXi1nrZE.js";
11
+ import { createFederation, handleWebFinger } from "../middleware-XOfMDFVl.js";
12
+ import "../semver-DCqorrj5.js";
13
+ import "../client-49mgdebk.js";
14
+ import "../lookup-DcB1UuZA.js";
15
+ import "../types-n7HI7VFr.js";
16
+ import "../actor-C5n4A944.js";
17
+ import "../key-CvnCx-As.js";
18
+ import "../http-DyZD6UXI.js";
19
+ import "../authdocloader-4RSyvLgz.js";
20
+ import "../ld-BDA3JCwf.js";
21
+ import "../owner-D_-GBbn-.js";
22
+ import "../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 { createRequestContext, test } from "../testing-C4oxyGxC.js";
30
+ import "../std__assert-BQdmxyzF.js";
31
+ import "../assert_rejects-AjlKk-Vo.js";
32
+ import "../assert_is_error-CeVBLPsZ.js";
33
+ import "../assert_not_equals-D2R2nl5h.js";
34
+ import "../assert_throws-CqMKbTh_.js";
44
35
 
45
36
  //#region webfinger/handler.test.ts
46
37
  test("handleWebFinger()", async (t) => {
@@ -3,19 +3,18 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { lookupWebFinger } from "../type-CFzYOYUt.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import "../docloader-CJ7eOrpZ.js";
10
- import "../url-kTAI6_KP.js";
11
- import { lookupWebFinger } from "../lookup-CEbB0_t_.js";
12
- import { test } from "../testing-BZ0dJ4qn.js";
13
- import "../std__assert-B3iAixc-.js";
14
- import "../assert_rejects-DceVjUlD.js";
15
- import "../assert_is_error-DQdKoRgb.js";
16
- import "../assert_not_equals-7pyUM3Ib.js";
17
- import "../assert_throws-DTDC_gwN.js";
18
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import "../lookup-DcB1UuZA.js";
11
+ import { test } from "../testing-C4oxyGxC.js";
12
+ import "../std__assert-BQdmxyzF.js";
13
+ import "../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";
17
+ import { esm_default } from "../esm-3l5DpT9c.js";
19
18
  import { withTimeout } from "es-toolkit";
20
19
 
21
20
  //#region webfinger/lookup.test.ts
@@ -135,60 +134,6 @@ test({
135
134
  redirectCount = 0;
136
135
  assertEquals(await lookupWebFinger("acct:johndoe@example.com"), expected);
137
136
  });
138
- esm_default.removeRoutes();
139
- esm_default.get("begin:https://example.com/.well-known/webfinger?", () => new Promise((resolve) => {
140
- const timeoutId = setTimeout(() => {
141
- resolve({ body: expected });
142
- }, 1e3);
143
- return () => clearTimeout(timeoutId);
144
- }));
145
- await t.step("request cancellation", async () => {
146
- const controller = new AbortController();
147
- const promise = lookupWebFinger("acct:johndoe@example.com", { signal: controller.signal });
148
- controller.abort();
149
- assertEquals(await promise, null);
150
- });
151
- esm_default.removeRoutes();
152
- let redirectCount2 = 0;
153
- esm_default.get("begin:https://example.com/.well-known/webfinger", () => {
154
- redirectCount2++;
155
- if (redirectCount2 === 1) return {
156
- status: 302,
157
- headers: { Location: "/.well-known/webfinger2" }
158
- };
159
- return new Promise((resolve) => {
160
- const timeoutId = setTimeout(() => {
161
- resolve({ body: expected });
162
- }, 1e3);
163
- return () => clearTimeout(timeoutId);
164
- });
165
- });
166
- await t.step("cancellation during redirection", async () => {
167
- const controller = new AbortController();
168
- const promise = lookupWebFinger("acct:johndoe@example.com", { signal: controller.signal });
169
- setTimeout(() => controller.abort(), 100);
170
- assertEquals(await promise, null);
171
- });
172
- esm_default.removeRoutes();
173
- esm_default.get("begin:https://example.com/.well-known/webfinger?", () => new Promise((resolve) => {
174
- const timeoutId = setTimeout(() => {
175
- resolve({ body: expected });
176
- }, 500);
177
- return () => clearTimeout(timeoutId);
178
- }));
179
- await t.step("cancellation with immediate abort", async () => {
180
- const controller = new AbortController();
181
- controller.abort();
182
- const result = await lookupWebFinger("acct:johndoe@example.com", { signal: controller.signal });
183
- assertEquals(result, null);
184
- });
185
- esm_default.removeRoutes();
186
- esm_default.get("begin:https://example.com/.well-known/webfinger?", { body: expected });
187
- await t.step("successful request with signal", async () => {
188
- const controller = new AbortController();
189
- const result = await lookupWebFinger("acct:johndoe@example.com", { signal: controller.signal });
190
- assertEquals(result, expected);
191
- });
192
137
  esm_default.hardReset();
193
138
  }
194
139
  });
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import "../kv-DDdb1hMa.js";
4
- import "../docloader-DtGccyuM.js";
5
- import { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger } from "../lookup-m3U6KA0u.js";
3
+ import "../kv-BqOK6zss.js";
4
+ import "../docloader-CLolPVL_.js";
5
+ import { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger } from "../lookup-tSXYzgYs.js";
6
6
  import "../mod-GIh5OYxW.js";
7
7
  export { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger };
@@ -2,8 +2,8 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../docloader-BindvZ7y.js";
6
- import { lookupWebFinger } from "../lookup-_XgQq_BY.js";
5
+ import "../docloader-DfooRmPz.js";
6
+ import { lookupWebFinger } from "../lookup-mq8Ba5Kb.js";
7
7
  import "../webfinger-C3GIyXIg.js";
8
8
 
9
9
  export { lookupWebFinger };
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { KvKey, KvStore, KvStoreSetOptions } from "../kv-DDdb1hMa.js";
3
+ import { KvKey, KvStore, KvStoreSetOptions } from "../kv-BqOK6zss.js";
4
4
  import { MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions } from "../mq-DYKDDJmp.js";
5
5
  import { KVNamespace, Queue } from "@cloudflare/workers-types/experimental";
6
6
 
@@ -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-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import { test } from "../testing-BZ0dJ4qn.js";
10
- import "../std__assert-B3iAixc-.js";
11
- import "../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 "../std__assert-BQdmxyzF.js";
13
+ import "../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 x/cfworkers.ts
package/dist/x/hono.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import "../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 { Federation } from "../context-BhO5LP_t.js";
3
+ import "../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 { Federation } from "../context-BNA3vzcr.js";
13
13
  import "../mq-DYKDDJmp.js";
14
14
 
15
15
  //#region x/hono.d.ts
@@ -25,9 +25,9 @@ type HonoMiddleware<THonoContext extends HonoContext> = (ctx: THonoContext, next
25
25
  * A factory function to create a context data for the {@link Federation}
26
26
  * object.
27
27
  *
28
- * @typeParam TContextData A type of the context data for the {@link Federation}
28
+ * @template TContextData A type of the context data for the {@link Federation}
29
29
  * object.
30
- * @typeParam THonoContext A type of the Hono context.
30
+ * @template THonoContext A type of the Hono context.
31
31
  * @param context A Hono context object.
32
32
  * @returns A context data for the {@link Federation} object.
33
33
  */
@@ -35,9 +35,9 @@ type ContextDataFactory<TContextData, THonoContext> = (context: THonoContext) =>
35
35
  /**
36
36
  * Create a Hono middleware to integrate with the {@link Federation} object.
37
37
  *
38
- * @typeParam TContextData A type of the context data for the {@link Federation}
38
+ * @template TContextData A type of the context data for the {@link Federation}
39
39
  * object.
40
- * @typeParam THonoContext A type of the Hono context.
40
+ * @template THonoContext A type of the Hono context.
41
41
  * @param federation A {@link Federation} object to integrate with Hono.
42
42
  * @param contextDataFactory A function to create a context data for the
43
43
  * {@link Federation} object.
package/dist/x/hono.js CHANGED
@@ -6,9 +6,9 @@
6
6
  /**
7
7
  * Create a Hono middleware to integrate with the {@link Federation} object.
8
8
  *
9
- * @typeParam TContextData A type of the context data for the {@link Federation}
9
+ * @template TContextData A type of the context data for the {@link Federation}
10
10
  * object.
11
- * @typeParam THonoContext A type of the Hono context.
11
+ * @template THonoContext A type of the Hono context.
12
12
  * @param federation A {@link Federation} object to integrate with Hono.
13
13
  * @param contextDataFactory A function to create a context data for the
14
14
  * {@link Federation} object.