@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.
- package/dist/{actor-2ENhJMd7.js → actor-BVilnhZ3.js} +6 -9
- package/dist/{actor-DgWryCk8.js → actor-CsmPeeHG.js} +1059 -2276
- package/dist/{assert-DmFG7ppO.js → assert-LOEeCUK5.js} +1 -1
- package/dist/{assert_equals-CTYbeopb.js → assert_equals-B44MxcIj.js} +2 -4
- package/dist/{assert_instance_of-CF09JHYM.js → assert_instance_of-XtuFevV_.js} +1 -1
- package/dist/{assert_is_error-nrwA1GeT.js → assert_is_error-BTlryvT0.js} +1 -1
- package/dist/{assert_not_equals-Dc7y-V5Q.js → assert_not_equals-C685gKx6.js} +1 -1
- package/dist/{assert_rejects-C-sxEMM5.js → assert_rejects-DWQ4jaf9.js} +2 -2
- package/dist/{assert_throws-Cn9C6Jur.js → assert_throws-YetpVSc-.js} +2 -2
- package/dist/{authdocloader-CK17fG7y.js → authdocloader-9g6RkEcR.js} +4 -4
- package/dist/{authdocloader-BUJAQQAE.js → authdocloader-DqCINL6u.js} +3 -3
- package/dist/{builder-CZM8EtHh.js → builder-CKUAOfcL.js} +7 -10
- package/dist/{chunk-HsBuZ-b2.js → chunk-Cx8LTkjm.js} +3 -1
- package/dist/{client-D83KwIk4.js → client-C5xUY491.js} +6 -6
- package/dist/compat/transformers.test.js +27 -28
- package/dist/{context-MUHrGcK9.js → context-aglzx1Ww.js} +2 -2
- package/dist/{docloader-BcyuO_kK.js → docloader-CchlnLWb.js} +5 -9
- package/dist/{docloader-D4wl8z_4.js → docloader-Qfs9nPiy.js} +4 -6
- package/dist/{esm-Db4De7AS.js → esm-DO9PrujO.js} +23 -34
- package/dist/federation/builder.test.js +23 -29
- package/dist/federation/collection.test.js +9 -9
- package/dist/federation/handler.test.js +33 -33
- package/dist/federation/inbox.test.js +10 -10
- package/dist/federation/keycache.test.js +9 -9
- package/dist/federation/kv.test.js +10 -9
- package/dist/federation/middleware.test.js +76 -99
- package/dist/federation/mod.js +11 -11
- package/dist/federation/mq.test.js +10 -11
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +9 -9
- package/dist/federation/send.test.js +22 -22
- package/dist/{federation-BRIQn-GV.js → federation-B0aljx0V.js} +1 -2
- package/dist/{http-DFHfa9tA.js → http-CP3h1SLi.js} +8 -15
- package/dist/{http-Dsj_eYDw.js → http-CjDwMreH.js} +8 -15
- package/dist/{inbox-CltmHpHc.js → inbox-ApPO50Ma.js} +5 -7
- package/dist/{key-qFVeObG1.js → key--l6NVKdl.js} +5 -8
- package/dist/key-1Fv7reaM.js +16 -0
- package/dist/{key-bttcdrh5.js → key-BPUM0v_S.js} +6 -9
- package/dist/{key-bBurC_PZ.js → key-DD37RpoD.js} +4 -4
- package/dist/{keycache-DijbBawF.js → keycache-B7Urghlu.js} +2 -2
- package/dist/{keys-DJ5t4jB4.js → keys-DGJec4-R.js} +1 -1
- package/dist/{ld-U-lGfuzj.js → ld-DJTavNY3.js} +9 -16
- package/dist/{lookup-BlPHJ-Ff.js → lookup-CN-LpF5e.js} +2 -4
- package/dist/{lookup-BGqnk7rW.js → lookup-CkOdKyYR.js} +3 -5
- package/dist/{lookup-C8ZpflGI.js → lookup-CnkkF4Rf.js} +7 -11
- package/dist/middleware-BQHe0X6Y.js +17 -0
- package/dist/{middleware-D66R1UZl.js → middleware-BxHcZC4p.js} +34 -52
- package/dist/middleware-C3TZ3P-v.js +33 -0
- package/dist/{middleware-BRzqW-QG.js → middleware-CEpilAEY.js} +34 -58
- package/dist/mod.js +11 -11
- package/dist/{multibase-DeCHcK8L.js → multibase-CnLHszip.js} +1 -2
- package/dist/nodeinfo/client.test.js +20 -23
- package/dist/nodeinfo/handler.test.js +32 -32
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +23 -30
- package/dist/nodeinfo/types.test.js +11 -11
- package/dist/{owner-2zho-3Ew.js → owner-qKULzrkx.js} +3 -3
- package/dist/{proof-3J23UdVg.js → proof-BfeWBNrY.js} +12 -25
- package/dist/{proof-BYHc1mMr.js → proof-d5P09-xk.js} +8 -14
- package/dist/runtime/authdocloader.test.js +21 -21
- package/dist/runtime/docloader.test.js +16 -18
- package/dist/runtime/key.test.js +17 -17
- package/dist/runtime/langstr.test.js +9 -9
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +11 -12
- package/dist/runtime/url.test.js +6 -6
- package/dist/{semver-DWClQt_5.js → semver-BNrOOAs9.js} +1 -3
- package/dist/{send-CW7iJ-b9.js → send-BnMY3Qxa.js} +3 -4
- package/dist/sig/http.test.js +40 -54
- package/dist/sig/key.test.js +18 -18
- package/dist/sig/ld.test.js +20 -22
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +20 -20
- package/dist/sig/proof.test.js +19 -19
- package/dist/{std__assert-vp0TKMS1.js → std__assert-o_r9vqm1.js} +1 -1
- package/dist/testing/docloader.test.js +9 -9
- package/dist/testing/mod.js +1 -1
- package/dist/{testing-BZ0dJ4qn.js → testing-DLyvtiiW.js} +3 -5
- package/dist/{type-D2s5lmbZ.js → type-CFuiGLz9.js} +1 -2
- package/dist/{types-DXmLob1B.js → types-BZUzjGS0.js} +6 -8
- package/dist/{types-C7C_l-jz.js → types-CJHS5pXl.js} +1 -1
- package/dist/{url-kTAI6_KP.js → url-C2xuoQD1.js} +2 -4
- package/dist/vocab/actor.test.js +104 -156
- package/dist/vocab/lookup.test.js +17 -17
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +11 -15
- package/dist/vocab/vocab.test.js +68 -49
- package/dist/{vocab-Cy9XhW_T.js → vocab-C_pE4SvE.js} +6 -10
- package/dist/{vocab-BojAnGjI.js → vocab-S7fEn6XO.js} +1057 -2270
- package/dist/webfinger/handler.test.js +33 -34
- package/dist/webfinger/lookup.test.js +13 -13
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +9 -9
- package/package.json +1 -1
- package/dist/key-BROjrzkW.js +0 -16
- package/dist/middleware-BhqeOJrC.js +0 -17
- 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-
|
|
7
|
-
import "../assert-
|
|
8
|
-
import "../assert_instance_of-
|
|
9
|
-
import { test } from "../testing-
|
|
10
|
-
import "../std__assert-
|
|
11
|
-
import "../assert_rejects-
|
|
12
|
-
import "../assert_is_error-
|
|
13
|
-
import "../assert_not_equals-
|
|
14
|
-
import "../assert_throws-
|
|
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
|
package/dist/testing/mod.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { __require } from "./chunk-
|
|
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
|
-
|
|
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
|
-
|
|
139
|
-
return caller$1.getFileName().replaceAll("\\", "/");
|
|
137
|
+
return stack[2].getFileName().replaceAll("\\", "/");
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
//#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-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|