@fedify/fedify 1.6.10 → 1.6.12

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 (97) hide show
  1. package/dist/{actor-zJITiLGT.js → actor-7vCpWIGd.js} +1059 -2276
  2. package/dist/{actor-DIUXw3Jf.js → actor-BxaCJsn8.js} +6 -9
  3. package/dist/{assert-DmFG7ppO.js → assert-LOEeCUK5.js} +1 -1
  4. package/dist/{assert_equals-CTYbeopb.js → assert_equals-B44MxcIj.js} +2 -4
  5. package/dist/{assert_instance_of-CF09JHYM.js → assert_instance_of-XtuFevV_.js} +1 -1
  6. package/dist/{assert_is_error-nrwA1GeT.js → assert_is_error-BTlryvT0.js} +1 -1
  7. package/dist/{assert_not_equals-Dc7y-V5Q.js → assert_not_equals-C685gKx6.js} +1 -1
  8. package/dist/{assert_rejects-C-sxEMM5.js → assert_rejects-DWQ4jaf9.js} +2 -2
  9. package/dist/{assert_throws-Cn9C6Jur.js → assert_throws-YetpVSc-.js} +2 -2
  10. package/dist/{authdocloader-r__VtsYF.js → authdocloader-CVhMTbv4.js} +4 -4
  11. package/dist/{authdocloader-BcwoX8r4.js → authdocloader-niAJMnCQ.js} +3 -3
  12. package/dist/{builder-ec-rmcfn.js → builder-DboGa9iv.js} +7 -10
  13. package/dist/{chunk-HsBuZ-b2.js → chunk-Cx8LTkjm.js} +3 -1
  14. package/dist/{client-Ct6EJXY4.js → client-De_5-2EG.js} +6 -6
  15. package/dist/compat/transformers.test.js +27 -28
  16. package/dist/{context-B51aFJ33.js → context-KOy1fHBn.js} +2 -2
  17. package/dist/{docloader-Bk8yyKtx.js → docloader-CPBLJsVK.js} +4 -6
  18. package/dist/{docloader-D4xNpZfb.js → docloader-RFcxdgI8.js} +5 -9
  19. package/dist/{esm-Db4De7AS.js → esm-DO9PrujO.js} +23 -34
  20. package/dist/federation/builder.test.js +20 -23
  21. package/dist/federation/collection.test.js +9 -9
  22. package/dist/federation/handler.test.js +33 -33
  23. package/dist/federation/inbox.test.js +10 -10
  24. package/dist/federation/keycache.test.js +9 -9
  25. package/dist/federation/kv.test.js +10 -9
  26. package/dist/federation/middleware.test.js +53 -68
  27. package/dist/federation/mod.js +11 -11
  28. package/dist/federation/mq.test.js +10 -11
  29. package/dist/federation/retry.test.js +3 -3
  30. package/dist/federation/router.test.js +9 -9
  31. package/dist/federation/send.test.js +22 -22
  32. package/dist/{federation-3B6BDKCK.js → federation-DyRlaC4X.js} +1 -2
  33. package/dist/{http-BqI8l_zq.js → http-B__WhFrv.js} +8 -15
  34. package/dist/{http-BjXvFars.js → http-CnSGudcE.js} +8 -15
  35. package/dist/{inbox-BVf3oh4Y.js → inbox-L4MTtAQ4.js} +5 -7
  36. package/dist/{key-C_PfBuZC.js → key-BG_CTepE.js} +4 -4
  37. package/dist/{key-avTzmEfO.js → key-BQg3A7eo.js} +5 -8
  38. package/dist/key-CeY-eted.js +16 -0
  39. package/dist/{key-D_WrdfTP.js → key-Dlbuqhbr.js} +6 -9
  40. package/dist/{keycache-GLblHhov.js → keycache-BEb0DSk7.js} +2 -2
  41. package/dist/{keys-DDHFsLa-.js → keys-CqpeF-EG.js} +1 -1
  42. package/dist/{ld-yhnqjt2k.js → ld-45SsuOmB.js} +9 -16
  43. package/dist/{lookup-CIYoashs.js → lookup-CWdbkwKD.js} +7 -11
  44. package/dist/{lookup-Czw5r0oM.js → lookup-CdHTw-tQ.js} +2 -4
  45. package/dist/{lookup-CCdJ24ZP.js → lookup-HY083HcK.js} +3 -5
  46. package/dist/middleware-BP-XbRGC.js +17 -0
  47. package/dist/{middleware-C69vl3qG.js → middleware-Cg-eSyqX.js} +34 -58
  48. package/dist/{middleware-C9Y127V3.js → middleware-D2HU0DhQ.js} +34 -52
  49. package/dist/middleware-JoLpCiMC.js +33 -0
  50. package/dist/mod.js +11 -11
  51. package/dist/{multibase-DeCHcK8L.js → multibase-CnLHszip.js} +1 -2
  52. package/dist/nodeinfo/client.test.js +20 -23
  53. package/dist/nodeinfo/handler.test.js +32 -32
  54. package/dist/nodeinfo/mod.js +2 -2
  55. package/dist/nodeinfo/semver.test.js +23 -30
  56. package/dist/nodeinfo/types.test.js +11 -11
  57. package/dist/{owner-CqOZVri-.js → owner-BYxqeMiw.js} +3 -3
  58. package/dist/{proof-BYiV2_yo.js → proof-BjHA4H_1.js} +8 -14
  59. package/dist/{proof-BpBPpfw4.js → proof-DVYup76O.js} +12 -25
  60. package/dist/runtime/authdocloader.test.js +21 -21
  61. package/dist/runtime/docloader.test.js +16 -18
  62. package/dist/runtime/key.test.js +17 -17
  63. package/dist/runtime/langstr.test.js +9 -9
  64. package/dist/runtime/mod.js +6 -6
  65. package/dist/runtime/multibase/multibase.test.js +11 -12
  66. package/dist/runtime/url.test.js +6 -6
  67. package/dist/{semver-DWClQt_5.js → semver-BNrOOAs9.js} +1 -3
  68. package/dist/{send-B7cv9i7f.js → send-BQA1p7vs.js} +3 -4
  69. package/dist/sig/http.test.js +39 -53
  70. package/dist/sig/key.test.js +18 -18
  71. package/dist/sig/ld.test.js +20 -22
  72. package/dist/sig/mod.js +6 -6
  73. package/dist/sig/owner.test.js +20 -20
  74. package/dist/sig/proof.test.js +19 -19
  75. package/dist/{std__assert-vp0TKMS1.js → std__assert-o_r9vqm1.js} +1 -1
  76. package/dist/testing/docloader.test.js +9 -9
  77. package/dist/testing/mod.js +1 -1
  78. package/dist/{testing-BZ0dJ4qn.js → testing-DLyvtiiW.js} +3 -5
  79. package/dist/{type-D2s5lmbZ.js → type-CFuiGLz9.js} +1 -2
  80. package/dist/{types-C7C_l-jz.js → types-CJHS5pXl.js} +1 -1
  81. package/dist/{types-sw4Fdy78.js → types-D7_MRRa4.js} +6 -8
  82. package/dist/{url-kTAI6_KP.js → url-C2xuoQD1.js} +2 -4
  83. package/dist/vocab/actor.test.js +104 -156
  84. package/dist/vocab/lookup.test.js +17 -17
  85. package/dist/vocab/mod.js +4 -4
  86. package/dist/vocab/type.test.js +11 -15
  87. package/dist/vocab/vocab.test.js +68 -49
  88. package/dist/{vocab-CcGSU3Wf.js → vocab-DVEzP_bQ.js} +1057 -2270
  89. package/dist/{vocab-BT10fLiU.js → vocab-aaGb1Tji.js} +6 -10
  90. package/dist/webfinger/handler.test.js +33 -34
  91. package/dist/webfinger/lookup.test.js +13 -13
  92. package/dist/webfinger/mod.js +2 -2
  93. package/dist/x/cfworkers.test.js +9 -9
  94. package/package.json +1 -1
  95. package/dist/key-C0_lA6sj.js +0 -16
  96. package/dist/middleware-BZY7OuAu.js +0 -17
  97. package/dist/middleware-CcsOhLqv.js +0 -33
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { getUserAgent } from "./docloader-D4xNpZfb.js";
5
+ import { getUserAgent } from "./docloader-RFcxdgI8.js";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
 
8
8
  //#region nodeinfo/semver.ts
@@ -142,9 +142,7 @@ function formatSemVer(version) {
142
142
  const patch = formatNumber(version.patch);
143
143
  const pre = version.prerelease?.join(".") ?? "";
144
144
  const build = version.build?.join(".") ?? "";
145
- const primary = `${major}.${minor}.${patch}`;
146
- const release = [primary, pre].filter((v) => v).join("-");
147
- return [release, build].filter((v) => v).join("+");
145
+ return [[`${major}.${minor}.${patch}`, pre].filter((v) => v).join("-"), build].filter((v) => v).join("+");
148
146
  }
149
147
 
150
148
  //#endregion
@@ -169,7 +167,7 @@ async function getNodeInfo(url, options = {}) {
169
167
  status: wellKnownResponse.status,
170
168
  statusText: wellKnownResponse.statusText
171
169
  });
172
- return void 0;
170
+ return;
173
171
  }
174
172
  const wellKnownRd = await wellKnownResponse.json();
175
173
  const link = wellKnownRd?.links?.find((link$1) => link$1 != null && "rel" in link$1 && (link$1.rel === "http://nodeinfo.diaspora.software/ns/schema/2.0" || link$1.rel === "http://nodeinfo.diaspora.software/ns/schema/2.1") && "href" in link$1 && link$1.href != null);
@@ -178,7 +176,7 @@ async function getNodeInfo(url, options = {}) {
178
176
  url: wellKnownUrl.href,
179
177
  resourceDescriptor: wellKnownRd
180
178
  });
181
- return void 0;
179
+ return;
182
180
  }
183
181
  nodeInfoUrl = link.href;
184
182
  }
@@ -192,7 +190,7 @@ async function getNodeInfo(url, options = {}) {
192
190
  status: response.status,
193
191
  statusText: response.statusText
194
192
  });
195
- return void 0;
193
+ return;
196
194
  }
197
195
  const data = await response.json();
198
196
  if (options.parse === "none") return data;
@@ -202,7 +200,7 @@ async function getNodeInfo(url, options = {}) {
202
200
  url: url.toString(),
203
201
  error
204
202
  });
205
- return void 0;
203
+ return;
206
204
  }
207
205
  }
208
206
  /**
@@ -23,8 +23,7 @@ async function validatePublicUrl(url) {
23
23
  if (hostname.startsWith("[") && hostname.endsWith("]")) hostname = hostname.substring(1, hostname.length - 2);
24
24
  if (hostname === "localhost") throw new UrlError("Localhost is not allowed");
25
25
  if ("Deno" in globalThis && !isIP(hostname)) {
26
- const netPermission = await Deno.permissions.query({ name: "net" });
27
- if (netPermission.state !== "granted") return;
26
+ if ((await Deno.permissions.query({ name: "net" })).state !== "granted") return;
28
27
  }
29
28
  if ("Bun" in globalThis) {
30
29
  if (hostname === "example.com" || hostname.endsWith(".example.com")) return;
@@ -60,8 +59,7 @@ function expandIPv6Address(address) {
60
59
  if (address.startsWith("::")) address = "0000" + address;
61
60
  if (address.endsWith("::")) address = address + "0000";
62
61
  address = address.replace("::", ":0000".repeat(8 - (address.match(/:/g) || []).length) + ":");
63
- const parts = address.split(":");
64
- return parts.map((part) => part.padStart(4, "0")).join(":");
62
+ return address.split(":").map((part) => part.padStart(4, "0")).join(":");
65
63
  }
66
64
 
67
65
  //#endregion