@fedify/fedify 1.6.11 → 1.6.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-tT_B0pDn.d.ts → actor-5yLVgYbM.d.ts} +3 -3
- package/dist/{actor-KrOvzFz1.js → actor-CcchiJa2.js} +6 -6
- package/dist/{actor-CxnKxfwH.js → actor-_hg-8_KF.js} +329 -465
- package/dist/{assert-LOEeCUK5.js → assert-C-mZuSQl.js} +2 -2
- package/dist/{assert_equals-B44MxcIj.js → assert_equals-Dy0MG_Zw.js} +16 -16
- package/dist/{assert_instance_of-XtuFevV_.js → assert_instance_of-lS0Jr2iu.js} +2 -2
- package/dist/{assert_is_error-BTlryvT0.js → assert_is_error-CIYFACrT.js} +2 -2
- package/dist/{assert_not_equals-C685gKx6.js → assert_not_equals-C1azCAB0.js} +3 -6
- package/dist/{assert_rejects-DWQ4jaf9.js → assert_rejects-Bkh5lA1a.js} +3 -3
- package/dist/{assert_throws-YetpVSc-.js → assert_throws-CmpfkWEM.js} +3 -3
- package/dist/{authdocloader-CsnXlm3V.js → authdocloader-1Ja0Him4.js} +7 -9
- package/dist/{authdocloader-DsULyH5D.js → authdocloader-D0Ds92Vk.js} +6 -8
- package/dist/{builder-BjJSVOvs.js → builder-MOXlzktX.js} +7 -7
- package/dist/{chunk-Cx8LTkjm.js → chunk-DvTpRkcT.js} +22 -15
- package/dist/{client-Cd552pKL.d.ts → client-BvbhJik1.d.ts} +2 -2
- package/dist/{client-BlntqhE9.js → client-C0yKnQtt.js} +3 -3
- package/dist/{collection-Dfb0TPno.js → collection-XNLQhehO.js} +2 -3
- package/dist/{mod-CgmTOt4z.d.ts → compat/mod-MHHm8HmK.d.ts} +3 -3
- package/dist/compat/mod.js +1 -2
- package/dist/compat/transformers.test.js +34 -38
- package/dist/{context-DRhhOsMk.d.ts → context-C0X9n1tC.d.ts} +10 -10
- package/dist/{context-CiyuTkCx.js → context-D7ltDKkC.js} +5 -5
- package/dist/{docloader-09nVWLAZ.js → docloader-BDSHZfTJ.js} +1 -1
- package/dist/{docloader-BYgIBZvh.js → docloader-C8QMM0lt.js} +32 -152
- package/dist/{docloader-DlUDOVSe.d.ts → docloader-DecYq5GI.d.ts} +2 -2
- package/dist/{docloader-DOrb0fRp.js → docloader-M1Np6SYc.js} +31 -151
- package/dist/{esm-DO9PrujO.js → esm-BRXvTSrx.js} +36 -22
- package/dist/federation/builder.test.js +20 -26
- package/dist/federation/collection.test.js +11 -16
- package/dist/federation/handler.test.js +41 -48
- package/dist/federation/inbox.test.js +11 -11
- package/dist/federation/keycache.test.js +12 -11
- package/dist/federation/kv.test.js +8 -10
- package/dist/federation/middleware.test.js +99 -120
- package/dist/federation/mod-CLkToKJa.d.ts +6 -0
- package/dist/federation/mod.js +195 -12
- package/dist/federation/mq.test.js +9 -14
- package/dist/federation/retry.test.js +5 -4
- package/dist/federation/router.test.js +9 -10
- package/dist/federation/send.test.js +23 -24
- package/dist/{http-LsE7i_Zq.js → http-BDLuDcCk.js} +17 -26
- package/dist/{http-Dc8RIaDE.js → http-BHjHzW-Y.js} +17 -26
- package/dist/{http-BkUCISGt.d.ts → http-ByqMVN52.d.ts} +3 -3
- package/dist/{inbox-BVwejjm8.js → inbox-FoFUUhTd.js} +5 -5
- package/dist/{key-BTcmhZp7.js → key-BABKdX0W.js} +5 -5
- package/dist/{key-Bg_PKGpe.js → key-Bj3ZyKd0.js} +4 -4
- package/dist/key-CragWqc4.js +16 -0
- package/dist/key-OMbKIYLU.js +10 -0
- package/dist/{keycache-BnCTs9sG.js → keycache-DONR-3XM.js} +2 -2
- package/dist/{keys-pbGG00jU.js → keys-KKGS1cpG.js} +2 -2
- package/dist/{kv-p8sC8PTT.d.ts → kv-CyvhW67T.d.ts} +1 -1
- package/dist/{kv-DohFOP2C.js → kv-DosGYGwV.js} +1 -1
- package/dist/{langstr-DbWheeIS.js → langstr-pFHBDU4y.js} +1 -1
- package/dist/{ld-n_kUCeXG.js → ld-DWSCvUJ-.js} +9 -12
- package/dist/{lookup-vJccIKCS.d.ts → lookup-BULfTwGb.d.ts} +2 -2
- package/dist/{lookup-Cutk-FXA.js → lookup-C2TcPqxv.js} +4 -4
- package/dist/{lookup-DrAS097Q.js → lookup-DIQCWtDD.js} +3 -3
- package/dist/{lookup-1pupHJbK.js → lookup-DZBZTzld.js} +6 -6
- package/dist/middleware-BdpSheEs.js +32 -0
- package/dist/{middleware-CMTirIyg.js → middleware-C9cbWvtY.js} +35 -39
- package/dist/middleware-CZQPvn1Y.js +17 -0
- package/dist/{middleware-kjrPMCqA.js → middleware-DRRaBIs3.js} +38 -43
- package/dist/{mod-j45KmAfR.d.ts → mod-C3OG1oK4.d.ts} +4 -4
- package/dist/{mod-DSPyncxx.d.ts → mod-CMpqcqIz.d.ts} +3 -3
- package/dist/mod-zMq7BLOW.d.ts +20 -0
- package/dist/mod.js +17 -17
- package/dist/{mq-nceTGCuc.d.ts → mq-CITHOe0n.d.ts} +1 -1
- package/dist/{multibase-CnLHszip.js → multibase-DBcKTV2a.js} +1 -1
- package/dist/nodeinfo/client.test.js +19 -28
- package/dist/nodeinfo/handler.test.js +37 -44
- package/dist/nodeinfo/mod-DY5OWSvB.d.ts +4 -0
- package/dist/nodeinfo/mod.js +2 -3
- package/dist/nodeinfo/semver.test.js +13 -21
- package/dist/nodeinfo/types.test.js +9 -11
- package/dist/{owner-CbRc94FP.d.ts → owner-BPGFI8Z3.d.ts} +4 -4
- package/dist/{owner-c-Zzpacz.js → owner-BSBuyxV4.js} +4 -4
- package/dist/{proof-BTx3Maj-.js → proof-B8LPOkvZ.js} +14 -19
- package/dist/{proof-CTOU2zFF.js → proof-CBHYxfh3.js} +11 -13
- package/dist/{retry-BiIhZWgD.js → retry-BQet39_l.js} +1 -1
- package/dist/{router-D_aVZZUc.js → router-BuDkN4RQ.js} +1 -1
- package/dist/runtime/authdocloader.test.js +22 -26
- package/dist/runtime/docloader.test.js +50 -46
- package/dist/runtime/key.test.js +31 -53
- package/dist/runtime/langstr.test.js +8 -10
- package/dist/{mod-BTHfUeLo.d.ts → runtime/mod-C4NyJ6RS.d.ts} +4 -3
- package/dist/runtime/mod.js +6 -7
- package/dist/runtime/multibase/multibase.test.js +12 -18
- package/dist/runtime/url.test.js +7 -6
- package/dist/{semver-BNrOOAs9.js → semver-D9d-VO-_.js} +7 -17
- package/dist/{send-SniNSIKd.js → send-Cah-Z3UO.js} +4 -4
- package/dist/sig/http.test.js +104 -168
- package/dist/sig/key.test.js +17 -20
- package/dist/sig/ld.test.js +28 -35
- package/dist/sig/mod-DM0ceGER.d.ts +6 -0
- package/dist/sig/mod.js +6 -7
- package/dist/sig/owner.test.js +24 -30
- package/dist/sig/proof.test.js +24 -29
- package/dist/{std__assert-o_r9vqm1.js → std__assert-BdP_WkD-.js} +7 -13
- package/dist/testing/docloader.test.js +9 -12
- package/dist/testing/mod.js +2 -1
- package/dist/{testing-DLyvtiiW.js → testing-qaAD4B0t.js} +2 -2
- package/dist/{transformers-ghwJuzGY.js → transformers-CFSWUhNi.js} +1 -1
- package/dist/{type-CFuiGLz9.js → type-DFsmi-p1.js} +1 -1
- package/dist/{types-DG1qZLU9.js → types-BXvx0wJm.js} +8 -18
- package/dist/{types-CJHS5pXl.js → types-CB_2uuCA.js} +2 -2
- package/dist/{url-C2xuoQD1.js → url-BdNvnK9P.js} +1 -1
- package/dist/vocab/actor.test.js +76 -128
- package/dist/vocab/lookup.test.js +19 -23
- package/dist/vocab/mod-CgB887se.d.ts +6 -0
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +10 -10
- package/dist/vocab/vocab.test.js +109 -105
- package/dist/{vocab-lzEJg2bH.js → vocab-B0flx0SI.js} +328 -464
- package/dist/{vocab-DSFLLLe6.d.ts → vocab-BQaYsnhp.d.ts} +2 -2
- package/dist/{vocab-oKloyO0F.js → vocab-BXeM76FR.js} +5 -5
- package/dist/webfinger/handler.test.js +40 -48
- package/dist/webfinger/lookup.test.js +12 -15
- package/dist/webfinger/mod-CE5bmzpH.d.ts +4 -0
- package/dist/webfinger/mod.js +2 -3
- package/dist/x/{cfworkers.d.ts → cfworkers-D_9uuXWs.d.ts} +2 -2
- package/dist/x/cfworkers.test.js +7 -9
- package/dist/x/{hono.d.ts → hono-TxxAGdy4.d.ts} +2 -11
- package/dist/x/{sveltekit.d.ts → sveltekit-KCF9gOdN.d.ts} +2 -11
- package/package.json +1 -1
- package/dist/compat/mod.d.ts +0 -15
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/federation/mod.d.ts +0 -15
- package/dist/federation-DyRlaC4X.js +0 -192
- package/dist/key-BP-Oky5H.js +0 -16
- package/dist/key-DxKqQgGm.js +0 -10
- package/dist/middleware-CDYmpOKW.js +0 -33
- package/dist/middleware-CXZvlTVn.js +0 -17
- package/dist/mod-1pDWKvUL.d.ts +0 -2
- package/dist/mod-GIh5OYxW.d.ts +0 -2
- package/dist/mod-g0xFzAP9.d.ts +0 -2
- package/dist/mod.d.ts +0 -20
- package/dist/nodeinfo/mod.d.ts +0 -7
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime/mod.d.ts +0 -8
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/sig/mod.d.ts +0 -10
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/vocab/mod.d.ts +0 -8
- package/dist/webfinger/mod.d.ts +0 -7
- package/dist/webfinger-C3GIyXIg.js +0 -4
- /package/dist/compat/{transformers.test.d.ts → transformers.test-DnJbd34u.d.ts} +0 -0
- /package/dist/{denokv-B_GFWjrl.js → denokv-XeyH3cFs.js} +0 -0
- /package/dist/federation/{builder.test.d.ts → builder.test-Bpt6NOZ6.d.ts} +0 -0
- /package/dist/federation/{collection.test.d.ts → collection.test-DKJ6JOZz.d.ts} +0 -0
- /package/dist/federation/{handler.test.d.ts → handler.test-BMT7uLC0.d.ts} +0 -0
- /package/dist/federation/{inbox.test.d.ts → inbox.test-Do6i02Qp.d.ts} +0 -0
- /package/dist/federation/{keycache.test.d.ts → keycache.test-BT83IPZY.d.ts} +0 -0
- /package/dist/federation/{kv.test.d.ts → kv.test-kFzzF2VN.d.ts} +0 -0
- /package/dist/federation/{middleware.test.d.ts → middleware.test-B1R4_e3-.d.ts} +0 -0
- /package/dist/federation/{mq.test.d.ts → mq.test-l79EQQOe.d.ts} +0 -0
- /package/dist/federation/{retry.test.d.ts → retry.test-BqS50VCX.d.ts} +0 -0
- /package/dist/federation/{router.test.d.ts → router.test-CYQl4po-.d.ts} +0 -0
- /package/dist/federation/{send.test.d.ts → send.test-COUnNUzv.d.ts} +0 -0
- /package/dist/nodeinfo/{client.test.d.ts → client.test-CZLe79hL.d.ts} +0 -0
- /package/dist/nodeinfo/{handler.test.d.ts → handler.test-B-EDZ_hK.d.ts} +0 -0
- /package/dist/nodeinfo/{semver.test.d.ts → semver.test-BEuuQSEM.d.ts} +0 -0
- /package/dist/nodeinfo/{types.test.d.ts → types.test-B5AT89WV.d.ts} +0 -0
- /package/dist/runtime/{authdocloader.test.d.ts → authdocloader.test-hCRKzn9v.d.ts} +0 -0
- /package/dist/runtime/{docloader.test.d.ts → docloader.test-CVd7i_5h.d.ts} +0 -0
- /package/dist/runtime/{key.test.d.ts → key.test-DBsILYSD.d.ts} +0 -0
- /package/dist/runtime/{langstr.test.d.ts → langstr.test-CiKxuuRY.d.ts} +0 -0
- /package/dist/runtime/multibase/{multibase.test.d.ts → multibase.test-Brh6gPBP.d.ts} +0 -0
- /package/dist/runtime/{url.test.d.ts → url.test-DlRqkU2j.d.ts} +0 -0
- /package/dist/sig/{http.test.d.ts → http.test-BpXNAWNI.d.ts} +0 -0
- /package/dist/sig/{key.test.d.ts → key.test-B2iLIugy.d.ts} +0 -0
- /package/dist/sig/{ld.test.d.ts → ld.test-D-cI70Gw.d.ts} +0 -0
- /package/dist/sig/{owner.test.d.ts → owner.test-B_YRjMPj.d.ts} +0 -0
- /package/dist/sig/{proof.test.d.ts → proof.test-BagEM_-4.d.ts} +0 -0
- /package/dist/testing/{docloader.test.d.ts → docloader.test-lrzf6sDZ.d.ts} +0 -0
- /package/dist/testing/{mod.d.ts → mod-3uM8ZvS7.d.ts} +0 -0
- /package/dist/vocab/{actor.test.d.ts → actor.test-ClC-iVWk.d.ts} +0 -0
- /package/dist/vocab/{lookup.test.d.ts → lookup.test-Cq1I-27w.d.ts} +0 -0
- /package/dist/vocab/{type.test.d.ts → type.test-bfFiYGcs.d.ts} +0 -0
- /package/dist/vocab/{vocab.test.d.ts → vocab.test-h-ZTisfu.d.ts} +0 -0
- /package/dist/webfinger/{handler.test.d.ts → handler.test-DiUeEDDD.d.ts} +0 -0
- /package/dist/webfinger/{lookup.test.d.ts → lookup.test-D9onm3U3.d.ts} +0 -0
- /package/dist/x/{cfworkers.test.d.ts → cfworkers.test-KXHlJ29z.d.ts} +0 -0
|
@@ -3,26 +3,23 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import
|
|
16
|
-
import "../
|
|
17
|
-
import "../
|
|
18
|
-
import "../
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import "../
|
|
23
|
-
import "../assert_is_error-BTlryvT0.js";
|
|
24
|
-
import "../assert_not_equals-C685gKx6.js";
|
|
25
|
-
import "../assert_throws-YetpVSc-.js";
|
|
6
|
+
import "../chunk-DvTpRkcT.js";
|
|
7
|
+
import { t as assertEquals } from "../assert_equals-Dy0MG_Zw.js";
|
|
8
|
+
import { t as MemoryKvStore } from "../kv-DosGYGwV.js";
|
|
9
|
+
import "../docloader-C8QMM0lt.js";
|
|
10
|
+
import "../url-BdNvnK9P.js";
|
|
11
|
+
import { n as parseSemVer } from "../semver-D9d-VO-_.js";
|
|
12
|
+
import "../router-BuDkN4RQ.js";
|
|
13
|
+
import "../multibase-DBcKTV2a.js";
|
|
14
|
+
import { S as Person, g as Note, t as Activity } from "../vocab-B0flx0SI.js";
|
|
15
|
+
import "../langstr-pFHBDU4y.js";
|
|
16
|
+
import "../inbox-FoFUUhTd.js";
|
|
17
|
+
import { n as createFederationBuilder } from "../builder-MOXlzktX.js";
|
|
18
|
+
import { t as test } from "../testing-qaAD4B0t.js";
|
|
19
|
+
import { a as assertExists } from "../std__assert-BdP_WkD-.js";
|
|
20
|
+
import "../assert_rejects-Bkh5lA1a.js";
|
|
21
|
+
import "../assert_is_error-CIYFACrT.js";
|
|
22
|
+
import "../assert_throws-CmpfkWEM.js";
|
|
26
23
|
|
|
27
24
|
//#region federation/builder.test.ts
|
|
28
25
|
test("FederationBuilder", async (t) => {
|
|
@@ -74,8 +71,7 @@ test("FederationBuilder", async (t) => {
|
|
|
74
71
|
assertExists(inboxListeners);
|
|
75
72
|
assertExists(impl.objectCallbacks[Note.typeId.href]);
|
|
76
73
|
assertExists(impl.nodeInfoDispatcher);
|
|
77
|
-
|
|
78
|
-
assertEquals(notePaths, "/notes/123");
|
|
74
|
+
assertEquals(impl.router.build(`object:${Note.typeId.href}`, { id: "123" }), "/notes/123");
|
|
79
75
|
assertEquals(impl.router.build("actor", { identifier: "user1" }), "/users/user1");
|
|
80
76
|
assertEquals(impl.router.build("inbox", { identifier: "user1" }), "/users/user1/inbox");
|
|
81
77
|
await builder.build({ kv });
|
|
@@ -119,10 +115,8 @@ test("FederationBuilder", async (t) => {
|
|
|
119
115
|
const impl = await builder.build({ kv });
|
|
120
116
|
assertExists(impl.objectCallbacks[Note.typeId.href]);
|
|
121
117
|
assertExists(impl.objectCallbacks[Person.typeId.href]);
|
|
122
|
-
|
|
123
|
-
assertEquals(
|
|
124
|
-
const personPath = impl.router.build(`object:${Person.typeId.href}`, { id: "456" });
|
|
125
|
-
assertEquals(personPath, "/people/456");
|
|
118
|
+
assertEquals(impl.router.build(`object:${Note.typeId.href}`, { id: "123" }), "/notes/123");
|
|
119
|
+
assertEquals(impl.router.build(`object:${Person.typeId.href}`, { id: "456" }), "/people/456");
|
|
126
120
|
const noteRoute = impl.router.route("/notes/789");
|
|
127
121
|
assertEquals(noteRoute?.name, `object:${Note.typeId.href}`);
|
|
128
122
|
assertEquals(noteRoute?.values.id, "789");
|
|
@@ -3,31 +3,26 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../assert_not_equals-C685gKx6.js";
|
|
15
|
-
import "../assert_throws-YetpVSc-.js";
|
|
6
|
+
import "../chunk-DvTpRkcT.js";
|
|
7
|
+
import { t as assertEquals } from "../assert_equals-Dy0MG_Zw.js";
|
|
8
|
+
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-XNLQhehO.js";
|
|
9
|
+
import { t as test } from "../testing-qaAD4B0t.js";
|
|
10
|
+
import "../std__assert-BdP_WkD-.js";
|
|
11
|
+
import "../assert_rejects-Bkh5lA1a.js";
|
|
12
|
+
import "../assert_is_error-CIYFACrT.js";
|
|
13
|
+
import "../assert_throws-CmpfkWEM.js";
|
|
16
14
|
import { decodeHex } from "byte-encodings/hex";
|
|
17
15
|
|
|
18
16
|
//#region federation/collection.test.ts
|
|
19
17
|
test("digest()", async () => {
|
|
20
|
-
|
|
18
|
+
assertEquals(await digest([
|
|
21
19
|
new URL("https://testing.example.org/users/1"),
|
|
22
20
|
new URL("https://testing.example.org/users/2"),
|
|
23
21
|
new URL("https://testing.example.org/users/2")
|
|
24
|
-
];
|
|
25
|
-
const result = await digest(uris);
|
|
26
|
-
assertEquals(result, decodeHex("c33f48cd341ef046a206b8a72ec97af65079f9a3a9b90eef79c5920dce45c61f"));
|
|
22
|
+
]), decodeHex("c33f48cd341ef046a206b8a72ec97af65079f9a3a9b90eef79c5920dce45c61f"));
|
|
27
23
|
});
|
|
28
24
|
test("buildCollectionSynchronizationHeader()", async () => {
|
|
29
|
-
|
|
30
|
-
assertEquals(header, "collectionId=\"https://testing.example.org/users/1/followers\", url=\"https://testing.example.org/users/1/followers?base-url=https%3A%2F%2Ftesting.example.org%2F\", digest=\"c33f48cd341ef046a206b8a72ec97af65079f9a3a9b90eef79c5920dce45c61f\"");
|
|
25
|
+
assertEquals(await buildCollectionSynchronizationHeader("https://testing.example.org/users/1/followers", ["https://testing.example.org/users/2", "https://testing.example.org/users/1"]), "collectionId=\"https://testing.example.org/users/1/followers\", url=\"https://testing.example.org/users/1/followers?base-url=https%3A%2F%2Ftesting.example.org%2F\", digest=\"c33f48cd341ef046a206b8a72ec97af65079f9a3a9b90eef79c5920dce45c61f\"");
|
|
31
26
|
});
|
|
32
27
|
|
|
33
28
|
//#endregion
|
|
@@ -3,45 +3,42 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import "../
|
|
9
|
-
import { MemoryKvStore } from "../kv-
|
|
10
|
-
import {
|
|
11
|
-
import "../docloader-
|
|
12
|
-
import "../url-
|
|
13
|
-
import "../semver-
|
|
14
|
-
import "../client-
|
|
15
|
-
import "../router-
|
|
16
|
-
import "../types-
|
|
17
|
-
import "../multibase-
|
|
18
|
-
import { Create, Note
|
|
19
|
-
import "../langstr-
|
|
20
|
-
import "../lookup-
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import
|
|
31
|
-
import "../
|
|
32
|
-
import "../
|
|
33
|
-
import "../
|
|
34
|
-
import "../
|
|
35
|
-
import "../
|
|
36
|
-
import {
|
|
37
|
-
import "../
|
|
38
|
-
import
|
|
39
|
-
import "../
|
|
40
|
-
import "../
|
|
41
|
-
import "../
|
|
42
|
-
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
|
43
|
-
import { createInboxContext, createRequestContext } from "../context-CiyuTkCx.js";
|
|
44
|
-
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-pbGG00jU.js";
|
|
6
|
+
import "../chunk-DvTpRkcT.js";
|
|
7
|
+
import { t as assertEquals } from "../assert_equals-Dy0MG_Zw.js";
|
|
8
|
+
import { t as assert } from "../assert-C-mZuSQl.js";
|
|
9
|
+
import { t as MemoryKvStore } from "../kv-DosGYGwV.js";
|
|
10
|
+
import { a as createFederation, c as handleCollection, d as respondWithObject, f as respondWithObjectIfAcceptable, l as handleInbox, o as acceptsJsonLd, s as handleActor, u as handleObject } from "../middleware-C9cbWvtY.js";
|
|
11
|
+
import "../docloader-C8QMM0lt.js";
|
|
12
|
+
import "../url-BdNvnK9P.js";
|
|
13
|
+
import "../semver-D9d-VO-_.js";
|
|
14
|
+
import "../client-C0yKnQtt.js";
|
|
15
|
+
import "../router-BuDkN4RQ.js";
|
|
16
|
+
import "../types-CB_2uuCA.js";
|
|
17
|
+
import "../multibase-DBcKTV2a.js";
|
|
18
|
+
import { S as Person, a as Create, g as Note } from "../vocab-B0flx0SI.js";
|
|
19
|
+
import "../langstr-pFHBDU4y.js";
|
|
20
|
+
import "../lookup-C2TcPqxv.js";
|
|
21
|
+
import "../actor-CcchiJa2.js";
|
|
22
|
+
import "../key-BABKdX0W.js";
|
|
23
|
+
import { s as signRequest } from "../http-BHjHzW-Y.js";
|
|
24
|
+
import "../authdocloader-1Ja0Him4.js";
|
|
25
|
+
import "../ld-DWSCvUJ-.js";
|
|
26
|
+
import "../owner-BSBuyxV4.js";
|
|
27
|
+
import "../proof-CBHYxfh3.js";
|
|
28
|
+
import "../lookup-DZBZTzld.js";
|
|
29
|
+
import { t as InboxListenerSet } from "../inbox-FoFUUhTd.js";
|
|
30
|
+
import "../builder-MOXlzktX.js";
|
|
31
|
+
import "../collection-XNLQhehO.js";
|
|
32
|
+
import "../keycache-DONR-3XM.js";
|
|
33
|
+
import "../send-Cah-Z3UO.js";
|
|
34
|
+
import { t as test } from "../testing-qaAD4B0t.js";
|
|
35
|
+
import "../std__assert-BdP_WkD-.js";
|
|
36
|
+
import { n as assertFalse } from "../assert_rejects-Bkh5lA1a.js";
|
|
37
|
+
import "../assert_is_error-CIYFACrT.js";
|
|
38
|
+
import "../assert_throws-CmpfkWEM.js";
|
|
39
|
+
import { t as mockDocumentLoader } from "../docloader-BDSHZfTJ.js";
|
|
40
|
+
import { n as createRequestContext, t as createInboxContext } from "../context-D7ltDKkC.js";
|
|
41
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-KKGS1cpG.js";
|
|
45
42
|
|
|
46
43
|
//#region federation/handler.test.ts
|
|
47
44
|
test("acceptsJsonLd()", () => {
|
|
@@ -52,9 +49,8 @@ test("acceptsJsonLd()", () => {
|
|
|
52
49
|
assertFalse(acceptsJsonLd(new Request("https://example.com/", { headers: { Accept: "application/ld+json; q=0.4, application/xhtml+xml; q=0.9" } })));
|
|
53
50
|
});
|
|
54
51
|
test("handleActor()", async () => {
|
|
55
|
-
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
56
52
|
let context = createRequestContext({
|
|
57
|
-
federation,
|
|
53
|
+
federation: createFederation({ kv: new MemoryKvStore() }),
|
|
58
54
|
data: void 0,
|
|
59
55
|
url: new URL("https://example.com/"),
|
|
60
56
|
getActorUri(identifier) {
|
|
@@ -278,9 +274,8 @@ test("handleActor()", async () => {
|
|
|
278
274
|
assertEquals(onUnauthorizedCalled, null);
|
|
279
275
|
});
|
|
280
276
|
test("handleObject()", async () => {
|
|
281
|
-
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
282
277
|
let context = createRequestContext({
|
|
283
|
-
federation,
|
|
278
|
+
federation: createFederation({ kv: new MemoryKvStore() }),
|
|
284
279
|
data: void 0,
|
|
285
280
|
url: new URL("https://example.com/"),
|
|
286
281
|
getObjectUri(_cls, values) {
|
|
@@ -513,9 +508,8 @@ test("handleObject()", async () => {
|
|
|
513
508
|
assertEquals(onUnauthorizedCalled, null);
|
|
514
509
|
});
|
|
515
510
|
test("handleCollection()", async () => {
|
|
516
|
-
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
517
511
|
let context = createRequestContext({
|
|
518
|
-
federation,
|
|
512
|
+
federation: createFederation({ kv: new MemoryKvStore() }),
|
|
519
513
|
data: void 0,
|
|
520
514
|
url: new URL("https://example.com/"),
|
|
521
515
|
getActorUri(identifier) {
|
|
@@ -1133,7 +1127,7 @@ test("handleInbox()", async () => {
|
|
|
1133
1127
|
});
|
|
1134
1128
|
assertEquals(onNotFoundCalled, null);
|
|
1135
1129
|
assertEquals(response.status, 202);
|
|
1136
|
-
const
|
|
1130
|
+
const signedInvalidRequest = await signRequest(new Request("https://example.com/", {
|
|
1137
1131
|
method: "POST",
|
|
1138
1132
|
body: JSON.stringify({
|
|
1139
1133
|
"@context": [
|
|
@@ -1148,8 +1142,7 @@ test("handleInbox()", async () => {
|
|
|
1148
1142
|
},
|
|
1149
1143
|
actor: "https://example.com/users/alice"
|
|
1150
1144
|
})
|
|
1151
|
-
});
|
|
1152
|
-
const signedInvalidRequest = await signRequest(invalidRequest, rsaPrivateKey3, rsaPublicKey3.id);
|
|
1145
|
+
}), rsaPrivateKey3, rsaPublicKey3.id);
|
|
1153
1146
|
const signedInvalidContext = createRequestContext({
|
|
1154
1147
|
federation,
|
|
1155
1148
|
request: signedInvalidRequest,
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import { InboxListenerSet } from "../inbox-
|
|
14
|
-
import { test } from "../testing-
|
|
15
|
-
import "../assert_is_error-
|
|
16
|
-
import { assertThrows } from "../assert_throws-
|
|
6
|
+
import "../chunk-DvTpRkcT.js";
|
|
7
|
+
import { t as assertEquals } from "../assert_equals-Dy0MG_Zw.js";
|
|
8
|
+
import "../docloader-C8QMM0lt.js";
|
|
9
|
+
import "../url-BdNvnK9P.js";
|
|
10
|
+
import "../multibase-DBcKTV2a.js";
|
|
11
|
+
import { D as Update, a as Create, p as Invite, t as Activity, v as Offer } from "../vocab-B0flx0SI.js";
|
|
12
|
+
import "../langstr-pFHBDU4y.js";
|
|
13
|
+
import { t as InboxListenerSet } from "../inbox-FoFUUhTd.js";
|
|
14
|
+
import { t as test } from "../testing-qaAD4B0t.js";
|
|
15
|
+
import "../assert_is_error-CIYFACrT.js";
|
|
16
|
+
import { t as assertThrows } from "../assert_throws-CmpfkWEM.js";
|
|
17
17
|
|
|
18
18
|
//#region federation/inbox.test.ts
|
|
19
19
|
test("InboxListenerSet", () => {
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import
|
|
14
|
-
import "../
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
6
|
+
import "../chunk-DvTpRkcT.js";
|
|
7
|
+
import { t as assertEquals } from "../assert_equals-Dy0MG_Zw.js";
|
|
8
|
+
import { t as assert } from "../assert-C-mZuSQl.js";
|
|
9
|
+
import { t as assertInstanceOf } from "../assert_instance_of-lS0Jr2iu.js";
|
|
10
|
+
import { t as MemoryKvStore } from "../kv-DosGYGwV.js";
|
|
11
|
+
import "../docloader-C8QMM0lt.js";
|
|
12
|
+
import "../url-BdNvnK9P.js";
|
|
13
|
+
import "../multibase-DBcKTV2a.js";
|
|
14
|
+
import { h as Multikey, o as CryptographicKey } from "../vocab-B0flx0SI.js";
|
|
15
|
+
import "../langstr-pFHBDU4y.js";
|
|
16
|
+
import { t as KvKeyCache } from "../keycache-DONR-3XM.js";
|
|
17
|
+
import { t as test } from "../testing-qaAD4B0t.js";
|
|
17
18
|
|
|
18
19
|
//#region federation/keycache.test.ts
|
|
19
20
|
test("KvKeyCache.set()", async () => {
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../assert_not_equals-C685gKx6.js";
|
|
15
|
-
import "../assert_throws-YetpVSc-.js";
|
|
6
|
+
import "../chunk-DvTpRkcT.js";
|
|
7
|
+
import { t as assertEquals } from "../assert_equals-Dy0MG_Zw.js";
|
|
8
|
+
import { t as MemoryKvStore } from "../kv-DosGYGwV.js";
|
|
9
|
+
import { t as test } from "../testing-qaAD4B0t.js";
|
|
10
|
+
import "../std__assert-BdP_WkD-.js";
|
|
11
|
+
import "../assert_rejects-Bkh5lA1a.js";
|
|
12
|
+
import "../assert_is_error-CIYFACrT.js";
|
|
13
|
+
import "../assert_throws-CmpfkWEM.js";
|
|
16
14
|
|
|
17
15
|
//#region federation/kv.test.ts
|
|
18
16
|
test("MemoryKvStore", async (t) => {
|