@fedify/fedify 1.6.5 → 1.6.6-pr.295.998
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-BRaEwa29.js → actor-B45eQSqs.js} +3 -3
- package/dist/{actor-dJqNBJhO.js → actor-CK9ONBOc.js} +179 -179
- package/dist/{authdocloader-hXHPDXu2.js → authdocloader-CKx5YiYI.js} +3 -3
- package/dist/{authdocloader-D8mRjN_8.js → authdocloader-CcVP-E48.js} +3 -3
- package/dist/{builder-BCqi2vZI.js → builder-U9NePgb1.js} +3 -3
- package/dist/{client-Bz2YTmkI.js → client-Bxy8HDr6.js} +1 -1
- package/dist/compat/transformers.test.js +17 -17
- package/dist/{context--_OmBS_y.js → context-QdZW-Ujr.js} +2 -2
- package/dist/{docloader-CFPEGP-O.js → docloader-BxETv5Pg.js} +1 -1
- package/dist/{docloader-BXXU1IJa.js → docloader-CROX6mGl.js} +1 -1
- package/dist/federation/builder.test.js +4 -4
- package/dist/federation/handler.test.js +19 -19
- package/dist/federation/inbox.test.js +3 -3
- package/dist/federation/keycache.test.js +3 -3
- package/dist/federation/middleware.test.js +18 -18
- package/dist/federation/mod.js +10 -10
- package/dist/federation/send.test.js +9 -9
- package/dist/{http-CzqspmWU.js → http-BFFGTjGx.js} +28 -21
- package/dist/{http-BRrwx46z.js → http-BqyrrKga.js} +28 -21
- package/dist/{inbox-DD8UlhfG.js → inbox-B5Bw9Srl.js} +2 -2
- package/dist/{key-C5w-3SjO.js → key-CKebx9PQ.js} +5 -5
- package/dist/{key-DvwiOQwb.js → key-CMZaFsXy.js} +2 -2
- package/dist/{key-HNnxRIWR.js → key-CoCnU0TT.js} +3 -3
- package/dist/{key-QrKcvsSO.js → key-DQTI7H4H.js} +4 -4
- package/dist/{keycache-BoDH2T-i.js → keycache-DaGwVfyc.js} +1 -1
- package/dist/{keys-BAIkWBEq.js → keys-BbUPUEgc.js} +1 -1
- package/dist/{ld-Bi7Ivsm2.js → ld-zkArBnON.js} +3 -3
- package/dist/{lookup-DcdCCASI.js → lookup-5azkwQD7.js} +1 -1
- package/dist/{lookup-DyTmY5qU.js → lookup-BA2ljxxY.js} +1 -1
- package/dist/{lookup-BY5Ul4o7.js → lookup-Dkxs_pKw.js} +3 -3
- package/dist/middleware-BxQ9666a.js +17 -0
- package/dist/middleware-CDE2_cNS.js +33 -0
- package/dist/{middleware-CsbBMtrS.js → middleware-CjF6p7Is.js} +10 -10
- package/dist/{middleware-DoxO7NoH.js → middleware-De1leWxl.js} +15 -15
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +2 -2
- package/dist/nodeinfo/handler.test.js +18 -18
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/{owner-dmDDwN4q.js → owner-N5CPjlOT.js} +3 -3
- package/dist/{proof-DF7SY8Mq.js → proof-CETxIXYN.js} +3 -3
- package/dist/{proof-Dc4vpS1b.js → proof-n6qSQR1L.js} +3 -3
- package/dist/runtime/authdocloader.test.js +8 -8
- package/dist/runtime/docloader.test.js +1 -1
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/{send-Vli-wyrf.js → send-D4TDNch8.js} +2 -2
- package/dist/sig/http.test.js +32 -7
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +8 -8
- package/dist/sig/proof.test.js +7 -7
- package/dist/{types-BXKrWlms.js → types-CYkdV-jc.js} +1 -1
- package/dist/vocab/actor.test.js +4 -4
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +2 -2
- package/dist/vocab/vocab.test.js +3 -3
- package/dist/{vocab-jioARZnT.js → vocab-Bcnyhik6.js} +178 -178
- package/dist/{vocab-CSx3GRWT.js → vocab-Dm06IKO9.js} +3 -3
- package/dist/webfinger/handler.test.js +18 -18
- package/dist/webfinger/lookup.test.js +2 -2
- package/dist/webfinger/mod.js +2 -2
- package/package.json +1 -1
- package/dist/middleware-B7uD4PAv.js +0 -17
- package/dist/middleware-DSs2762V.js +0 -33
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-
|
6
|
-
import { validateCryptoKey } from "./key-
|
7
|
-
import { doubleKnock } from "./http-
|
5
|
+
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-BxETv5Pg.js";
|
6
|
+
import { validateCryptoKey } from "./key-CMZaFsXy.js";
|
7
|
+
import { doubleKnock } from "./http-BqyrrKga.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
|
10
10
|
//#region runtime/authdocloader.ts
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { createRequest, getRemoteDocument, logRequest } from "./docloader-
|
6
|
+
import { createRequest, getRemoteDocument, logRequest } from "./docloader-CROX6mGl.js";
|
7
7
|
import { UrlError, validatePublicUrl } from "./url-kTAI6_KP.js";
|
8
|
-
import { validateCryptoKey } from "./key-
|
9
|
-
import { doubleKnock } from "./http-
|
8
|
+
import { validateCryptoKey } from "./key-CoCnU0TT.js";
|
9
|
+
import { doubleKnock } from "./http-BFFGTjGx.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
|
12
12
|
//#region runtime/authdocloader.ts
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
6
|
+
import { deno_default } from "./docloader-CROX6mGl.js";
|
7
7
|
import { Router, RouterError } from "./router-D_aVZZUc.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
|
-
import { InboxListenerSet } from "./inbox-
|
9
|
+
import { InboxListenerSet } from "./inbox-B5Bw9Srl.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
12
12
|
|
@@ -34,7 +34,7 @@ var FederationBuilderImpl = class {
|
|
34
34
|
this.objectTypeIds = {};
|
35
35
|
}
|
36
36
|
async build(options) {
|
37
|
-
const { FederationImpl } = await import("./middleware-
|
37
|
+
const { FederationImpl } = await import("./middleware-CDE2_cNS.js");
|
38
38
|
const f = new FederationImpl(options);
|
39
39
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
40
40
|
f.router = this.router.clone();
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { getUserAgent } from "./docloader-
|
6
|
+
import { getUserAgent } from "./docloader-CROX6mGl.js";
|
7
7
|
import { parseSemVer } from "./semver-DWClQt_5.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
|
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
|
7
7
|
import { assert } from "../assert-0DSnLFa8.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-v5adm_-K.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-
|
11
|
-
import "../docloader-
|
10
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-De1leWxl.js";
|
11
|
+
import "../docloader-CROX6mGl.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-DWClQt_5.js";
|
14
|
-
import "../client-
|
14
|
+
import "../client-Bxy8HDr6.js";
|
15
15
|
import "../router-D_aVZZUc.js";
|
16
16
|
import "../types-C7C_l-jz.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Follow, Person } from "../vocab-
|
18
|
+
import { Follow, Person } from "../vocab-Bcnyhik6.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-5azkwQD7.js";
|
21
21
|
import "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import "../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-B45eQSqs.js";
|
23
|
+
import "../key-CoCnU0TT.js";
|
24
|
+
import "../http-BFFGTjGx.js";
|
25
|
+
import "../authdocloader-CcVP-E48.js";
|
26
|
+
import "../ld-zkArBnON.js";
|
27
|
+
import "../owner-N5CPjlOT.js";
|
28
|
+
import "../proof-CETxIXYN.js";
|
29
|
+
import "../lookup-Dkxs_pKw.js";
|
30
|
+
import "../inbox-B5Bw9Srl.js";
|
31
|
+
import "../builder-U9NePgb1.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-DaGwVfyc.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-D4TDNch8.js";
|
36
36
|
import { test } from "../testing-BZ0dJ4qn.js";
|
37
37
|
|
38
38
|
//#region compat/transformers.test.ts
|
@@ -4,8 +4,8 @@
|
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
6
|
import { RouterError } from "./router-D_aVZZUc.js";
|
7
|
-
import { lookupWebFinger } from "./lookup-
|
8
|
-
import { lookupObject, traverseCollection } from "./lookup-
|
7
|
+
import { lookupWebFinger } from "./lookup-5azkwQD7.js";
|
8
|
+
import { lookupObject, traverseCollection } from "./lookup-Dkxs_pKw.js";
|
9
9
|
import { mockDocumentLoader } from "./docloader-09nVWLAZ.js";
|
10
10
|
import { trace } from "@opentelemetry/api";
|
11
11
|
|
@@ -7,16 +7,16 @@ import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
|
7
7
|
import "../assert-0DSnLFa8.js";
|
8
8
|
import "../assert_instance_of-v5adm_-K.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import "../docloader-
|
10
|
+
import "../docloader-CROX6mGl.js";
|
11
11
|
import "../url-kTAI6_KP.js";
|
12
12
|
import { parseSemVer } from "../semver-DWClQt_5.js";
|
13
13
|
import "../router-D_aVZZUc.js";
|
14
14
|
import "../multibase-DeCHcK8L.js";
|
15
|
-
import { Activity, Note, Person } from "../vocab-
|
15
|
+
import { Activity, Note, Person } from "../vocab-Bcnyhik6.js";
|
16
16
|
import "../langstr-DbWheeIS.js";
|
17
17
|
import "../type-D2s5lmbZ.js";
|
18
|
-
import "../inbox-
|
19
|
-
import { createFederationBuilder } from "../builder-
|
18
|
+
import "../inbox-B5Bw9Srl.js";
|
19
|
+
import { createFederationBuilder } from "../builder-U9NePgb1.js";
|
20
20
|
import { test } from "../testing-BZ0dJ4qn.js";
|
21
21
|
import { assertExists } from "../std__assert-CmyZxqPw.js";
|
22
22
|
import "../assert_rejects-D_nYI1gs.js";
|
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
|
7
7
|
import { assert } from "../assert-0DSnLFa8.js";
|
8
8
|
import "../assert_instance_of-v5adm_-K.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
11
|
-
import "../docloader-
|
10
|
+
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-De1leWxl.js";
|
11
|
+
import "../docloader-CROX6mGl.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-DWClQt_5.js";
|
14
|
-
import "../client-
|
14
|
+
import "../client-Bxy8HDr6.js";
|
15
15
|
import "../router-D_aVZZUc.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-Bcnyhik6.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-5azkwQD7.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-B45eQSqs.js";
|
23
|
+
import "../key-CoCnU0TT.js";
|
24
|
+
import { signRequest } from "../http-BFFGTjGx.js";
|
25
|
+
import "../authdocloader-CcVP-E48.js";
|
26
|
+
import "../ld-zkArBnON.js";
|
27
|
+
import "../owner-N5CPjlOT.js";
|
28
|
+
import "../proof-CETxIXYN.js";
|
29
|
+
import "../lookup-Dkxs_pKw.js";
|
30
|
+
import "../inbox-B5Bw9Srl.js";
|
31
|
+
import "../builder-U9NePgb1.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-DaGwVfyc.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-D4TDNch8.js";
|
36
36
|
import { test } from "../testing-BZ0dJ4qn.js";
|
37
37
|
import "../std__assert-CmyZxqPw.js";
|
38
38
|
import { assertFalse } from "../assert_rejects-D_nYI1gs.js";
|
@@ -40,8 +40,8 @@ import "../assert_is_error-Drwb_yQp.js";
|
|
40
40
|
import "../assert_not_equals-BRPdeJ9D.js";
|
41
41
|
import "../assert_throws-DNuPhPNp.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-QdZW-Ujr.js";
|
44
|
+
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-BbUPUEgc.js";
|
45
45
|
|
46
46
|
//#region federation/handler.test.ts
|
47
47
|
test("acceptsJsonLd()", () => {
|
@@ -4,13 +4,13 @@
|
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
6
|
import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
7
|
-
import "../docloader-
|
7
|
+
import "../docloader-CROX6mGl.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-Bcnyhik6.js";
|
11
11
|
import "../langstr-DbWheeIS.js";
|
12
12
|
import "../type-D2s5lmbZ.js";
|
13
|
-
import { InboxListenerSet } from "../inbox-
|
13
|
+
import { InboxListenerSet } from "../inbox-B5Bw9Srl.js";
|
14
14
|
import { test } from "../testing-BZ0dJ4qn.js";
|
15
15
|
import "../assert_is_error-Drwb_yQp.js";
|
16
16
|
import { assertThrows } from "../assert_throws-DNuPhPNp.js";
|
@@ -7,12 +7,12 @@ import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
|
7
7
|
import { assert } from "../assert-0DSnLFa8.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-v5adm_-K.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import "../docloader-
|
10
|
+
import "../docloader-CROX6mGl.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-Bcnyhik6.js";
|
14
14
|
import "../langstr-DbWheeIS.js";
|
15
|
-
import { KvKeyCache } from "../keycache-
|
15
|
+
import { KvKeyCache } from "../keycache-DaGwVfyc.js";
|
16
16
|
import { test } from "../testing-BZ0dJ4qn.js";
|
17
17
|
|
18
18
|
//#region federation/keycache.test.ts
|
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
|
7
7
|
import { assert } from "../assert-0DSnLFa8.js";
|
8
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-De1leWxl.js";
|
11
|
+
import { FetchError, fetchDocumentLoader } from "../docloader-CROX6mGl.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-DWClQt_5.js";
|
14
|
-
import "../client-
|
14
|
+
import "../client-Bxy8HDr6.js";
|
15
15
|
import { RouterError } from "../router-D_aVZZUc.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-Bcnyhik6.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-5azkwQD7.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-B45eQSqs.js";
|
23
|
+
import "../key-CoCnU0TT.js";
|
24
|
+
import { signRequest, verifyRequest } from "../http-BFFGTjGx.js";
|
25
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-CcVP-E48.js";
|
26
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-zkArBnON.js";
|
27
|
+
import { doesActorOwnKey } from "../owner-N5CPjlOT.js";
|
28
|
+
import { signObject, verifyObject } from "../proof-CETxIXYN.js";
|
29
|
+
import { lookupObject } from "../lookup-Dkxs_pKw.js";
|
30
|
+
import "../inbox-B5Bw9Srl.js";
|
31
|
+
import "../builder-U9NePgb1.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-DaGwVfyc.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-D4TDNch8.js";
|
36
36
|
import { test } from "../testing-BZ0dJ4qn.js";
|
37
37
|
import { assertStrictEquals } from "../std__assert-CmyZxqPw.js";
|
38
38
|
import { assertFalse, assertRejects } from "../assert_rejects-D_nYI1gs.js";
|
@@ -40,7 +40,7 @@ import "../assert_is_error-Drwb_yQp.js";
|
|
40
40
|
import { assertNotEquals } from "../assert_not_equals-BRPdeJ9D.js";
|
41
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-
|
43
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-BbUPUEgc.js";
|
44
44
|
import { esm_default } from "../esm-CASHO3OR.js";
|
45
45
|
|
46
46
|
//#region testing/fixtures/example.com/person.json
|
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-BxETv5Pg.js";
|
7
|
+
import "../actor-CK9ONBOc.js";
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-CjF6p7Is.js";
|
9
|
+
import "../lookup-BA2ljxxY.js";
|
10
|
+
import "../key-CMZaFsXy.js";
|
11
|
+
import "../http-BqyrrKga.js";
|
12
|
+
import "../proof-n6qSQR1L.js";
|
13
13
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-3B6BDKCK.js";
|
14
|
-
import "../types-
|
15
|
-
import "../authdocloader-
|
16
|
-
import "../vocab-
|
14
|
+
import "../types-CYkdV-jc.js";
|
15
|
+
import "../authdocloader-CKx5YiYI.js";
|
16
|
+
import "../vocab-Dm06IKO9.js";
|
17
17
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
@@ -6,18 +6,18 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-XhPMqqO2.js";
|
7
7
|
import { assert } from "../assert-0DSnLFa8.js";
|
8
8
|
import "../assert_instance_of-v5adm_-K.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-CROX6mGl.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-Bcnyhik6.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-5azkwQD7.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-B45eQSqs.js";
|
17
|
+
import "../key-CoCnU0TT.js";
|
18
|
+
import { verifyRequest } from "../http-BFFGTjGx.js";
|
19
|
+
import { doesActorOwnKey } from "../owner-N5CPjlOT.js";
|
20
|
+
import { extractInboxes, sendActivity } from "../send-D4TDNch8.js";
|
21
21
|
import { test } from "../testing-BZ0dJ4qn.js";
|
22
22
|
import "../std__assert-CmyZxqPw.js";
|
23
23
|
import { assertFalse, assertRejects } from "../assert_rejects-D_nYI1gs.js";
|
@@ -25,7 +25,7 @@ import "../assert_is_error-Drwb_yQp.js";
|
|
25
25
|
import { assertNotEquals } from "../assert_not_equals-BRPdeJ9D.js";
|
26
26
|
import "../assert_throws-DNuPhPNp.js";
|
27
27
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
28
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
28
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-BbUPUEgc.js";
|
29
29
|
import { esm_default } from "../esm-CASHO3OR.js";
|
30
30
|
|
31
31
|
//#region federation/send.test.ts
|
@@ -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-CROX6mGl.js";
|
7
|
+
import { CryptographicKey } from "./vocab-Bcnyhik6.js";
|
8
|
+
import { fetchKey, validateCryptoKey } from "./key-CoCnU0TT.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";
|
@@ -645,6 +645,28 @@ async function verifyRequestRfc9421(request, span, { documentLoader, contextLoad
|
|
645
645
|
return validKey;
|
646
646
|
}
|
647
647
|
/**
|
648
|
+
* Helper function to create a new Request for redirect handling.
|
649
|
+
* @param request The original request.
|
650
|
+
* @param location The redirect location.
|
651
|
+
* @param body The request body as ArrayBuffer or undefined.
|
652
|
+
* @returns A new Request object for the redirect.
|
653
|
+
*/
|
654
|
+
function createRedirectRequest(request, location, body) {
|
655
|
+
return new Request(location, {
|
656
|
+
method: request.method,
|
657
|
+
headers: request.headers,
|
658
|
+
body,
|
659
|
+
redirect: "manual",
|
660
|
+
signal: request.signal,
|
661
|
+
mode: request.mode,
|
662
|
+
credentials: request.credentials,
|
663
|
+
referrer: request.referrer,
|
664
|
+
referrerPolicy: request.referrerPolicy,
|
665
|
+
integrity: request.integrity,
|
666
|
+
keepalive: request.keepalive
|
667
|
+
});
|
668
|
+
}
|
669
|
+
/**
|
648
670
|
* Performs a double-knock request to the given URL. For the details of
|
649
671
|
* double-knocking, see
|
650
672
|
* <https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions>.
|
@@ -667,19 +689,7 @@ async function doubleKnock(request, identity, options = {}) {
|
|
667
689
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
668
690
|
const location = response.headers.get("Location");
|
669
691
|
const body = request.method !== "GET" && request.method !== "HEAD" ? await request.clone().arrayBuffer() : void 0;
|
670
|
-
return doubleKnock(
|
671
|
-
method: request.method,
|
672
|
-
headers: request.headers,
|
673
|
-
body,
|
674
|
-
redirect: "manual",
|
675
|
-
signal: request.signal,
|
676
|
-
mode: request.mode,
|
677
|
-
credentials: request.credentials,
|
678
|
-
referrer: request.referrer,
|
679
|
-
referrerPolicy: request.referrerPolicy,
|
680
|
-
integrity: request.integrity,
|
681
|
-
keepalive: request.keepalive
|
682
|
-
}), identity, options);
|
692
|
+
return doubleKnock(createRedirectRequest(request, location, body), identity, options);
|
683
693
|
} else if (response.status === 400 || response.status === 401 || response.status > 401) {
|
684
694
|
const spec = firstTrySpec === "draft-cavage-http-signatures-12" ? "rfc9421" : "draft-cavage-http-signatures-12";
|
685
695
|
getLogger([
|
@@ -700,11 +710,8 @@ async function doubleKnock(request, identity, options = {}) {
|
|
700
710
|
response = await fetch(signedRequest, { redirect: "manual" });
|
701
711
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
702
712
|
const location = response.headers.get("Location");
|
703
|
-
const body = request.method !== "GET" && request.method !== "HEAD" ? request.clone().
|
704
|
-
return doubleKnock(
|
705
|
-
...request,
|
706
|
-
body
|
707
|
-
}), identity, options);
|
713
|
+
const body = request.method !== "GET" && request.method !== "HEAD" ? await request.clone().arrayBuffer() : void 0;
|
714
|
+
return doubleKnock(createRedirectRequest(request, location, body), identity, options);
|
708
715
|
} else if (response.status !== 400 && response.status !== 401) await specDeterminer?.rememberSpec(origin, spec);
|
709
716
|
} else await specDeterminer?.rememberSpec(origin, firstTrySpec);
|
710
717
|
return response;
|
@@ -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-BxETv5Pg.js";
|
6
|
+
import { CryptographicKey } from "./actor-CK9ONBOc.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-CMZaFsXy.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";
|
@@ -644,6 +644,28 @@ async function verifyRequestRfc9421(request, span, { documentLoader, contextLoad
|
|
644
644
|
return validKey;
|
645
645
|
}
|
646
646
|
/**
|
647
|
+
* Helper function to create a new Request for redirect handling.
|
648
|
+
* @param request The original request.
|
649
|
+
* @param location The redirect location.
|
650
|
+
* @param body The request body as ArrayBuffer or undefined.
|
651
|
+
* @returns A new Request object for the redirect.
|
652
|
+
*/
|
653
|
+
function createRedirectRequest(request, location, body) {
|
654
|
+
return new Request(location, {
|
655
|
+
method: request.method,
|
656
|
+
headers: request.headers,
|
657
|
+
body,
|
658
|
+
redirect: "manual",
|
659
|
+
signal: request.signal,
|
660
|
+
mode: request.mode,
|
661
|
+
credentials: request.credentials,
|
662
|
+
referrer: request.referrer,
|
663
|
+
referrerPolicy: request.referrerPolicy,
|
664
|
+
integrity: request.integrity,
|
665
|
+
keepalive: request.keepalive
|
666
|
+
});
|
667
|
+
}
|
668
|
+
/**
|
647
669
|
* Performs a double-knock request to the given URL. For the details of
|
648
670
|
* double-knocking, see
|
649
671
|
* <https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions>.
|
@@ -666,19 +688,7 @@ async function doubleKnock(request, identity, options = {}) {
|
|
666
688
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
667
689
|
const location = response.headers.get("Location");
|
668
690
|
const body = request.method !== "GET" && request.method !== "HEAD" ? await request.clone().arrayBuffer() : void 0;
|
669
|
-
return doubleKnock(
|
670
|
-
method: request.method,
|
671
|
-
headers: request.headers,
|
672
|
-
body,
|
673
|
-
redirect: "manual",
|
674
|
-
signal: request.signal,
|
675
|
-
mode: request.mode,
|
676
|
-
credentials: request.credentials,
|
677
|
-
referrer: request.referrer,
|
678
|
-
referrerPolicy: request.referrerPolicy,
|
679
|
-
integrity: request.integrity,
|
680
|
-
keepalive: request.keepalive
|
681
|
-
}), identity, options);
|
691
|
+
return doubleKnock(createRedirectRequest(request, location, body), identity, options);
|
682
692
|
} else if (response.status === 400 || response.status === 401 || response.status > 401) {
|
683
693
|
const spec = firstTrySpec === "draft-cavage-http-signatures-12" ? "rfc9421" : "draft-cavage-http-signatures-12";
|
684
694
|
getLogger([
|
@@ -699,11 +709,8 @@ async function doubleKnock(request, identity, options = {}) {
|
|
699
709
|
response = await fetch(signedRequest, { redirect: "manual" });
|
700
710
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
701
711
|
const location = response.headers.get("Location");
|
702
|
-
const body = request.method !== "GET" && request.method !== "HEAD" ? request.clone().
|
703
|
-
return doubleKnock(
|
704
|
-
...request,
|
705
|
-
body
|
706
|
-
}), identity, options);
|
712
|
+
const body = request.method !== "GET" && request.method !== "HEAD" ? await request.clone().arrayBuffer() : void 0;
|
713
|
+
return doubleKnock(createRedirectRequest(request, location, body), identity, options);
|
707
714
|
} else if (response.status !== 400 && response.status !== 401) await specDeterminer?.rememberSpec(origin, spec);
|
708
715
|
} else await specDeterminer?.rememberSpec(origin, firstTrySpec);
|
709
716
|
return response;
|
@@ -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-CROX6mGl.js";
|
7
|
+
import { Activity } from "./vocab-Bcnyhik6.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,14 +3,14 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "./docloader-
|
6
|
+
import "./docloader-CROX6mGl.js";
|
7
7
|
import "./url-kTAI6_KP.js";
|
8
8
|
import "./multibase-DeCHcK8L.js";
|
9
|
-
import "./vocab-
|
9
|
+
import "./vocab-Bcnyhik6.js";
|
10
10
|
import "./langstr-DbWheeIS.js";
|
11
|
-
import "./lookup-
|
11
|
+
import "./lookup-5azkwQD7.js";
|
12
12
|
import "./type-D2s5lmbZ.js";
|
13
|
-
import "./actor-
|
14
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
13
|
+
import "./actor-B45eQSqs.js";
|
14
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-CoCnU0TT.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-BxETv5Pg.js";
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-CK9ONBOc.js";
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
9
9
|
|
@@ -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-CROX6mGl.js";
|
7
|
+
import { CryptographicKey, Object as Object$1 } from "./vocab-Bcnyhik6.js";
|
8
|
+
import { isActor } from "./actor-B45eQSqs.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-BxETv5Pg.js";
|
6
|
+
import "./actor-CK9ONBOc.js";
|
7
|
+
import "./lookup-BA2ljxxY.js";
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-CMZaFsXy.js";
|
9
9
|
|
10
10
|
export { validateCryptoKey };
|
@@ -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-Bcnyhik6.js";
|
7
7
|
|
8
8
|
//#region federation/keycache.ts
|
9
9
|
var KvKeyCache = class {
|