@fedify/fedify 1.7.11 → 1.7.13

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-2ENhJMd7.js → actor-BVilnhZ3.js} +6 -9
  2. package/dist/{actor-DgWryCk8.js → actor-CsmPeeHG.js} +1059 -2276
  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-CK17fG7y.js → authdocloader-9g6RkEcR.js} +4 -4
  11. package/dist/{authdocloader-BUJAQQAE.js → authdocloader-DqCINL6u.js} +3 -3
  12. package/dist/{builder-CZM8EtHh.js → builder-CKUAOfcL.js} +7 -10
  13. package/dist/{chunk-HsBuZ-b2.js → chunk-Cx8LTkjm.js} +3 -1
  14. package/dist/{client-D83KwIk4.js → client-C5xUY491.js} +6 -6
  15. package/dist/compat/transformers.test.js +27 -28
  16. package/dist/{context-MUHrGcK9.js → context-aglzx1Ww.js} +2 -2
  17. package/dist/{docloader-BcyuO_kK.js → docloader-CchlnLWb.js} +5 -9
  18. package/dist/{docloader-D4wl8z_4.js → docloader-Qfs9nPiy.js} +4 -6
  19. package/dist/{esm-Db4De7AS.js → esm-DO9PrujO.js} +23 -34
  20. package/dist/federation/builder.test.js +23 -29
  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 +76 -99
  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-BRIQn-GV.js → federation-B0aljx0V.js} +1 -2
  33. package/dist/{http-DFHfa9tA.js → http-CP3h1SLi.js} +8 -15
  34. package/dist/{http-Dsj_eYDw.js → http-CjDwMreH.js} +8 -15
  35. package/dist/{inbox-CltmHpHc.js → inbox-ApPO50Ma.js} +5 -7
  36. package/dist/{key-qFVeObG1.js → key--l6NVKdl.js} +5 -8
  37. package/dist/key-1Fv7reaM.js +16 -0
  38. package/dist/{key-bttcdrh5.js → key-BPUM0v_S.js} +6 -9
  39. package/dist/{key-bBurC_PZ.js → key-DD37RpoD.js} +4 -4
  40. package/dist/{keycache-DijbBawF.js → keycache-B7Urghlu.js} +2 -2
  41. package/dist/{keys-DJ5t4jB4.js → keys-DGJec4-R.js} +1 -1
  42. package/dist/{ld-U-lGfuzj.js → ld-DJTavNY3.js} +9 -16
  43. package/dist/{lookup-BlPHJ-Ff.js → lookup-CN-LpF5e.js} +2 -4
  44. package/dist/{lookup-BGqnk7rW.js → lookup-CkOdKyYR.js} +3 -5
  45. package/dist/{lookup-C8ZpflGI.js → lookup-CnkkF4Rf.js} +7 -11
  46. package/dist/middleware-BQHe0X6Y.js +17 -0
  47. package/dist/{middleware-D66R1UZl.js → middleware-BxHcZC4p.js} +34 -52
  48. package/dist/middleware-C3TZ3P-v.js +33 -0
  49. package/dist/{middleware-BRzqW-QG.js → middleware-CEpilAEY.js} +34 -58
  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-2zho-3Ew.js → owner-qKULzrkx.js} +3 -3
  58. package/dist/{proof-3J23UdVg.js → proof-BfeWBNrY.js} +12 -25
  59. package/dist/{proof-BYHc1mMr.js → proof-d5P09-xk.js} +8 -14
  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-CW7iJ-b9.js → send-BnMY3Qxa.js} +3 -4
  69. package/dist/sig/http.test.js +40 -54
  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-DXmLob1B.js → types-BZUzjGS0.js} +6 -8
  81. package/dist/{types-C7C_l-jz.js → types-CJHS5pXl.js} +1 -1
  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-Cy9XhW_T.js → vocab-C_pE4SvE.js} +6 -10
  89. package/dist/{vocab-BojAnGjI.js → vocab-S7fEn6XO.js} +1057 -2270
  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-BROjrzkW.js +0 -16
  96. package/dist/middleware-BhqeOJrC.js +0 -17
  97. package/dist/middleware-DFra19vb.js +0 -33
@@ -3,15 +3,15 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-CTYbeopb.js";
7
- import "../assert-DmFG7ppO.js";
8
- import "../assert_instance_of-CF09JHYM.js";
9
- import { test } from "../testing-BZ0dJ4qn.js";
10
- import "../std__assert-vp0TKMS1.js";
11
- import "../assert_rejects-C-sxEMM5.js";
12
- import "../assert_is_error-nrwA1GeT.js";
13
- import "../assert_not_equals-Dc7y-V5Q.js";
14
- import "../assert_throws-Cn9C6Jur.js";
6
+ import { assertEquals } from "../assert_equals-B44MxcIj.js";
7
+ import "../assert-LOEeCUK5.js";
8
+ import "../assert_instance_of-XtuFevV_.js";
9
+ import { test } from "../testing-DLyvtiiW.js";
10
+ import "../std__assert-o_r9vqm1.js";
11
+ import "../assert_rejects-DWQ4jaf9.js";
12
+ import "../assert_is_error-BTlryvT0.js";
13
+ import "../assert_not_equals-C685gKx6.js";
14
+ import "../assert_throws-YetpVSc-.js";
15
15
  import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
16
16
 
17
17
  //#region testing/docloader.test.ts
@@ -3,6 +3,6 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { test, testDefinitions } from "../testing-BZ0dJ4qn.js";
6
+ import { test, testDefinitions } from "../testing-DLyvtiiW.js";
7
7
 
8
8
  export { test, testDefinitions };
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { __require } from "./chunk-HsBuZ-b2.js";
6
+ import { __require } from "./chunk-Cx8LTkjm.js";
7
7
  import { configure, getConsoleSink, reset } from "@logtape/logtape";
8
8
 
9
9
  //#region testing/mod.ts
@@ -121,12 +121,11 @@ function intoDenoTestContext(name, ctx) {
121
121
  });
122
122
  return failed;
123
123
  }
124
- const denoCtx = {
124
+ return {
125
125
  name,
126
126
  origin: ctx.filePath ?? "",
127
127
  step
128
128
  };
129
- return denoCtx;
130
129
  }
131
130
  /** Retrieve caller test file. */
132
131
  function caller() {
@@ -135,8 +134,7 @@ function caller() {
135
134
  Trace.prepareStackTrace = (_$1, stack$1) => stack$1;
136
135
  const { stack } = /* @__PURE__ */ new Error();
137
136
  Trace.prepareStackTrace = _;
138
- const caller$1 = stack[2];
139
- return caller$1.getFileName().replaceAll("\\", "/");
137
+ return stack[2].getFileName().replaceAll("\\", "/");
140
138
  }
141
139
 
142
140
  //#endregion
@@ -6,8 +6,7 @@
6
6
  //#region vocab/type.ts
7
7
  function getTypeId(object) {
8
8
  if (object == null) return object;
9
- const cls = object.constructor;
10
- return cls.typeId;
9
+ return object.constructor.typeId;
11
10
  }
12
11
 
13
12
  //#endregion
@@ -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-BcyuO_kK.js";
5
+ import { getUserAgent } from "./docloader-CchlnLWb.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
  /**
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { formatSemVer } from "./semver-DWClQt_5.js";
6
+ import { formatSemVer } from "./semver-BNrOOAs9.js";
7
7
 
8
8
  //#region nodeinfo/types.ts
9
9
  /**
@@ -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