@fedify/fedify 1.8.1-dev.1251 → 1.8.1-dev.1260
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/README.md +14 -11
- package/dist/{actor-BrcrDRrd.js → actor-BQ_KA96z.js} +189 -189
- package/dist/{actor-C2nhWp6O.d.ts → actor-CWNAGvnO.d.ts} +3 -3
- package/dist/{actor-DoKu1L4T.js → actor-CkYiMF2G.js} +2 -2
- package/dist/{assert-MZs1qjMx.js → assert-DwEa6glZ.js} +2 -2
- package/dist/{assert_equals-DSbWqCm3.js → assert_equals-C5gKCm6A.js} +9 -9
- package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-C9QtN-X9.js} +2 -2
- package/dist/{assert_is_error-BPGph1Jx.js → assert_is_error-CeVBLPsZ.js} +2 -2
- package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals-D2R2nl5h.js} +2 -2
- package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-AjlKk-Vo.js} +4 -4
- package/dist/{assert_throws-BOO88avQ.js → assert_throws-CqMKbTh_.js} +3 -3
- package/dist/{authdocloader-BM_rDISs.js → authdocloader-BxAUT5Xm.js} +4 -4
- package/dist/{authdocloader-BCPue7G-.js → authdocloader-aWYs2hxV.js} +4 -4
- package/dist/{builder-DPbqDjRL.js → builder-C708-MQj.js} +5 -5
- package/dist/{client-D2tgjFk3.d.ts → client-B0IOer6B.d.ts} +4 -4
- package/dist/{client-EtAMhk0M.js → client-BD1zmwJe.js} +3 -3
- package/dist/{collection-CSzG2j1P.js → collection-D5V3UzU3.js} +1 -1
- package/dist/compat/mod.d.ts +12 -12
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +25 -25
- package/dist/{context-BBD2ZH_P.d.ts → context-BNA3vzcr.d.ts} +22 -22
- package/dist/{denokv-2x6-IpXO.js → denokv-DK9P5Jq7.js} +1 -1
- package/dist/{docloader-Bz56sKV5.d.ts → docloader-CLolPVL_.d.ts} +2 -2
- package/dist/{docloader-BFnz4cUB.js → docloader-CU3DHEeK.js} +34 -34
- package/dist/{esm-By_fFRjc.js → esm-Bho9FgAg.js} +15 -15
- package/dist/federation/builder.test.js +16 -16
- package/dist/federation/collection.test.js +13 -13
- package/dist/federation/handler.test.js +31 -31
- package/dist/federation/inbox.test.js +8 -8
- package/dist/federation/keycache.test.js +9 -9
- package/dist/federation/kv.test.js +13 -13
- package/dist/federation/middleware.test.js +34 -34
- package/dist/federation/mod.d.ts +11 -11
- package/dist/federation/mod.js +12 -12
- package/dist/federation/mq.test.js +15 -15
- package/dist/federation/retry.test.js +7 -7
- package/dist/federation/router.test.js +12 -12
- package/dist/federation/send.test.js +19 -19
- package/dist/{federation-CMX7WzeL.js → federation-C44ekWNP.js} +2 -2
- package/dist/{http-l4uEvaAw.d.ts → http-COez3YdK.d.ts} +4 -4
- package/dist/{http-1Wzt-s-x.js → http-DBd_ra18.js} +3 -3
- package/dist/{http-CSZQOCiK.js → http-Dt8q9aI7.js} +4 -4
- package/dist/{inbox-C6-okn67.js → inbox-DiMz2u05.js} +2 -2
- package/dist/{key-BE8Xa-LD.js → key-B1lFLyTc.js} +3 -3
- package/dist/{key-Ds9OGz2b.js → key-BDHOX_Wb.js} +3 -3
- package/dist/{key-KiUFPYCP.js → key-BkCrACZf.js} +3 -3
- package/dist/{key-DSQYlIcZ.js → key-DYEATWlJ.js} +4 -4
- package/dist/{keycache-B4Qb2wT6.js → keycache-Do8OHmNJ.js} +2 -2
- package/dist/{keys-8gSmlKLZ.js → keys-BHgRk4_q.js} +2 -2
- package/dist/{kv-C7sopW2E.d.ts → kv-BqOK6zss.d.ts} +1 -1
- package/dist/{kv-CRZrzyXm.js → kv-D7Yt6pnB.js} +1 -1
- package/dist/{ld-Ct7v-88v.js → ld-Q3jKE5VL.js} +3 -3
- package/dist/{lookup-CSj0842o.js → lookup-BrlEWKsU.js} +2 -2
- package/dist/{lookup-CVrpxrwg.js → lookup-CiiLUHJi.js} +4 -4
- package/dist/{lookup-BJelGpWr.d.ts → lookup-tSXYzgYs.d.ts} +3 -3
- package/dist/middleware-BKOetJQY.js +17 -0
- package/dist/{middleware-DENCQMFM.js → middleware-C4PFwDkm.js} +23 -23
- package/dist/{middleware-h8mWKC7-.js → middleware-DFzTX2Pl.js} +23 -23
- package/dist/middleware-ZYPLfH_S.js +26 -0
- package/dist/{mod-DwquBB1g.d.ts → mod-Bf-mThHd.d.ts} +5 -5
- package/dist/{mod-D79SaXL-.d.ts → mod-C2jQirfr.d.ts} +6 -6
- package/dist/{mod-DDwnlIlm.d.ts → mod-CxD6XXBN.d.ts} +3 -3
- package/dist/{mod-DM7ZpXF4.d.ts → mod-UTC30uNC.d.ts} +4 -4
- package/dist/mod.d.ts +14 -14
- package/dist/mod.js +12 -12
- package/dist/{mq-CRGm1e_F.d.ts → mq-DYKDDJmp.d.ts} +1 -1
- package/dist/nodeinfo/client.test.js +15 -15
- package/dist/nodeinfo/handler.test.js +30 -30
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +13 -13
- package/dist/nodeinfo/types.test.js +14 -14
- package/dist/{owner-fFqUg4lq.d.ts → owner-BlxMNrL4.d.ts} +4 -4
- package/dist/{owner-C4I-uKsE.js → owner-CALdeXqs.js} +3 -3
- package/dist/{proof-Dc6YBQrG.js → proof-BqYd3TSh.js} +3 -3
- package/dist/{proof-D38LfAv-.js → proof-Cy8JPq8J.js} +6 -6
- package/dist/{retry-D4GJ670a.js → retry-BnpVRGFC.js} +1 -1
- package/dist/runtime/authdocloader.test.js +18 -18
- package/dist/runtime/docloader.test.js +14 -14
- package/dist/runtime/key.test.js +14 -14
- package/dist/runtime/langstr.test.js +12 -12
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +12 -12
- package/dist/runtime/url.test.js +8 -8
- package/dist/{semver-dArNLkR9.js → semver-DCqorrj5.js} +1 -1
- package/dist/{send-Bmx4oAgz.js → send-5qQ6uP8T.js} +3 -3
- package/dist/sig/http.test.js +17 -17
- package/dist/sig/key.test.js +15 -15
- package/dist/sig/ld.test.js +13 -13
- 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 +16 -16
- package/dist/{std__assert-X-_kMxKM.js → std__assert-BQdmxyzF.js} +6 -6
- package/dist/testing/docloader.test.js +12 -12
- package/dist/testing/mod.d.ts +19 -19
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-D8jl2zpn.js → testing-DwC7K6Ix.js} +5 -5
- package/dist/{transformers-Dna8Fg7k.js → transformers-DJRB0yFF.js} +1 -1
- package/dist/{type-BdEEMr54.js → type-BCSEe3aP.js} +221 -221
- package/dist/{types-CB7kSoxP.js → types-CN2hZqdL.js} +4 -4
- package/dist/{types-BIgY6c-l.js → types-n7HI7VFr.js} +2 -2
- package/dist/vocab/actor.test.js +143 -143
- 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 +5 -5
- package/dist/vocab/vocab.test.js +54 -54
- package/dist/{vocab-zTbk21_4.js → vocab-BJXB9OZv.js} +6 -6
- package/dist/{vocab-CA7YwVEz.d.ts → vocab-Cyrb7_co.d.ts} +3 -3
- package/dist/webfinger/handler.test.js +30 -30
- package/dist/webfinger/lookup.test.js +13 -13
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +3 -3
- package/dist/x/cfworkers.js +1 -1
- package/dist/x/cfworkers.test.js +13 -13
- package/dist/x/hono.d.ts +12 -12
- package/dist/x/hono.js +1 -1
- package/dist/x/sveltekit.d.ts +12 -12
- package/dist/x/sveltekit.js +1 -1
- package/package.json +3 -3
- package/dist/middleware-DrXiPjY8.js +0 -17
- package/dist/middleware-DxmXyJsU.js +0 -26
- /package/dist/{src/vocab → vocab}/accept.yaml +0 -0
- /package/dist/{src/vocab → vocab}/activity.yaml +0 -0
- /package/dist/{src/vocab → vocab}/add.yaml +0 -0
- /package/dist/{src/vocab → vocab}/announce.yaml +0 -0
- /package/dist/{src/vocab → vocab}/application.yaml +0 -0
- /package/dist/{src/vocab → vocab}/arrive.yaml +0 -0
- /package/dist/{src/vocab → vocab}/article.yaml +0 -0
- /package/dist/{src/vocab → vocab}/audio.yaml +0 -0
- /package/dist/{src/vocab → vocab}/block.yaml +0 -0
- /package/dist/{src/vocab → vocab}/chatmessage.yaml +0 -0
- /package/dist/{src/vocab → vocab}/collection.yaml +0 -0
- /package/dist/{src/vocab → vocab}/collectionpage.yaml +0 -0
- /package/dist/{src/vocab → vocab}/create.yaml +0 -0
- /package/dist/{src/vocab → vocab}/dataintegrityproof.yaml +0 -0
- /package/dist/{src/vocab → vocab}/delete.yaml +0 -0
- /package/dist/{src/vocab → vocab}/didservice.yaml +0 -0
- /package/dist/{src/vocab → vocab}/dislike.yaml +0 -0
- /package/dist/{src/vocab → vocab}/document.yaml +0 -0
- /package/dist/{src/vocab → vocab}/emoji.yaml +0 -0
- /package/dist/{src/vocab → vocab}/emojireact.yaml +0 -0
- /package/dist/{src/vocab → vocab}/endpoints.yaml +0 -0
- /package/dist/{src/vocab → vocab}/event.yaml +0 -0
- /package/dist/{src/vocab → vocab}/export.yaml +0 -0
- /package/dist/{src/vocab → vocab}/flag.yaml +0 -0
- /package/dist/{src/vocab → vocab}/follow.yaml +0 -0
- /package/dist/{src/vocab → vocab}/group.yaml +0 -0
- /package/dist/{src/vocab → vocab}/hashtag.yaml +0 -0
- /package/dist/{src/vocab → vocab}/ignore.yaml +0 -0
- /package/dist/{src/vocab → vocab}/image.yaml +0 -0
- /package/dist/{src/vocab → vocab}/intransitiveactivity.yaml +0 -0
- /package/dist/{src/vocab → vocab}/invite.yaml +0 -0
- /package/dist/{src/vocab → vocab}/join.yaml +0 -0
- /package/dist/{src/vocab → vocab}/key.yaml +0 -0
- /package/dist/{src/vocab → vocab}/leave.yaml +0 -0
- /package/dist/{src/vocab → vocab}/like.yaml +0 -0
- /package/dist/{src/vocab → vocab}/link.yaml +0 -0
- /package/dist/{src/vocab → vocab}/listen.yaml +0 -0
- /package/dist/{src/vocab → vocab}/mention.yaml +0 -0
- /package/dist/{src/vocab → vocab}/move.yaml +0 -0
- /package/dist/{src/vocab → vocab}/multikey.yaml +0 -0
- /package/dist/{src/vocab → vocab}/note.yaml +0 -0
- /package/dist/{src/vocab → vocab}/object.yaml +0 -0
- /package/dist/{src/vocab → vocab}/offer.yaml +0 -0
- /package/dist/{src/vocab → vocab}/orderedcollection.yaml +0 -0
- /package/dist/{src/vocab → vocab}/orderedcollectionpage.yaml +0 -0
- /package/dist/{src/vocab → vocab}/organization.yaml +0 -0
- /package/dist/{src/vocab → vocab}/page.yaml +0 -0
- /package/dist/{src/vocab → vocab}/person.yaml +0 -0
- /package/dist/{src/vocab → vocab}/place.yaml +0 -0
- /package/dist/{src/vocab → vocab}/profile.yaml +0 -0
- /package/dist/{src/vocab → vocab}/propertyvalue.yaml +0 -0
- /package/dist/{src/vocab → vocab}/question.yaml +0 -0
- /package/dist/{src/vocab → vocab}/read.yaml +0 -0
- /package/dist/{src/vocab → vocab}/reject.yaml +0 -0
- /package/dist/{src/vocab → vocab}/relationship.yaml +0 -0
- /package/dist/{src/vocab → vocab}/remove.yaml +0 -0
- /package/dist/{src/vocab → vocab}/service.yaml +0 -0
- /package/dist/{src/vocab → vocab}/source.yaml +0 -0
- /package/dist/{src/vocab → vocab}/tentativeaccept.yaml +0 -0
- /package/dist/{src/vocab → vocab}/tentativereject.yaml +0 -0
- /package/dist/{src/vocab → vocab}/tombstone.yaml +0 -0
- /package/dist/{src/vocab → vocab}/travel.yaml +0 -0
- /package/dist/{src/vocab → vocab}/undo.yaml +0 -0
- /package/dist/{src/vocab → vocab}/update.yaml +0 -0
- /package/dist/{src/vocab → vocab}/video.yaml +0 -0
- /package/dist/{src/vocab → vocab}/view.yaml +0 -0
package/dist/federation/mod.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../transformers-
|
|
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-
|
|
5
|
+
import "../transformers-DJRB0yFF.js";
|
|
6
|
+
import "../docloader-CU3DHEeK.js";
|
|
7
|
+
import "../actor-BQ_KA96z.js";
|
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DFzTX2Pl.js";
|
|
9
|
+
import "../lookup-BrlEWKsU.js";
|
|
10
|
+
import "../key-BkCrACZf.js";
|
|
11
|
+
import "../http-Dt8q9aI7.js";
|
|
12
|
+
import "../proof-Cy8JPq8J.js";
|
|
13
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-C44ekWNP.js";
|
|
14
|
+
import "../types-CN2hZqdL.js";
|
|
15
|
+
import "../authdocloader-aWYs2hxV.js";
|
|
16
|
+
import "../vocab-BJXB9OZv.js";
|
|
17
17
|
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
12
|
-
import { assertGreater, assertGreaterOrEqual } from "../std__assert-
|
|
13
|
-
import { assertFalse } from "../assert_rejects-
|
|
14
|
-
import "../assert_is_error-
|
|
15
|
-
import "../assert_not_equals-
|
|
16
|
-
import "../assert_throws-
|
|
6
|
+
import "../type-BCSEe3aP.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
+
import "../lookup-CiiLUHJi.js";
|
|
11
|
+
import { test } from "../testing-DwC7K6Ix.js";
|
|
12
|
+
import { assertGreater, assertGreaterOrEqual } from "../std__assert-BQdmxyzF.js";
|
|
13
|
+
import { assertFalse } from "../assert_rejects-AjlKk-Vo.js";
|
|
14
|
+
import "../assert_is_error-CeVBLPsZ.js";
|
|
15
|
+
import "../assert_not_equals-D2R2nl5h.js";
|
|
16
|
+
import "../assert_throws-CqMKbTh_.js";
|
|
17
17
|
import { delay } from "es-toolkit";
|
|
18
18
|
|
|
19
|
-
//#region
|
|
19
|
+
//#region federation/mq.ts
|
|
20
20
|
/**
|
|
21
21
|
* A message queue that processes messages in the same process.
|
|
22
22
|
* Do not use this in production as it does neither persist messages nor
|
|
@@ -169,7 +169,7 @@ var ParallelMessageQueue = class ParallelMessageQueue {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
//#endregion
|
|
172
|
-
//#region
|
|
172
|
+
//#region federation/mq.test.ts
|
|
173
173
|
test("InProcessMessageQueue", async (t) => {
|
|
174
174
|
const mq = new InProcessMessageQueue();
|
|
175
175
|
await t.step("nativeRetrial property", () => {
|
|
@@ -227,7 +227,7 @@ test("InProcessMessageQueue", async (t) => {
|
|
|
227
227
|
});
|
|
228
228
|
test("MessageQueue.nativeRetrial", async (t) => {
|
|
229
229
|
if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") await t.step("DenoKvMessageQueue", async () => {
|
|
230
|
-
const { DenoKvMessageQueue } = await import("../denokv-
|
|
230
|
+
const { DenoKvMessageQueue } = await import("../denokv-DK9P5Jq7.js");
|
|
231
231
|
const mq = new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
|
232
232
|
assert(mq.nativeRetrial);
|
|
233
233
|
if (Symbol.dispose in mq) {
|
|
@@ -266,7 +266,7 @@ test("MessageQueue.nativeRetrial", async (t) => {
|
|
|
266
266
|
});
|
|
267
267
|
const queues = { InProcessMessageQueue: () => Promise.resolve(new InProcessMessageQueue()) };
|
|
268
268
|
if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") {
|
|
269
|
-
const { DenoKvMessageQueue } = await import("../denokv-
|
|
269
|
+
const { DenoKvMessageQueue } = await import("../denokv-DK9P5Jq7.js");
|
|
270
270
|
queues.DenoKvMessageQueue = async () => new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
|
271
271
|
}
|
|
272
272
|
for (const mqName in queues) test({
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { AssertionError, assertEquals } from "../assert_equals-
|
|
8
|
-
import "../lookup-
|
|
9
|
-
import { createExponentialBackoffPolicy } from "../retry-
|
|
10
|
-
import { test } from "../testing-
|
|
11
|
-
import { assertNotEquals } from "../assert_not_equals-
|
|
6
|
+
import "../type-BCSEe3aP.js";
|
|
7
|
+
import { AssertionError, assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
+
import "../lookup-CiiLUHJi.js";
|
|
9
|
+
import { createExponentialBackoffPolicy } from "../retry-BnpVRGFC.js";
|
|
10
|
+
import { test } from "../testing-DwC7K6Ix.js";
|
|
11
|
+
import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
|
|
12
12
|
|
|
13
|
-
//#region
|
|
13
|
+
//#region federation/retry.test.ts
|
|
14
14
|
test("createExponentialBackoffPolicy()", () => {
|
|
15
15
|
const policy = createExponentialBackoffPolicy({ maxAttempts: 4 });
|
|
16
16
|
const noMatter = Temporal.Duration.from({ seconds: 0 });
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { Router, RouterError } from "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
12
|
-
import "../std__assert-
|
|
13
|
-
import { assertFalse } from "../assert_rejects-
|
|
14
|
-
import "../assert_is_error-
|
|
15
|
-
import "../assert_not_equals-
|
|
16
|
-
import { assertThrows } from "../assert_throws-
|
|
6
|
+
import "../type-BCSEe3aP.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
+
import { Router, RouterError } from "../lookup-CiiLUHJi.js";
|
|
11
|
+
import { test } from "../testing-DwC7K6Ix.js";
|
|
12
|
+
import "../std__assert-BQdmxyzF.js";
|
|
13
|
+
import { assertFalse } from "../assert_rejects-AjlKk-Vo.js";
|
|
14
|
+
import "../assert_is_error-CeVBLPsZ.js";
|
|
15
|
+
import "../assert_not_equals-D2R2nl5h.js";
|
|
16
|
+
import { assertThrows } from "../assert_throws-CqMKbTh_.js";
|
|
17
17
|
|
|
18
|
-
//#region
|
|
18
|
+
//#region federation/router.test.ts
|
|
19
19
|
function setUp(options = {}) {
|
|
20
20
|
const router = new Router(options);
|
|
21
21
|
router.add("/users/{name}", "user");
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Application, Endpoints, Group, Person, Service } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import "../actor-
|
|
12
|
-
import "../key-
|
|
13
|
-
import { verifyRequest } from "../http-
|
|
14
|
-
import { doesActorOwnKey } from "../owner-
|
|
15
|
-
import { extractInboxes, sendActivity } from "../send-
|
|
16
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
17
|
-
import "../std__assert-
|
|
18
|
-
import { assertFalse, assertRejects } from "../assert_rejects-
|
|
19
|
-
import "../assert_is_error-
|
|
20
|
-
import { assertNotEquals } from "../assert_not_equals-
|
|
21
|
-
import "../assert_throws-
|
|
22
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
|
23
|
-
import { esm_default } from "../esm-
|
|
6
|
+
import { Activity, Application, Endpoints, Group, Person, Service } from "../type-BCSEe3aP.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
+
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
+
import "../lookup-CiiLUHJi.js";
|
|
11
|
+
import "../actor-CkYiMF2G.js";
|
|
12
|
+
import "../key-BDHOX_Wb.js";
|
|
13
|
+
import { verifyRequest } from "../http-DBd_ra18.js";
|
|
14
|
+
import { doesActorOwnKey } from "../owner-CALdeXqs.js";
|
|
15
|
+
import { extractInboxes, sendActivity } from "../send-5qQ6uP8T.js";
|
|
16
|
+
import { mockDocumentLoader, test } from "../testing-DwC7K6Ix.js";
|
|
17
|
+
import "../std__assert-BQdmxyzF.js";
|
|
18
|
+
import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
|
|
19
|
+
import "../assert_is_error-CeVBLPsZ.js";
|
|
20
|
+
import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
|
|
21
|
+
import "../assert_throws-CqMKbTh_.js";
|
|
22
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-BHgRk4_q.js";
|
|
23
|
+
import { esm_default } from "../esm-Bho9FgAg.js";
|
|
24
24
|
|
|
25
|
-
//#region
|
|
25
|
+
//#region federation/send.test.ts
|
|
26
26
|
test("extractInboxes()", () => {
|
|
27
27
|
const recipients = [
|
|
28
28
|
new Person({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { isEqual } from "es-toolkit";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region federation/kv.ts
|
|
8
8
|
/**
|
|
9
9
|
* A key–value store that stores values in memory.
|
|
10
10
|
* Do not use this in production as it does not persist values.
|
|
@@ -70,7 +70,7 @@ var MemoryKvStore = class {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
73
|
-
//#region
|
|
73
|
+
//#region federation/mq.ts
|
|
74
74
|
/**
|
|
75
75
|
* A message queue that processes messages in the same process.
|
|
76
76
|
* Do not use this in production as it does neither persist messages nor
|
|
@@ -1,10 +1,10 @@
|
|
|
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-CLolPVL_.js";
|
|
4
|
+
import { CryptographicKey, Multikey } from "./vocab-Cyrb7_co.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region sig/key.d.ts
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Generates a key pair which is appropriate for Fedify.
|
|
@@ -116,7 +116,7 @@ interface KeyCache {
|
|
|
116
116
|
set(keyId: URL, key: CryptographicKey | Multikey | null): Promise<void>;
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
|
-
//#region
|
|
119
|
+
//#region sig/http.d.ts
|
|
120
120
|
/**
|
|
121
121
|
* The standard to use for signing and verifying HTTP signatures.
|
|
122
122
|
* @since 1.6.0
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, deno_default } from "./type-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { CryptographicKey, deno_default } from "./type-BCSEe3aP.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BDHOX_Wb.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
@@ -12,7 +12,7 @@ import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
|
12
12
|
import { encodeHex } from "byte-encodings/hex";
|
|
13
13
|
import { Item, decodeDict, encodeItem } from "structured-field-values";
|
|
14
14
|
|
|
15
|
-
//#region
|
|
15
|
+
//#region sig/http.ts
|
|
16
16
|
/**
|
|
17
17
|
* Signs a request using the given private key.
|
|
18
18
|
* @param request The request to sign.
|
|
@@ -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-CU3DHEeK.js";
|
|
6
|
+
import { CryptographicKey } from "./actor-BQ_KA96z.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BkCrACZf.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";
|
|
@@ -12,7 +12,7 @@ import { encodeHex } from "byte-encodings/hex";
|
|
|
12
12
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
13
13
|
import { Item, decodeDict, encodeItem } from "structured-field-values";
|
|
14
14
|
|
|
15
|
-
//#region
|
|
15
|
+
//#region sig/http.ts
|
|
16
16
|
/**
|
|
17
17
|
* Signs a request using the given private key.
|
|
18
18
|
* @param request The request to sign.
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, deno_default, getTypeId } from "./type-
|
|
6
|
+
import { Activity, deno_default, getTypeId } from "./type-BCSEe3aP.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
10
|
-
//#region
|
|
10
|
+
//#region federation/inbox.ts
|
|
11
11
|
var InboxListenerSet = class InboxListenerSet {
|
|
12
12
|
#listeners;
|
|
13
13
|
constructor() {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "./type-
|
|
7
|
-
import "./actor-
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
|
6
|
+
import "./type-BCSEe3aP.js";
|
|
7
|
+
import "./actor-CkYiMF2G.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-BDHOX_Wb.js";
|
|
9
9
|
|
|
10
10
|
export { validateCryptoKey };
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-
|
|
7
|
-
import { isActor } from "./actor-
|
|
6
|
+
import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-BCSEe3aP.js";
|
|
7
|
+
import { isActor } from "./actor-CkYiMF2G.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
|
|
11
|
-
//#region
|
|
11
|
+
//#region sig/key.ts
|
|
12
12
|
/**
|
|
13
13
|
* Checks if the given key is valid and supported. No-op if the key is valid,
|
|
14
14
|
* otherwise throws an error.
|
|
@@ -2,12 +2,12 @@
|
|
|
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-CU3DHEeK.js";
|
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-BQ_KA96z.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
10
|
-
//#region
|
|
10
|
+
//#region sig/key.ts
|
|
11
11
|
/**
|
|
12
12
|
* Checks if the given key is valid and supported. No-op if the key is valid,
|
|
13
13
|
* otherwise throws an error.
|
|
@@ -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-CU3DHEeK.js";
|
|
6
|
+
import "./actor-BQ_KA96z.js";
|
|
7
|
+
import "./lookup-BrlEWKsU.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-BkCrACZf.js";
|
|
9
9
|
|
|
10
10
|
export { validateCryptoKey };
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey } from "./type-
|
|
6
|
+
import { CryptographicKey, Multikey } from "./type-BCSEe3aP.js";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
8
|
+
//#region federation/keycache.ts
|
|
9
9
|
var KvKeyCache = class {
|
|
10
10
|
kv;
|
|
11
11
|
prefix;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey, importSpki } from "./type-
|
|
6
|
+
import { CryptographicKey, Multikey, importSpki } from "./type-BCSEe3aP.js";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
8
|
+
//#region testing/keys.ts
|
|
9
9
|
const rsaPublicKey1 = new CryptographicKey({
|
|
10
10
|
id: new URL("https://example.com/key"),
|
|
11
11
|
owner: new URL("https://example.com/person"),
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, CryptographicKey, Object as Object$1, deno_default, getDocumentLoader, getTypeId } from "./type-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { Activity, CryptographicKey, Object as Object$1, deno_default, getDocumentLoader, getTypeId } from "./type-BCSEe3aP.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BDHOX_Wb.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";
|
|
11
11
|
import { encodeHex } from "byte-encodings/hex";
|
|
12
12
|
import jsonld from "jsonld";
|
|
13
13
|
|
|
14
|
-
//#region
|
|
14
|
+
//#region sig/ld.ts
|
|
15
15
|
const logger = getLogger([
|
|
16
16
|
"fedify",
|
|
17
17
|
"sig",
|
|
@@ -2,11 +2,11 @@
|
|
|
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-CU3DHEeK.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
|
|
9
|
-
//#region
|
|
9
|
+
//#region webfinger/lookup.ts
|
|
10
10
|
const logger = getLogger([
|
|
11
11
|
"fedify",
|
|
12
12
|
"webfinger",
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Object as Object$1, deno_default, getDocumentLoader, getTypeId, lookupWebFinger } from "./type-
|
|
6
|
+
import { Object as Object$1, deno_default, getDocumentLoader, getTypeId, lookupWebFinger } from "./type-BCSEe3aP.js";
|
|
7
7
|
import { cloneDeep, delay } from "es-toolkit";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { Router } from "uri-template-router";
|
|
11
11
|
import { parseTemplate } from "url-template";
|
|
12
12
|
|
|
13
|
-
//#region
|
|
13
|
+
//#region federation/router.ts
|
|
14
14
|
function cloneInnerRouter(router) {
|
|
15
15
|
const clone = new Router();
|
|
16
16
|
clone.nid = router.nid;
|
|
@@ -118,7 +118,7 @@ var RouterError = class extends Error {
|
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
//#endregion
|
|
121
|
-
//#region
|
|
121
|
+
//#region vocab/handle.ts
|
|
122
122
|
/**
|
|
123
123
|
* Regular expression to match a fediverse handle in the format `@user@server`
|
|
124
124
|
* or `user@server`. The `user` part can contain alphanumeric characters and
|
|
@@ -175,7 +175,7 @@ function toAcctUrl(handle) {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
//#endregion
|
|
178
|
-
//#region
|
|
178
|
+
//#region vocab/lookup.ts
|
|
179
179
|
const logger = getLogger([
|
|
180
180
|
"fedify",
|
|
181
181
|
"vocab",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { GetUserAgentOptions } from "./docloader-
|
|
3
|
+
import { GetUserAgentOptions } from "./docloader-CLolPVL_.js";
|
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region webfinger/jrd.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Describes a resource. See also
|
|
9
9
|
* [RFC 7033 section 4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4).
|
|
@@ -56,7 +56,7 @@ interface Link {
|
|
|
56
56
|
properties?: Record<string, string>;
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
|
-
//#region
|
|
59
|
+
//#region webfinger/lookup.d.ts
|
|
60
60
|
/**
|
|
61
61
|
* Options for {@link lookupWebFinger}.
|
|
62
62
|
* @since 1.3.0
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
|
|
5
|
+
import "./transformers-DJRB0yFF.js";
|
|
6
|
+
import "./docloader-CU3DHEeK.js";
|
|
7
|
+
import "./actor-BQ_KA96z.js";
|
|
8
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-DFzTX2Pl.js";
|
|
9
|
+
import "./lookup-BrlEWKsU.js";
|
|
10
|
+
import "./key-BkCrACZf.js";
|
|
11
|
+
import "./http-Dt8q9aI7.js";
|
|
12
|
+
import "./proof-Cy8JPq8J.js";
|
|
13
|
+
import "./types-CN2hZqdL.js";
|
|
14
|
+
import "./authdocloader-aWYs2hxV.js";
|
|
15
|
+
import "./vocab-BJXB9OZv.js";
|
|
16
|
+
|
|
17
|
+
export { FederationImpl };
|
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-
|
|
7
|
-
import { getNodeInfo } from "./client-
|
|
8
|
-
import { RouterError, lookupObject, traverseCollection } from "./lookup-
|
|
9
|
-
import { nodeInfoToJson } from "./types-
|
|
10
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
|
11
|
-
import { verifyRequest } from "./http-
|
|
12
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
13
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
|
14
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
|
15
|
-
import { signObject, verifyObject } from "./proof-
|
|
16
|
-
import { routeActivity } from "./inbox-
|
|
17
|
-
import { FederationBuilderImpl } from "./builder-
|
|
18
|
-
import { buildCollectionSynchronizationHeader } from "./collection-
|
|
19
|
-
import { KvKeyCache } from "./keycache-
|
|
20
|
-
import { createExponentialBackoffPolicy } from "./retry-
|
|
21
|
-
import { extractInboxes, sendActivity } from "./send-
|
|
6
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-BCSEe3aP.js";
|
|
7
|
+
import { getNodeInfo } from "./client-BD1zmwJe.js";
|
|
8
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-CiiLUHJi.js";
|
|
9
|
+
import { nodeInfoToJson } from "./types-n7HI7VFr.js";
|
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-BDHOX_Wb.js";
|
|
11
|
+
import { verifyRequest } from "./http-DBd_ra18.js";
|
|
12
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-BxAUT5Xm.js";
|
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-Q3jKE5VL.js";
|
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-CALdeXqs.js";
|
|
15
|
+
import { signObject, verifyObject } from "./proof-BqYd3TSh.js";
|
|
16
|
+
import { routeActivity } from "./inbox-DiMz2u05.js";
|
|
17
|
+
import { FederationBuilderImpl } from "./builder-C708-MQj.js";
|
|
18
|
+
import { buildCollectionSynchronizationHeader } from "./collection-D5V3UzU3.js";
|
|
19
|
+
import { KvKeyCache } from "./keycache-Do8OHmNJ.js";
|
|
20
|
+
import { createExponentialBackoffPolicy } from "./retry-BnpVRGFC.js";
|
|
21
|
+
import { extractInboxes, sendActivity } from "./send-5qQ6uP8T.js";
|
|
22
22
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
23
23
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
24
24
|
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";
|
|
25
25
|
import { domainToASCII } from "node:url";
|
|
26
26
|
|
|
27
|
-
//#region
|
|
27
|
+
//#region compat/transformers.ts
|
|
28
28
|
const logger$1 = getLogger([
|
|
29
29
|
"fedify",
|
|
30
30
|
"compat",
|
|
@@ -115,7 +115,7 @@ function getDefaultActivityTransformers() {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
//#endregion
|
|
118
|
-
//#region
|
|
118
|
+
//#region nodeinfo/handler.ts
|
|
119
119
|
/**
|
|
120
120
|
* Handles a NodeInfo request. You would not typically call this function
|
|
121
121
|
* directly, but instead use {@link Federation.handle} method.
|
|
@@ -153,7 +153,7 @@ function handleNodeInfoJrd(_request, context$1) {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
//#endregion
|
|
156
|
-
//#region
|
|
156
|
+
//#region vocab/constants.ts
|
|
157
157
|
/**
|
|
158
158
|
* The special public collection for [public addressing]. *Do not mutate this
|
|
159
159
|
* object.*
|
|
@@ -165,7 +165,7 @@ function handleNodeInfoJrd(_request, context$1) {
|
|
|
165
165
|
const PUBLIC_COLLECTION = new URL("https://www.w3.org/ns/activitystreams#Public");
|
|
166
166
|
|
|
167
167
|
//#endregion
|
|
168
|
-
//#region
|
|
168
|
+
//#region webfinger/handler.ts
|
|
169
169
|
const logger = getLogger([
|
|
170
170
|
"fedify",
|
|
171
171
|
"webfinger",
|
|
@@ -295,7 +295,7 @@ async function handleWebFingerInternal(request, { context: context$1, host, acto
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
//#endregion
|
|
298
|
-
//#region
|
|
298
|
+
//#region federation/negotiation.ts
|
|
299
299
|
function compareSpecs(a, b) {
|
|
300
300
|
return b.q - a.q || (b.s ?? 0) - (a.s ?? 0) || (a.o ?? 0) - (b.o ?? 0) || a.i - b.i || 0;
|
|
301
301
|
}
|
|
@@ -353,7 +353,7 @@ function preferredMediaTypes(accept) {
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
//#endregion
|
|
356
|
-
//#region
|
|
356
|
+
//#region federation/handler.ts
|
|
357
357
|
function acceptsJsonLd(request) {
|
|
358
358
|
const accept = request.headers.get("Accept");
|
|
359
359
|
const types = accept ? preferredMediaTypes(accept) : ["*/*"];
|
|
@@ -1366,7 +1366,7 @@ async function respondWithObjectIfAcceptable(object, request, options) {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
|
|
1368
1368
|
//#endregion
|
|
1369
|
-
//#region
|
|
1369
|
+
//#region federation/middleware.ts
|
|
1370
1370
|
/**
|
|
1371
1371
|
* Create a new {@link Federation} instance.
|
|
1372
1372
|
* @param parameters Parameters for initializing the instance.
|