@fedify/fedify 1.6.2 → 1.6.4
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-BMhjtSSP.js → actor-BfzxE2QN.js} +199 -184
- package/dist/{actor-sID3ZxDC.js → actor-CHPy3MD6.js} +3 -3
- package/dist/{assert-YJk-1DlZ.js → assert-0DSnLFa8.js} +1 -1
- package/dist/{assert_equals-Dnj7ejjL.js → assert_equals-XhPMqqO2.js} +19 -7
- package/dist/{assert_instance_of-DBIoG5k7.js → assert_instance_of-v5adm_-K.js} +1 -1
- package/dist/{assert_is_error-jyzqjHud.js → assert_is_error-Drwb_yQp.js} +1 -1
- package/dist/{assert_not_equals-wx-SRs4i.js → assert_not_equals-BRPdeJ9D.js} +1 -1
- package/dist/{assert_rejects-BZjUwo62.js → assert_rejects-D_nYI1gs.js} +2 -2
- package/dist/{assert_throws-gBPv3v2V.js → assert_throws-DNuPhPNp.js} +2 -2
- package/dist/{authdocloader-Cx832_tB.js → authdocloader-8yB-xGBR.js} +3 -3
- package/dist/{authdocloader-C0NAukol.js → authdocloader-qBxZEEi9.js} +3 -3
- package/dist/{builder-D3RO7FNo.js → builder-NApTRrpC.js} +3 -3
- package/dist/{client-C41u40q8.js → client-DFAp6PBu.js} +2 -2
- package/dist/compat/transformers.test.js +23 -23
- package/dist/{context-BJas1P69.js → context-DPm_2m4V.js} +2 -2
- package/dist/{docloader-sQOhKEBJ.js → docloader-BGQB_PFT.js} +1 -1
- package/dist/{docloader-BvrnWgo_.js → docloader-Chzwgszm.js} +1 -1
- package/dist/{esm-e_d5TL5c.js → esm-CASHO3OR.js} +2 -2
- package/dist/federation/builder.test.js +14 -14
- package/dist/federation/collection.test.js +9 -9
- package/dist/federation/handler.test.js +34 -31
- package/dist/federation/inbox.test.js +7 -7
- package/dist/federation/keycache.test.js +7 -7
- package/dist/federation/kv.test.js +9 -9
- package/dist/federation/middleware.test.js +31 -31
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +9 -9
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +9 -9
- package/dist/federation/send.test.js +19 -19
- package/dist/{http-Bg69S5M3.js → http-CoPwpYGd.js} +22 -8
- package/dist/{http-CRixLRRg.js → http-DJcO8N65.js} +22 -8
- package/dist/{inbox-DOqV2pzD.js → inbox-CL7Y2POM.js} +2 -2
- package/dist/{key-C165LPcE.js → key-5iwxfdk7.js} +3 -3
- package/dist/{key-MStTavXZ.js → key-BQEmzABV.js} +4 -4
- package/dist/{key-B8GvtVuo.js → key-dki_alWE.js} +5 -5
- package/dist/{key-CjznLZb-.js → key-vNs-KWCR.js} +2 -2
- package/dist/{keycache-B1a4V1bo.js → keycache-oIWQCIss.js} +1 -1
- package/dist/{keys-ClfspZmG.js → keys-BF9Wnizj.js} +1 -1
- package/dist/{ld-Bgne7jyu.js → ld-Bro1OUaC.js} +3 -3
- package/dist/{lookup-bR-W7dO1.js → lookup-BE2D88-F.js} +1 -1
- package/dist/{lookup-Cj7hv3cS.js → lookup-BNZr2r1q.js} +3 -3
- package/dist/{lookup-BfzH97Bi.js → lookup-DVLRiy-x.js} +1 -1
- package/dist/middleware-30sYf6H-.js +17 -0
- package/dist/{middleware-Cc1LwuPX.js → middleware-BoJeFg8A.js} +16 -16
- package/dist/{middleware-Cth2CRY9.js → middleware-DIMI9i2M.js} +10 -10
- package/dist/middleware-DvIti4UE.js +33 -0
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +13 -13
- package/dist/nodeinfo/handler.test.js +29 -29
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +10 -10
- package/dist/nodeinfo/types.test.js +11 -11
- package/dist/{owner-BwbNQA42.js → owner-B5psHPX0.js} +3 -3
- package/dist/{proof-VM7AiB-j.js → proof-Bxho-Eev.js} +3 -3
- package/dist/{proof-D8juaMAC.js → proof-Ck9qUTzW.js} +3 -3
- package/dist/runtime/authdocloader.test.js +18 -18
- package/dist/runtime/docloader.test.js +11 -11
- package/dist/runtime/key.test.js +14 -14
- package/dist/runtime/langstr.test.js +9 -9
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +9 -9
- package/dist/runtime/url.test.js +5 -5
- package/dist/{semver-CbbIgUsa.js → semver-DWClQt_5.js} +2 -2
- package/dist/{send-E1bEkesZ.js → send-D4-hN_vq.js} +2 -2
- package/dist/sig/http.test.js +51 -23
- package/dist/sig/key.test.js +15 -15
- package/dist/sig/ld.test.js +13 -13
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +17 -17
- package/dist/sig/proof.test.js +17 -17
- package/dist/{std__assert-CHXwj7zk.js → std__assert-CmyZxqPw.js} +1 -1
- package/dist/testing/docloader.test.js +9 -9
- package/dist/testing/mod.js +1 -1
- package/dist/{testing-jcGLO9Lp.js → testing-BZ0dJ4qn.js} +1 -1
- package/dist/{types-CIrnA1uA.js → types-BaxpHQDE.js} +3 -3
- package/dist/{types-CqoqWDkp.js → types-C7C_l-jz.js} +1 -1
- package/dist/vocab/actor.test.js +15 -15
- package/dist/vocab/announce.yaml +3 -1
- package/dist/vocab/create.yaml +3 -1
- package/dist/vocab/delete.yaml +3 -1
- package/dist/vocab/lookup.test.js +14 -14
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/question.yaml +3 -1
- package/dist/vocab/type.test.js +4 -4
- package/dist/vocab/update.yaml +3 -1
- package/dist/vocab/vocab.test.js +37 -34
- package/dist/{vocab-DMwazFlI.js → vocab-Bcgf3ubZ.js} +3 -3
- package/dist/{vocab-BOhnfQ4Q.js → vocab-DrV5TQKL.js} +199 -184
- package/dist/webfinger/handler.test.js +29 -29
- package/dist/webfinger/lookup.test.js +12 -12
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +9 -9
- package/package.json +1 -1
- package/dist/middleware-9potsc1r.js +0 -33
- package/dist/middleware-BfaA_Kfc.js +0 -17
@@ -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-
|
6
|
+
import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
7
|
+
import { assert } from "../assert-0DSnLFa8.js";
|
8
|
+
import { assertInstanceOf } from "../assert_instance_of-v5adm_-K.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, createFederation } from "../middleware-
|
11
|
-
import { FetchError, fetchDocumentLoader } from "../docloader-
|
10
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, createFederation } from "../middleware-BoJeFg8A.js";
|
11
|
+
import { FetchError, fetchDocumentLoader } from "../docloader-Chzwgszm.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
|
-
import "../semver-
|
14
|
-
import "../client-
|
13
|
+
import "../semver-DWClQt_5.js";
|
14
|
+
import "../client-DFAp6PBu.js";
|
15
15
|
import { RouterError } from "../router-D_aVZZUc.js";
|
16
|
-
import "../types-
|
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-DrV5TQKL.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-BE2D88-F.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-CHPy3MD6.js";
|
23
|
+
import "../key-5iwxfdk7.js";
|
24
|
+
import { signRequest, verifyRequest } from "../http-DJcO8N65.js";
|
25
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-qBxZEEi9.js";
|
26
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-Bro1OUaC.js";
|
27
|
+
import { doesActorOwnKey } from "../owner-B5psHPX0.js";
|
28
|
+
import { signObject, verifyObject } from "../proof-Ck9qUTzW.js";
|
29
|
+
import { lookupObject } from "../lookup-BNZr2r1q.js";
|
30
|
+
import "../inbox-CL7Y2POM.js";
|
31
|
+
import "../builder-NApTRrpC.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-oIWQCIss.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
36
|
-
import { test } from "../testing-
|
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-
|
35
|
+
import "../send-D4-hN_vq.js";
|
36
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
37
|
+
import { assertStrictEquals } from "../std__assert-CmyZxqPw.js";
|
38
|
+
import { assertFalse, assertRejects } from "../assert_rejects-D_nYI1gs.js";
|
39
|
+
import "../assert_is_error-Drwb_yQp.js";
|
40
|
+
import { assertNotEquals } from "../assert_not_equals-BRPdeJ9D.js";
|
41
|
+
import { assertThrows } from "../assert_throws-DNuPhPNp.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-BF9Wnizj.js";
|
44
|
+
import { esm_default } from "../esm-CASHO3OR.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"];
|
@@ -933,7 +933,7 @@ test("Federation.setInboxListeners()", async (t) => {
|
|
933
933
|
privateKey: rsaPrivateKey2,
|
934
934
|
publicKey: rsaPublicKey2.publicKey
|
935
935
|
}]);
|
936
|
-
const error = new Error("test");
|
936
|
+
const error = /* @__PURE__ */ new Error("test");
|
937
937
|
const errors = [];
|
938
938
|
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").on(Create, () => {
|
939
939
|
throw error;
|
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-
|
6
|
+
import "../docloader-BGQB_PFT.js";
|
7
|
+
import "../actor-BfzxE2QN.js";
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DIMI9i2M.js";
|
9
|
+
import "../lookup-DVLRiy-x.js";
|
10
|
+
import "../key-vNs-KWCR.js";
|
11
|
+
import "../http-CoPwpYGd.js";
|
12
|
+
import "../proof-Bxho-Eev.js";
|
13
13
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-3B6BDKCK.js";
|
14
|
-
import "../types-
|
15
|
-
import "../authdocloader-
|
16
|
-
import "../vocab-
|
14
|
+
import "../types-BaxpHQDE.js";
|
15
|
+
import "../authdocloader-8yB-xGBR.js";
|
16
|
+
import "../vocab-Bcgf3ubZ.js";
|
17
17
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
@@ -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 { assertGreater, assertGreaterOrEqual } from "../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-XhPMqqO2.js";
|
7
|
+
import "../assert-0DSnLFa8.js";
|
8
|
+
import "../assert_instance_of-v5adm_-K.js";
|
9
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
10
|
+
import { assertGreater, assertGreaterOrEqual } from "../std__assert-CmyZxqPw.js";
|
11
|
+
import "../assert_rejects-D_nYI1gs.js";
|
12
|
+
import "../assert_is_error-Drwb_yQp.js";
|
13
|
+
import "../assert_not_equals-BRPdeJ9D.js";
|
14
|
+
import "../assert_throws-DNuPhPNp.js";
|
15
15
|
import { delay } from "@es-toolkit/es-toolkit";
|
16
16
|
|
17
17
|
//#region federation/mq.ts
|
@@ -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-XhPMqqO2.js";
|
7
7
|
import { createExponentialBackoffPolicy } from "../retry-BiIhZWgD.js";
|
8
|
-
import { test } from "../testing-
|
9
|
-
import { assertNotEquals } from "../assert_not_equals-
|
8
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
9
|
+
import { assertNotEquals } from "../assert_not_equals-BRPdeJ9D.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-
|
6
|
+
import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
7
|
+
import { assert } from "../assert-0DSnLFa8.js";
|
8
|
+
import "../assert_instance_of-v5adm_-K.js";
|
9
9
|
import { Router, RouterError } from "../router-D_aVZZUc.js";
|
10
|
-
import { test } from "../testing-
|
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-
|
10
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
11
|
+
import "../std__assert-CmyZxqPw.js";
|
12
|
+
import { assertFalse } from "../assert_rejects-D_nYI1gs.js";
|
13
|
+
import "../assert_is_error-Drwb_yQp.js";
|
14
|
+
import "../assert_not_equals-BRPdeJ9D.js";
|
15
|
+
import { assertThrows } from "../assert_throws-DNuPhPNp.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-XhPMqqO2.js";
|
7
|
+
import { assert } from "../assert-0DSnLFa8.js";
|
8
|
+
import "../assert_instance_of-v5adm_-K.js";
|
9
|
+
import "../docloader-Chzwgszm.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-DrV5TQKL.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-BE2D88-F.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-
|
21
|
-
import { test } from "../testing-
|
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-
|
16
|
+
import "../actor-CHPy3MD6.js";
|
17
|
+
import "../key-5iwxfdk7.js";
|
18
|
+
import { verifyRequest } from "../http-DJcO8N65.js";
|
19
|
+
import { doesActorOwnKey } from "../owner-B5psHPX0.js";
|
20
|
+
import { extractInboxes, sendActivity } from "../send-D4-hN_vq.js";
|
21
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
22
|
+
import "../std__assert-CmyZxqPw.js";
|
23
|
+
import { assertFalse, assertRejects } from "../assert_rejects-D_nYI1gs.js";
|
24
|
+
import "../assert_is_error-Drwb_yQp.js";
|
25
|
+
import { assertNotEquals } from "../assert_not_equals-BRPdeJ9D.js";
|
26
|
+
import "../assert_throws-DNuPhPNp.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-BF9Wnizj.js";
|
29
|
+
import { esm_default } from "../esm-CASHO3OR.js";
|
30
30
|
|
31
31
|
//#region federation/send.test.ts
|
32
32
|
test("extractInboxes()", () => {
|
@@ -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-BGQB_PFT.js";
|
6
|
+
import { CryptographicKey } from "./actor-BfzxE2QN.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-vNs-KWCR.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,10 +211,15 @@ async function signRequestRfc9421(request, privateKey, keyId, span, currentTime)
|
|
211
211
|
keyId,
|
212
212
|
created
|
213
213
|
});
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
214
|
+
let signatureBase;
|
215
|
+
try {
|
216
|
+
signatureBase = createRfc9421SignatureBase(new Request(request.url, {
|
217
|
+
method: request.method,
|
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
|
+
}
|
218
223
|
const signatureBytes = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, new TextEncoder().encode(signatureBase));
|
219
224
|
const [signatureInput, signature] = formatRfc9421Signature(signatureBytes, components, signatureParams);
|
220
225
|
headers.set("Signature-Input", signatureInput);
|
@@ -594,7 +599,16 @@ async function verifyRequestRfc9421(request, span, { documentLoader, contextLoad
|
|
594
599
|
});
|
595
600
|
continue;
|
596
601
|
}
|
597
|
-
|
602
|
+
let signatureBase;
|
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
|
+
}
|
598
612
|
const signatureBaseBytes = new TextEncoder().encode(signatureBase);
|
599
613
|
span?.setAttribute("http_signatures.signature", encodeHex(sigBytes));
|
600
614
|
try {
|
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { CryptographicKey } from "./vocab-
|
8
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
6
|
+
import { deno_default } from "./docloader-Chzwgszm.js";
|
7
|
+
import { CryptographicKey } from "./vocab-DrV5TQKL.js";
|
8
|
+
import { fetchKey, validateCryptoKey } from "./key-5iwxfdk7.js";
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
11
11
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
@@ -212,10 +212,15 @@ async function signRequestRfc9421(request, privateKey, keyId, span, currentTime)
|
|
212
212
|
keyId,
|
213
213
|
created
|
214
214
|
});
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
215
|
+
let signatureBase;
|
216
|
+
try {
|
217
|
+
signatureBase = createRfc9421SignatureBase(new Request(request.url, {
|
218
|
+
method: request.method,
|
219
|
+
headers
|
220
|
+
}), components, signatureParams);
|
221
|
+
} catch (error) {
|
222
|
+
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.`);
|
223
|
+
}
|
219
224
|
const signatureBytes = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, new TextEncoder().encode(signatureBase));
|
220
225
|
const [signatureInput, signature] = formatRfc9421Signature(signatureBytes, components, signatureParams);
|
221
226
|
headers.set("Signature-Input", signatureInput);
|
@@ -595,7 +600,16 @@ async function verifyRequestRfc9421(request, span, { documentLoader, contextLoad
|
|
595
600
|
});
|
596
601
|
continue;
|
597
602
|
}
|
598
|
-
|
603
|
+
let signatureBase;
|
604
|
+
try {
|
605
|
+
signatureBase = createRfc9421SignatureBase(request, sigInput.components, sigInput.parameters);
|
606
|
+
} catch (error) {
|
607
|
+
logger.debug("Failed to create signature base for verification: {error}", {
|
608
|
+
error,
|
609
|
+
signatureInput: sigInput
|
610
|
+
});
|
611
|
+
continue;
|
612
|
+
}
|
599
613
|
const signatureBaseBytes = new TextEncoder().encode(signatureBase);
|
600
614
|
span?.setAttribute("http_signatures.signature", encodeHex(sigBytes));
|
601
615
|
try {
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { Activity } from "./vocab-
|
6
|
+
import { deno_default } from "./docloader-Chzwgszm.js";
|
7
|
+
import { Activity } from "./vocab-DrV5TQKL.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
10
10
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
7
|
-
import { CryptographicKey, Object as Object$1 } from "./vocab-
|
8
|
-
import { isActor } from "./actor-
|
6
|
+
import { deno_default, getDocumentLoader } from "./docloader-Chzwgszm.js";
|
7
|
+
import { CryptographicKey, Object as Object$1 } from "./vocab-DrV5TQKL.js";
|
8
|
+
import { isActor } from "./actor-CHPy3MD6.js";
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
10
10
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
11
11
|
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import "./docloader-
|
6
|
-
import "./actor-
|
7
|
-
import "./lookup-
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
5
|
+
import "./docloader-BGQB_PFT.js";
|
6
|
+
import "./actor-BfzxE2QN.js";
|
7
|
+
import "./lookup-DVLRiy-x.js";
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-vNs-KWCR.js";
|
9
9
|
|
10
10
|
export { validateCryptoKey };
|
@@ -3,14 +3,14 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "./docloader-
|
6
|
+
import "./docloader-Chzwgszm.js";
|
7
7
|
import "./url-kTAI6_KP.js";
|
8
8
|
import "./multibase-DeCHcK8L.js";
|
9
|
-
import "./vocab-
|
9
|
+
import "./vocab-DrV5TQKL.js";
|
10
10
|
import "./langstr-DbWheeIS.js";
|
11
|
-
import "./lookup-
|
11
|
+
import "./lookup-BE2D88-F.js";
|
12
12
|
import "./type-D2s5lmbZ.js";
|
13
|
-
import "./actor-
|
14
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
13
|
+
import "./actor-CHPy3MD6.js";
|
14
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-5iwxfdk7.js";
|
15
15
|
|
16
16
|
export { validateCryptoKey };
|
@@ -2,8 +2,8 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
6
|
-
import { CryptographicKey, Object as Object$1, isActor } from "./actor-
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-BGQB_PFT.js";
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-BfzxE2QN.js";
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Multikey } from "./vocab-
|
6
|
+
import { CryptographicKey, Multikey } from "./vocab-DrV5TQKL.js";
|
7
7
|
|
8
8
|
//#region federation/keycache.ts
|
9
9
|
var KvKeyCache = class {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Multikey, importSpki } from "./vocab-
|
6
|
+
import { CryptographicKey, Multikey, importSpki } from "./vocab-DrV5TQKL.js";
|
7
7
|
|
8
8
|
//#region testing/keys.ts
|
9
9
|
const rsaPublicKey1 = new CryptographicKey({
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
7
|
-
import { Activity, CryptographicKey, Object as Object$1 } from "./vocab-
|
6
|
+
import { deno_default, getDocumentLoader } from "./docloader-Chzwgszm.js";
|
7
|
+
import { Activity, CryptographicKey, Object as Object$1 } from "./vocab-DrV5TQKL.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
9
|
+
import { fetchKey, validateCryptoKey } from "./key-5iwxfdk7.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
12
12
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getUserAgent } from "./docloader-
|
6
|
+
import { deno_default, getUserAgent } from "./docloader-Chzwgszm.js";
|
7
7
|
import { UrlError, validatePublicUrl } from "./url-kTAI6_KP.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
7
|
-
import { Object as Object$1 } from "./vocab-
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
6
|
+
import { deno_default, getDocumentLoader } from "./docloader-Chzwgszm.js";
|
7
|
+
import { Object as Object$1 } from "./vocab-DrV5TQKL.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-BE2D88-F.js";
|
9
9
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-
|
5
|
+
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-BGQB_PFT.js";
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
8
8
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import "./transformers-ghwJuzGY.js";
|
6
|
+
import "./docloader-BGQB_PFT.js";
|
7
|
+
import "./actor-BfzxE2QN.js";
|
8
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-DIMI9i2M.js";
|
9
|
+
import "./lookup-DVLRiy-x.js";
|
10
|
+
import "./key-vNs-KWCR.js";
|
11
|
+
import "./http-CoPwpYGd.js";
|
12
|
+
import "./proof-Bxho-Eev.js";
|
13
|
+
import "./types-BaxpHQDE.js";
|
14
|
+
import "./authdocloader-8yB-xGBR.js";
|
15
|
+
import "./vocab-Bcgf3ubZ.js";
|
16
|
+
|
17
|
+
export { FederationImpl };
|
@@ -3,26 +3,26 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
7
|
-
import { getNodeInfo } from "./client-
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-Chzwgszm.js";
|
7
|
+
import { getNodeInfo } from "./client-DFAp6PBu.js";
|
8
8
|
import { RouterError } from "./router-D_aVZZUc.js";
|
9
|
-
import { nodeInfoToJson } from "./types-
|
10
|
-
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage } from "./vocab-
|
11
|
-
import { lookupWebFinger } from "./lookup-
|
9
|
+
import { nodeInfoToJson } from "./types-C7C_l-jz.js";
|
10
|
+
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage } from "./vocab-DrV5TQKL.js";
|
11
|
+
import { lookupWebFinger } from "./lookup-BE2D88-F.js";
|
12
12
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
13
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
14
|
-
import { verifyRequest } from "./http-
|
15
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
16
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
17
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
18
|
-
import { signObject, verifyObject } from "./proof-
|
19
|
-
import { lookupObject, traverseCollection } from "./lookup-
|
20
|
-
import { routeActivity } from "./inbox-
|
21
|
-
import { FederationBuilderImpl } from "./builder-
|
13
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-5iwxfdk7.js";
|
14
|
+
import { verifyRequest } from "./http-DJcO8N65.js";
|
15
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-qBxZEEi9.js";
|
16
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-Bro1OUaC.js";
|
17
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-B5psHPX0.js";
|
18
|
+
import { signObject, verifyObject } from "./proof-Ck9qUTzW.js";
|
19
|
+
import { lookupObject, traverseCollection } from "./lookup-BNZr2r1q.js";
|
20
|
+
import { routeActivity } from "./inbox-CL7Y2POM.js";
|
21
|
+
import { FederationBuilderImpl } from "./builder-NApTRrpC.js";
|
22
22
|
import { buildCollectionSynchronizationHeader } from "./collection-Dfb0TPno.js";
|
23
|
-
import { KvKeyCache } from "./keycache-
|
23
|
+
import { KvKeyCache } from "./keycache-oIWQCIss.js";
|
24
24
|
import { createExponentialBackoffPolicy } from "./retry-BiIhZWgD.js";
|
25
|
-
import { extractInboxes, sendActivity } from "./send-
|
25
|
+
import { extractInboxes, sendActivity } from "./send-D4-hN_vq.js";
|
26
26
|
import { getLogger, withContext } from "@logtape/logtape";
|
27
27
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
28
28
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
@@ -3,15 +3,15 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
5
|
import { getDefaultActivityTransformers } from "./transformers-ghwJuzGY.js";
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
7
|
-
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
9
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
10
|
-
import { doubleKnock, verifyRequest } from "./http-
|
11
|
-
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-
|
12
|
-
import { getNodeInfo, nodeInfoToJson } from "./types-
|
13
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
14
|
-
import { lookupObject, traverseCollection } from "./vocab-
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-BGQB_PFT.js";
|
7
|
+
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-BfzxE2QN.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-DVLRiy-x.js";
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-vNs-KWCR.js";
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-CoPwpYGd.js";
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-Bxho-Eev.js";
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-BaxpHQDE.js";
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-8yB-xGBR.js";
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-Bcgf3ubZ.js";
|
15
15
|
import { getLogger, withContext } from "@logtape/logtape";
|
16
16
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
17
17
|
import { encodeHex } from "byte-encodings/hex";
|
@@ -312,7 +312,7 @@ var FederationBuilderImpl = class {
|
|
312
312
|
this.objectTypeIds = {};
|
313
313
|
}
|
314
314
|
async build(options) {
|
315
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
315
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-30sYf6H-.js");
|
316
316
|
const f = new FederationImpl$1(options);
|
317
317
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
318
318
|
f.router = this.router.clone();
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
globalThis.addEventListener = () => {};
|
5
|
+
|
6
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BoJeFg8A.js";
|
7
|
+
import "./docloader-Chzwgszm.js";
|
8
|
+
import "./url-kTAI6_KP.js";
|
9
|
+
import "./semver-DWClQt_5.js";
|
10
|
+
import "./client-DFAp6PBu.js";
|
11
|
+
import "./router-D_aVZZUc.js";
|
12
|
+
import "./types-C7C_l-jz.js";
|
13
|
+
import "./multibase-DeCHcK8L.js";
|
14
|
+
import "./vocab-DrV5TQKL.js";
|
15
|
+
import "./langstr-DbWheeIS.js";
|
16
|
+
import "./lookup-BE2D88-F.js";
|
17
|
+
import "./type-D2s5lmbZ.js";
|
18
|
+
import "./actor-CHPy3MD6.js";
|
19
|
+
import "./key-5iwxfdk7.js";
|
20
|
+
import "./http-DJcO8N65.js";
|
21
|
+
import "./authdocloader-qBxZEEi9.js";
|
22
|
+
import "./ld-Bro1OUaC.js";
|
23
|
+
import "./owner-B5psHPX0.js";
|
24
|
+
import "./proof-Ck9qUTzW.js";
|
25
|
+
import "./lookup-BNZr2r1q.js";
|
26
|
+
import "./inbox-CL7Y2POM.js";
|
27
|
+
import "./builder-NApTRrpC.js";
|
28
|
+
import "./collection-Dfb0TPno.js";
|
29
|
+
import "./keycache-oIWQCIss.js";
|
30
|
+
import "./retry-BiIhZWgD.js";
|
31
|
+
import "./send-D4-hN_vq.js";
|
32
|
+
|
33
|
+
export { FederationImpl };
|