@fedify/fedify 1.7.2 → 1.8.0-dev.910
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/LICENSE +20 -0
- package/dist/{actor-CPpvuBKU.d.ts → actor-B4TBtqRP.d.ts} +2 -2
- package/dist/{actor-kNI1Kuu5.js → actor-BniCOS3i.js} +3 -3
- package/dist/{actor-C_sd2LSx.js → actor-W-6h4XlQ.js} +179 -179
- package/dist/{assert-0DSnLFa8.js → assert-DwEa6glZ.js} +2 -2
- package/dist/{assert_equals-XhPMqqO2.js → assert_equals-C5gKCm6A.js} +10 -22
- package/dist/{assert_instance_of-v5adm_-K.js → assert_instance_of-C9QtN-X9.js} +2 -2
- package/dist/{assert_is_error-Drwb_yQp.js → assert_is_error-DQdKoRgb.js} +2 -2
- package/dist/{assert_not_equals-BRPdeJ9D.js → assert_not_equals-7pyUM3Ib.js} +2 -2
- package/dist/{assert_rejects-D_nYI1gs.js → assert_rejects-DceVjUlD.js} +4 -4
- package/dist/{assert_throws-DNuPhPNp.js → assert_throws-DTDC_gwN.js} +3 -3
- package/dist/{authdocloader-B6BfM9cL.js → authdocloader-e8Qhqry3.js} +3 -3
- package/dist/{authdocloader-if5ggdqv.js → authdocloader-o-F5aHAH.js} +3 -3
- package/dist/{builder-BfWHOJkZ.js → builder-6s4wCL2c.js} +4 -4
- package/dist/{client-BiG9LrWB.js → client-37jfjmdY.js} +1 -1
- package/dist/{client-DvtwXO7t.d.ts → client-BQ4AQGKo.d.ts} +1 -1
- package/dist/compat/mod.d.ts +11 -11
- package/dist/compat/transformers.test.js +22 -22
- package/dist/{context-lMHWYYW2.js → context-ByWT6rsc.js} +3 -3
- package/dist/{context-DPggmpB4.d.ts → context-y90aX3KP.d.ts} +9 -9
- package/dist/{denokv-CvROlGYX.js → denokv-QWKsIqML.js} +2 -0
- package/dist/{docloader-Y76fz1QR.js → docloader-BZBrUZeZ.js} +2 -2
- package/dist/{docloader-Q42SMRIB.d.ts → docloader-BeCtcTOJ.d.ts} +1 -1
- package/dist/{docloader-ps0DMWjv.js → docloader-DzoNSY8I.js} +2 -2
- package/dist/{esm-CASHO3OR.js → esm-d-9EVGaP.js} +14 -14
- package/dist/federation/builder.test.js +14 -14
- package/dist/federation/collection.test.js +8 -8
- package/dist/federation/handler.test.js +29 -29
- package/dist/federation/inbox.test.js +6 -6
- package/dist/federation/keycache.test.js +7 -7
- package/dist/federation/kv.test.js +21 -9
- package/dist/federation/middleware.test.js +29 -29
- package/dist/federation/mod.d.ts +10 -10
- package/dist/federation/mod.js +11 -11
- package/dist/federation/mq.test.js +11 -11
- package/dist/federation/retry.test.js +2 -2
- package/dist/federation/router.test.js +9 -9
- package/dist/federation/send.test.js +18 -18
- package/dist/{federation-BRIQn-GV.js → federation-C44ekWNP.js} +28 -6
- package/dist/{http-D2kxx0MM.js → http-BrJcn5xX.js} +8 -22
- package/dist/{http-B8EiSgi2.d.ts → http-CP2ZUALI.d.ts} +2 -2
- package/dist/{http-xny2jgU9.js → http-CWcmmHS3.js} +8 -22
- package/dist/{inbox-DYa89dK3.js → inbox-DXGMgg5A.js} +2 -2
- package/dist/{key-CW6VucYV.js → key-CKQt2QuX.js} +4 -4
- package/dist/{key-CbN6XqfG.js → key-CL8xpd53.js} +5 -5
- package/dist/{key-C4ZA8dqv.js → key-CNh0_4UK.js} +2 -2
- package/dist/{key-B--oybmj.js → key-CQZCHGYL.js} +3 -3
- package/dist/{keycache-B3XsWKuN.js → keycache-2xuv5jk-.js} +1 -1
- package/dist/{keys-CSt26-hj.js → keys-_CuBoyQl.js} +1 -1
- package/dist/{kv-BMY6Qf_A.js → kv-D7Yt6pnB.js} +22 -0
- package/dist/{kv-DRaeSXco.d.ts → kv-DDdb1hMa.d.ts} +14 -0
- package/dist/{ld-liCYh9NF.js → ld-CyHD6QTx.js} +3 -3
- package/dist/{lookup-QgCHmE_h.js → lookup-B3Ji9Hri.js} +1 -1
- package/dist/{lookup-UHy_h_Ub.js → lookup-CO7jWozP.js} +4 -4
- package/dist/{lookup-154aM5KD.js → lookup-CfqMiAUO.js} +1 -1
- package/dist/{lookup-Bf-K85bV.d.ts → lookup-DHNtuVcT.d.ts} +1 -1
- package/dist/middleware-BWBJQC-P.js +17 -0
- package/dist/{middleware-BeTfacPC.js → middleware-BrK09zm5.js} +11 -11
- package/dist/{middleware-CfHPRgJ8.js → middleware-DYZ4sFyx.js} +16 -16
- package/dist/middleware-Dx6oWBGd.js +33 -0
- package/dist/{mod-CDzlVCUF.d.ts → mod-BzLUzgBJ.d.ts} +2 -2
- package/dist/{mod-CbjCOiVh.d.ts → mod-CaGwZaei.d.ts} +2 -2
- package/dist/{mod-C2drFqH8.d.ts → mod-CytXBx8A.d.ts} +2 -2
- package/dist/{mod-sEI6_uZ2.d.ts → mod-D2uPZuP-.d.ts} +3 -3
- package/dist/mod.d.ts +13 -13
- package/dist/mod.js +11 -11
- package/dist/nodeinfo/client.test.js +11 -11
- package/dist/nodeinfo/handler.test.js +28 -28
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +8 -8
- package/dist/nodeinfo/types.test.js +8 -8
- package/dist/{owner-D0cOz8R5.d.ts → owner-CEv_PfyK.d.ts} +3 -3
- package/dist/{owner-CrtnBHX7.js → owner-D3kbnehv.js} +3 -3
- package/dist/{proof-DPvYSJvz.js → proof-BIg4cgPU.js} +3 -3
- package/dist/{proof-JaQW7dZG.js → proof-C8Br62yY.js} +3 -3
- package/dist/{router-D_aVZZUc.js → router-D3UybECj.js} +1 -1
- package/dist/runtime/authdocloader.test.js +17 -17
- package/dist/runtime/docloader.test.js +11 -11
- package/dist/runtime/key.test.js +13 -13
- package/dist/runtime/langstr.test.js +8 -8
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +8 -8
- package/dist/runtime/url.test.js +4 -4
- package/dist/{send-BHD0sfF3.js → send-rnqPOKSI.js} +2 -2
- package/dist/sig/http.test.js +16 -44
- package/dist/sig/key.test.js +14 -14
- package/dist/sig/ld.test.js +12 -12
- package/dist/sig/mod.d.ts +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +16 -16
- package/dist/sig/proof.test.js +15 -15
- package/dist/{std__assert-CmyZxqPw.js → std__assert-B3iAixc-.js} +6 -6
- package/dist/testing/docloader.test.js +8 -8
- package/dist/{types-kUNFKQc-.js → types-CF4796nA.js} +1 -1
- package/dist/vocab/actor.test.js +142 -142
- package/dist/vocab/lookup.test.js +13 -13
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +53 -49
- package/dist/{vocab-B-3Rb7jH.js → vocab-BIhg0gCj.js} +178 -178
- package/dist/{vocab-DZnMWLHx.js → vocab-Ba2a4kTo.js} +4 -4
- package/dist/{vocab-CzEfWQk2.d.ts → vocab-By6mpzr-.d.ts} +1 -1
- package/dist/webfinger/handler.test.js +28 -28
- package/dist/webfinger/lookup.test.js +12 -12
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +6 -1
- package/dist/x/cfworkers.js +5 -0
- package/dist/x/cfworkers.test.js +14 -9
- package/dist/x/hono.d.ts +10 -10
- package/dist/x/sveltekit.d.ts +10 -10
- package/package.json +3 -3
- package/dist/middleware-DLfV8p8d.js +0 -17
- package/dist/middleware-qG5pwbUh.js +0 -33
@@ -3,16 +3,16 @@
|
|
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-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
9
|
import { buildCollectionSynchronizationHeader, digest } from "../collection-Dfb0TPno.js";
|
10
10
|
import { test } from "../testing-BZ0dJ4qn.js";
|
11
|
-
import "../std__assert-
|
12
|
-
import "../assert_rejects-
|
13
|
-
import "../assert_is_error-
|
14
|
-
import "../assert_not_equals-
|
15
|
-
import "../assert_throws-
|
11
|
+
import "../std__assert-B3iAixc-.js";
|
12
|
+
import "../assert_rejects-DceVjUlD.js";
|
13
|
+
import "../assert_is_error-DQdKoRgb.js";
|
14
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
15
|
+
import "../assert_throws-DTDC_gwN.js";
|
16
16
|
import { decodeHex } from "byte-encodings/hex";
|
17
17
|
|
18
18
|
//#region federation/collection.test.ts
|
@@ -3,45 +3,45 @@
|
|
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 { MemoryKvStore } from "../kv-
|
10
|
-
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
11
|
-
import "../docloader-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
+
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
10
|
+
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DYZ4sFyx.js";
|
11
|
+
import "../docloader-BZBrUZeZ.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-DWClQt_5.js";
|
14
|
-
import "../client-
|
15
|
-
import "../router-
|
14
|
+
import "../client-37jfjmdY.js";
|
15
|
+
import "../router-D3UybECj.js";
|
16
16
|
import "../types-C7C_l-jz.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Create, Note, Person } from "../vocab-
|
18
|
+
import { Create, Note, Person } from "../vocab-BIhg0gCj.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-B3Ji9Hri.js";
|
21
21
|
import "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import { signRequest } from "../http-
|
25
|
-
import "../authdocloader-
|
26
|
-
import "../ld-
|
27
|
-
import "../owner-
|
28
|
-
import "../proof-
|
29
|
-
import "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-BniCOS3i.js";
|
23
|
+
import "../key-CQZCHGYL.js";
|
24
|
+
import { signRequest } from "../http-CWcmmHS3.js";
|
25
|
+
import "../authdocloader-e8Qhqry3.js";
|
26
|
+
import "../ld-CyHD6QTx.js";
|
27
|
+
import "../owner-D3kbnehv.js";
|
28
|
+
import "../proof-C8Br62yY.js";
|
29
|
+
import "../lookup-CO7jWozP.js";
|
30
|
+
import "../inbox-DXGMgg5A.js";
|
31
|
+
import "../builder-6s4wCL2c.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-2xuv5jk-.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-rnqPOKSI.js";
|
36
36
|
import { test } from "../testing-BZ0dJ4qn.js";
|
37
|
-
import "../std__assert-
|
38
|
-
import { assertFalse } from "../assert_rejects-
|
39
|
-
import "../assert_is_error-
|
40
|
-
import "../assert_not_equals-
|
41
|
-
import "../assert_throws-
|
37
|
+
import "../std__assert-B3iAixc-.js";
|
38
|
+
import { assertFalse } from "../assert_rejects-DceVjUlD.js";
|
39
|
+
import "../assert_is_error-DQdKoRgb.js";
|
40
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
41
|
+
import "../assert_throws-DTDC_gwN.js";
|
42
42
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
43
|
-
import { createInboxContext, createRequestContext } from "../context-
|
44
|
-
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
43
|
+
import { createInboxContext, createRequestContext } from "../context-ByWT6rsc.js";
|
44
|
+
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-_CuBoyQl.js";
|
45
45
|
|
46
46
|
//#region federation/handler.test.ts
|
47
47
|
test("acceptsJsonLd()", () => {
|
@@ -3,17 +3,17 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
7
|
-
import "../docloader-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import "../docloader-BZBrUZeZ.js";
|
8
8
|
import "../url-kTAI6_KP.js";
|
9
9
|
import "../multibase-DeCHcK8L.js";
|
10
|
-
import { Activity, Create, Invite, Offer, Update } from "../vocab-
|
10
|
+
import { Activity, Create, Invite, Offer, Update } from "../vocab-BIhg0gCj.js";
|
11
11
|
import "../langstr-DbWheeIS.js";
|
12
12
|
import "../type-D2s5lmbZ.js";
|
13
|
-
import { InboxListenerSet } from "../inbox-
|
13
|
+
import { InboxListenerSet } from "../inbox-DXGMgg5A.js";
|
14
14
|
import { test } from "../testing-BZ0dJ4qn.js";
|
15
|
-
import "../assert_is_error-
|
16
|
-
import { assertThrows } from "../assert_throws-
|
15
|
+
import "../assert_is_error-DQdKoRgb.js";
|
16
|
+
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
17
17
|
|
18
18
|
//#region federation/inbox.test.ts
|
19
19
|
test("InboxListenerSet", () => {
|
@@ -3,16 +3,16 @@
|
|
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 { assertInstanceOf } from "../assert_instance_of-
|
9
|
-
import { MemoryKvStore } from "../kv-
|
10
|
-
import "../docloader-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
8
|
+
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
9
|
+
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
10
|
+
import "../docloader-BZBrUZeZ.js";
|
11
11
|
import "../url-kTAI6_KP.js";
|
12
12
|
import "../multibase-DeCHcK8L.js";
|
13
|
-
import { CryptographicKey, Multikey } from "../vocab-
|
13
|
+
import { CryptographicKey, Multikey } from "../vocab-BIhg0gCj.js";
|
14
14
|
import "../langstr-DbWheeIS.js";
|
15
|
-
import { KvKeyCache } from "../keycache-
|
15
|
+
import { KvKeyCache } from "../keycache-2xuv5jk-.js";
|
16
16
|
import { test } from "../testing-BZ0dJ4qn.js";
|
17
17
|
|
18
18
|
//#region federation/keycache.test.ts
|
@@ -3,16 +3,16 @@
|
|
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 { MemoryKvStore } from "../kv-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
+
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
10
10
|
import { test } from "../testing-BZ0dJ4qn.js";
|
11
|
-
import "../std__assert-
|
12
|
-
import "../assert_rejects-
|
13
|
-
import "../assert_is_error-
|
14
|
-
import "../assert_not_equals-
|
15
|
-
import "../assert_throws-
|
11
|
+
import "../std__assert-B3iAixc-.js";
|
12
|
+
import "../assert_rejects-DceVjUlD.js";
|
13
|
+
import "../assert_is_error-DQdKoRgb.js";
|
14
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
15
|
+
import "../assert_throws-DTDC_gwN.js";
|
16
16
|
|
17
17
|
//#region federation/kv.test.ts
|
18
18
|
test("MemoryKvStore", async (t) => {
|
@@ -28,6 +28,18 @@ test("MemoryKvStore", async (t) => {
|
|
28
28
|
await store.delete(["foo", "bar"]);
|
29
29
|
assertEquals(await store.get(["foo", "bar"]), void 0);
|
30
30
|
});
|
31
|
+
await t.step("cas()", async () => {
|
32
|
+
await store.set(["foo", "bar"], "foobar");
|
33
|
+
assertEquals(await store.cas(["foo", "bar"], "bar", "baz"), false);
|
34
|
+
assertEquals(await store.get(["foo", "bar"]), "foobar");
|
35
|
+
assertEquals(await store.cas(["foo", "bar"], "foobar", "baz"), true);
|
36
|
+
assertEquals(await store.get(["foo", "bar"]), "baz");
|
37
|
+
await store.delete(["foo", "bar"]);
|
38
|
+
assertEquals(await store.cas(["foo", "bar"], "foobar", "baz"), false);
|
39
|
+
assertEquals(await store.get(["foo", "bar"]), void 0);
|
40
|
+
assertEquals(await store.cas(["foo", "bar"], void 0, "baz"), true);
|
41
|
+
assertEquals(await store.get(["foo", "bar"]), "baz");
|
42
|
+
});
|
31
43
|
});
|
32
44
|
|
33
45
|
//#endregion
|
@@ -3,45 +3,45 @@
|
|
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 { assertInstanceOf } from "../assert_instance_of-
|
9
|
-
import { MemoryKvStore } from "../kv-
|
10
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-
|
11
|
-
import { FetchError, fetchDocumentLoader } from "../docloader-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
8
|
+
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
9
|
+
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
10
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-DYZ4sFyx.js";
|
11
|
+
import { FetchError, fetchDocumentLoader } from "../docloader-BZBrUZeZ.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-DWClQt_5.js";
|
14
|
-
import "../client-
|
15
|
-
import { RouterError } from "../router-
|
14
|
+
import "../client-37jfjmdY.js";
|
15
|
+
import { RouterError } from "../router-D3UybECj.js";
|
16
16
|
import "../types-C7C_l-jz.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-
|
18
|
+
import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-BIhg0gCj.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-B3Ji9Hri.js";
|
21
21
|
import { getTypeId } from "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import { signRequest, verifyRequest } from "../http-
|
25
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
26
|
-
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-
|
27
|
-
import { doesActorOwnKey } from "../owner-
|
28
|
-
import { signObject, verifyObject } from "../proof-
|
29
|
-
import { lookupObject } from "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-BniCOS3i.js";
|
23
|
+
import "../key-CQZCHGYL.js";
|
24
|
+
import { signRequest, verifyRequest } from "../http-CWcmmHS3.js";
|
25
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-e8Qhqry3.js";
|
26
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-CyHD6QTx.js";
|
27
|
+
import { doesActorOwnKey } from "../owner-D3kbnehv.js";
|
28
|
+
import { signObject, verifyObject } from "../proof-C8Br62yY.js";
|
29
|
+
import { lookupObject } from "../lookup-CO7jWozP.js";
|
30
|
+
import "../inbox-DXGMgg5A.js";
|
31
|
+
import "../builder-6s4wCL2c.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-2xuv5jk-.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-rnqPOKSI.js";
|
36
36
|
import { test } from "../testing-BZ0dJ4qn.js";
|
37
|
-
import { assertStrictEquals } from "../std__assert-
|
38
|
-
import { assertFalse, assertRejects } from "../assert_rejects-
|
39
|
-
import "../assert_is_error-
|
40
|
-
import { assertNotEquals } from "../assert_not_equals-
|
41
|
-
import { assertThrows } from "../assert_throws-
|
37
|
+
import { assertStrictEquals } from "../std__assert-B3iAixc-.js";
|
38
|
+
import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
|
39
|
+
import "../assert_is_error-DQdKoRgb.js";
|
40
|
+
import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
|
41
|
+
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
42
42
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
43
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
44
|
-
import { esm_default } from "../esm-
|
43
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-_CuBoyQl.js";
|
44
|
+
import { esm_default } from "../esm-d-9EVGaP.js";
|
45
45
|
|
46
46
|
//#region testing/fixtures/example.com/person.json
|
47
47
|
var __context$1 = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"];
|
package/dist/federation/mod.d.ts
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "../kv-
|
4
|
-
import "../docloader-
|
5
|
-
import "../client-
|
6
|
-
import "../vocab-
|
7
|
-
import "../actor-
|
8
|
-
import "../http-
|
9
|
-
import "../owner-
|
10
|
-
import "../mod-
|
11
|
-
import "../lookup-
|
12
|
-
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-
|
3
|
+
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "../kv-DDdb1hMa.js";
|
4
|
+
import "../docloader-BeCtcTOJ.js";
|
5
|
+
import "../client-BQ4AQGKo.js";
|
6
|
+
import "../vocab-By6mpzr-.js";
|
7
|
+
import "../actor-B4TBtqRP.js";
|
8
|
+
import "../http-CP2ZUALI.js";
|
9
|
+
import "../owner-CEv_PfyK.js";
|
10
|
+
import "../mod-BzLUzgBJ.js";
|
11
|
+
import "../lookup-DHNtuVcT.js";
|
12
|
+
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-y90aX3KP.js";
|
13
13
|
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "../mq-DYKDDJmp.js";
|
14
14
|
import "../mod-g0xFzAP9.js";
|
15
15
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
@@ -3,16 +3,16 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
5
|
import "../transformers-ghwJuzGY.js";
|
6
|
-
import "../docloader-
|
7
|
-
import "../actor-
|
8
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
9
|
-
import "../lookup-
|
10
|
-
import "../key-
|
11
|
-
import "../http-
|
12
|
-
import "../proof-
|
13
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-
|
14
|
-
import "../types-
|
15
|
-
import "../authdocloader-
|
16
|
-
import "../vocab-
|
6
|
+
import "../docloader-DzoNSY8I.js";
|
7
|
+
import "../actor-W-6h4XlQ.js";
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-BrK09zm5.js";
|
9
|
+
import "../lookup-CfqMiAUO.js";
|
10
|
+
import "../key-CNh0_4UK.js";
|
11
|
+
import "../http-BrJcn5xX.js";
|
12
|
+
import "../proof-BIg4cgPU.js";
|
13
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-C44ekWNP.js";
|
14
|
+
import "../types-CF4796nA.js";
|
15
|
+
import "../authdocloader-o-F5aHAH.js";
|
16
|
+
import "../vocab-Ba2a4kTo.js";
|
17
17
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
@@ -3,16 +3,16 @@
|
|
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-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
9
|
import { test } from "../testing-BZ0dJ4qn.js";
|
10
|
-
import { assertGreater, assertGreaterOrEqual } from "../std__assert-
|
11
|
-
import { assertFalse } from "../assert_rejects-
|
12
|
-
import "../assert_is_error-
|
13
|
-
import "../assert_not_equals-
|
14
|
-
import "../assert_throws-
|
15
|
-
import { delay } from "
|
10
|
+
import { assertGreater, assertGreaterOrEqual } from "../std__assert-B3iAixc-.js";
|
11
|
+
import { assertFalse } from "../assert_rejects-DceVjUlD.js";
|
12
|
+
import "../assert_is_error-DQdKoRgb.js";
|
13
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
14
|
+
import "../assert_throws-DTDC_gwN.js";
|
15
|
+
import { delay } from "es-toolkit";
|
16
16
|
|
17
17
|
//#region federation/mq.ts
|
18
18
|
/**
|
@@ -225,7 +225,7 @@ test("InProcessMessageQueue", async (t) => {
|
|
225
225
|
});
|
226
226
|
test("MessageQueue.nativeRetrial", async (t) => {
|
227
227
|
if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") await t.step("DenoKvMessageQueue", async () => {
|
228
|
-
const { DenoKvMessageQueue } = await import("../denokv-
|
228
|
+
const { DenoKvMessageQueue } = await import("../denokv-QWKsIqML.js");
|
229
229
|
const mq = new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
230
230
|
assert(mq.nativeRetrial);
|
231
231
|
if (Symbol.dispose in mq) {
|
@@ -264,7 +264,7 @@ test("MessageQueue.nativeRetrial", async (t) => {
|
|
264
264
|
});
|
265
265
|
const queues = { InProcessMessageQueue: () => Promise.resolve(new InProcessMessageQueue()) };
|
266
266
|
if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") {
|
267
|
-
const { DenoKvMessageQueue } = await import("../denokv-
|
267
|
+
const { DenoKvMessageQueue } = await import("../denokv-QWKsIqML.js");
|
268
268
|
queues.DenoKvMessageQueue = async () => new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
269
269
|
}
|
270
270
|
for (const mqName in queues) test({
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { AssertionError, assertEquals } from "../assert_equals-
|
6
|
+
import { AssertionError, assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
7
|
import { createExponentialBackoffPolicy } from "../retry-BiIhZWgD.js";
|
8
8
|
import { test } from "../testing-BZ0dJ4qn.js";
|
9
|
-
import { assertNotEquals } from "../assert_not_equals-
|
9
|
+
import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
|
10
10
|
|
11
11
|
//#region federation/retry.test.ts
|
12
12
|
test("createExponentialBackoffPolicy()", () => {
|
@@ -3,16 +3,16 @@
|
|
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 { Router, RouterError } from "../router-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
+
import { Router, RouterError } from "../router-D3UybECj.js";
|
10
10
|
import { test } from "../testing-BZ0dJ4qn.js";
|
11
|
-
import "../std__assert-
|
12
|
-
import { assertFalse } from "../assert_rejects-
|
13
|
-
import "../assert_is_error-
|
14
|
-
import "../assert_not_equals-
|
15
|
-
import { assertThrows } from "../assert_throws-
|
11
|
+
import "../std__assert-B3iAixc-.js";
|
12
|
+
import { assertFalse } from "../assert_rejects-DceVjUlD.js";
|
13
|
+
import "../assert_is_error-DQdKoRgb.js";
|
14
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
15
|
+
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
16
16
|
|
17
17
|
//#region federation/router.test.ts
|
18
18
|
function setUp(options = {}) {
|
@@ -3,30 +3,30 @@
|
|
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-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
+
import "../docloader-BZBrUZeZ.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import "../multibase-DeCHcK8L.js";
|
12
|
-
import { Activity, Application, Endpoints, Group, Person, Service } from "../vocab-
|
12
|
+
import { Activity, Application, Endpoints, Group, Person, Service } from "../vocab-BIhg0gCj.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-B3Ji9Hri.js";
|
15
15
|
import "../type-D2s5lmbZ.js";
|
16
|
-
import "../actor-
|
17
|
-
import "../key-
|
18
|
-
import { verifyRequest } from "../http-
|
19
|
-
import { doesActorOwnKey } from "../owner-
|
20
|
-
import { extractInboxes, sendActivity } from "../send-
|
16
|
+
import "../actor-BniCOS3i.js";
|
17
|
+
import "../key-CQZCHGYL.js";
|
18
|
+
import { verifyRequest } from "../http-CWcmmHS3.js";
|
19
|
+
import { doesActorOwnKey } from "../owner-D3kbnehv.js";
|
20
|
+
import { extractInboxes, sendActivity } from "../send-rnqPOKSI.js";
|
21
21
|
import { test } from "../testing-BZ0dJ4qn.js";
|
22
|
-
import "../std__assert-
|
23
|
-
import { assertFalse, assertRejects } from "../assert_rejects-
|
24
|
-
import "../assert_is_error-
|
25
|
-
import { assertNotEquals } from "../assert_not_equals-
|
26
|
-
import "../assert_throws-
|
22
|
+
import "../std__assert-B3iAixc-.js";
|
23
|
+
import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
|
24
|
+
import "../assert_is_error-DQdKoRgb.js";
|
25
|
+
import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
|
26
|
+
import "../assert_throws-DTDC_gwN.js";
|
27
27
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
28
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
29
|
-
import { esm_default } from "../esm-
|
28
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-_CuBoyQl.js";
|
29
|
+
import { esm_default } from "../esm-d-9EVGaP.js";
|
30
30
|
|
31
31
|
//#region federation/send.test.ts
|
32
32
|
test("extractInboxes()", () => {
|
@@ -2,6 +2,8 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
+
import { isEqual } from "es-toolkit";
|
6
|
+
|
5
7
|
//#region federation/kv.ts
|
6
8
|
/**
|
7
9
|
* A key–value store that stores values in memory.
|
@@ -45,6 +47,26 @@ var MemoryKvStore = class {
|
|
45
47
|
delete this.#values[encodedKey];
|
46
48
|
return Promise.resolve();
|
47
49
|
}
|
50
|
+
/**
|
51
|
+
* {@inheritDoc KvStore.cas}
|
52
|
+
*/
|
53
|
+
cas(key, expectedValue, newValue, options) {
|
54
|
+
const encodedKey = this.#encodeKey(key);
|
55
|
+
const entry = this.#values[encodedKey];
|
56
|
+
let currentValue;
|
57
|
+
if (entry == null) currentValue = void 0;
|
58
|
+
else {
|
59
|
+
const [value, expiration$1] = entry;
|
60
|
+
if (expiration$1 != null && Temporal.Now.instant().until(expiration$1).sign < 0) {
|
61
|
+
delete this.#values[encodedKey];
|
62
|
+
currentValue = void 0;
|
63
|
+
} else currentValue = value;
|
64
|
+
}
|
65
|
+
if (!isEqual(currentValue, expectedValue)) return Promise.resolve(false);
|
66
|
+
const expiration = options?.ttl == null ? null : Temporal.Now.instant().add(options.ttl.round({ largestUnit: "hour" }));
|
67
|
+
this.#values[encodedKey] = [newValue, expiration];
|
68
|
+
return Promise.resolve(true);
|
69
|
+
}
|
48
70
|
};
|
49
71
|
|
50
72
|
//#endregion
|
@@ -75,12 +97,12 @@ var InProcessMessageQueue = class {
|
|
75
97
|
this.#pollIntervalMs = Temporal.Duration.from(options.pollInterval ?? { seconds: 5 }).total("millisecond");
|
76
98
|
}
|
77
99
|
enqueue(message, options) {
|
78
|
-
const delay = options?.delay == null ? 0 : Math.max(options.delay.total("millisecond"), 0);
|
79
|
-
if (delay > 0) {
|
100
|
+
const delay$1 = options?.delay == null ? 0 : Math.max(options.delay.total("millisecond"), 0);
|
101
|
+
if (delay$1 > 0) {
|
80
102
|
setTimeout(() => this.enqueue(message, {
|
81
103
|
...options,
|
82
104
|
delay: void 0
|
83
|
-
}), delay);
|
105
|
+
}), delay$1);
|
84
106
|
return Promise.resolve();
|
85
107
|
}
|
86
108
|
this.#messages.push(message);
|
@@ -89,12 +111,12 @@ var InProcessMessageQueue = class {
|
|
89
111
|
}
|
90
112
|
enqueueMany(messages, options) {
|
91
113
|
if (messages.length === 0) return Promise.resolve();
|
92
|
-
const delay = options?.delay == null ? 0 : Math.max(options.delay.total("millisecond"), 0);
|
93
|
-
if (delay > 0) {
|
114
|
+
const delay$1 = options?.delay == null ? 0 : Math.max(options.delay.total("millisecond"), 0);
|
115
|
+
if (delay$1 > 0) {
|
94
116
|
setTimeout(() => this.enqueueMany(messages, {
|
95
117
|
...options,
|
96
118
|
delay: void 0
|
97
|
-
}), delay);
|
119
|
+
}), delay$1);
|
98
120
|
return Promise.resolve();
|
99
121
|
}
|
100
122
|
this.#messages.push(...messages);
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default } from "./docloader-
|
6
|
-
import { CryptographicKey } from "./actor-
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
5
|
+
import { deno_default } from "./docloader-DzoNSY8I.js";
|
6
|
+
import { CryptographicKey } from "./actor-W-6h4XlQ.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-CNh0_4UK.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
@@ -211,15 +211,10 @@ async function signRequestRfc9421(request, privateKey, keyId, span, currentTime)
|
|
211
211
|
keyId,
|
212
212
|
created
|
213
213
|
});
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
headers
|
219
|
-
}), components, signatureParams);
|
220
|
-
} catch (error) {
|
221
|
-
throw new TypeError(`Failed to create signature base: ${String(error)}; it is probably a bug in the implementation. Please report it at Fedify's issue tracker.`);
|
222
|
-
}
|
214
|
+
const signatureBase = createRfc9421SignatureBase(new Request(request.url, {
|
215
|
+
method: request.method,
|
216
|
+
headers
|
217
|
+
}), components, signatureParams);
|
223
218
|
const signatureBytes = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, new TextEncoder().encode(signatureBase));
|
224
219
|
const [signatureInput, signature] = formatRfc9421Signature(signatureBytes, components, signatureParams);
|
225
220
|
headers.set("Signature-Input", signatureInput);
|
@@ -599,16 +594,7 @@ async function verifyRequestRfc9421(request, span, { documentLoader, contextLoad
|
|
599
594
|
});
|
600
595
|
continue;
|
601
596
|
}
|
602
|
-
|
603
|
-
try {
|
604
|
-
signatureBase = createRfc9421SignatureBase(request, sigInput.components, sigInput.parameters);
|
605
|
-
} catch (error) {
|
606
|
-
logger.debug("Failed to create signature base for verification: {error}", {
|
607
|
-
error,
|
608
|
-
signatureInput: sigInput
|
609
|
-
});
|
610
|
-
continue;
|
611
|
-
}
|
597
|
+
const signatureBase = createRfc9421SignatureBase(request, sigInput.components, sigInput.parameters);
|
612
598
|
const signatureBaseBytes = new TextEncoder().encode(signatureBase);
|
613
599
|
span?.setAttribute("http_signatures.signature", encodeHex(sigBytes));
|
614
600
|
try {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader } from "./docloader-
|
4
|
-
import { CryptographicKey, Multikey } from "./vocab-
|
3
|
+
import { DocumentLoader } from "./docloader-BeCtcTOJ.js";
|
4
|
+
import { CryptographicKey, Multikey } from "./vocab-By6mpzr-.js";
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
6
6
|
|
7
7
|
//#region sig/key.d.ts
|