@fedify/fedify 2.0.0-pr.490.2 → 2.0.0-pr.559.4

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 (267) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +64 -37
  3. package/dist/{builder-4syLV1-z.js → builder-DTlQwmVF.js} +10 -3
  4. package/dist/{client-BsGzbnV-.d.ts → client-CUTUGgvJ.d.ts} +18 -18
  5. package/dist/{client-pY7-3icS.js → client-Dg7OfUDA.js} +28 -23
  6. package/dist/{client-94iWEfQa.d.cts → client-by-PEGAJ.d.cts} +18 -18
  7. package/dist/compat/mod.cjs +1 -1
  8. package/dist/compat/mod.d.cts +6 -10
  9. package/dist/compat/mod.d.ts +6 -10
  10. package/dist/compat/mod.js +1 -1
  11. package/dist/compat/transformers.test.js +22 -21
  12. package/dist/{context-PxGADCsD.d.cts → context-B6X-7loD.d.cts} +206 -74
  13. package/dist/{context-V-XS2_6O.d.ts → context-CJaICYPw.d.ts} +206 -74
  14. package/dist/context-CZ5llAss.js +109 -0
  15. package/dist/deno-DGx1JZHr.js +124 -0
  16. package/dist/{testing-BslrM_9E.js → dist-B5f6a8Tt.js} +90 -110
  17. package/dist/{docloader-DndkGj0O.js → docloader-D8UHsyqD.js} +3 -3
  18. package/dist/{esm-VlKMJQqV.js → esm-DGl7uK1r.js} +1 -1
  19. package/dist/federation/builder.test.js +7 -5
  20. package/dist/federation/collection.test.js +2 -3
  21. package/dist/federation/handler.test.js +24 -23
  22. package/dist/federation/idempotency.test.js +59 -22
  23. package/dist/federation/inbox.test.js +4 -3
  24. package/dist/federation/keycache.test.js +4 -4
  25. package/dist/federation/kv.test.js +56 -3
  26. package/dist/federation/middleware.test.js +307 -93
  27. package/dist/federation/mod.cjs +9 -10
  28. package/dist/federation/mod.d.cts +7 -11
  29. package/dist/federation/mod.d.ts +7 -11
  30. package/dist/federation/mod.js +8 -11
  31. package/dist/federation/mq.test.js +167 -16
  32. package/dist/federation/negotiation.test.js +2 -3
  33. package/dist/federation/retry.test.js +2 -3
  34. package/dist/federation/router.test.js +2 -2
  35. package/dist/federation/send.test.js +93 -11
  36. package/dist/{webfinger/handler.test.js → federation/webfinger.test.js} +24 -22
  37. package/dist/{federation-CRpdnOMS.cjs → federation-CE0CJ_0G.cjs} +116 -10
  38. package/dist/{federation-jcR8-ZxP.js → federation-D6FVaeAR.js} +122 -16
  39. package/dist/{http-YhR_TMMQ.js → http-CL3G0rnf.js} +126 -9
  40. package/dist/{http-M8k5mKc0.d.cts → http-ClB3pLcL.d.cts} +1 -1
  41. package/dist/{http-Dxpqz4hE.cjs → http-DKBUv5zZ.cjs} +139 -16
  42. package/dist/{http-BbO0ejuk.d.ts → http-DLBDPal9.d.ts} +1 -1
  43. package/dist/{http-DH47B-h3.js → http-LGtYlSfN.js} +3 -2
  44. package/dist/{inbox-CEyHvxOo.js → inbox-DbtWQY2D.js} +2 -1
  45. package/dist/{key-x7E5PYI0.js → key-BCtt1Ugy.js} +3 -3
  46. package/dist/{keycache-BRXuBDuy.js → keycache-DRxpZ5r9.js} +1 -1
  47. package/dist/{keys-DLk_8H-l.js → keys-ZbcByPg9.js} +1 -1
  48. package/dist/{kv-Bxr0Q87_.d.cts → kv-B4vFhIYL.d.cts} +30 -1
  49. package/dist/{kv-BKNZ-Tb-.d.ts → kv-CYySNrsn.d.ts} +30 -1
  50. package/dist/{kv-CRZrzyXm.js → kv-QzKcOQgP.js} +22 -0
  51. package/dist/{kv-cache-HFnFIjSD.js → kv-cache-0786BfqY.js} +3 -3
  52. package/dist/{kv-cache-DN9pfMBe.js → kv-cache-B__dHl7g.js} +15 -2
  53. package/dist/{kv-cache-BMpfJFTx.cjs → kv-cache-DCJojeTn.cjs} +3 -3
  54. package/dist/{ld-CRPaU6c8.js → ld-QlZPwGEH.js} +4 -3
  55. package/dist/middleware-B3jUPnDa.js +12 -0
  56. package/dist/middleware-BFiwWMA2.cjs +12 -0
  57. package/dist/middleware-DMx6DyIw.js +26 -0
  58. package/dist/{middleware-DfLpMu7C.js → middleware-Dm58nObp.js} +280 -166
  59. package/dist/{middleware-BIqFwRwI.js → middleware-WokE4qxc.js} +245 -178
  60. package/dist/{middleware-Ck7O6mb0.cjs → middleware-hWyKOO_6.cjs} +332 -206
  61. package/dist/{mod-DMpuiKXi.d.cts → mod-BHXq4Q3x.d.cts} +7 -7
  62. package/dist/{mod-DgxG-byT.d.cts → mod-BrS8tiad.d.cts} +2 -2
  63. package/dist/mod-CoMP50Rf.d.ts +64 -0
  64. package/dist/{mod-BoRKfJPE.d.cts → mod-DScazwCW.d.cts} +4 -4
  65. package/dist/mod-DTzN6Pv3.d.cts +62 -0
  66. package/dist/{mod-aAE2wOWV.d.ts → mod-DZmuPaKv.d.ts} +7 -7
  67. package/dist/{mod-D5Z2tISD.d.ts → mod-jOa7W503.d.ts} +2 -2
  68. package/dist/{mod-Cdo6SYlJ.d.ts → mod-xKJ57rwu.d.ts} +4 -4
  69. package/dist/mod.cjs +12 -93
  70. package/dist/mod.d.cts +11 -15
  71. package/dist/mod.d.ts +11 -15
  72. package/dist/mod.js +11 -15
  73. package/dist/nodeinfo/client.test.js +3 -4
  74. package/dist/nodeinfo/handler.test.js +22 -21
  75. package/dist/nodeinfo/mod.cjs +2 -2
  76. package/dist/nodeinfo/mod.d.cts +2 -2
  77. package/dist/nodeinfo/mod.d.ts +2 -2
  78. package/dist/nodeinfo/mod.js +2 -2
  79. package/dist/nodeinfo/types.test.js +2 -3
  80. package/dist/otel/exporter.test.js +893 -0
  81. package/dist/otel/mod.cjs +256 -0
  82. package/dist/otel/mod.d.cts +230 -0
  83. package/dist/otel/mod.d.ts +232 -0
  84. package/dist/otel/mod.js +255 -0
  85. package/dist/{owner-kQRGVXG1.d.ts → owner-BgI8C-VY.d.ts} +1 -2
  86. package/dist/{owner-B4HbyP8s.d.cts → owner-C-zfmVAD.d.cts} +1 -2
  87. package/dist/{owner-CIWnopkT.js → owner-Cejm-F7S.js} +2 -2
  88. package/dist/{proof-D-5ri6rf.js → proof-BOQBHd-i.js} +3 -2
  89. package/dist/{proof-fEwcA7LA.cjs → proof-Bmi8ZIcW.cjs} +24 -25
  90. package/dist/{proof-C8-2l0zH.js → proof-CnaEQ_Ev.js} +4 -5
  91. package/dist/router-D9eI0s4b.js +118 -0
  92. package/dist/{send-CPGk9QKZ.js → send-jFxXfsN8.js} +38 -4
  93. package/dist/sig/http.test.js +6 -7
  94. package/dist/sig/key.test.js +5 -5
  95. package/dist/sig/ld.test.js +6 -6
  96. package/dist/sig/mod.cjs +3 -5
  97. package/dist/sig/mod.d.cts +3 -5
  98. package/dist/sig/mod.d.ts +3 -5
  99. package/dist/sig/mod.js +3 -5
  100. package/dist/sig/owner.test.js +6 -7
  101. package/dist/sig/proof.test.js +6 -6
  102. package/dist/testing/mod.d.ts +173 -7006
  103. package/dist/testing/mod.js +4 -3
  104. package/dist/{transformers-CoBS-oFG.cjs → transformers-BjBg6Lag.cjs} +2 -2
  105. package/dist/{transformers-BFT6d7J5.js → transformers-N_ip_y4P.js} +2 -2
  106. package/dist/{types-BtUjyi5y.js → types-8l28uC8o.js} +30 -25
  107. package/dist/{types-CWgzGaqk.cjs → types-B6z6CqIz.cjs} +30 -25
  108. package/dist/{types-C2XVl6gj.js → types-CPz01LGH.js} +3 -3
  109. package/dist/utils/docloader.test.js +7 -8
  110. package/dist/utils/kv-cache.test.js +5 -3
  111. package/dist/utils/mod.cjs +3 -5
  112. package/dist/utils/mod.d.cts +3 -4
  113. package/dist/utils/mod.d.ts +3 -4
  114. package/dist/utils/mod.js +3 -5
  115. package/dist/vocab/mod.cjs +8 -81
  116. package/dist/vocab/mod.d.cts +1 -4
  117. package/dist/vocab/mod.d.ts +1 -4
  118. package/dist/vocab/mod.js +1 -5
  119. package/package.json +27 -27
  120. package/dist/actor-BT-e5fn9.js +0 -146
  121. package/dist/actor-B_gRMloq.js +0 -41647
  122. package/dist/actor-CBfPjuWj.cjs +0 -42079
  123. package/dist/actor-DqFajh9s.d.ts +0 -130
  124. package/dist/actor-f2NtjyCg.d.cts +0 -128
  125. package/dist/fixtures/activitypub.academy/users/brauca_darradiul.json +0 -83
  126. package/dist/fixtures/example.com/announce.json +0 -6
  127. package/dist/fixtures/example.com/collection.json +0 -19
  128. package/dist/fixtures/example.com/create.json +0 -6
  129. package/dist/fixtures/example.com/cross-origin-actor.json +0 -6
  130. package/dist/fixtures/example.com/hong-gildong.json +0 -11
  131. package/dist/fixtures/example.com/invite.json +0 -7
  132. package/dist/fixtures/example.com/key.json +0 -7
  133. package/dist/fixtures/example.com/key2.json +0 -6
  134. package/dist/fixtures/example.com/object.json +0 -6
  135. package/dist/fixtures/example.com/orderedcollectionpage.json +0 -24
  136. package/dist/fixtures/example.com/paged/a.json +0 -13
  137. package/dist/fixtures/example.com/paged/b.json +0 -16
  138. package/dist/fixtures/example.com/paged-collection.json +0 -6
  139. package/dist/fixtures/example.com/person.json +0 -22
  140. package/dist/fixtures/example.com/person2.json +0 -40
  141. package/dist/fixtures/example.com/test.json +0 -5
  142. package/dist/fixtures/example.com/users/handle.json +0 -16
  143. package/dist/fixtures/example.com/wrong-type.json +0 -3
  144. package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +0 -6
  145. package/dist/fixtures/oeee.cafe/ap/users/3609fd4e-d51d-4db8-9f04-4189815864dd.json +0 -24
  146. package/dist/fixtures/remote.domain/users/bob.json +0 -20
  147. package/dist/fixtures/server.example/users/alice.json +0 -20
  148. package/dist/fixtures/w3id.org/identity/v1.json +0 -152
  149. package/dist/fixtures/w3id.org/security/data-integrity/v1.json +0 -74
  150. package/dist/fixtures/w3id.org/security/multikey/v1.json +0 -35
  151. package/dist/fixtures/w3id.org/security/v1.json +0 -50
  152. package/dist/fixtures/wizard.casa/users/hongminhee.json +0 -69
  153. package/dist/fixtures/www.w3.org/ns/activitystreams.json +0 -379
  154. package/dist/fixtures/www.w3.org/ns/did/v1.json +0 -58
  155. package/dist/lookup-BTqtVATt.cjs +0 -266
  156. package/dist/lookup-DOSnR912.js +0 -254
  157. package/dist/lookup-Dj9-mgOn.js +0 -42184
  158. package/dist/middleware-CxswDtQn.js +0 -15
  159. package/dist/middleware-CyITsnX0.js +0 -26
  160. package/dist/middleware-Z8lc_drL.cjs +0 -15
  161. package/dist/mod-BlVovdcy.d.ts +0 -309
  162. package/dist/mod-BxRCHTz-.d.cts +0 -307
  163. package/dist/mod-C58MZ7Wx.d.cts +0 -113
  164. package/dist/mod-CcDPcLJW.d.cts +0 -1
  165. package/dist/mod-Ds0mpFZU.d.ts +0 -115
  166. package/dist/mod-bjzj5QIb.d.ts +0 -2
  167. package/dist/otel-1BmGPuZc.js +0 -64
  168. package/dist/src/vocab/accept.yaml +0 -15
  169. package/dist/src/vocab/activity.yaml +0 -98
  170. package/dist/src/vocab/add.yaml +0 -16
  171. package/dist/src/vocab/announce.yaml +0 -30
  172. package/dist/src/vocab/application.yaml +0 -324
  173. package/dist/src/vocab/arrive.yaml +0 -15
  174. package/dist/src/vocab/article.yaml +0 -46
  175. package/dist/src/vocab/audio.yaml +0 -11
  176. package/dist/src/vocab/block.yaml +0 -16
  177. package/dist/src/vocab/chatmessage.yaml +0 -50
  178. package/dist/src/vocab/collection.yaml +0 -154
  179. package/dist/src/vocab/collectionpage.yaml +0 -55
  180. package/dist/src/vocab/create.yaml +0 -28
  181. package/dist/src/vocab/dataintegrityproof.yaml +0 -56
  182. package/dist/src/vocab/delete.yaml +0 -27
  183. package/dist/src/vocab/didservice.yaml +0 -22
  184. package/dist/src/vocab/dislike.yaml +0 -14
  185. package/dist/src/vocab/document.yaml +0 -31
  186. package/dist/src/vocab/emoji.yaml +0 -12
  187. package/dist/src/vocab/emojireact.yaml +0 -17
  188. package/dist/src/vocab/endpoints.yaml +0 -85
  189. package/dist/src/vocab/event.yaml +0 -11
  190. package/dist/src/vocab/export.yaml +0 -9
  191. package/dist/src/vocab/flag.yaml +0 -15
  192. package/dist/src/vocab/follow.yaml +0 -19
  193. package/dist/src/vocab/group.yaml +0 -324
  194. package/dist/src/vocab/hashtag.yaml +0 -14
  195. package/dist/src/vocab/ignore.yaml +0 -14
  196. package/dist/src/vocab/image.yaml +0 -9
  197. package/dist/src/vocab/intransitiveactivity.yaml +0 -15
  198. package/dist/src/vocab/invite.yaml +0 -14
  199. package/dist/src/vocab/join.yaml +0 -14
  200. package/dist/src/vocab/key.yaml +0 -28
  201. package/dist/src/vocab/leave.yaml +0 -14
  202. package/dist/src/vocab/like.yaml +0 -16
  203. package/dist/src/vocab/link.yaml +0 -101
  204. package/dist/src/vocab/listen.yaml +0 -12
  205. package/dist/src/vocab/mention.yaml +0 -9
  206. package/dist/src/vocab/move.yaml +0 -15
  207. package/dist/src/vocab/multikey.yaml +0 -36
  208. package/dist/src/vocab/note.yaml +0 -48
  209. package/dist/src/vocab/object.yaml +0 -404
  210. package/dist/src/vocab/offer.yaml +0 -15
  211. package/dist/src/vocab/orderedcollection.yaml +0 -39
  212. package/dist/src/vocab/orderedcollectionpage.yaml +0 -50
  213. package/dist/src/vocab/organization.yaml +0 -324
  214. package/dist/src/vocab/page.yaml +0 -11
  215. package/dist/src/vocab/person.yaml +0 -324
  216. package/dist/src/vocab/place.yaml +0 -75
  217. package/dist/src/vocab/profile.yaml +0 -26
  218. package/dist/src/vocab/propertyvalue.yaml +0 -32
  219. package/dist/src/vocab/question.yaml +0 -103
  220. package/dist/src/vocab/read.yaml +0 -13
  221. package/dist/src/vocab/reject.yaml +0 -14
  222. package/dist/src/vocab/relationship.yaml +0 -52
  223. package/dist/src/vocab/remove.yaml +0 -14
  224. package/dist/src/vocab/service.yaml +0 -324
  225. package/dist/src/vocab/source.yaml +0 -26
  226. package/dist/src/vocab/tentativeaccept.yaml +0 -14
  227. package/dist/src/vocab/tentativereject.yaml +0 -14
  228. package/dist/src/vocab/tombstone.yaml +0 -24
  229. package/dist/src/vocab/travel.yaml +0 -16
  230. package/dist/src/vocab/undo.yaml +0 -26
  231. package/dist/src/vocab/update.yaml +0 -58
  232. package/dist/src/vocab/video.yaml +0 -11
  233. package/dist/src/vocab/view.yaml +0 -13
  234. package/dist/testing/docloader.test.js +0 -22
  235. package/dist/vocab/actor.test.js +0 -5963
  236. package/dist/vocab/lookup.test.d.ts +0 -3
  237. package/dist/vocab/lookup.test.js +0 -476
  238. package/dist/vocab/type.test.d.ts +0 -3
  239. package/dist/vocab/type.test.js +0 -24
  240. package/dist/vocab/vocab.test.d.ts +0 -3
  241. package/dist/vocab/vocab.test.js +0 -9397
  242. package/dist/vocab-BCWe1Ih5.d.ts +0 -14905
  243. package/dist/vocab-ByUp-A2_.js +0 -260
  244. package/dist/vocab-CeDBzu-f.d.cts +0 -14903
  245. package/dist/vocab-X_X5T8D3.cjs +0 -296
  246. package/dist/webfinger/handler.test.d.ts +0 -3
  247. package/dist/webfinger/lookup.test.d.ts +0 -3
  248. package/dist/webfinger/lookup.test.js +0 -193
  249. package/dist/webfinger/mod.cjs +0 -8
  250. package/dist/webfinger/mod.d.cts +0 -2
  251. package/dist/webfinger/mod.d.ts +0 -4
  252. package/dist/webfinger/mod.js +0 -8
  253. package/dist/webfinger-C72Y8lrh.js +0 -4
  254. package/dist/webfinger-vAtLmxOF.cjs +0 -4
  255. /package/dist/{collection-BzWsN9pB.js → collection-CcnIw1qY.js} +0 -0
  256. /package/dist/{testing/docloader.test.d.ts → federation/webfinger.test.d.ts} +0 -0
  257. /package/dist/{mod-CVgZgliM.d.ts → mod-1E3W847c.d.ts} +0 -0
  258. /package/dist/{mod-B-hUPT2N.d.cts → mod-C81L6_lQ.d.cts} +0 -0
  259. /package/dist/{negotiation-C4nFufNk.js → negotiation-5NPJL6zp.js} +0 -0
  260. /package/dist/{nodeinfo-BnthBobC.js → nodeinfo-BlLsRSiT.js} +0 -0
  261. /package/dist/{nodeinfo-CdN0rEnZ.cjs → nodeinfo-DuMYTpbZ.cjs} +0 -0
  262. /package/dist/{vocab/actor.test.d.ts → otel/exporter.test.d.ts} +0 -0
  263. /package/dist/{retry-CfF8Gn4d.js → retry-D4GJ670a.js} +0 -0
  264. /package/dist/{sig-C34-oHBl.js → sig-CwuONEzF.js} +0 -0
  265. /package/dist/{sig-YYj5tCnr.cjs → sig-DeXX2xnj.cjs} +0 -0
  266. /package/dist/{utils-DyRU1gdZ.cjs → utils-Db0ZmjcD.cjs} +0 -0
  267. /package/dist/{utils-D-Va7aXC.js → utils-Wranxuoe.js} +0 -0
@@ -3,7 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import "../lookup-Dj9-mgOn.js";
7
- import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-BslrM_9E.js";
6
+ import { testDefinitions } from "../dist-B5f6a8Tt.js";
7
+ import "../router-D9eI0s4b.js";
8
+ import { createInboxContext, createRequestContext } from "../context-CZ5llAss.js";
8
9
 
9
- export { createInboxContext, createRequestContext, test, testDefinitions };
10
+ export { createInboxContext, createRequestContext, testDefinitions };
@@ -41,7 +41,7 @@ function autoIdAssigner(activity, context) {
41
41
  * activity like this:
42
42
  *
43
43
  * ```typescript
44
- * import { Follow, Person } from "@fedify/fedify/vocab";
44
+ * import { Follow, Person } from "@fedify/vocab";
45
45
  * const input = new Follow({
46
46
  * id: new URL("http://example.com/activities/1"),
47
47
  * actor: new Person({
@@ -60,7 +60,7 @@ function autoIdAssigner(activity, context) {
60
60
  * The result of applying this transformer would be:
61
61
  *
62
62
  * ```typescript
63
- * import { Follow, Person } from "@fedify/fedify/vocab";
63
+ * import { Follow, Person } from "@fedify/vocab";
64
64
  * const output = new Follow({
65
65
  * id: new URL("http://example.com/activities/1"),
66
66
  * actor: new URL("http://example.com/actors/1"),
@@ -40,7 +40,7 @@ function autoIdAssigner(activity, context) {
40
40
  * activity like this:
41
41
  *
42
42
  * ```typescript
43
- * import { Follow, Person } from "@fedify/fedify/vocab";
43
+ * import { Follow, Person } from "@fedify/vocab";
44
44
  * const input = new Follow({
45
45
  * id: new URL("http://example.com/activities/1"),
46
46
  * actor: new Person({
@@ -59,7 +59,7 @@ function autoIdAssigner(activity, context) {
59
59
  * The result of applying this transformer would be:
60
60
  *
61
61
  * ```typescript
62
- * import { Follow, Person } from "@fedify/fedify/vocab";
62
+ * import { Follow, Person } from "@fedify/vocab";
63
63
  * const output = new Follow({
64
64
  * id: new URL("http://example.com/activities/1"),
65
65
  * actor: new URL("http://example.com/actors/1"),
@@ -110,15 +110,14 @@ function parseNodeInfo(data, options = {}) {
110
110
  if (typeof data.metadata === "object" && data.metadata != null) metadata = Object.fromEntries(Object.entries(data.metadata));
111
111
  else if (!options.tryBestEffort) return null;
112
112
  }
113
- const result = {
113
+ return {
114
114
  software,
115
115
  protocols,
116
- usage
116
+ usage,
117
+ ...services != null && { services },
118
+ ...openRegistrations != null && { openRegistrations },
119
+ ...metadata != null && { metadata }
117
120
  };
118
- if (services != null) result.services = services;
119
- if (openRegistrations != null) result.openRegistrations = openRegistrations;
120
- if (metadata != null) result.metadata = metadata;
121
- return result;
122
121
  }
123
122
  function parseSoftware(data, options = {}) {
124
123
  if (typeof data !== "object" || data == null) {
@@ -154,13 +153,12 @@ function parseSoftware(data, options = {}) {
154
153
  }
155
154
  else if (!options.tryBestEffort) return null;
156
155
  }
157
- const result = {
156
+ return {
158
157
  name,
159
- version
158
+ version,
159
+ ...repository != null && { repository },
160
+ ...homepage != null && { homepage }
160
161
  };
161
- if (repository != null) result.repository = repository;
162
- if (homepage != null) result.homepage = homepage;
163
- return result;
164
162
  }
165
163
  function parseProtocol(data) {
166
164
  if (data === "activitypub" || data === "buddycloud" || data === "dfrn" || data === "diaspora" || data === "libertree" || data === "ostatus" || data === "pumpio" || data === "tent" || data === "xmpp" || data === "zot") return data;
@@ -183,10 +181,10 @@ function parseServices(data, options = {}) {
183
181
  outbound = os.filter((o) => o != null);
184
182
  if (os.length > outbound.length && !options.tryBestEffort) return null;
185
183
  }
186
- const result = {};
187
- if (inbound != null) result.inbound = inbound;
188
- if (outbound != null) result.outbound = outbound;
189
- return result;
184
+ return {
185
+ ...inbound != null && { inbound },
186
+ ...outbound != null && { outbound }
187
+ };
190
188
  }
191
189
  function parseInboundService(data) {
192
190
  if (data === "atom1.0" || data === "gnusocial" || data === "imap" || data === "pnut" || data === "pop3" || data === "pumpio" || data === "rss2.0" || data === "twitter") return data;
@@ -198,33 +196,40 @@ function parseOutboundService(data) {
198
196
  }
199
197
  function parseUsage(data, options = {}) {
200
198
  if (typeof data !== "object" || data == null) return null;
201
- const users = {};
199
+ let total;
200
+ let activeHalfyear;
201
+ let activeMonth;
202
202
  if ("users" in data && typeof data.users === "object" && data.users != null) {
203
- if ("total" in data.users) if (typeof data.users.total === "number") users.total = data.users.total;
203
+ if ("total" in data.users) if (typeof data.users.total === "number") total = data.users.total;
204
204
  else {
205
205
  if (!options.tryBestEffort) return null;
206
206
  if (typeof data.users.total === "string") {
207
207
  const n = parseInt(data.users.total);
208
- if (!isNaN(n)) users.total = n;
208
+ if (!isNaN(n)) total = n;
209
209
  }
210
210
  }
211
- if ("activeHalfyear" in data.users) if (typeof data.users.activeHalfyear === "number") users.activeHalfyear = data.users.activeHalfyear;
211
+ if ("activeHalfyear" in data.users) if (typeof data.users.activeHalfyear === "number") activeHalfyear = data.users.activeHalfyear;
212
212
  else {
213
213
  if (!options.tryBestEffort) return null;
214
214
  if (typeof data.users.activeHalfyear === "string") {
215
215
  const n = parseInt(data.users.activeHalfyear);
216
- if (!isNaN(n)) users.activeHalfyear = n;
216
+ if (!isNaN(n)) activeHalfyear = n;
217
217
  }
218
218
  }
219
- if ("activeMonth" in data.users) if (typeof data.users.activeMonth === "number") users.activeMonth = data.users.activeMonth;
219
+ if ("activeMonth" in data.users) if (typeof data.users.activeMonth === "number") activeMonth = data.users.activeMonth;
220
220
  else {
221
221
  if (!options.tryBestEffort) return null;
222
222
  if (typeof data.users.activeMonth === "string") {
223
223
  const n = parseInt(data.users.activeMonth);
224
- if (!isNaN(n)) users.activeMonth = n;
224
+ if (!isNaN(n)) activeMonth = n;
225
225
  }
226
226
  }
227
227
  } else if (!options.tryBestEffort) return null;
228
+ const users = {
229
+ ...total != null && { total },
230
+ ...activeHalfyear != null && { activeHalfyear },
231
+ ...activeMonth != null && { activeMonth }
232
+ };
228
233
  let localPosts = 0;
229
234
  if ("localPosts" in data) if (typeof data.localPosts === "number") localPosts = data.localPosts;
230
235
  else {
@@ -275,13 +280,13 @@ function nodeInfoToJson(nodeInfo) {
275
280
  repository: nodeInfo.software.repository?.href,
276
281
  homepage: nodeInfo.software.homepage?.href
277
282
  },
278
- protocols: nodeInfo.protocols,
283
+ protocols: [...nodeInfo.protocols],
279
284
  services: nodeInfo.services == null ? {
280
285
  inbound: [],
281
286
  outbound: []
282
287
  } : {
283
- inbound: nodeInfo.services.inbound ?? [],
284
- outbound: nodeInfo.services.outbound ?? []
288
+ inbound: nodeInfo.services.inbound ? [...nodeInfo.services.inbound] : [],
289
+ outbound: nodeInfo.services.outbound ? [...nodeInfo.services.outbound] : []
285
290
  },
286
291
  openRegistrations: nodeInfo.openRegistrations ?? false,
287
292
  usage: {
@@ -111,15 +111,14 @@ function parseNodeInfo(data, options = {}) {
111
111
  if (typeof data.metadata === "object" && data.metadata != null) metadata = Object.fromEntries(Object.entries(data.metadata));
112
112
  else if (!options.tryBestEffort) return null;
113
113
  }
114
- const result = {
114
+ return {
115
115
  software,
116
116
  protocols,
117
- usage
117
+ usage,
118
+ ...services != null && { services },
119
+ ...openRegistrations != null && { openRegistrations },
120
+ ...metadata != null && { metadata }
118
121
  };
119
- if (services != null) result.services = services;
120
- if (openRegistrations != null) result.openRegistrations = openRegistrations;
121
- if (metadata != null) result.metadata = metadata;
122
- return result;
123
122
  }
124
123
  function parseSoftware(data, options = {}) {
125
124
  if (typeof data !== "object" || data == null) {
@@ -155,13 +154,12 @@ function parseSoftware(data, options = {}) {
155
154
  }
156
155
  else if (!options.tryBestEffort) return null;
157
156
  }
158
- const result = {
157
+ return {
159
158
  name,
160
- version
159
+ version,
160
+ ...repository != null && { repository },
161
+ ...homepage != null && { homepage }
161
162
  };
162
- if (repository != null) result.repository = repository;
163
- if (homepage != null) result.homepage = homepage;
164
- return result;
165
163
  }
166
164
  function parseProtocol(data) {
167
165
  if (data === "activitypub" || data === "buddycloud" || data === "dfrn" || data === "diaspora" || data === "libertree" || data === "ostatus" || data === "pumpio" || data === "tent" || data === "xmpp" || data === "zot") return data;
@@ -184,10 +182,10 @@ function parseServices(data, options = {}) {
184
182
  outbound = os.filter((o) => o != null);
185
183
  if (os.length > outbound.length && !options.tryBestEffort) return null;
186
184
  }
187
- const result = {};
188
- if (inbound != null) result.inbound = inbound;
189
- if (outbound != null) result.outbound = outbound;
190
- return result;
185
+ return {
186
+ ...inbound != null && { inbound },
187
+ ...outbound != null && { outbound }
188
+ };
191
189
  }
192
190
  function parseInboundService(data) {
193
191
  if (data === "atom1.0" || data === "gnusocial" || data === "imap" || data === "pnut" || data === "pop3" || data === "pumpio" || data === "rss2.0" || data === "twitter") return data;
@@ -199,33 +197,40 @@ function parseOutboundService(data) {
199
197
  }
200
198
  function parseUsage(data, options = {}) {
201
199
  if (typeof data !== "object" || data == null) return null;
202
- const users = {};
200
+ let total;
201
+ let activeHalfyear;
202
+ let activeMonth;
203
203
  if ("users" in data && typeof data.users === "object" && data.users != null) {
204
- if ("total" in data.users) if (typeof data.users.total === "number") users.total = data.users.total;
204
+ if ("total" in data.users) if (typeof data.users.total === "number") total = data.users.total;
205
205
  else {
206
206
  if (!options.tryBestEffort) return null;
207
207
  if (typeof data.users.total === "string") {
208
208
  const n = parseInt(data.users.total);
209
- if (!isNaN(n)) users.total = n;
209
+ if (!isNaN(n)) total = n;
210
210
  }
211
211
  }
212
- if ("activeHalfyear" in data.users) if (typeof data.users.activeHalfyear === "number") users.activeHalfyear = data.users.activeHalfyear;
212
+ if ("activeHalfyear" in data.users) if (typeof data.users.activeHalfyear === "number") activeHalfyear = data.users.activeHalfyear;
213
213
  else {
214
214
  if (!options.tryBestEffort) return null;
215
215
  if (typeof data.users.activeHalfyear === "string") {
216
216
  const n = parseInt(data.users.activeHalfyear);
217
- if (!isNaN(n)) users.activeHalfyear = n;
217
+ if (!isNaN(n)) activeHalfyear = n;
218
218
  }
219
219
  }
220
- if ("activeMonth" in data.users) if (typeof data.users.activeMonth === "number") users.activeMonth = data.users.activeMonth;
220
+ if ("activeMonth" in data.users) if (typeof data.users.activeMonth === "number") activeMonth = data.users.activeMonth;
221
221
  else {
222
222
  if (!options.tryBestEffort) return null;
223
223
  if (typeof data.users.activeMonth === "string") {
224
224
  const n = parseInt(data.users.activeMonth);
225
- if (!isNaN(n)) users.activeMonth = n;
225
+ if (!isNaN(n)) activeMonth = n;
226
226
  }
227
227
  }
228
228
  } else if (!options.tryBestEffort) return null;
229
+ const users = {
230
+ ...total != null && { total },
231
+ ...activeHalfyear != null && { activeHalfyear },
232
+ ...activeMonth != null && { activeMonth }
233
+ };
229
234
  let localPosts = 0;
230
235
  if ("localPosts" in data) if (typeof data.localPosts === "number") localPosts = data.localPosts;
231
236
  else {
@@ -276,13 +281,13 @@ function nodeInfoToJson(nodeInfo) {
276
281
  repository: nodeInfo.software.repository?.href,
277
282
  homepage: nodeInfo.software.homepage?.href
278
283
  },
279
- protocols: nodeInfo.protocols,
284
+ protocols: [...nodeInfo.protocols],
280
285
  services: nodeInfo.services == null ? {
281
286
  inbound: [],
282
287
  outbound: []
283
288
  } : {
284
- inbound: nodeInfo.services.inbound ?? [],
285
- outbound: nodeInfo.services.outbound ?? []
289
+ inbound: nodeInfo.services.inbound ? [...nodeInfo.services.inbound] : [],
290
+ outbound: nodeInfo.services.outbound ? [...nodeInfo.services.outbound] : []
286
291
  },
287
292
  openRegistrations: nodeInfo.openRegistrations ?? false,
288
293
  usage: {
@@ -27,13 +27,13 @@ function nodeInfoToJson(nodeInfo) {
27
27
  repository: nodeInfo.software.repository?.href,
28
28
  homepage: nodeInfo.software.homepage?.href
29
29
  },
30
- protocols: nodeInfo.protocols,
30
+ protocols: [...nodeInfo.protocols],
31
31
  services: nodeInfo.services == null ? {
32
32
  inbound: [],
33
33
  outbound: []
34
34
  } : {
35
- inbound: nodeInfo.services.inbound ?? [],
36
- outbound: nodeInfo.services.outbound ?? []
35
+ inbound: nodeInfo.services.inbound ? [...nodeInfo.services.inbound] : [],
36
+ outbound: nodeInfo.services.outbound ? [...nodeInfo.services.outbound] : []
37
37
  },
38
38
  openRegistrations: nodeInfo.openRegistrations ?? false,
39
39
  usage: {
@@ -3,21 +3,20 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import "../lookup-Dj9-mgOn.js";
6
+ import { mockDocumentLoader, test } from "../dist-B5f6a8Tt.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
- import "../actor-BT-e5fn9.js";
11
- import "../key-x7E5PYI0.js";
12
- import { verifyRequest } from "../http-DH47B-h3.js";
13
- import { getAuthenticatedDocumentLoader } from "../docloader-DndkGj0O.js";
14
- import { mockDocumentLoader, test } from "../testing-BslrM_9E.js";
10
+ import "../deno-DGx1JZHr.js";
11
+ import "../key-BCtt1Ugy.js";
12
+ import { verifyRequest } from "../http-LGtYlSfN.js";
13
+ import { getAuthenticatedDocumentLoader } from "../docloader-D8UHsyqD.js";
15
14
  import "../std__assert-DWivtrGR.js";
16
15
  import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
17
16
  import "../assert_throws-BNXdRGWP.js";
18
17
  import "../assert_not_equals-C80BG-_5.js";
19
- import { rsaPrivateKey2 } from "../keys-DLk_8H-l.js";
20
- import { esm_default } from "../esm-VlKMJQqV.js";
18
+ import { rsaPrivateKey2 } from "../keys-ZbcByPg9.js";
19
+ import { esm_default } from "../esm-DGl7uK1r.js";
21
20
  import { UrlError } from "@fedify/vocab-runtime";
22
21
 
23
22
  //#region src/utils/docloader.test.ts
@@ -3,9 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import "../lookup-Dj9-mgOn.js";
7
- import { MockKvStore, kvCache } from "../kv-cache-DN9pfMBe.js";
8
- import { mockDocumentLoader, test } from "../testing-BslrM_9E.js";
6
+ import { mockDocumentLoader, test } from "../dist-B5f6a8Tt.js";
7
+ import { MockKvStore, kvCache } from "../kv-cache-B__dHl7g.js";
9
8
  import { preloadedContexts } from "@fedify/vocab-runtime";
10
9
  import { deepStrictEqual, throws } from "node:assert";
11
10
 
@@ -125,6 +124,9 @@ test("kvCache()", async (t) => {
125
124
  delete(_key) {
126
125
  throw new Error("Failed to delete key");
127
126
  }
127
+ async *list(_prefix) {
128
+ throw new Error("Failed to list keys");
129
+ }
128
130
  }
129
131
  const loader = kvCache({
130
132
  kv: new KvStoreThrowsException(),
@@ -2,11 +2,9 @@
2
2
  const { Temporal } = require("@js-temporal/polyfill");
3
3
  const { URLPattern } = require("urlpattern-polyfill");
4
4
 
5
- require('../lookup-BTqtVATt.cjs');
6
- require('../actor-CBfPjuWj.cjs');
7
- require('../http-Dxpqz4hE.cjs');
8
- const require_kv_cache = require('../kv-cache-BMpfJFTx.cjs');
9
- require('../utils-DyRU1gdZ.cjs');
5
+ require('../http-DKBUv5zZ.cjs');
6
+ const require_kv_cache = require('../kv-cache-DCJojeTn.cjs');
7
+ require('../utils-Db0ZmjcD.cjs');
10
8
 
11
9
  exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
12
10
  exports.kvCache = require_kv_cache.kvCache;
@@ -1,5 +1,4 @@
1
- import "../vocab-CeDBzu-f.cjs";
2
- import "../http-M8k5mKc0.cjs";
3
- import "../kv-Bxr0Q87_.cjs";
4
- import { getAuthenticatedDocumentLoader, kvCache } from "../mod-DMpuiKXi.cjs";
1
+ import "../http-ClB3pLcL.cjs";
2
+ import "../kv-B4vFhIYL.cjs";
3
+ import { getAuthenticatedDocumentLoader, kvCache } from "../mod-BHXq4Q3x.cjs";
5
4
  export { getAuthenticatedDocumentLoader, kvCache };
@@ -1,7 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import "../vocab-BCWe1Ih5.js";
4
- import "../http-BbO0ejuk.js";
5
- import "../kv-BKNZ-Tb-.js";
6
- import { getAuthenticatedDocumentLoader, kvCache } from "../mod-aAE2wOWV.js";
3
+ import "../http-DLBDPal9.js";
4
+ import "../kv-CYySNrsn.js";
5
+ import { getAuthenticatedDocumentLoader, kvCache } from "../mod-DZmuPaKv.js";
7
6
  export { getAuthenticatedDocumentLoader, kvCache };
package/dist/utils/mod.js CHANGED
@@ -2,10 +2,8 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../lookup-DOSnR912.js";
6
- import "../actor-B_gRMloq.js";
7
- import "../http-YhR_TMMQ.js";
8
- import { getAuthenticatedDocumentLoader, kvCache } from "../kv-cache-HFnFIjSD.js";
9
- import "../utils-D-Va7aXC.js";
5
+ import "../http-CL3G0rnf.js";
6
+ import { getAuthenticatedDocumentLoader, kvCache } from "../kv-cache-0786BfqY.js";
7
+ import "../utils-Wranxuoe.js";
10
8
 
11
9
  export { getAuthenticatedDocumentLoader, kvCache };
@@ -2,85 +2,12 @@
2
2
  const { Temporal } = require("@js-temporal/polyfill");
3
3
  const { URLPattern } = require("urlpattern-polyfill");
4
4
 
5
- require('../lookup-BTqtVATt.cjs');
6
- const require_actor = require('../actor-CBfPjuWj.cjs');
7
- const require_vocab = require('../vocab-X_X5T8D3.cjs');
8
5
 
9
- exports.Accept = require_actor.Accept;
10
- exports.Activity = require_actor.Activity;
11
- exports.Add = require_actor.Add;
12
- exports.Announce = require_actor.Announce;
13
- exports.Application = require_actor.Application;
14
- exports.Arrive = require_actor.Arrive;
15
- exports.Article = require_actor.Article;
16
- exports.Audio = require_actor.Audio;
17
- exports.Block = require_actor.Block;
18
- exports.ChatMessage = require_actor.ChatMessage;
19
- exports.Collection = require_actor.Collection;
20
- exports.CollectionPage = require_actor.CollectionPage;
21
- exports.Create = require_actor.Create;
22
- exports.CryptographicKey = require_actor.CryptographicKey;
23
- exports.DataIntegrityProof = require_actor.DataIntegrityProof;
24
- exports.Delete = require_actor.Delete;
25
- exports.DidService = require_actor.DidService;
26
- exports.Dislike = require_actor.Dislike;
27
- exports.Document = require_actor.Document;
28
- exports.Emoji = require_actor.Emoji;
29
- exports.EmojiReact = require_actor.EmojiReact;
30
- exports.Endpoints = require_actor.Endpoints;
31
- exports.Event = require_actor.Event;
32
- exports.Export = require_actor.Export;
33
- exports.Flag = require_actor.Flag;
34
- exports.Follow = require_actor.Follow;
35
- exports.Group = require_actor.Group;
36
- exports.Hashtag = require_actor.Hashtag;
37
- exports.Ignore = require_actor.Ignore;
38
- exports.Image = require_actor.Image;
39
- exports.IntransitiveActivity = require_actor.IntransitiveActivity;
40
- exports.Invite = require_actor.Invite;
41
- exports.Join = require_actor.Join;
42
- exports.Leave = require_actor.Leave;
43
- exports.Like = require_actor.Like;
44
- exports.Link = require_actor.Link;
45
- exports.Listen = require_actor.Listen;
46
- exports.Mention = require_actor.Mention;
47
- exports.Move = require_actor.Move;
48
- exports.Multikey = require_actor.Multikey;
49
- exports.Note = require_actor.Note;
50
- exports.Object = require_actor.Object$1;
51
- exports.Offer = require_actor.Offer;
52
- exports.OrderedCollection = require_actor.OrderedCollection;
53
- exports.OrderedCollectionPage = require_actor.OrderedCollectionPage;
54
- exports.Organization = require_actor.Organization;
55
- exports.PUBLIC_COLLECTION = require_vocab.PUBLIC_COLLECTION;
56
- exports.Page = require_actor.Page;
57
- exports.Person = require_actor.Person;
58
- exports.Place = require_actor.Place;
59
- exports.Profile = require_actor.Profile;
60
- exports.PropertyValue = require_actor.PropertyValue;
61
- exports.Question = require_actor.Question;
62
- exports.Read = require_actor.Read;
63
- exports.Reject = require_actor.Reject;
64
- exports.Relationship = require_actor.Relationship;
65
- exports.Remove = require_actor.Remove;
66
- exports.Service = require_actor.Service;
67
- exports.Source = require_actor.Source;
68
- exports.TentativeAccept = require_actor.TentativeAccept;
69
- exports.TentativeReject = require_actor.TentativeReject;
70
- exports.Tombstone = require_actor.Tombstone;
71
- exports.Travel = require_actor.Travel;
72
- exports.Undo = require_actor.Undo;
73
- exports.Update = require_actor.Update;
74
- exports.Video = require_actor.Video;
75
- exports.View = require_actor.View;
76
- exports.getActorClassByTypeName = require_actor.getActorClassByTypeName;
77
- exports.getActorHandle = require_actor.getActorHandle;
78
- exports.getActorTypeName = require_actor.getActorTypeName;
79
- exports.getTypeId = require_actor.getTypeId;
80
- exports.isActor = require_actor.isActor;
81
- exports.isFediverseHandle = require_vocab.isFediverseHandle;
82
- exports.lookupObject = require_vocab.lookupObject;
83
- exports.normalizeActorHandle = require_actor.normalizeActorHandle;
84
- exports.parseFediverseHandle = require_vocab.parseFediverseHandle;
85
- exports.toAcctUrl = require_vocab.toAcctUrl;
86
- exports.traverseCollection = require_vocab.traverseCollection;
6
+
7
+ var __fedify_vocab = require("@fedify/vocab");
8
+ Object.keys(__fedify_vocab).forEach(function (k) {
9
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
10
+ enumerable: true,
11
+ get: function () { return __fedify_vocab[k]; }
12
+ });
13
+ });
@@ -1,4 +1 @@
1
- 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-CeDBzu-f.cjs";
2
- import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-f2NtjyCg.cjs";
3
- import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../mod-BxRCHTz-.cjs";
4
- 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 };
1
+ export * from "@fedify/vocab";
@@ -1,6 +1,3 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- 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-BCWe1Ih5.js";
4
- import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-DqFajh9s.js";
5
- import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../mod-BlVovdcy.js";
6
- 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 };
3
+ export * from "@fedify/vocab";
package/dist/vocab/mod.js CHANGED
@@ -2,8 +2,4 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../lookup-DOSnR912.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-B_gRMloq.js";
7
- import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-ByUp-A2_.js";
8
-
9
- 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 };
5
+ export * from "@fedify/vocab"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "2.0.0-pr.490.2+99a396d5",
3
+ "version": "2.0.0-pr.559.4+6357309b",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -78,6 +78,16 @@
78
78
  "require": "./dist/nodeinfo/mod.cjs",
79
79
  "default": "./dist/nodeinfo/mod.js"
80
80
  },
81
+ "./otel": {
82
+ "types": {
83
+ "import": "./dist/otel/mod.d.ts",
84
+ "require": "./dist/otel/mod.d.cts",
85
+ "default": "./dist/otel/mod.d.ts"
86
+ },
87
+ "import": "./dist/otel/mod.js",
88
+ "require": "./dist/otel/mod.cjs",
89
+ "default": "./dist/otel/mod.js"
90
+ },
81
91
  "./sig": {
82
92
  "types": {
83
93
  "import": "./dist/sig/mod.d.ts",
@@ -107,59 +117,49 @@
107
117
  "import": "./dist/vocab/mod.js",
108
118
  "require": "./dist/vocab/mod.cjs",
109
119
  "default": "./dist/vocab/mod.js"
110
- },
111
- "./webfinger": {
112
- "types": {
113
- "import": "./dist/webfinger/mod.d.ts",
114
- "require": "./dist/webfinger/mod.d.cts",
115
- "default": "./dist/webfinger/mod.d.ts"
116
- },
117
- "import": "./dist/webfinger/mod.js",
118
- "require": "./dist/webfinger/mod.cjs",
119
- "default": "./dist/webfinger/mod.js"
120
120
  }
121
121
  },
122
122
  "dependencies": {
123
123
  "@js-temporal/polyfill": "^0.5.1",
124
- "@logtape/logtape": "^1.2.2",
125
- "@multiformats/base-x": "^4.0.1",
124
+ "@logtape/logtape": "^2.0.0",
126
125
  "@opentelemetry/api": "^1.9.0",
127
- "@opentelemetry/core": "^1.30.1",
128
- "@opentelemetry/sdk-trace-base": "^1.30.1",
126
+ "@opentelemetry/core": "^2.0.0",
127
+ "@opentelemetry/sdk-trace-base": "^2.0.0",
129
128
  "@opentelemetry/semantic-conventions": "^1.27.0",
130
- "asn1js": "^3.0.5",
131
129
  "byte-encodings": "^1.0.11",
132
- "es-toolkit": "^1.39.5",
130
+ "es-toolkit": "1.43.0",
133
131
  "json-canon": "^1.0.1",
134
132
  "jsonld": "^9.0.0",
135
133
  "multicodec": "^3.2.1",
136
- "pkijs": "^3.2.4",
137
134
  "structured-field-values": "^2.0.4",
138
135
  "uri-template-router": "^1.0.0",
139
136
  "url-template": "^3.1.1",
140
137
  "urlpattern-polyfill": "^10.1.0",
141
- "@fedify/vocab-runtime": "2.0.0-pr.490.2+99a396d5"
138
+ "@fedify/vocab": "2.0.0-pr.559.4+6357309b",
139
+ "@fedify/vocab-runtime": "2.0.0-pr.559.4+6357309b",
140
+ "@fedify/webfinger": "2.0.0-pr.559.4+6357309b"
142
141
  },
143
142
  "devDependencies": {
144
143
  "@std/assert": "npm:@jsr/std__assert@^0.226.0",
145
144
  "@std/path": "npm:@jsr/std__path@^1.0.6",
146
- "@std/url": "npm:@jsr/std__url@1.0.0-rc.3",
147
- "@std/yaml": "npm:@jsr/std__yaml@^1.0.6",
148
145
  "@types/node": "^24.2.1",
149
- "fast-check": "^3.22.0",
150
146
  "fetch-mock": "^12.5.4",
151
147
  "miniflare": "^4.20250523.0",
152
148
  "tsdown": "^0.12.9",
153
149
  "tsx": "^4.19.4",
154
150
  "typescript": "^5.9.3",
155
151
  "wrangler": "^4.17.0",
156
- "@fedify/vocab-tools": "^2.0.0-pr.490.2+99a396d5"
152
+ "@fedify/fixture": "2.0.0",
153
+ "@fedify/vocab-tools": "^2.0.0-pr.559.4+6357309b"
157
154
  },
158
155
  "scripts": {
159
- "build": "deno task codegen && pnpm run --filter vocab-runtime build && pnpm run --filter vocab-tools build && tsdown",
160
- "prepublish": "pnpm run build",
161
- "test": "deno task codegen && tsdown && cd dist/ && node --test",
162
- "test:bun": "deno task codegen && deno task pnpm:build-vocab && tsdown && cd dist/ && bun test --timeout 60000",
156
+ "build:self": "tsdown",
157
+ "build": "pnpm --filter @fedify/fedify... run build:self",
158
+ "prepublish": "pnpm build",
159
+ "pretest": "pnpm build",
160
+ "test": "cd dist/ && node --test",
161
+ "pretest:bun": "pnpm build",
162
+ "test:bun": "cd dist/ && bun test --timeout 60000",
163
163
  "test:cfworkers": "deno task codegen && wrangler deploy --dry-run --outdir src/cfworkers && node --import=tsx src/cfworkers/client.ts"
164
164
  }
165
165
  }