@fedify/fedify 2.0.0-pr.410.1558 → 2.0.0-pr.412.1692

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 (184) hide show
  1. package/dist/actor-CrTGiTZd.cjs +42609 -0
  2. package/dist/{actor-CkjTCNqi.js → actor-D5S46edz.js} +1 -1
  3. package/dist/actor-D6K058Tb.d.cts +128 -0
  4. package/dist/{actor-DmsbGzXS.js → actor-G2S5sPEA.js} +6951 -2127
  5. package/dist/{actor-C22bXuuC.d.ts → actor-T6RyhRgk.d.ts} +1 -1
  6. package/dist/{authdocloader-BwV2NPfz.js → authdocloader-C5AvdCCi.js} +6 -6
  7. package/dist/authdocloader-CQMPmpaO.cjs +58 -0
  8. package/dist/{authdocloader-BJxkviIL.js → authdocloader-SjwloJUA.js} +3 -3
  9. package/dist/{builder-DbOVAz8i.js → builder-OA47XRft.js} +10 -4
  10. package/dist/chunk-DqRYRqnO.cjs +34 -0
  11. package/dist/{client-DrNZd6r_.js → client-Bmd-i8x8.js} +3 -22
  12. package/dist/client-CegPX0Rn.d.cts +222 -0
  13. package/dist/{client-DF8anIB5.d.ts → client-bgSdkFa2.d.ts} +2 -74
  14. package/dist/compat/mod.cjs +10 -0
  15. package/dist/compat/mod.d.cts +13 -0
  16. package/dist/compat/mod.d.ts +8 -8
  17. package/dist/compat/mod.js +5 -5
  18. package/dist/compat/transformers.test.js +19 -19
  19. package/dist/compat-DmDDELst.cjs +4 -0
  20. package/dist/compat-nxUqe4Z-.js +4 -0
  21. package/dist/{context-9gCpIkiz.d.ts → context-ByZprN0S.d.ts} +67 -7
  22. package/dist/context-C5BsZkDr.d.cts +2315 -0
  23. package/dist/docloader-7Ey7wNHx.cjs +4861 -0
  24. package/dist/{docloader-DnepZfu_.js → docloader-CkweNhUH.js} +189 -9
  25. package/dist/docloader-D-MrRyHl.d.cts +219 -0
  26. package/dist/{esm-D1HqBE3n.js → esm-CwHz8Y8t.js} +1 -1
  27. package/dist/federation/builder.test.js +6 -7
  28. package/dist/federation/collection.test.js +4 -4
  29. package/dist/federation/handler.test.js +23 -143
  30. package/dist/federation/idempotency.test.js +202 -0
  31. package/dist/federation/inbox.test.js +4 -4
  32. package/dist/federation/keycache.test.js +4 -4
  33. package/dist/federation/kv.test.js +4 -3
  34. package/dist/federation/middleware.test.js +231 -52
  35. package/dist/federation/mod.cjs +29 -0
  36. package/dist/federation/mod.d.cts +13 -0
  37. package/dist/federation/mod.d.ts +8 -8
  38. package/dist/federation/mod.js +15 -15
  39. package/dist/federation/mq.test.js +3 -3
  40. package/dist/federation/negotiation.test.d.ts +3 -0
  41. package/dist/federation/negotiation.test.js +28 -0
  42. package/dist/federation/retry.test.js +3 -3
  43. package/dist/federation/router.test.js +3 -3
  44. package/dist/federation/send.test.js +10 -10
  45. package/dist/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
  46. package/dist/federation-H2_En3j5.cjs +244 -0
  47. package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +6 -0
  48. package/dist/http-BiBofurJ.cjs +826 -0
  49. package/dist/{http-BEJUSX6j.js → http-C5tC93Hn.js} +7 -7
  50. package/dist/http-D-e6AFwR.d.cts +253 -0
  51. package/dist/{http-DqSNLFNY.d.ts → http-D6Uj2x2y.d.ts} +1 -1
  52. package/dist/{http-BgCF3jDs.js → http-DGjdMiLc.js} +3 -3
  53. package/dist/{inbox-Bq4EChoK.js → inbox-BoDY3z8G.js} +24 -7
  54. package/dist/key-CZR7QraT.cjs +290 -0
  55. package/dist/key-Cf8MffVe.cjs +10 -0
  56. package/dist/{key-D-0OLe9C.js → key-CkxrAIyp.js} +5 -5
  57. package/dist/key-Dk0j88Jo.js +10 -0
  58. package/dist/{key-BD3lpBWw.js → key-Epcl5jpz.js} +3 -3
  59. package/dist/{key-BYNqWXyu.js → key-IxRhZpOF.js} +2 -2
  60. package/dist/{keycache-yZDAc3-e.js → keycache-TEniXNel.js} +1 -1
  61. package/dist/{keys-Dtc-g6xq.js → keys-bZxcrZ9Z.js} +1 -1
  62. package/dist/kv-63Cil1MD.d.cts +81 -0
  63. package/dist/{ld-BJ484qSg.js → ld-DW7A0uIc.js} +4 -4
  64. package/dist/{lookup-Cj0sX50U.js → lookup-DhQCVVja.js} +21 -12
  65. package/dist/lookup-DiV4LFBg.cjs +137 -0
  66. package/dist/{lookup-BzogF2gp.js → lookup-cVRa2QM-.js} +4 -4
  67. package/dist/middleware-Be1JStOx.js +17 -0
  68. package/dist/middleware-CDOK7WOb.js +26 -0
  69. package/dist/{middleware-CiH0ptqy.js → middleware-Cgr3PtaJ.js} +58 -149
  70. package/dist/{middleware-DIZ1dnwT.js → middleware-DvvYAIsd.js} +87 -91
  71. package/dist/middleware-EjIW2mZB.cjs +17 -0
  72. package/dist/middleware-TfuVoceY.cjs +4231 -0
  73. package/dist/mod-8DMWKtQE.d.cts +80 -0
  74. package/dist/{mod-Drmz72EK.d.ts → mod-BhUKmBJD.d.ts} +2 -2
  75. package/dist/mod-C2tOeRkN.d.cts +1 -0
  76. package/dist/{mod-TFoH2Ql8.d.ts → mod-CerN_Sza.d.ts} +1 -1
  77. package/dist/mod-Cj1tHXBR.d.cts +102 -0
  78. package/dist/mod-CxkWO3Mg.d.cts +307 -0
  79. package/dist/{mod-Bqxcp7eN.d.ts → mod-D6hQoxC5.d.ts} +2 -2
  80. package/dist/mod-Djzcw2ry.d.cts +266 -0
  81. package/dist/{mod-Cxt4Kpf6.d.ts → mod-DlU8ISoa.d.ts} +19 -1
  82. package/dist/mod-FZd39qVq.d.cts +1 -0
  83. package/dist/mod-jQ4OODsl.d.cts +113 -0
  84. package/dist/mod.cjs +150 -0
  85. package/dist/mod.d.cts +17 -0
  86. package/dist/mod.d.ts +11 -11
  87. package/dist/mod.js +21 -21
  88. package/dist/mq-B7R1Q-M5.d.cts +140 -0
  89. package/dist/negotiation-5NPJL6zp.js +71 -0
  90. package/dist/nodeinfo/client.test.js +27 -106
  91. package/dist/nodeinfo/handler.test.js +20 -20
  92. package/dist/nodeinfo/mod.cjs +11 -0
  93. package/dist/nodeinfo/mod.d.cts +5 -0
  94. package/dist/nodeinfo/mod.d.ts +2 -2
  95. package/dist/nodeinfo/mod.js +7 -7
  96. package/dist/nodeinfo/types.test.js +5 -10
  97. package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
  98. package/dist/nodeinfo-DfycQ8Wf.js +4 -0
  99. package/dist/{owner-9FMX4wQT.js → owner-6Vc3UXXE.js} +2 -2
  100. package/dist/owner-BN_tO3cY.d.cts +67 -0
  101. package/dist/{owner-CQPnQVtf.d.ts → owner-hd9lvQcP.d.ts} +2 -2
  102. package/dist/{proof-Arx4Q9Q6.js → proof-C1jhbeNv.js} +3 -3
  103. package/dist/proof-CRJWXFfT.cjs +673 -0
  104. package/dist/{proof-DnTD0avk.js → proof-Chi90OXv.js} +9 -9
  105. package/dist/runtime/authdocloader.test.js +9 -9
  106. package/dist/runtime/docloader.test.js +4 -4
  107. package/dist/runtime/key.test.js +5 -5
  108. package/dist/runtime/langstr.test.js +3 -3
  109. package/dist/runtime/link.test.d.ts +3 -0
  110. package/dist/runtime/link.test.js +61 -0
  111. package/dist/runtime/mod.cjs +25 -0
  112. package/dist/runtime/mod.d.cts +6 -0
  113. package/dist/runtime/mod.d.ts +3 -3
  114. package/dist/runtime/mod.js +10 -10
  115. package/dist/runtime/multibase/multibase.test.js +3 -3
  116. package/dist/runtime/url.test.js +3 -3
  117. package/dist/runtime-C58AJWSv.cjs +4 -0
  118. package/dist/runtime-DPYEDf-o.js +4 -0
  119. package/dist/{send-CcxHe0p3.js → send-DjATl6i3.js} +2 -2
  120. package/dist/sig/http.test.js +9 -9
  121. package/dist/sig/key.test.js +6 -6
  122. package/dist/sig/ld.test.js +7 -7
  123. package/dist/sig/mod.cjs +30 -0
  124. package/dist/sig/mod.d.cts +8 -0
  125. package/dist/sig/mod.d.ts +5 -5
  126. package/dist/sig/mod.js +10 -10
  127. package/dist/sig/owner.test.js +7 -7
  128. package/dist/sig/proof.test.js +7 -7
  129. package/dist/sig-ByHXzqUi.cjs +4 -0
  130. package/dist/sig-Cj3tk-ig.js +4 -0
  131. package/dist/testing/docloader.test.js +3 -3
  132. package/dist/testing/mod.d.ts +273 -28
  133. package/dist/testing/mod.js +3 -3
  134. package/dist/{testing-DFgpNAI6.js → testing-BnfPB5T-.js} +2 -2
  135. package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
  136. package/dist/transformers-CoBS-oFG.cjs +116 -0
  137. package/dist/{type-B2h-NRAo.js → type-NEA09tSC.js} +7262 -2258
  138. package/dist/{types-BIgY6c-l.js → types-BSuWJsOm.js} +1 -3
  139. package/dist/types-CmmUQisS.cjs +315 -0
  140. package/dist/{types-B1QuBj5L.js → types-dLXLjVLf.js} +8 -169
  141. package/dist/vocab/actor.test.js +5 -5
  142. package/dist/vocab/lookup.test.js +255 -5
  143. package/dist/vocab/mod.cjs +87 -0
  144. package/dist/vocab/mod.d.cts +6 -0
  145. package/dist/vocab/mod.d.ts +3 -3
  146. package/dist/vocab/mod.js +7 -7
  147. package/dist/vocab/type.test.js +3 -3
  148. package/dist/vocab/vocab.test.js +433 -9
  149. package/dist/{vocab-SOE1ifCr.d.ts → vocab-BI0Ak5lL.d.ts} +290 -0
  150. package/dist/vocab-C5Y-0fGj.cjs +291 -0
  151. package/dist/vocab-Dw1-yVGg.d.cts +14922 -0
  152. package/dist/{vocab-BREfYr1a.js → vocab-rWbHpc2J.js} +26 -17
  153. package/dist/webfinger/handler.test.js +19 -19
  154. package/dist/webfinger/lookup.test.js +4 -4
  155. package/dist/webfinger/mod.cjs +9 -0
  156. package/dist/webfinger/mod.d.cts +4 -0
  157. package/dist/webfinger/mod.js +6 -6
  158. package/dist/webfinger-BjOEdFPs.cjs +4 -0
  159. package/dist/webfinger-De_bU0iE.js +4 -0
  160. package/dist/x/cfworkers.cjs +100 -0
  161. package/dist/x/cfworkers.d.cts +59 -0
  162. package/dist/x/cfworkers.js +3 -3
  163. package/dist/x/cfworkers.test.js +3 -3
  164. package/dist/x/hono.cjs +61 -0
  165. package/dist/x/hono.d.cts +54 -0
  166. package/dist/x/hono.d.ts +7 -7
  167. package/dist/x/hono.js +3 -3
  168. package/dist/x/sveltekit.cjs +69 -0
  169. package/dist/x/sveltekit.d.cts +46 -0
  170. package/dist/x/sveltekit.d.ts +7 -7
  171. package/dist/x/sveltekit.js +3 -3
  172. package/package.json +68 -13
  173. package/dist/compat-Bb5myD13.js +0 -4
  174. package/dist/key-BmFoI4_J.js +0 -10
  175. package/dist/middleware-D2W4gwdv.js +0 -17
  176. package/dist/middleware-LmK3pQ2z.js +0 -26
  177. package/dist/nodeinfo/semver.test.js +0 -143
  178. package/dist/nodeinfo-CyEbLjHs.js +0 -4
  179. package/dist/runtime-BSkOVUWM.js +0 -4
  180. package/dist/semver-dArNLkR9.js +0 -149
  181. package/dist/sig-BXJO--F9.js +0 -4
  182. package/dist/webfinger-C3GIyXIg.js +0 -4
  183. /package/dist/{collection-CSzG2j1P.js → collection-CcnIw1qY.js} +0 -0
  184. /package/dist/{nodeinfo/semver.test.d.ts → federation/idempotency.test.d.ts} +0 -0
@@ -3,8 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-B2h-NRAo.js";
7
- import { isActor } from "./actor-CkjTCNqi.js";
6
+ import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-NEA09tSC.js";
7
+ import { isActor } from "./actor-D5S46edz.js";
8
8
  import { trace } from "@opentelemetry/api";
9
9
 
10
10
  //#region src/sig/owner.ts
@@ -0,0 +1,67 @@
1
+ import { DocumentLoader } from "./docloader-D-MrRyHl.cjs";
2
+ import { Activity, CryptographicKey } from "./vocab-Dw1-yVGg.cjs";
3
+ import { Actor } from "./actor-D6K058Tb.cjs";
4
+ import { TracerProvider } from "@opentelemetry/api";
5
+
6
+ //#region src/sig/owner.d.ts
7
+ /**
8
+ * Options for {@link doesActorOwnKey}.
9
+ * @since 0.8.0
10
+ */
11
+ interface DoesActorOwnKeyOptions {
12
+ /**
13
+ * The document loader to use for fetching the actor.
14
+ */
15
+ documentLoader?: DocumentLoader;
16
+ /**
17
+ * The context loader to use for JSON-LD context retrieval.
18
+ */
19
+ contextLoader?: DocumentLoader;
20
+ /**
21
+ * The OpenTelemetry tracer provider to use for tracing. If omitted,
22
+ * the global tracer provider is used.
23
+ * @since 1.3.0
24
+ */
25
+ tracerProvider?: TracerProvider;
26
+ }
27
+ /**
28
+ * Checks if the actor of the given activity owns the specified key.
29
+ * @param activity The activity to check.
30
+ * @param key The public key to check.
31
+ * @param options Options for checking the key ownership.
32
+ * @returns Whether the actor is the owner of the key.
33
+ */
34
+ declare function doesActorOwnKey(activity: Activity, key: CryptographicKey, options: DoesActorOwnKeyOptions): Promise<boolean>;
35
+ /**
36
+ * Options for {@link getKeyOwner}.
37
+ * @since 0.8.0
38
+ */
39
+ interface GetKeyOwnerOptions {
40
+ /**
41
+ * The document loader to use for fetching the key and its owner.
42
+ */
43
+ documentLoader?: DocumentLoader;
44
+ /**
45
+ * The context loader to use for JSON-LD context retrieval.
46
+ */
47
+ contextLoader?: DocumentLoader;
48
+ /**
49
+ * The OpenTelemetry tracer provider to use for tracing. If omitted,
50
+ * the global tracer provider is used.
51
+ * @since 1.3.0
52
+ */
53
+ tracerProvider?: TracerProvider;
54
+ }
55
+ /**
56
+ * Gets the actor that owns the specified key. Returns `null` if the key has no
57
+ * known owner.
58
+ *
59
+ * @param keyId The ID of the key to check, or the key itself.
60
+ * @param options Options for getting the key owner.
61
+ * @returns The actor that owns the key, or `null` if the key has no known
62
+ * owner.
63
+ * @since 0.7.0
64
+ */
65
+ declare function getKeyOwner(keyId: URL | CryptographicKey, options: GetKeyOwnerOptions): Promise<Actor | null>;
66
+ //#endregion
67
+ export { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner };
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { DocumentLoader } from "./docloader-CxWcuWqQ.js";
4
- import { Activity, CryptographicKey } from "./vocab-SOE1ifCr.js";
5
- import { Actor } from "./actor-C22bXuuC.js";
4
+ import { Activity, CryptographicKey } from "./vocab-BI0Ak5lL.js";
5
+ import { Actor } from "./actor-T6RyhRgk.js";
6
6
  import { TracerProvider } from "@opentelemetry/api";
7
7
 
8
8
  //#region src/sig/owner.d.ts
@@ -3,8 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-B2h-NRAo.js";
7
- import { fetchKey, validateCryptoKey } from "./key-BYNqWXyu.js";
6
+ import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-NEA09tSC.js";
7
+ import { fetchKey, validateCryptoKey } from "./key-IxRhZpOF.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
10
10
  import { encodeHex } from "byte-encodings/hex";
@@ -195,7 +195,7 @@ async function verifyProofInternal(jsonLd, proof, options) {
195
195
  });
196
196
  return null;
197
197
  }
198
- const verified = await crypto.subtle.verify("Ed25519", publicKey.publicKey, proof.proofValue, digest);
198
+ const verified = await crypto.subtle.verify("Ed25519", publicKey.publicKey, proof.proofValue.slice(), digest);
199
199
  if (!verified) {
200
200
  if (fetchedKey.cached) {
201
201
  logger.debug("Failed to verify the proof with the cached key {keyId}; retrying with the freshly fetched key...", {