@fedify/fedify 1.8.1-pr.315.1091 → 1.8.1-pr.315.1275

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 (203) hide show
  1. package/README.md +16 -10
  2. package/dist/{actor-C_d9cZrz.js → actor-B9oI1pGu.js} +2 -5
  3. package/dist/{actor-1rvS-py8.d.ts → actor-CYyhXZHp.d.ts} +3 -3
  4. package/dist/{actor-DLZ25ttS.js → actor-Cg2FBINf.js} +189 -189
  5. package/dist/{assert-DwEa6glZ.js → assert-MZs1qjMx.js} +2 -2
  6. package/dist/{assert_equals-C5gKCm6A.js → assert_equals-DSbWqCm3.js} +9 -9
  7. package/dist/{assert_instance_of-C9QtN-X9.js → assert_instance_of-DHz7EHNU.js} +2 -2
  8. package/dist/{assert_is_error-DQdKoRgb.js → assert_is_error-BPGph1Jx.js} +2 -2
  9. package/dist/{assert_not_equals-7pyUM3Ib.js → assert_not_equals-f3m3epl3.js} +2 -2
  10. package/dist/{assert_rejects-DceVjUlD.js → assert_rejects-DiIiJbZn.js} +4 -4
  11. package/dist/{assert_throws-DTDC_gwN.js → assert_throws-BOO88avQ.js} +3 -3
  12. package/dist/{authdocloader-CLixqGPW.js → authdocloader-0urt38S6.js} +4 -4
  13. package/dist/{authdocloader-DUnUXs5R.js → authdocloader-BkwhwBf_.js} +4 -5
  14. package/dist/{builder-Js_TKEl1.js → builder-B-wZuoFJ.js} +75 -6
  15. package/dist/{client-DK4qnXK0.d.ts → client-B_KFjN3D.d.ts} +4 -4
  16. package/dist/{client-Cu9HMcIJ.js → client-Cr3DvU-q.js} +3 -3
  17. package/dist/{collection-Dfb0TPno.js → collection-CSzG2j1P.js} +1 -1
  18. package/dist/compat/mod.d.ts +12 -12
  19. package/dist/compat/mod.js +1 -1
  20. package/dist/compat/transformers.test.js +25 -32
  21. package/dist/{context-BhO5LP_t.d.ts → context-BRl3Ndz3.d.ts} +286 -73
  22. package/dist/{denokv-QWKsIqML.js → denokv-2x6-IpXO.js} +1 -1
  23. package/dist/{docloader-BindvZ7y.js → docloader-BLgRerm3.js} +41 -40
  24. package/dist/{docloader-DtGccyuM.d.ts → docloader-DJT1UZH4.d.ts} +5 -2
  25. package/dist/{esm-d-9EVGaP.js → esm-CRotYXVH.js} +15 -15
  26. package/dist/federation/builder.test.js +35 -21
  27. package/dist/federation/collection.test.js +13 -11
  28. package/dist/federation/handler.test.js +341 -40
  29. package/dist/federation/inbox.test.js +8 -12
  30. package/dist/federation/keycache.test.js +9 -12
  31. package/dist/federation/kv.test.js +13 -11
  32. package/dist/federation/middleware.test.js +65 -42
  33. package/dist/federation/mod.d.ts +12 -12
  34. package/dist/federation/mod.js +12 -12
  35. package/dist/federation/mq.test.js +15 -13
  36. package/dist/federation/retry.test.js +7 -5
  37. package/dist/federation/router.test.js +12 -11
  38. package/dist/federation/send.test.js +19 -25
  39. package/dist/{federation-C44ekWNP.js → federation-CMX7WzeL.js} +2 -2
  40. package/dist/{http-BigTqmE7.js → http-BkzChfDi.js} +5 -5
  41. package/dist/{http-Cp-0z2Ja.d.ts → http-CMfQwn0N.d.ts} +6 -6
  42. package/dist/{http-DIyD7he1.js → http-g01-ecph.js} +6 -5
  43. package/dist/{inbox-BB6ajp8P.js → inbox-CpONbSbQ.js} +2 -4
  44. package/dist/{key-D9LuuzMv.js → key-B9Yg9Nqz.js} +4 -5
  45. package/dist/{key-BfI9Ju0m.js → key-C3aLobhY.js} +4 -4
  46. package/dist/{key-DlkWX5Fp.js → key-DdT7xoLD.js} +4 -4
  47. package/dist/key-RnJPgo1m.js +10 -0
  48. package/dist/{keycache-C4C7f09E.js → keycache-BvyhLLHV.js} +2 -2
  49. package/dist/{keys-BjET3ZIs.js → keys-BRSTnUlp.js} +2 -2
  50. package/dist/{kv-DDdb1hMa.d.ts → kv-C7sopW2E.d.ts} +2 -2
  51. package/dist/{kv-D7Yt6pnB.js → kv-CRZrzyXm.js} +1 -1
  52. package/dist/{ld-CYqXYuyr.js → ld-i6KANj32.js} +3 -5
  53. package/dist/{lookup-BYiP0j0F.js → lookup-BGA_VdZm.js} +115 -8
  54. package/dist/{lookup-_XgQq_BY.js → lookup-D5NvwwsS.js} +2 -2
  55. package/dist/{lookup-m3U6KA0u.d.ts → lookup-DXPWo3Hz.d.ts} +3 -3
  56. package/dist/{middleware-e74I4DJ9.js → middleware-BdFHk7bB.js} +629 -24
  57. package/dist/{middleware-VSdfWI3m.js → middleware-Chh21-S_.js} +563 -32
  58. package/dist/middleware-DEwSbDYQ.js +26 -0
  59. package/dist/middleware-DyY-_2Np.js +17 -0
  60. package/dist/{mod-c1I-Ydch.d.ts → mod-Cozftwmt.d.ts} +4 -4
  61. package/dist/{mod-yPzXIjJX.d.ts → mod-DHoWcUrW.d.ts} +6 -6
  62. package/dist/{mod-nlVEnYuj.d.ts → mod-DyY7EVjn.d.ts} +6 -6
  63. package/dist/{mod-BqCBztub.d.ts → mod-DyvbAsBu.d.ts} +6 -6
  64. package/dist/mod.d.ts +15 -15
  65. package/dist/mod.js +12 -12
  66. package/dist/{mq-DYKDDJmp.d.ts → mq-CRGm1e_F.d.ts} +1 -1
  67. package/dist/nodeinfo/client.test.js +15 -15
  68. package/dist/nodeinfo/handler.test.js +30 -39
  69. package/dist/nodeinfo/mod.d.ts +3 -3
  70. package/dist/nodeinfo/mod.js +2 -2
  71. package/dist/nodeinfo/semver.test.js +13 -11
  72. package/dist/nodeinfo/types.test.js +14 -12
  73. package/dist/{owner-BK4eWKBp.d.ts → owner-CfnEgfAc.d.ts} +4 -4
  74. package/dist/{owner-D7RvVquY.js → owner-DSr0c3Yp.js} +3 -4
  75. package/dist/{proof-D4z1cLgw.js → proof-B83O-qBN.js} +4 -6
  76. package/dist/{proof-ChRSmA_D.js → proof-a4fXDkG3.js} +7 -7
  77. package/dist/{retry-BiIhZWgD.js → retry-D4GJ670a.js} +1 -1
  78. package/dist/runtime/authdocloader.test.js +18 -24
  79. package/dist/runtime/docloader.test.js +14 -15
  80. package/dist/runtime/key.test.js +14 -19
  81. package/dist/runtime/langstr.test.js +12 -11
  82. package/dist/runtime/mod.d.ts +5 -5
  83. package/dist/runtime/mod.js +6 -6
  84. package/dist/runtime/multibase/multibase.test.js +12 -11
  85. package/dist/runtime/url.test.js +8 -7
  86. package/dist/{semver-DWClQt_5.js → semver-dArNLkR9.js} +1 -1
  87. package/dist/{send-DmlRAY0X.js → send-QRloWueE.js} +3 -3
  88. package/dist/sig/http.test.js +40 -23
  89. package/dist/sig/key.test.js +15 -21
  90. package/dist/sig/ld.test.js +13 -19
  91. package/dist/sig/mod.d.ts +7 -7
  92. package/dist/sig/mod.js +6 -6
  93. package/dist/sig/owner.test.js +16 -23
  94. package/dist/sig/proof.test.js +16 -22
  95. package/dist/{std__assert-B3iAixc-.js → std__assert-X-_kMxKM.js} +6 -6
  96. package/dist/testing/docloader.test.js +12 -11
  97. package/dist/testing/mod.d.ts +8622 -2
  98. package/dist/testing/mod.js +4 -2
  99. package/dist/testing-A4u9tSVX.js +302 -0
  100. package/dist/{transformers-ghwJuzGY.js → transformers-Dna8Fg7k.js} +4 -4
  101. package/dist/{vocab-dw0HG0EQ.js → type-DHDlfpLg.js} +5246 -185
  102. package/dist/{types-C7C_l-jz.js → types-BIgY6c-l.js} +2 -2
  103. package/dist/{types-DuZ6KMHu.js → types-DbFIDnXK.js} +4 -4
  104. package/dist/vocab/actor.test.js +143 -149
  105. package/dist/vocab/lookup.test.js +13 -20
  106. package/dist/vocab/mod.d.ts +5 -5
  107. package/dist/vocab/mod.js +4 -4
  108. package/dist/vocab/type.test.js +5 -9
  109. package/dist/vocab/vocab.test.js +54 -58
  110. package/dist/{vocab-CI5oydJj.js → vocab-DN6Plgg2.js} +6 -6
  111. package/dist/{vocab-B52eQhpN.d.ts → vocab-KgaI50mH.d.ts} +3 -3
  112. package/dist/webfinger/handler.test.js +30 -39
  113. package/dist/webfinger/lookup.test.js +13 -14
  114. package/dist/webfinger/mod.d.ts +3 -3
  115. package/dist/webfinger/mod.js +2 -2
  116. package/dist/x/cfworkers.d.ts +3 -3
  117. package/dist/x/cfworkers.js +1 -1
  118. package/dist/x/cfworkers.test.js +13 -11
  119. package/dist/x/hono.d.ts +16 -16
  120. package/dist/x/hono.js +3 -3
  121. package/dist/x/sveltekit.d.ts +13 -13
  122. package/dist/x/sveltekit.js +2 -2
  123. package/package.json +3 -3
  124. package/dist/chunk-HsBuZ-b2.js +0 -41
  125. package/dist/context-CXi1nrZE.js +0 -108
  126. package/dist/docloader-Bh-sDknx.js +0 -68
  127. package/dist/docloader-CJ7eOrpZ.js +0 -4514
  128. package/dist/key-DG7lKWv0.js +0 -16
  129. package/dist/langstr-DbWheeIS.js +0 -33
  130. package/dist/lookup-CEbB0_t_.js +0 -133
  131. package/dist/middleware-Dd2mc8-e.js +0 -33
  132. package/dist/middleware-DjA978L0.js +0 -17
  133. package/dist/multibase-DeCHcK8L.js +0 -316
  134. package/dist/router-D3UybECj.js +0 -118
  135. package/dist/testing-BZ0dJ4qn.js +0 -143
  136. package/dist/type-D2s5lmbZ.js +0 -14
  137. package/dist/url-kTAI6_KP.js +0 -68
  138. /package/dist/{vocab → src/vocab}/accept.yaml +0 -0
  139. /package/dist/{vocab → src/vocab}/activity.yaml +0 -0
  140. /package/dist/{vocab → src/vocab}/add.yaml +0 -0
  141. /package/dist/{vocab → src/vocab}/announce.yaml +0 -0
  142. /package/dist/{vocab → src/vocab}/application.yaml +0 -0
  143. /package/dist/{vocab → src/vocab}/arrive.yaml +0 -0
  144. /package/dist/{vocab → src/vocab}/article.yaml +0 -0
  145. /package/dist/{vocab → src/vocab}/audio.yaml +0 -0
  146. /package/dist/{vocab → src/vocab}/block.yaml +0 -0
  147. /package/dist/{vocab → src/vocab}/chatmessage.yaml +0 -0
  148. /package/dist/{vocab → src/vocab}/collection.yaml +0 -0
  149. /package/dist/{vocab → src/vocab}/collectionpage.yaml +0 -0
  150. /package/dist/{vocab → src/vocab}/create.yaml +0 -0
  151. /package/dist/{vocab → src/vocab}/dataintegrityproof.yaml +0 -0
  152. /package/dist/{vocab → src/vocab}/delete.yaml +0 -0
  153. /package/dist/{vocab → src/vocab}/didservice.yaml +0 -0
  154. /package/dist/{vocab → src/vocab}/dislike.yaml +0 -0
  155. /package/dist/{vocab → src/vocab}/document.yaml +0 -0
  156. /package/dist/{vocab → src/vocab}/emoji.yaml +0 -0
  157. /package/dist/{vocab → src/vocab}/emojireact.yaml +0 -0
  158. /package/dist/{vocab → src/vocab}/endpoints.yaml +0 -0
  159. /package/dist/{vocab → src/vocab}/event.yaml +0 -0
  160. /package/dist/{vocab → src/vocab}/export.yaml +0 -0
  161. /package/dist/{vocab → src/vocab}/flag.yaml +0 -0
  162. /package/dist/{vocab → src/vocab}/follow.yaml +0 -0
  163. /package/dist/{vocab → src/vocab}/group.yaml +0 -0
  164. /package/dist/{vocab → src/vocab}/hashtag.yaml +0 -0
  165. /package/dist/{vocab → src/vocab}/ignore.yaml +0 -0
  166. /package/dist/{vocab → src/vocab}/image.yaml +0 -0
  167. /package/dist/{vocab → src/vocab}/intransitiveactivity.yaml +0 -0
  168. /package/dist/{vocab → src/vocab}/invite.yaml +0 -0
  169. /package/dist/{vocab → src/vocab}/join.yaml +0 -0
  170. /package/dist/{vocab → src/vocab}/key.yaml +0 -0
  171. /package/dist/{vocab → src/vocab}/leave.yaml +0 -0
  172. /package/dist/{vocab → src/vocab}/like.yaml +0 -0
  173. /package/dist/{vocab → src/vocab}/link.yaml +0 -0
  174. /package/dist/{vocab → src/vocab}/listen.yaml +0 -0
  175. /package/dist/{vocab → src/vocab}/mention.yaml +0 -0
  176. /package/dist/{vocab → src/vocab}/move.yaml +0 -0
  177. /package/dist/{vocab → src/vocab}/multikey.yaml +0 -0
  178. /package/dist/{vocab → src/vocab}/note.yaml +0 -0
  179. /package/dist/{vocab → src/vocab}/object.yaml +0 -0
  180. /package/dist/{vocab → src/vocab}/offer.yaml +0 -0
  181. /package/dist/{vocab → src/vocab}/orderedcollection.yaml +0 -0
  182. /package/dist/{vocab → src/vocab}/orderedcollectionpage.yaml +0 -0
  183. /package/dist/{vocab → src/vocab}/organization.yaml +0 -0
  184. /package/dist/{vocab → src/vocab}/page.yaml +0 -0
  185. /package/dist/{vocab → src/vocab}/person.yaml +0 -0
  186. /package/dist/{vocab → src/vocab}/place.yaml +0 -0
  187. /package/dist/{vocab → src/vocab}/profile.yaml +0 -0
  188. /package/dist/{vocab → src/vocab}/propertyvalue.yaml +0 -0
  189. /package/dist/{vocab → src/vocab}/question.yaml +0 -0
  190. /package/dist/{vocab → src/vocab}/read.yaml +0 -0
  191. /package/dist/{vocab → src/vocab}/reject.yaml +0 -0
  192. /package/dist/{vocab → src/vocab}/relationship.yaml +0 -0
  193. /package/dist/{vocab → src/vocab}/remove.yaml +0 -0
  194. /package/dist/{vocab → src/vocab}/service.yaml +0 -0
  195. /package/dist/{vocab → src/vocab}/source.yaml +0 -0
  196. /package/dist/{vocab → src/vocab}/tentativeaccept.yaml +0 -0
  197. /package/dist/{vocab → src/vocab}/tentativereject.yaml +0 -0
  198. /package/dist/{vocab → src/vocab}/tombstone.yaml +0 -0
  199. /package/dist/{vocab → src/vocab}/travel.yaml +0 -0
  200. /package/dist/{vocab → src/vocab}/undo.yaml +0 -0
  201. /package/dist/{vocab → src/vocab}/update.yaml +0 -0
  202. /package/dist/{vocab → src/vocab}/video.yaml +0 -0
  203. /package/dist/{vocab → src/vocab}/view.yaml +0 -0
@@ -3,22 +3,21 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
- import "../assert-DwEa6glZ.js";
8
- 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";
6
+ import { lookupWebFinger } from "../type-DHDlfpLg.js";
7
+ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
+ import "../assert-MZs1qjMx.js";
9
+ import "../assert_instance_of-DHz7EHNU.js";
10
+ import "../lookup-BGA_VdZm.js";
11
+ import { test } from "../testing-A4u9tSVX.js";
12
+ import "../std__assert-X-_kMxKM.js";
13
+ import "../assert_rejects-DiIiJbZn.js";
14
+ import "../assert_is_error-BPGph1Jx.js";
15
+ import "../assert_not_equals-f3m3epl3.js";
16
+ import "../assert_throws-BOO88avQ.js";
17
+ import { esm_default } from "../esm-CRotYXVH.js";
19
18
  import { withTimeout } from "es-toolkit";
20
19
 
21
- //#region webfinger/lookup.test.ts
20
+ //#region src/webfinger/lookup.test.ts
22
21
  test({
23
22
  name: "lookupWebFinger()",
24
23
  sanitizeOps: false,
@@ -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-C7sopW2E.js";
4
+ import "../docloader-DJT1UZH4.js";
5
+ import { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger } from "../lookup-DXPWo3Hz.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-BLgRerm3.js";
6
+ import { lookupWebFinger } from "../lookup-D5NvwwsS.js";
7
7
  import "../webfinger-C3GIyXIg.js";
8
8
 
9
9
  export { lookupWebFinger };
@@ -1,10 +1,10 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { KvKey, KvStore, KvStoreSetOptions } from "../kv-DDdb1hMa.js";
4
- import { MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions } from "../mq-DYKDDJmp.js";
3
+ import { KvKey, KvStore, KvStoreSetOptions } from "../kv-C7sopW2E.js";
4
+ import { MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions } from "../mq-CRGm1e_F.js";
5
5
  import { KVNamespace, Queue } from "@cloudflare/workers-types/experimental";
6
6
 
7
- //#region x/cfworkers.d.ts
7
+ //#region src/x/cfworkers.d.ts
8
8
 
9
9
  /**
10
10
  * Implementation of the {@link KvStore} interface for Cloudflare Workers KV
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- //#region x/cfworkers.ts
5
+ //#region src/x/cfworkers.ts
6
6
  /**
7
7
  * Implementation of the {@link KvStore} interface for Cloudflare Workers KV
8
8
  * binding. This class provides a wrapper around Cloudflare's KV namespace to
@@ -3,18 +3,20 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
- import "../assert-DwEa6glZ.js";
8
- 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";
6
+ import "../type-DHDlfpLg.js";
7
+ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
+ import "../assert-MZs1qjMx.js";
9
+ import "../assert_instance_of-DHz7EHNU.js";
10
+ import "../lookup-BGA_VdZm.js";
11
+ import { test } from "../testing-A4u9tSVX.js";
12
+ import "../std__assert-X-_kMxKM.js";
13
+ import "../assert_rejects-DiIiJbZn.js";
14
+ import "../assert_is_error-BPGph1Jx.js";
15
+ import "../assert_not_equals-f3m3epl3.js";
16
+ import "../assert_throws-BOO88avQ.js";
15
17
  import { delay } from "es-toolkit";
16
18
 
17
- //#region x/cfworkers.ts
19
+ //#region src/x/cfworkers.ts
18
20
  /**
19
21
  * Implementation of the {@link KvStore} interface for Cloudflare Workers KV
20
22
  * binding. This class provides a wrapper around Cloudflare's KV namespace to
@@ -93,7 +95,7 @@ var WorkersMessageQueue = class {
93
95
  };
94
96
 
95
97
  //#endregion
96
- //#region x/cfworkers.test.ts
98
+ //#region src/x/cfworkers.test.ts
97
99
  test({
98
100
  name: "WorkersKvStore",
99
101
  ignore: !("navigator" in globalThis && navigator.userAgent === "Cloudflare-Workers"),
package/dist/x/hono.d.ts CHANGED
@@ -1,18 +1,18 @@
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";
13
- import "../mq-DYKDDJmp.js";
3
+ import "../kv-C7sopW2E.js";
4
+ import "../docloader-DJT1UZH4.js";
5
+ import "../client-B_KFjN3D.js";
6
+ import "../vocab-KgaI50mH.js";
7
+ import "../actor-CYyhXZHp.js";
8
+ import "../http-CMfQwn0N.js";
9
+ import "../owner-CfnEgfAc.js";
10
+ import "../mod-DyvbAsBu.js";
11
+ import "../lookup-DXPWo3Hz.js";
12
+ import { Federation } from "../context-BRl3Ndz3.js";
13
+ import "../mq-CRGm1e_F.js";
14
14
 
15
- //#region x/hono.d.ts
15
+ //#region src/x/hono.d.ts
16
16
  interface HonoRequest {
17
17
  raw: Request;
18
18
  }
@@ -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
@@ -2,13 +2,13 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- //#region x/hono.ts
5
+ //#region src/x/hono.ts
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.
@@ -1,18 +1,18 @@
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";
13
- import "../mq-DYKDDJmp.js";
3
+ import "../kv-C7sopW2E.js";
4
+ import "../docloader-DJT1UZH4.js";
5
+ import "../client-B_KFjN3D.js";
6
+ import "../vocab-KgaI50mH.js";
7
+ import "../actor-CYyhXZHp.js";
8
+ import "../http-CMfQwn0N.js";
9
+ import "../owner-CfnEgfAc.js";
10
+ import "../mod-DyvbAsBu.js";
11
+ import "../lookup-DXPWo3Hz.js";
12
+ import { Federation } from "../context-BRl3Ndz3.js";
13
+ import "../mq-CRGm1e_F.js";
14
14
 
15
- //#region x/sveltekit.d.ts
15
+ //#region src/x/sveltekit.d.ts
16
16
  type RequestEvent = {
17
17
  request: Request;
18
18
  };
@@ -31,7 +31,7 @@ type HookParams = {
31
31
  * export const handle = fedifyHook(federation, () => undefined);
32
32
  * ```
33
33
  *
34
- * @typeParam TContextData A type of the context data for the {@link Federation}
34
+ * @template TContextData A type of the context data for the {@link Federation}
35
35
  * object.
36
36
  * @param federation A {@link Federation} object to integrate with SvelteKit.
37
37
  * @param createContextData A function to create a context data for the
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- //#region x/sveltekit.ts
5
+ //#region src/x/sveltekit.ts
6
6
  /**
7
7
  * Create a SvelteKit hook handler to integrate with the {@link Federation}
8
8
  * object.
@@ -14,7 +14,7 @@
14
14
  * export const handle = fedifyHook(federation, () => undefined);
15
15
  * ```
16
16
  *
17
- * @typeParam TContextData A type of the context data for the {@link Federation}
17
+ * @template TContextData A type of the context data for the {@link Federation}
18
18
  * object.
19
19
  * @param federation A {@link Federation} object to integrate with SvelteKit.
20
20
  * @param createContextData A function to create a context data for the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.8.1-pr.315.1091+6219e632",
3
+ "version": "1.8.1-pr.315.1275+37d811f6",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -16,7 +16,7 @@
16
16
  "repository": {
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/fedify-dev/fedify.git",
19
- "directory": "fedify"
19
+ "directory": "packages/fedify"
20
20
  },
21
21
  "bugs": {
22
22
  "url": "https://github.com/fedify-dev/fedify/issues"
@@ -134,6 +134,6 @@
134
134
  "prepublish": "deno task codegen && tsdown",
135
135
  "test": "deno task codegen && tsdown && cd dist/ && node --test",
136
136
  "test:bun": "deno task codegen && tsdown && cd dist/ && bun test --timeout 60000",
137
- "test:cfworkers": "deno task codegen && wrangler deploy --dry-run --outdir cfworkers && node --import=tsx cfworkers/client.ts"
137
+ "test:cfworkers": "deno task codegen && wrangler deploy --dry-run --outdir src/cfworkers && node --import=tsx src/cfworkers/client.ts"
138
138
  }
139
139
  }
@@ -1,41 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
6
- import { createRequire } from "node:module";
7
-
8
- //#region rolldown:runtime
9
- var __create = Object.create;
10
- var __defProp = Object.defineProperty;
11
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
- var __getOwnPropNames = Object.getOwnPropertyNames;
13
- var __getProtoOf = Object.getPrototypeOf;
14
- var __hasOwnProp = Object.prototype.hasOwnProperty;
15
- var __commonJS = (cb, mod) => function() {
16
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
- };
18
- var __export = (target, all) => {
19
- for (var name in all) __defProp(target, name, {
20
- get: all[name],
21
- enumerable: true
22
- });
23
- };
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
26
- key = keys[i];
27
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
28
- get: ((k) => from[k]).bind(null, key),
29
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
30
- });
31
- }
32
- return to;
33
- };
34
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
35
- value: mod,
36
- enumerable: true
37
- }) : target, mod));
38
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
39
-
40
- //#endregion
41
- export { __commonJS, __export, __require, __toESM };
@@ -1,108 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
6
- import { RouterError } from "./router-D3UybECj.js";
7
- import { lookupWebFinger } from "./lookup-CEbB0_t_.js";
8
- import { lookupObject, traverseCollection } from "./lookup-BYiP0j0F.js";
9
- import { mockDocumentLoader } from "./docloader-Bh-sDknx.js";
10
- import { trace } from "@opentelemetry/api";
11
-
12
- //#region testing/context.ts
13
- function createContext(values) {
14
- const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity } = values;
15
- function throwRouteError() {
16
- throw new RouterError("Not implemented");
17
- }
18
- return {
19
- federation,
20
- data,
21
- origin: url.origin,
22
- canonicalOrigin: canonicalOrigin ?? url.origin,
23
- host: url.host,
24
- hostname: url.hostname,
25
- documentLoader: documentLoader ?? mockDocumentLoader,
26
- contextLoader: contextLoader ?? mockDocumentLoader,
27
- tracerProvider: tracerProvider ?? trace.getTracerProvider(),
28
- clone: clone ?? ((data$1) => createContext({
29
- ...values,
30
- data: data$1
31
- })),
32
- getNodeInfoUri: getNodeInfoUri ?? throwRouteError,
33
- getActorUri: getActorUri ?? throwRouteError,
34
- getObjectUri: getObjectUri ?? throwRouteError,
35
- getOutboxUri: getOutboxUri ?? throwRouteError,
36
- getInboxUri: getInboxUri ?? throwRouteError,
37
- getFollowingUri: getFollowingUri ?? throwRouteError,
38
- getFollowersUri: getFollowersUri ?? throwRouteError,
39
- getLikedUri: getLikedUri ?? throwRouteError,
40
- getFeaturedUri: getFeaturedUri ?? throwRouteError,
41
- getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError,
42
- parseUri: parseUri ?? ((_uri) => {
43
- throw new Error("Not implemented");
44
- }),
45
- getDocumentLoader: getDocumentLoader ?? ((_params) => {
46
- throw new Error("Not implemented");
47
- }),
48
- getActorKeyPairs: getActorKeyPairs ?? ((_handle) => Promise.resolve([])),
49
- lookupObject: lookupObject$1 ?? ((uri, options = {}) => {
50
- return lookupObject(uri, {
51
- documentLoader: options.documentLoader ?? documentLoader ?? mockDocumentLoader,
52
- contextLoader: options.contextLoader ?? contextLoader ?? mockDocumentLoader
53
- });
54
- }),
55
- traverseCollection: traverseCollection$1 ?? ((collection, options = {}) => {
56
- return traverseCollection(collection, {
57
- documentLoader: options.documentLoader ?? documentLoader ?? mockDocumentLoader,
58
- contextLoader: options.contextLoader ?? contextLoader ?? mockDocumentLoader
59
- });
60
- }),
61
- lookupNodeInfo: lookupNodeInfo ?? ((_params) => {
62
- throw new Error("Not implemented");
63
- }),
64
- lookupWebFinger: lookupWebFinger$1 ?? ((resource, options = {}) => {
65
- return lookupWebFinger(resource, options);
66
- }),
67
- sendActivity: sendActivity ?? ((_params) => {
68
- throw new Error("Not implemented");
69
- }),
70
- routeActivity: routeActivity ?? ((_params) => {
71
- throw new Error("Not implemented");
72
- })
73
- };
74
- }
75
- function createRequestContext(args) {
76
- return {
77
- ...createContext(args),
78
- clone: args.clone ?? ((data) => createRequestContext({
79
- ...args,
80
- data
81
- })),
82
- request: args.request ?? new Request(args.url),
83
- url: args.url,
84
- getActor: args.getActor ?? (() => Promise.resolve(null)),
85
- getObject: args.getObject ?? (() => Promise.resolve(null)),
86
- getSignedKey: args.getSignedKey ?? (() => Promise.resolve(null)),
87
- getSignedKeyOwner: args.getSignedKeyOwner ?? (() => Promise.resolve(null)),
88
- sendActivity: args.sendActivity ?? ((_params) => {
89
- throw new Error("Not implemented");
90
- })
91
- };
92
- }
93
- function createInboxContext(args) {
94
- return {
95
- ...createContext(args),
96
- clone: args.clone ?? ((data) => createInboxContext({
97
- ...args,
98
- data
99
- })),
100
- recipient: args.recipient ?? null,
101
- forwardActivity: args.forwardActivity ?? ((_params) => {
102
- throw new Error("Not implemented");
103
- })
104
- };
105
- }
106
-
107
- //#endregion
108
- export { createInboxContext, createRequestContext };
@@ -1,68 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
6
- import { getLogger } from "@logtape/logtape";
7
-
8
- //#region testing/docloader.ts
9
- const logger = getLogger([
10
- "fedify",
11
- "testing",
12
- "docloader"
13
- ]);
14
- /**
15
- * A mock of the document loader. This does not make any actual HTTP requests
16
- * towards the remote server, but looks up the local fixture files instead.
17
- *
18
- * For instance, `mockDocumentLoader("http://example.com/foo/bar")` will look up
19
- * the file `testing/fixtures/http/example.com/foo/bar` (no suffix) and return
20
- * its content as the response.
21
- */
22
- async function mockDocumentLoader(resource, _options) {
23
- const url = new URL(resource);
24
- if ("navigator" in globalThis && navigator.userAgent === "Cloudflare-Workers") {
25
- const testUrl = new URL(url);
26
- testUrl.hostname += ".test";
27
- const resp = await fetch(testUrl);
28
- if (resp.ok) {
29
- const document$1 = await resp.json();
30
- logger.debug("Successfully fetched fixture {resource}: {status} {statusText}\n{body}", {
31
- resource,
32
- status: resp.status,
33
- statusText: resp.statusText,
34
- body: document$1
35
- });
36
- return {
37
- contextUrl: null,
38
- document: document$1,
39
- documentUrl: resource
40
- };
41
- }
42
- const error = await resp.text();
43
- logger.error("Failed to fetch fixture {resource}: {error}", {
44
- resource,
45
- error
46
- });
47
- throw new Error(error);
48
- }
49
- const path = `./fixtures/${url.host}${url.pathname}.json`;
50
- let document;
51
- try {
52
- document = (await import(path, { with: { type: "json" } })).default;
53
- } catch (error) {
54
- logger.error("Failed to read fixture file {path}: {error}", {
55
- path,
56
- error
57
- });
58
- throw error;
59
- }
60
- return {
61
- contextUrl: null,
62
- document,
63
- documentUrl: resource
64
- };
65
- }
66
-
67
- //#endregion
68
- export { mockDocumentLoader };