@fedify/fedify 1.6.9 → 1.6.11
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-DY_ediuQ.js → actor-CxnKxfwH.js} +1059 -2276
- package/dist/{actor-qNVQigMJ.js → actor-KrOvzFz1.js} +6 -9
- 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-DTpSS6vq.js → authdocloader-CsnXlm3V.js} +4 -4
- package/dist/{authdocloader-ColUu5fh.js → authdocloader-DsULyH5D.js} +3 -3
- package/dist/{builder-CTAic_n3.js → builder-BjJSVOvs.js} +7 -10
- package/dist/{chunk-HsBuZ-b2.js → chunk-Cx8LTkjm.js} +3 -1
- package/dist/{client-Bp-TqQI6.js → client-BlntqhE9.js} +6 -6
- package/dist/compat/transformers.test.js +27 -28
- package/dist/{context-BAx407GT.js → context-CiyuTkCx.js} +2 -2
- package/dist/{docloader-UqcHJRjL.js → docloader-BYgIBZvh.js} +4 -6
- package/dist/{docloader-NmruKwBX.js → docloader-DOrb0fRp.js} +5 -9
- package/dist/{esm-Db4De7AS.js → esm-DO9PrujO.js} +23 -34
- package/dist/federation/builder.test.js +20 -23
- 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 +53 -68
- 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-3B6BDKCK.js → federation-DyRlaC4X.js} +1 -2
- package/dist/fixtures/oeee.cafe/ap/users/3609fd4e-d51d-4db8-9f04-4189815864dd.json +24 -0
- package/dist/{http-DjFoawa6.js → http-Dc8RIaDE.js} +56 -17
- package/dist/{http-XWz7prGl.js → http-LsE7i_Zq.js} +56 -17
- package/dist/{inbox-eAHML3xw.js → inbox-BVwejjm8.js} +5 -7
- package/dist/key-BP-Oky5H.js +16 -0
- package/dist/{key-CUEyp_yz.js → key-BTcmhZp7.js} +6 -9
- package/dist/{key-B4UFmNvL.js → key-Bg_PKGpe.js} +5 -8
- package/dist/{key-C1UhN1LT.js → key-DxKqQgGm.js} +4 -4
- package/dist/{keycache-YqFJn7EL.js → keycache-BnCTs9sG.js} +2 -2
- package/dist/{keys-Dd_v3HDs.js → keys-pbGG00jU.js} +1 -1
- package/dist/{ld-D8WCx-VU.js → ld-n_kUCeXG.js} +9 -16
- package/dist/{lookup-DggOHyrB.js → lookup-1pupHJbK.js} +7 -11
- package/dist/{lookup-DEN8lvde.js → lookup-Cutk-FXA.js} +3 -5
- package/dist/{lookup-DHlMvC3Q.js → lookup-DrAS097Q.js} +2 -4
- package/dist/middleware-CDYmpOKW.js +33 -0
- package/dist/{middleware-D_j7IO2V.js → middleware-CMTirIyg.js} +34 -52
- package/dist/middleware-CXZvlTVn.js +17 -0
- package/dist/{middleware-mmR5eUDI.js → middleware-kjrPMCqA.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-lYBh2f5Z.js → owner-c-Zzpacz.js} +3 -3
- package/dist/{proof-CPamyAcG.js → proof-BTx3Maj-.js} +12 -25
- package/dist/{proof-BAoGg0DQ.js → proof-CTOU2zFF.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-CrbpYrfD.js → send-SniNSIKd.js} +3 -4
- package/dist/sig/http.test.js +55 -53
- 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-C7C_l-jz.js → types-CJHS5pXl.js} +1 -1
- package/dist/{types-Bl1hBU1t.js → types-DG1qZLU9.js} +6 -8
- 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 +45 -49
- package/dist/{vocab-Cs9KbJAx.js → vocab-lzEJg2bH.js} +1057 -2270
- package/dist/{vocab-DSVoOj6P.js → vocab-oKloyO0F.js} +6 -10
- 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-ByAyOg3m.js +0 -16
- package/dist/middleware-B-ysz1Gc.js +0 -17
- package/dist/middleware-Bmr-V4-W.js +0 -33
package/dist/sig/owner.test.js
CHANGED
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
|
7
|
-
import { assert } from "../assert-
|
|
8
|
-
import "../assert_instance_of-
|
|
9
|
-
import "../docloader-
|
|
10
|
-
import "../url-
|
|
11
|
-
import "../multibase-
|
|
12
|
-
import { Create } from "../vocab-
|
|
6
|
+
import { assertEquals } from "../assert_equals-B44MxcIj.js";
|
|
7
|
+
import { assert } from "../assert-LOEeCUK5.js";
|
|
8
|
+
import "../assert_instance_of-XtuFevV_.js";
|
|
9
|
+
import "../docloader-BYgIBZvh.js";
|
|
10
|
+
import "../url-C2xuoQD1.js";
|
|
11
|
+
import "../multibase-CnLHszip.js";
|
|
12
|
+
import { Create } from "../vocab-lzEJg2bH.js";
|
|
13
13
|
import "../langstr-DbWheeIS.js";
|
|
14
|
-
import "../lookup-
|
|
15
|
-
import "../type-
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import { doesActorOwnKey, getKeyOwner } from "../owner-
|
|
19
|
-
import { lookupObject } from "../lookup-
|
|
20
|
-
import { test } from "../testing-
|
|
21
|
-
import "../std__assert-
|
|
22
|
-
import { assertFalse } from "../assert_rejects-
|
|
23
|
-
import "../assert_is_error-
|
|
24
|
-
import "../assert_not_equals-
|
|
25
|
-
import "../assert_throws-
|
|
14
|
+
import "../lookup-Cutk-FXA.js";
|
|
15
|
+
import "../type-CFuiGLz9.js";
|
|
16
|
+
import "../actor-KrOvzFz1.js";
|
|
17
|
+
import "../key-BTcmhZp7.js";
|
|
18
|
+
import { doesActorOwnKey, getKeyOwner } from "../owner-c-Zzpacz.js";
|
|
19
|
+
import { lookupObject } from "../lookup-1pupHJbK.js";
|
|
20
|
+
import { test } from "../testing-DLyvtiiW.js";
|
|
21
|
+
import "../std__assert-o_r9vqm1.js";
|
|
22
|
+
import { assertFalse } from "../assert_rejects-DWQ4jaf9.js";
|
|
23
|
+
import "../assert_is_error-BTlryvT0.js";
|
|
24
|
+
import "../assert_not_equals-C685gKx6.js";
|
|
25
|
+
import "../assert_throws-YetpVSc-.js";
|
|
26
26
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
|
27
|
-
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-
|
|
27
|
+
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-pbGG00jU.js";
|
|
28
28
|
|
|
29
29
|
//#region sig/owner.test.ts
|
|
30
30
|
test("doesActorOwnKey()", async () => {
|
package/dist/sig/proof.test.js
CHANGED
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
|
7
|
-
import "../assert-
|
|
8
|
-
import { assertInstanceOf } from "../assert_instance_of-
|
|
9
|
-
import "../docloader-
|
|
10
|
-
import "../url-
|
|
11
|
-
import { decode } from "../multibase-
|
|
12
|
-
import { Create, DataIntegrityProof, Multikey, Note, Place, importMultibaseKey } from "../vocab-
|
|
6
|
+
import { assertEquals } from "../assert_equals-B44MxcIj.js";
|
|
7
|
+
import "../assert-LOEeCUK5.js";
|
|
8
|
+
import { assertInstanceOf } from "../assert_instance_of-XtuFevV_.js";
|
|
9
|
+
import "../docloader-BYgIBZvh.js";
|
|
10
|
+
import "../url-C2xuoQD1.js";
|
|
11
|
+
import { decode } from "../multibase-CnLHszip.js";
|
|
12
|
+
import { Create, DataIntegrityProof, Multikey, Note, Place, importMultibaseKey } from "../vocab-lzEJg2bH.js";
|
|
13
13
|
import "../langstr-DbWheeIS.js";
|
|
14
|
-
import "../lookup-
|
|
15
|
-
import "../type-
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import { createProof, signObject, verifyObject, verifyProof } from "../proof-
|
|
19
|
-
import { test } from "../testing-
|
|
20
|
-
import "../std__assert-
|
|
21
|
-
import { assertRejects } from "../assert_rejects-
|
|
22
|
-
import "../assert_is_error-
|
|
23
|
-
import "../assert_not_equals-
|
|
24
|
-
import "../assert_throws-
|
|
14
|
+
import "../lookup-Cutk-FXA.js";
|
|
15
|
+
import "../type-CFuiGLz9.js";
|
|
16
|
+
import "../actor-KrOvzFz1.js";
|
|
17
|
+
import "../key-BTcmhZp7.js";
|
|
18
|
+
import { createProof, signObject, verifyObject, verifyProof } from "../proof-CTOU2zFF.js";
|
|
19
|
+
import { test } from "../testing-DLyvtiiW.js";
|
|
20
|
+
import "../std__assert-o_r9vqm1.js";
|
|
21
|
+
import { assertRejects } from "../assert_rejects-DWQ4jaf9.js";
|
|
22
|
+
import "../assert_is_error-BTlryvT0.js";
|
|
23
|
+
import "../assert_not_equals-C685gKx6.js";
|
|
24
|
+
import "../assert_throws-YetpVSc-.js";
|
|
25
25
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
|
26
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
|
26
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-pbGG00jU.js";
|
|
27
27
|
import { decodeHex, encodeHex } from "byte-encodings/hex";
|
|
28
28
|
|
|
29
29
|
//#region sig/proof.test.ts
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { AssertionError, buildMessage, diff, diffStr, format, red } from "./assert_equals-
|
|
6
|
+
import { AssertionError, buildMessage, diff, diffStr, format, red } from "./assert_equals-B44MxcIj.js";
|
|
7
7
|
|
|
8
8
|
//#region node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_exists.js
|
|
9
9
|
/**
|
|
@@ -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-DOrb0fRp.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
|