@fedify/fedify 1.7.12 → 1.7.14

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 (182) hide show
  1. package/dist/{actor-CPpvuBKU.d.ts → actor-Dx5YX74F.d.ts} +3 -3
  2. package/dist/{actor-GZRoTRqg.js → actor-OYVgkiZG.js} +329 -465
  3. package/dist/{actor-TYqJGdVq.js → actor-y7shp0CR.js} +6 -6
  4. package/dist/{assert-LOEeCUK5.js → assert-C-mZuSQl.js} +2 -2
  5. package/dist/{assert_equals-B44MxcIj.js → assert_equals-Dy0MG_Zw.js} +16 -16
  6. package/dist/{assert_instance_of-XtuFevV_.js → assert_instance_of-lS0Jr2iu.js} +2 -2
  7. package/dist/{assert_is_error-BTlryvT0.js → assert_is_error-CIYFACrT.js} +2 -2
  8. package/dist/{assert_not_equals-C685gKx6.js → assert_not_equals-C1azCAB0.js} +3 -6
  9. package/dist/{assert_rejects-DWQ4jaf9.js → assert_rejects-Bkh5lA1a.js} +3 -3
  10. package/dist/{assert_throws-YetpVSc-.js → assert_throws-CmpfkWEM.js} +3 -3
  11. package/dist/{authdocloader-hiFSyM7V.js → authdocloader-C0JcfxUs.js} +7 -9
  12. package/dist/{authdocloader-BopfyipD.js → authdocloader-C2krvRo1.js} +6 -8
  13. package/dist/{builder-mi6RdzNE.js → builder-DaECqbbT.js} +7 -7
  14. package/dist/{chunk-Cx8LTkjm.js → chunk-DvTpRkcT.js} +22 -15
  15. package/dist/{client-DuUKk4pk.js → client-dfu57WLy.js} +3 -3
  16. package/dist/{client-DvtwXO7t.d.ts → client-wKLuY12i.d.ts} +2 -2
  17. package/dist/{collection-Dfb0TPno.js → collection-XNLQhehO.js} +2 -3
  18. package/dist/{mod-DFncUgcE.d.ts → compat/mod-Bwqav33K.d.ts} +3 -3
  19. package/dist/compat/mod.js +1 -2
  20. package/dist/compat/transformers.test.js +34 -38
  21. package/dist/{context-OBWjptjU.d.ts → context-CW_8R4BH.d.ts} +11 -11
  22. package/dist/{context-RMU32mk4.js → context-nxDPfAiA.js} +5 -5
  23. package/dist/{docloader-09nVWLAZ.js → docloader-BDSHZfTJ.js} +1 -1
  24. package/dist/{docloader-DJxET2fN.js → docloader-BU25UQLB.js} +31 -151
  25. package/dist/{docloader-Q42SMRIB.d.ts → docloader-D_MGP37Q.d.ts} +2 -2
  26. package/dist/{docloader-bgBm1Hd1.js → docloader-sGz4vcrK.js} +32 -152
  27. package/dist/{esm-DO9PrujO.js → esm-BRXvTSrx.js} +36 -22
  28. package/dist/federation/builder.test.js +20 -26
  29. package/dist/federation/collection.test.js +11 -16
  30. package/dist/federation/handler.test.js +41 -48
  31. package/dist/federation/inbox.test.js +11 -11
  32. package/dist/federation/keycache.test.js +12 -11
  33. package/dist/federation/kv.test.js +8 -10
  34. package/dist/federation/middleware.test.js +105 -134
  35. package/dist/federation/mod-DvlLc8Ru.d.ts +6 -0
  36. package/dist/federation/mod.js +206 -12
  37. package/dist/federation/mq.test.js +12 -17
  38. package/dist/federation/retry.test.js +5 -4
  39. package/dist/federation/router.test.js +9 -10
  40. package/dist/federation/send.test.js +23 -24
  41. package/dist/{http-D2DkwsjA.js → http-BhES0Sg9.js} +23 -30
  42. package/dist/{http-DMTrO3Ye.d.ts → http-DFZRNfDP.d.ts} +3 -3
  43. package/dist/{http-vqMAvOVs.js → http-DRePVWfE.js} +23 -30
  44. package/dist/{inbox-DAAZZl2k.js → inbox-Z_QlSGYN.js} +5 -5
  45. package/dist/key-CJuc1GE1.js +10 -0
  46. package/dist/{key-DmqJj57e.js → key-D2HZrCxh.js} +4 -4
  47. package/dist/{key-KVhaUM92.js → key-bMrDyA2T.js} +5 -5
  48. package/dist/key-eP5Yk7hl.js +16 -0
  49. package/dist/{keycache-C1pEuRyQ.js → keycache-B5Rr8Lbc.js} +2 -2
  50. package/dist/{keys-C4XQHW5_.js → keys-DK4k1R8e.js} +2 -2
  51. package/dist/{kv-DRaeSXco.d.ts → kv-CKqSUxHd.d.ts} +1 -1
  52. package/dist/{kv-BMY6Qf_A.js → kv-QeuZ51go.js} +1 -1
  53. package/dist/{langstr-DbWheeIS.js → langstr-pFHBDU4y.js} +1 -1
  54. package/dist/{ld-DzlJ_IpT.js → ld--auFISy7.js} +9 -12
  55. package/dist/{lookup-CSngxuWm.js → lookup-4uc2jh52.js} +3 -3
  56. package/dist/{lookup-DL62q3Xh.js → lookup-Bq8vhIG4.js} +4 -4
  57. package/dist/{lookup-Bf-K85bV.d.ts → lookup-CqI9jhXo.d.ts} +2 -2
  58. package/dist/{lookup-D0je8AqR.js → lookup-cHV4n1IB.js} +6 -6
  59. package/dist/middleware-72Tuh6Iw.js +17 -0
  60. package/dist/{middleware-3wVT6S9E.js → middleware-B7p-onxQ.js} +35 -39
  61. package/dist/middleware-DB3BUysJ.js +32 -0
  62. package/dist/{middleware-DlDXugwZ.js → middleware-QJjRfjjc.js} +38 -43
  63. package/dist/{mod-CCL2cvnI.d.ts → mod-BEZy4WHZ.d.ts} +4 -4
  64. package/dist/mod-DMn4Bxyg.d.ts +20 -0
  65. package/dist/{mod-CDzlVCUF.d.ts → mod-DjGYGrBd.d.ts} +3 -3
  66. package/dist/mod.js +17 -17
  67. package/dist/{mq-DYKDDJmp.d.ts → mq-Cgfbl44M.d.ts} +1 -1
  68. package/dist/{multibase-CnLHszip.js → multibase-DBcKTV2a.js} +1 -1
  69. package/dist/nodeinfo/client.test.js +19 -28
  70. package/dist/nodeinfo/handler.test.js +37 -44
  71. package/dist/nodeinfo/mod--upgPcaX.d.ts +4 -0
  72. package/dist/nodeinfo/mod.js +2 -3
  73. package/dist/nodeinfo/semver.test.js +13 -21
  74. package/dist/nodeinfo/types.test.js +9 -11
  75. package/dist/{owner-D0cOz8R5.d.ts → owner-CewLNqWO.d.ts} +4 -4
  76. package/dist/{owner-81ey_76X.js → owner-DkTRLQAV.js} +4 -4
  77. package/dist/{proof-DlI7QNdn.js → proof-D4HXHDPz.js} +14 -19
  78. package/dist/{proof-BlULDH4H.js → proof-DT_xxRPF.js} +11 -13
  79. package/dist/{retry-BiIhZWgD.js → retry-BQet39_l.js} +1 -1
  80. package/dist/{router-D_aVZZUc.js → router-BuDkN4RQ.js} +1 -1
  81. package/dist/runtime/authdocloader.test.js +22 -26
  82. package/dist/runtime/docloader.test.js +56 -56
  83. package/dist/runtime/key.test.js +31 -53
  84. package/dist/runtime/langstr.test.js +8 -10
  85. package/dist/{mod-qFMzZ3iF.d.ts → runtime/mod-BaH1vtHp.d.ts} +4 -3
  86. package/dist/runtime/mod.js +6 -7
  87. package/dist/runtime/multibase/multibase.test.js +12 -18
  88. package/dist/runtime/url.test.js +7 -6
  89. package/dist/{semver-BNrOOAs9.js → semver-D9d-VO-_.js} +7 -17
  90. package/dist/{send-DdxfTHo6.js → send-axIyQX2p.js} +4 -4
  91. package/dist/sig/http.test.js +104 -168
  92. package/dist/sig/key.test.js +17 -20
  93. package/dist/sig/ld.test.js +28 -35
  94. package/dist/sig/mod-BmJQTnPT.d.ts +6 -0
  95. package/dist/sig/mod.js +6 -7
  96. package/dist/sig/owner.test.js +24 -30
  97. package/dist/sig/proof.test.js +24 -29
  98. package/dist/{std__assert-o_r9vqm1.js → std__assert-BdP_WkD-.js} +7 -13
  99. package/dist/testing/docloader.test.js +9 -12
  100. package/dist/testing/mod.js +2 -1
  101. package/dist/{testing-DLyvtiiW.js → testing-qaAD4B0t.js} +2 -2
  102. package/dist/{transformers-ghwJuzGY.js → transformers-CFSWUhNi.js} +1 -1
  103. package/dist/{type-CFuiGLz9.js → type-DFsmi-p1.js} +1 -1
  104. package/dist/{types-CmVV9LT1.js → types-Bk4b1bGc.js} +8 -18
  105. package/dist/{types-CJHS5pXl.js → types-CB_2uuCA.js} +2 -2
  106. package/dist/{url-C2xuoQD1.js → url-BdNvnK9P.js} +1 -1
  107. package/dist/vocab/actor.test.js +76 -128
  108. package/dist/vocab/lookup.test.js +19 -23
  109. package/dist/vocab/mod-BkXGAYkx.d.ts +6 -0
  110. package/dist/vocab/mod.js +4 -4
  111. package/dist/vocab/type.test.js +10 -10
  112. package/dist/vocab/vocab.test.js +109 -105
  113. package/dist/{vocab-DFlq4Wa6.js → vocab-DCHRuBGF.js} +328 -464
  114. package/dist/{vocab-CzEfWQk2.d.ts → vocab-DoBcp8ow.d.ts} +2 -2
  115. package/dist/{vocab-BebR0kAy.js → vocab-sMuiKIWm.js} +5 -5
  116. package/dist/webfinger/handler.test.js +40 -48
  117. package/dist/webfinger/lookup.test.js +12 -15
  118. package/dist/webfinger/mod-B1UhCvlL.d.ts +4 -0
  119. package/dist/webfinger/mod.js +2 -3
  120. package/dist/x/{cfworkers.d.ts → cfworkers-BIcR64Sf.d.ts} +2 -2
  121. package/dist/x/cfworkers.test.js +7 -9
  122. package/dist/x/{hono.d.ts → hono-DmQmp8wi.d.ts} +2 -11
  123. package/dist/x/{sveltekit.d.ts → sveltekit-Cvh0XnN4.d.ts} +2 -11
  124. package/package.json +1 -1
  125. package/dist/compat/mod.d.ts +0 -15
  126. package/dist/compat-Bb5myD13.js +0 -4
  127. package/dist/federation/mod.d.ts +0 -15
  128. package/dist/federation-B0aljx0V.js +0 -203
  129. package/dist/key-5ssHQ67E.js +0 -16
  130. package/dist/key-DSJGnD10.js +0 -10
  131. package/dist/middleware-CxFoFBD8.js +0 -33
  132. package/dist/middleware-w7_U3fFi.js +0 -17
  133. package/dist/mod-1pDWKvUL.d.ts +0 -2
  134. package/dist/mod-GIh5OYxW.d.ts +0 -2
  135. package/dist/mod-g0xFzAP9.d.ts +0 -2
  136. package/dist/mod.d.ts +0 -20
  137. package/dist/nodeinfo/mod.d.ts +0 -7
  138. package/dist/nodeinfo-CyEbLjHs.js +0 -4
  139. package/dist/runtime/mod.d.ts +0 -8
  140. package/dist/runtime-BSkOVUWM.js +0 -4
  141. package/dist/sig/mod.d.ts +0 -10
  142. package/dist/sig-BXJO--F9.js +0 -4
  143. package/dist/vocab/mod.d.ts +0 -8
  144. package/dist/webfinger/mod.d.ts +0 -7
  145. package/dist/webfinger-C3GIyXIg.js +0 -4
  146. /package/dist/compat/{transformers.test.d.ts → transformers.test-DnJbd34u.d.ts} +0 -0
  147. /package/dist/{denokv-CvROlGYX.js → denokv-NcJeZ6rP.js} +0 -0
  148. /package/dist/federation/{builder.test.d.ts → builder.test-Bpt6NOZ6.d.ts} +0 -0
  149. /package/dist/federation/{collection.test.d.ts → collection.test-DKJ6JOZz.d.ts} +0 -0
  150. /package/dist/federation/{handler.test.d.ts → handler.test-BMT7uLC0.d.ts} +0 -0
  151. /package/dist/federation/{inbox.test.d.ts → inbox.test-Do6i02Qp.d.ts} +0 -0
  152. /package/dist/federation/{keycache.test.d.ts → keycache.test-BT83IPZY.d.ts} +0 -0
  153. /package/dist/federation/{kv.test.d.ts → kv.test-kFzzF2VN.d.ts} +0 -0
  154. /package/dist/federation/{middleware.test.d.ts → middleware.test-B1R4_e3-.d.ts} +0 -0
  155. /package/dist/federation/{mq.test.d.ts → mq.test-l79EQQOe.d.ts} +0 -0
  156. /package/dist/federation/{retry.test.d.ts → retry.test-BqS50VCX.d.ts} +0 -0
  157. /package/dist/federation/{router.test.d.ts → router.test-CYQl4po-.d.ts} +0 -0
  158. /package/dist/federation/{send.test.d.ts → send.test-COUnNUzv.d.ts} +0 -0
  159. /package/dist/nodeinfo/{client.test.d.ts → client.test-CZLe79hL.d.ts} +0 -0
  160. /package/dist/nodeinfo/{handler.test.d.ts → handler.test-B-EDZ_hK.d.ts} +0 -0
  161. /package/dist/nodeinfo/{semver.test.d.ts → semver.test-BEuuQSEM.d.ts} +0 -0
  162. /package/dist/nodeinfo/{types.test.d.ts → types.test-B5AT89WV.d.ts} +0 -0
  163. /package/dist/runtime/{authdocloader.test.d.ts → authdocloader.test-hCRKzn9v.d.ts} +0 -0
  164. /package/dist/runtime/{docloader.test.d.ts → docloader.test-CVd7i_5h.d.ts} +0 -0
  165. /package/dist/runtime/{key.test.d.ts → key.test-DBsILYSD.d.ts} +0 -0
  166. /package/dist/runtime/{langstr.test.d.ts → langstr.test-CiKxuuRY.d.ts} +0 -0
  167. /package/dist/runtime/multibase/{multibase.test.d.ts → multibase.test-Brh6gPBP.d.ts} +0 -0
  168. /package/dist/runtime/{url.test.d.ts → url.test-DlRqkU2j.d.ts} +0 -0
  169. /package/dist/sig/{http.test.d.ts → http.test-BpXNAWNI.d.ts} +0 -0
  170. /package/dist/sig/{key.test.d.ts → key.test-B2iLIugy.d.ts} +0 -0
  171. /package/dist/sig/{ld.test.d.ts → ld.test-D-cI70Gw.d.ts} +0 -0
  172. /package/dist/sig/{owner.test.d.ts → owner.test-B_YRjMPj.d.ts} +0 -0
  173. /package/dist/sig/{proof.test.d.ts → proof.test-BagEM_-4.d.ts} +0 -0
  174. /package/dist/testing/{docloader.test.d.ts → docloader.test-lrzf6sDZ.d.ts} +0 -0
  175. /package/dist/testing/{mod.d.ts → mod-3uM8ZvS7.d.ts} +0 -0
  176. /package/dist/vocab/{actor.test.d.ts → actor.test-ClC-iVWk.d.ts} +0 -0
  177. /package/dist/vocab/{lookup.test.d.ts → lookup.test-Cq1I-27w.d.ts} +0 -0
  178. /package/dist/vocab/{type.test.d.ts → type.test-bfFiYGcs.d.ts} +0 -0
  179. /package/dist/vocab/{vocab.test.d.ts → vocab.test-h-ZTisfu.d.ts} +0 -0
  180. /package/dist/webfinger/{handler.test.d.ts → handler.test-DiUeEDDD.d.ts} +0 -0
  181. /package/dist/webfinger/{lookup.test.d.ts → lookup.test-D9onm3U3.d.ts} +0 -0
  182. /package/dist/x/{cfworkers.test.d.ts → cfworkers.test-KXHlJ29z.d.ts} +0 -0
@@ -1,15 +1,15 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { KvKey, KvStore } from "./kv-DRaeSXco.js";
4
- import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "./docloader-Q42SMRIB.js";
5
- import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-DvtwXO7t.js";
6
- import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-CzEfWQk2.js";
7
- import { Actor, Recipient } from "./actor-CPpvuBKU.js";
8
- import { HttpMessageSignaturesSpec } from "./http-DMTrO3Ye.js";
9
- import { GetKeyOwnerOptions } from "./owner-D0cOz8R5.js";
10
- import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-CDzlVCUF.js";
11
- import { LookupWebFingerOptions, ResourceDescriptor } from "./lookup-Bf-K85bV.js";
12
- import { MessageQueue } from "./mq-DYKDDJmp.js";
3
+ import { n as KvStore, t as KvKey } from "./kv-CKqSUxHd.js";
4
+ import { n as DocumentLoader, r as DocumentLoaderFactory, s as GetUserAgentOptions, t as AuthenticatedDocumentLoaderFactory } from "./docloader-D_MGP37Q.js";
5
+ import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-wKLuY12i.js";
6
+ import { B as Multikey, H as Object$1, I as Link, O as Hashtag, d as Collection, m as CryptographicKey, n as Activity } from "./vocab-DoBcp8ow.js";
7
+ import { a as Recipient, t as Actor } from "./actor-Dx5YX74F.js";
8
+ import { t as HttpMessageSignaturesSpec } from "./http-DFZRNfDP.js";
9
+ import { n as GetKeyOwnerOptions } from "./owner-CewLNqWO.js";
10
+ import { i as TraverseCollectionOptions, r as LookupObjectOptions } from "./mod-DjGYGrBd.js";
11
+ import { i as ResourceDescriptor, t as LookupWebFingerOptions } from "./lookup-CqI9jhXo.js";
12
+ import { r as MessageQueue } from "./mq-Cgfbl44M.js";
13
13
  import { Span, TracerProvider } from "@opentelemetry/api";
14
14
 
15
15
  //#region compat/types.d.ts
@@ -2034,4 +2034,4 @@ interface ActorKeyPair extends CryptoKeyPair {
2034
2034
  multikey: Multikey;
2035
2035
  }
2036
2036
  //#endregion
2037
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
2037
+ export { SharedInboxKeyDispatcher as $, Message as A, ActorDispatcher as B, FederationOrigin as C, RetryContext as D, CreateExponentialBackoffPolicyOptions as E, RouterRouteResult as F, CollectionCursor as G, ActorKeyPairsDispatcher as H, RespondWithObjectOptions as I, InboxListener as J, CollectionDispatcher as K, respondWithObject as L, Router as M, RouterError as N, RetryPolicy as O, RouterOptions as P, OutboxErrorHandler as Q, respondWithObjectIfAcceptable as R, FederationKvPrefixes as S, createFederation as T, AuthorizePredicate as U, ActorHandleMapper as V, CollectionCounter as W, ObjectAuthorizePredicate as X, NodeInfoDispatcher as Y, ObjectDispatcher as Z, FederationOptions as _, InboxContext as a, ObjectCallbackSetters as b, RouteActivityOptions as c, ActorCallbackSetters as d, SenderKeyPair as et, CollectionCallbackSetters as f, FederationFetchOptions as g, FederationBuilder as h, GetSignedKeyOptions as i, ActivityTransformer as it, createFederationBuilder as j, createExponentialBackoffPolicy as k, SendActivityOptions as l, Federation as m, Context as n, buildCollectionSynchronizationHeader as nt, ParseUriResult as o, Federatable as p, InboxErrorHandler as q, ForwardActivityOptions as r, digest as rt, RequestContext as s, ActorKeyPair as t, PageItems as tt, SendActivityOptionsForCollection as u, FederationStartQueueOptions as v, FederationQueueOptions as w, CreateFederationOptions as x, InboxListenerSetters as y, ActorAliasMapper as z };
@@ -3,10 +3,10 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { RouterError } from "./router-D_aVZZUc.js";
7
- import { lookupWebFinger } from "./lookup-DL62q3Xh.js";
8
- import { lookupObject, traverseCollection } from "./lookup-D0je8AqR.js";
9
- import { mockDocumentLoader } from "./docloader-09nVWLAZ.js";
6
+ import { n as RouterError } from "./router-BuDkN4RQ.js";
7
+ import { t as lookupWebFinger } from "./lookup-Bq8vhIG4.js";
8
+ import { n as traverseCollection, t as lookupObject } from "./lookup-cHV4n1IB.js";
9
+ import { t as mockDocumentLoader } from "./docloader-BDSHZfTJ.js";
10
10
  import { trace } from "@opentelemetry/api";
11
11
 
12
12
  //#region testing/context.ts
@@ -105,4 +105,4 @@ function createInboxContext(args) {
105
105
  }
106
106
 
107
107
  //#endregion
108
- export { createInboxContext, createRequestContext };
108
+ export { createRequestContext as n, createInboxContext as t };
@@ -65,4 +65,4 @@ async function mockDocumentLoader(resource) {
65
65
  }
66
66
 
67
67
  //#endregion
68
- export { mockDocumentLoader };
68
+ export { mockDocumentLoader as t };
@@ -10,136 +10,7 @@ import { isIP } from "node:net";
10
10
 
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "1.7.12";
14
- var license = "MIT";
15
- var exports = {
16
- ".": "./mod.ts",
17
- "./compat": "./compat/mod.ts",
18
- "./federation": "./federation/mod.ts",
19
- "./nodeinfo": "./nodeinfo/mod.ts",
20
- "./runtime": "./runtime/mod.ts",
21
- "./sig": "./sig/mod.ts",
22
- "./vocab": "./vocab/mod.ts",
23
- "./webfinger": "./webfinger/mod.ts",
24
- "./x/cfworkers": "./x/cfworkers.ts",
25
- "./x/denokv": "./x/denokv.ts",
26
- "./x/fresh": "./x/fresh.ts",
27
- "./x/hono": "./x/hono.ts",
28
- "./x/sveltekit": "./x/sveltekit.ts"
29
- };
30
- var imports = {
31
- "@cfworker/json-schema": "npm:@cfworker/json-schema@^4.1.1",
32
- "@cloudflare/workers-types": "npm:@cloudflare/workers-types@^4.20250529.0",
33
- "@es-toolkit/es-toolkit": "jsr:@es-toolkit/es-toolkit@^1.38.0",
34
- "@hugoalh/http-header-link": "jsr:@hugoalh/http-header-link@^1.0.2",
35
- "@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",
36
- "@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
37
- "@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
38
- "@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0",
39
- "@std/assert": "jsr:@std/assert@^0.226.0",
40
- "@std/testing": "jsr:@std/testing@^0.224.0",
41
- "@std/url": "jsr:@std/url@^0.225.1",
42
- "@std/yaml": "jsr:@std/yaml@^0.224.3",
43
- "asn1js": "npm:asn1js@^3.0.5",
44
- "byte-encodings": "npm:byte-encodings@^1.0.11",
45
- "fast-check": "npm:fast-check@^3.22.0",
46
- "fetch-mock": "npm:fetch-mock@^12.5.2",
47
- "json-canon": "npm:json-canon@^1.0.1",
48
- "jsonld": "npm:jsonld@^8.3.2",
49
- "multicodec": "npm:multicodec@^3.2.1",
50
- "pkijs": "npm:pkijs@^3.2.4",
51
- "structured-field-values": "npm:structured-field-values@^2.0.4",
52
- "tsdown": "npm:tsdown@^0.12.2",
53
- "uri-template-router": "npm:uri-template-router@^0.0.17",
54
- "url-template": "npm:url-template@^3.1.1"
55
- };
56
- var include = ["vocab/vocab.ts"];
57
- var exclude = [
58
- ".test-report.xml",
59
- "apidoc/",
60
- "cfworkers/dist/",
61
- "cfworkers/fixtures/",
62
- "cfworkers/imports.ts",
63
- "cfworkers/README.md",
64
- "cfworkers/server.ts",
65
- "cfworkers/server.js",
66
- "cfworkers/server.js.map",
67
- "codegen/schema.yaml",
68
- "dist/",
69
- "node_modules/",
70
- "npm/",
71
- "pnpm-lock.yaml",
72
- "vocab/*.yaml",
73
- "!vocab/vocab.ts"
74
- ];
75
- var tasks = {
76
- "codegen": "deno run --allow-read --allow-write --check codegen/main.ts vocab/ ../runtime/ > vocab/vocab.ts && deno fmt vocab/vocab.ts && deno cache vocab/vocab.ts && deno check vocab/vocab.ts",
77
- "check-version": "deno run --allow-read=package.json scripts/check_version.ts && deno run ../cli/scripts/check_version.ts",
78
- "sync-version": "deno run --allow-read=package.json --allow-write=package.json scripts/sync_version.ts && deno run --allow-read=../cli/deno.json --allow-write=../cli/deno.json ../cli/scripts/sync_version.ts",
79
- "cache": {
80
- "command": "deno cache mod.ts",
81
- "dependencies": ["check-version", "codegen"]
82
- },
83
- "check": {
84
- "command": "deno fmt --check && deno lint && deno check */*.ts",
85
- "dependencies": ["codegen"]
86
- },
87
- "test": {
88
- "command": "deno test --check --doc --allow-read --allow-write --allow-env --unstable-kv --trace-leaks --parallel",
89
- "dependencies": ["codegen"]
90
- },
91
- "coverage": "deno task test --clean --coverage && deno coverage --html coverage",
92
- "bench": {
93
- "command": "deno bench --allow-read --allow-write --allow-net --allow-env --allow-run --unstable-kv",
94
- "dependencies": ["codegen"]
95
- },
96
- "apidoc": {
97
- "command": "deno doc --html --name=Fedify --output=apidoc/ mod.ts",
98
- "dependencies": ["codegen"]
99
- },
100
- "publish": {
101
- "command": "deno publish",
102
- "dependencies": ["check-version", "codegen"]
103
- },
104
- "pnpm:install": "pnpm install",
105
- "pnpm:build": {
106
- "command": "pnpm exec tsdown",
107
- "dependencies": ["codegen", "pnpm:install"]
108
- },
109
- "npm": {
110
- "command": "pnpm pack",
111
- "dependencies": ["sync-version", "pnpm:install"]
112
- },
113
- "test:node": {
114
- "command": "cd dist/ && node --test",
115
- "dependencies": ["pnpm:build"]
116
- },
117
- "test:bun": {
118
- "command": "cd dist/ && bun test --timeout 60000",
119
- "dependencies": ["pnpm:build"]
120
- },
121
- "test:cfworkers": {
122
- "command": "pnpm exec wrangler deploy --dry-run --outdir cfworkers && node --import=tsx cfworkers/client.ts",
123
- "dependencies": ["pnpm:build"]
124
- },
125
- "test-all": { "dependencies": [
126
- "check",
127
- "test",
128
- "test:node",
129
- "test:bun",
130
- "test:cfworkers"
131
- ] }
132
- };
133
- var deno_default = {
134
- name,
135
- version,
136
- license,
137
- exports,
138
- imports,
139
- include,
140
- exclude,
141
- tasks
142
- };
13
+ var version = "1.7.14";
143
14
 
144
15
  //#endregion
145
16
  //#region runtime/contexts.ts
@@ -4418,28 +4289,37 @@ async function getRemoteDocument(url, response, fetch$1) {
4418
4289
  }
4419
4290
  let document;
4420
4291
  if (!jsonLd && (contentType === "text/html" || contentType?.startsWith("text/html;") || contentType === "application/xhtml+xml" || contentType?.startsWith("application/xhtml+xml;"))) {
4421
- const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\s*\/?>/gi;
4422
- const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/gi;
4292
+ const MAX_HTML_SIZE = 1024 * 1024;
4423
4293
  const html = await response.text();
4424
- let m;
4425
- const rawAttribs = [];
4426
- while ((m = p.exec(html)) !== null) rawAttribs.push(m[2]);
4427
- for (const rawAttrs of rawAttribs) {
4428
- let m2;
4429
- const attribs = {};
4430
- while ((m2 = p2.exec(rawAttrs)) !== null) {
4431
- const key = m2[1].toLowerCase();
4432
- attribs[key] = m2[3] ?? m2[4] ?? m2[5] ?? "";
4433
- }
4434
- if (attribs.rel === "alternate" && "type" in attribs && (attribs.type === "application/activity+json" || attribs.type === "application/ld+json" || attribs.type.startsWith("application/ld+json;")) && "href" in attribs && new URL(attribs.href, docUrl).href !== docUrl.href) {
4435
- logger.debug("Found alternate document: {alternateUrl} from {url}", {
4436
- alternateUrl: attribs.href,
4437
- url: documentUrl
4438
- });
4439
- return await fetch$1(new URL(attribs.href, docUrl).href);
4294
+ if (html.length > MAX_HTML_SIZE) {
4295
+ logger.warn("HTML response too large, skipping alternate link discovery: {url}", {
4296
+ url: documentUrl,
4297
+ size: html.length
4298
+ });
4299
+ document = JSON.parse(html);
4300
+ } else {
4301
+ const tagPattern = /<(a|link)\s+([^>]*?)\s*\/?>/gi;
4302
+ const attrPattern = /([a-z][a-z:_-]*)=(?:"([^"]*)"|'([^']*)'|([^\s>]+))/gi;
4303
+ let tagMatch;
4304
+ while ((tagMatch = tagPattern.exec(html)) !== null) {
4305
+ const tagContent = tagMatch[2];
4306
+ let attrMatch;
4307
+ const attribs = {};
4308
+ attrPattern.lastIndex = 0;
4309
+ while ((attrMatch = attrPattern.exec(tagContent)) !== null) {
4310
+ const key = attrMatch[1].toLowerCase();
4311
+ attribs[key] = attrMatch[2] ?? attrMatch[3] ?? attrMatch[4] ?? "";
4312
+ }
4313
+ if (attribs.rel === "alternate" && "type" in attribs && (attribs.type === "application/activity+json" || attribs.type === "application/ld+json" || attribs.type.startsWith("application/ld+json;")) && "href" in attribs && new URL(attribs.href, docUrl).href !== docUrl.href) {
4314
+ logger.debug("Found alternate document: {alternateUrl} from {url}", {
4315
+ alternateUrl: attribs.href,
4316
+ url: documentUrl
4317
+ });
4318
+ return await fetch$1(new URL(attribs.href, docUrl).href);
4319
+ }
4440
4320
  }
4321
+ document = JSON.parse(html);
4441
4322
  }
4442
- document = JSON.parse(html);
4443
4323
  } else document = await response.json();
4444
4324
  logger.debug("Fetched document: {status} {url} {headers}", {
4445
4325
  status: response.status,
@@ -4586,7 +4466,7 @@ function kvCache({ loader, kv, prefix, rules }) {
4586
4466
  * @since 1.3.0
4587
4467
  */
4588
4468
  function getUserAgent({ software, url } = {}) {
4589
- const fedify = `Fedify/${deno_default.version}`;
4469
+ const fedify = `Fedify/${version}`;
4590
4470
  const runtime = globalThis.Deno?.version?.deno != null ? `Deno/${Deno.version.deno}` : globalThis.process?.versions?.bun != null ? `Bun/${process.versions.bun}` : "navigator" in globalThis && navigator.userAgent === "Cloudflare-Workers" ? navigator.userAgent : globalThis.process?.versions?.node != null ? `Node.js/${process.versions.node}` : null;
4591
4471
  const userAgent = software == null ? [fedify] : [software, fedify];
4592
4472
  if (runtime != null) userAgent.push(runtime);
@@ -4595,4 +4475,4 @@ function getUserAgent({ software, url } = {}) {
4595
4475
  }
4596
4476
 
4597
4477
  //#endregion
4598
- export { FetchError, UrlError, createRequest, deno_default, fetchDocumentLoader, getDocumentLoader, getRemoteDocument, getUserAgent, kvCache, logRequest, validatePublicUrl };
4478
+ export { getRemoteDocument as a, logRequest as c, name as d, version as f, getDocumentLoader as i, UrlError as l, createRequest as n, getUserAgent as o, fetchDocumentLoader as r, kvCache as s, FetchError as t, validatePublicUrl as u };
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { KvKey, KvStore } from "./kv-DRaeSXco.js";
3
+ import { n as KvStore, t as KvKey } from "./kv-CKqSUxHd.js";
4
4
 
5
5
  //#region runtime/docloader.d.ts
6
6
  /**
@@ -205,4 +205,4 @@ declare function getUserAgent({
205
205
  url
206
206
  }?: GetUserAgentOptions): string;
207
207
  //#endregion
208
- export { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache };
208
+ export { FetchError as a, KvCacheParameters as c, getDocumentLoader as d, getUserAgent as f, DocumentLoaderFactoryOptions as i, RemoteDocument as l, DocumentLoader as n, GetDocumentLoaderOptions as o, kvCache as p, DocumentLoaderFactory as r, GetUserAgentOptions as s, AuthenticatedDocumentLoaderFactory as t, fetchDocumentLoader as u };
@@ -3,143 +3,14 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { UrlError, validatePublicUrl } from "./url-C2xuoQD1.js";
6
+ import { a as validatePublicUrl, t as UrlError } from "./url-BdNvnK9P.js";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { HTTPHeaderLink } from "@hugoalh/http-header-link";
9
9
  import process from "node:process";
10
10
 
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "1.7.12";
14
- var license = "MIT";
15
- var exports = {
16
- ".": "./mod.ts",
17
- "./compat": "./compat/mod.ts",
18
- "./federation": "./federation/mod.ts",
19
- "./nodeinfo": "./nodeinfo/mod.ts",
20
- "./runtime": "./runtime/mod.ts",
21
- "./sig": "./sig/mod.ts",
22
- "./vocab": "./vocab/mod.ts",
23
- "./webfinger": "./webfinger/mod.ts",
24
- "./x/cfworkers": "./x/cfworkers.ts",
25
- "./x/denokv": "./x/denokv.ts",
26
- "./x/fresh": "./x/fresh.ts",
27
- "./x/hono": "./x/hono.ts",
28
- "./x/sveltekit": "./x/sveltekit.ts"
29
- };
30
- var imports = {
31
- "@cfworker/json-schema": "npm:@cfworker/json-schema@^4.1.1",
32
- "@cloudflare/workers-types": "npm:@cloudflare/workers-types@^4.20250529.0",
33
- "@es-toolkit/es-toolkit": "jsr:@es-toolkit/es-toolkit@^1.38.0",
34
- "@hugoalh/http-header-link": "jsr:@hugoalh/http-header-link@^1.0.2",
35
- "@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",
36
- "@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
37
- "@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
38
- "@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0",
39
- "@std/assert": "jsr:@std/assert@^0.226.0",
40
- "@std/testing": "jsr:@std/testing@^0.224.0",
41
- "@std/url": "jsr:@std/url@^0.225.1",
42
- "@std/yaml": "jsr:@std/yaml@^0.224.3",
43
- "asn1js": "npm:asn1js@^3.0.5",
44
- "byte-encodings": "npm:byte-encodings@^1.0.11",
45
- "fast-check": "npm:fast-check@^3.22.0",
46
- "fetch-mock": "npm:fetch-mock@^12.5.2",
47
- "json-canon": "npm:json-canon@^1.0.1",
48
- "jsonld": "npm:jsonld@^8.3.2",
49
- "multicodec": "npm:multicodec@^3.2.1",
50
- "pkijs": "npm:pkijs@^3.2.4",
51
- "structured-field-values": "npm:structured-field-values@^2.0.4",
52
- "tsdown": "npm:tsdown@^0.12.2",
53
- "uri-template-router": "npm:uri-template-router@^0.0.17",
54
- "url-template": "npm:url-template@^3.1.1"
55
- };
56
- var include = ["vocab/vocab.ts"];
57
- var exclude = [
58
- ".test-report.xml",
59
- "apidoc/",
60
- "cfworkers/dist/",
61
- "cfworkers/fixtures/",
62
- "cfworkers/imports.ts",
63
- "cfworkers/README.md",
64
- "cfworkers/server.ts",
65
- "cfworkers/server.js",
66
- "cfworkers/server.js.map",
67
- "codegen/schema.yaml",
68
- "dist/",
69
- "node_modules/",
70
- "npm/",
71
- "pnpm-lock.yaml",
72
- "vocab/*.yaml",
73
- "!vocab/vocab.ts"
74
- ];
75
- var tasks = {
76
- "codegen": "deno run --allow-read --allow-write --check codegen/main.ts vocab/ ../runtime/ > vocab/vocab.ts && deno fmt vocab/vocab.ts && deno cache vocab/vocab.ts && deno check vocab/vocab.ts",
77
- "check-version": "deno run --allow-read=package.json scripts/check_version.ts && deno run ../cli/scripts/check_version.ts",
78
- "sync-version": "deno run --allow-read=package.json --allow-write=package.json scripts/sync_version.ts && deno run --allow-read=../cli/deno.json --allow-write=../cli/deno.json ../cli/scripts/sync_version.ts",
79
- "cache": {
80
- "command": "deno cache mod.ts",
81
- "dependencies": ["check-version", "codegen"]
82
- },
83
- "check": {
84
- "command": "deno fmt --check && deno lint && deno check */*.ts",
85
- "dependencies": ["codegen"]
86
- },
87
- "test": {
88
- "command": "deno test --check --doc --allow-read --allow-write --allow-env --unstable-kv --trace-leaks --parallel",
89
- "dependencies": ["codegen"]
90
- },
91
- "coverage": "deno task test --clean --coverage && deno coverage --html coverage",
92
- "bench": {
93
- "command": "deno bench --allow-read --allow-write --allow-net --allow-env --allow-run --unstable-kv",
94
- "dependencies": ["codegen"]
95
- },
96
- "apidoc": {
97
- "command": "deno doc --html --name=Fedify --output=apidoc/ mod.ts",
98
- "dependencies": ["codegen"]
99
- },
100
- "publish": {
101
- "command": "deno publish",
102
- "dependencies": ["check-version", "codegen"]
103
- },
104
- "pnpm:install": "pnpm install",
105
- "pnpm:build": {
106
- "command": "pnpm exec tsdown",
107
- "dependencies": ["codegen", "pnpm:install"]
108
- },
109
- "npm": {
110
- "command": "pnpm pack",
111
- "dependencies": ["sync-version", "pnpm:install"]
112
- },
113
- "test:node": {
114
- "command": "cd dist/ && node --test",
115
- "dependencies": ["pnpm:build"]
116
- },
117
- "test:bun": {
118
- "command": "cd dist/ && bun test --timeout 60000",
119
- "dependencies": ["pnpm:build"]
120
- },
121
- "test:cfworkers": {
122
- "command": "pnpm exec wrangler deploy --dry-run --outdir cfworkers && node --import=tsx cfworkers/client.ts",
123
- "dependencies": ["pnpm:build"]
124
- },
125
- "test-all": { "dependencies": [
126
- "check",
127
- "test",
128
- "test:node",
129
- "test:bun",
130
- "test:cfworkers"
131
- ] }
132
- };
133
- var deno_default = {
134
- name,
135
- version,
136
- license,
137
- exports,
138
- imports,
139
- include,
140
- exclude,
141
- tasks
142
- };
13
+ var version = "1.7.14";
143
14
 
144
15
  //#endregion
145
16
  //#region runtime/contexts.ts
@@ -4361,28 +4232,37 @@ async function getRemoteDocument(url, response, fetch$1) {
4361
4232
  }
4362
4233
  let document;
4363
4234
  if (!jsonLd && (contentType === "text/html" || contentType?.startsWith("text/html;") || contentType === "application/xhtml+xml" || contentType?.startsWith("application/xhtml+xml;"))) {
4364
- const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\s*\/?>/gi;
4365
- const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/gi;
4235
+ const MAX_HTML_SIZE = 1024 * 1024;
4366
4236
  const html = await response.text();
4367
- let m;
4368
- const rawAttribs = [];
4369
- while ((m = p.exec(html)) !== null) rawAttribs.push(m[2]);
4370
- for (const rawAttrs of rawAttribs) {
4371
- let m2;
4372
- const attribs = {};
4373
- while ((m2 = p2.exec(rawAttrs)) !== null) {
4374
- const key = m2[1].toLowerCase();
4375
- attribs[key] = m2[3] ?? m2[4] ?? m2[5] ?? "";
4376
- }
4377
- if (attribs.rel === "alternate" && "type" in attribs && (attribs.type === "application/activity+json" || attribs.type === "application/ld+json" || attribs.type.startsWith("application/ld+json;")) && "href" in attribs && new URL(attribs.href, docUrl).href !== docUrl.href) {
4378
- logger.debug("Found alternate document: {alternateUrl} from {url}", {
4379
- alternateUrl: attribs.href,
4380
- url: documentUrl
4381
- });
4382
- return await fetch$1(new URL(attribs.href, docUrl).href);
4237
+ if (html.length > MAX_HTML_SIZE) {
4238
+ logger.warn("HTML response too large, skipping alternate link discovery: {url}", {
4239
+ url: documentUrl,
4240
+ size: html.length
4241
+ });
4242
+ document = JSON.parse(html);
4243
+ } else {
4244
+ const tagPattern = /<(a|link)\s+([^>]*?)\s*\/?>/gi;
4245
+ const attrPattern = /([a-z][a-z:_-]*)=(?:"([^"]*)"|'([^']*)'|([^\s>]+))/gi;
4246
+ let tagMatch;
4247
+ while ((tagMatch = tagPattern.exec(html)) !== null) {
4248
+ const tagContent = tagMatch[2];
4249
+ let attrMatch;
4250
+ const attribs = {};
4251
+ attrPattern.lastIndex = 0;
4252
+ while ((attrMatch = attrPattern.exec(tagContent)) !== null) {
4253
+ const key = attrMatch[1].toLowerCase();
4254
+ attribs[key] = attrMatch[2] ?? attrMatch[3] ?? attrMatch[4] ?? "";
4255
+ }
4256
+ if (attribs.rel === "alternate" && "type" in attribs && (attribs.type === "application/activity+json" || attribs.type === "application/ld+json" || attribs.type.startsWith("application/ld+json;")) && "href" in attribs && new URL(attribs.href, docUrl).href !== docUrl.href) {
4257
+ logger.debug("Found alternate document: {alternateUrl} from {url}", {
4258
+ alternateUrl: attribs.href,
4259
+ url: documentUrl
4260
+ });
4261
+ return await fetch$1(new URL(attribs.href, docUrl).href);
4262
+ }
4383
4263
  }
4264
+ document = JSON.parse(html);
4384
4265
  }
4385
- document = JSON.parse(html);
4386
4266
  } else document = await response.json();
4387
4267
  logger.debug("Fetched document: {status} {url} {headers}", {
4388
4268
  status: response.status,
@@ -4529,7 +4409,7 @@ function kvCache({ loader, kv, prefix, rules }) {
4529
4409
  * @since 1.3.0
4530
4410
  */
4531
4411
  function getUserAgent({ software, url } = {}) {
4532
- const fedify = `Fedify/${deno_default.version}`;
4412
+ const fedify = `Fedify/${version}`;
4533
4413
  const runtime = globalThis.Deno?.version?.deno != null ? `Deno/${Deno.version.deno}` : globalThis.process?.versions?.bun != null ? `Bun/${process.versions.bun}` : "navigator" in globalThis && navigator.userAgent === "Cloudflare-Workers" ? navigator.userAgent : globalThis.process?.versions?.node != null ? `Node.js/${process.versions.node}` : null;
4534
4414
  const userAgent = software == null ? [fedify] : [software, fedify];
4535
4415
  if (runtime != null) userAgent.push(runtime);
@@ -4538,4 +4418,4 @@ function getUserAgent({ software, url } = {}) {
4538
4418
  }
4539
4419
 
4540
4420
  //#endregion
4541
- export { FetchError, contexts_default, createRequest, deno_default, fetchDocumentLoader, getDocumentLoader, getRemoteDocument, getUserAgent, kvCache, logRequest };
4421
+ export { getRemoteDocument as a, logRequest as c, version as d, getDocumentLoader as i, contexts_default as l, createRequest as n, getUserAgent as o, fetchDocumentLoader as r, kvCache as s, FetchError as t, name as u };