@fedify/fedify 1.8.1-pr.345.1245 → 1.8.1-pr.348.1271
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-CWNAGvnO.d.ts → actor-C2nhWp6O.d.ts} +3 -3
- package/dist/{actor-CTGO4wgc.js → actor-D-8TdNPr.js} +189 -189
- package/dist/{actor-mhmzZU1g.js → actor-DrRRDhb8.js} +2 -2
- package/dist/{assert-DwEa6glZ.js → assert-MZs1qjMx.js} +2 -2
- package/dist/{assert_equals-C5gKCm6A.js → assert_equals-DSbWqCm3.js} +9 -9
- package/dist/{assert_instance_of-C9QtN-X9.js → assert_instance_of-DHz7EHNU.js} +2 -2
- package/dist/{assert_is_error-CeVBLPsZ.js → assert_is_error-BPGph1Jx.js} +2 -2
- package/dist/{assert_not_equals-D2R2nl5h.js → assert_not_equals-f3m3epl3.js} +2 -2
- package/dist/{assert_rejects-AjlKk-Vo.js → assert_rejects-DiIiJbZn.js} +4 -4
- package/dist/{assert_throws-CqMKbTh_.js → assert_throws-BOO88avQ.js} +3 -3
- package/dist/{authdocloader-tiZ590SB.js → authdocloader-Bl-I2-Sq.js} +4 -4
- package/dist/{authdocloader-CYvVipt0.js → authdocloader-TjazCcIU.js} +4 -4
- package/dist/{builder-C3D92262.js → builder-B6FPbgkw.js} +5 -5
- package/dist/{client-B0IOer6B.d.ts → client-D2tgjFk3.d.ts} +4 -4
- package/dist/{client-DjYYs_OW.js → client-puE6hfUk.js} +3 -3
- package/dist/{collection-D5V3UzU3.js → collection-CSzG2j1P.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-BNA3vzcr.d.ts → context-BBD2ZH_P.d.ts} +22 -22
- package/dist/{denokv-DK9P5Jq7.js → denokv-2x6-IpXO.js} +1 -1
- package/dist/{docloader-CLolPVL_.d.ts → docloader-Bz56sKV5.d.ts} +2 -2
- package/dist/{docloader-CxqWgqfO.js → docloader-C7WW0kMN.js} +34 -34
- package/dist/{esm-BjbJmcRn.js → esm-kKgnN0F0.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-C44ekWNP.js → federation-CMX7WzeL.js} +2 -2
- package/dist/{http-pyA3O-iu.js → http-CsB7aLbk.js} +3 -3
- package/dist/{http-DKwEynG6.js → http-DVY5TWhV.js} +4 -4
- package/dist/{http-COez3YdK.d.ts → http-l4uEvaAw.d.ts} +4 -4
- package/dist/{inbox-v5wWCRpe.js → inbox-BLhA-QWO.js} +2 -2
- package/dist/{key-BLQ_GGUM.js → key-CZYy7mnV.js} +3 -3
- package/dist/{key-8Sh3XrAI.js → key-Ckkyz6B7.js} +3 -3
- package/dist/{key-BTtPNBpl.js → key-D7pylbp7.js} +3 -3
- package/dist/{key-C1UqarQf.js → key-ZLk0pywF.js} +4 -4
- package/dist/{keycache-DKmDz7t8.js → keycache-DIx0OpPd.js} +2 -2
- package/dist/{keys-bRHZ6z9w.js → keys-ED6v78Fx.js} +2 -2
- package/dist/{kv-BqOK6zss.d.ts → kv-C7sopW2E.d.ts} +1 -1
- package/dist/{kv-D7Yt6pnB.js → kv-CRZrzyXm.js} +1 -1
- package/dist/{ld-DuGmR_iA.js → ld-CkgvjhBi.js} +3 -3
- package/dist/{lookup-tSXYzgYs.d.ts → lookup-BJelGpWr.d.ts} +3 -3
- package/dist/{lookup-CYcncMTD.js → lookup-D8SjsWr2.js} +4 -4
- package/dist/{lookup-BDjhBU7v.js → lookup-DDoSF4Q1.js} +2 -2
- package/dist/{middleware-BUvuryMN.js → middleware-D3v8eOPA.js} +23 -23
- package/dist/{middleware-Dawm8fA5.js → middleware-DU3AZVLF.js} +23 -23
- package/dist/middleware-Dq3YUjC0.js +17 -0
- package/dist/middleware-U-bEePkd.js +26 -0
- package/dist/{mod-C2jQirfr.d.ts → mod-D79SaXL-.d.ts} +6 -6
- package/dist/{mod-CxD6XXBN.d.ts → mod-DDwnlIlm.d.ts} +3 -3
- package/dist/{mod-UTC30uNC.d.ts → mod-DM7ZpXF4.d.ts} +4 -4
- package/dist/{mod-Bf-mThHd.d.ts → mod-DwquBB1g.d.ts} +5 -5
- package/dist/mod.d.ts +14 -14
- package/dist/mod.js +12 -12
- package/dist/{mq-DYKDDJmp.d.ts → mq-CRGm1e_F.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-C3AuVSZe.js → owner-DFOzrXnn.js} +3 -3
- package/dist/{owner-BlxMNrL4.d.ts → owner-fFqUg4lq.d.ts} +4 -4
- package/dist/{proof-CNOUPouK.js → proof-C9I8sGkH.js} +3 -3
- package/dist/{proof-CFVDEL_T.js → proof-QpYXzvLP.js} +6 -6
- package/dist/{retry-BnpVRGFC.js → retry-D4GJ670a.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-DCqorrj5.js → semver-dArNLkR9.js} +1 -1
- package/dist/{send-BSoyjraS.js → send-Cr09S8dD.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-BQdmxyzF.js → std__assert-X-_kMxKM.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-DpcMmWRw.js → testing-BYDK5oCn.js} +5 -5
- package/dist/{transformers-DJRB0yFF.js → transformers-Dna8Fg7k.js} +1 -1
- package/dist/{type-DtkIQZak.js → type-TZK8-ARl.js} +221 -221
- package/dist/{types-n7HI7VFr.js → types-BIgY6c-l.js} +2 -2
- package/dist/{types-DHz0awNo.js → types-BWv51qsq.js} +4 -4
- 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-t4O-VgwY.js → vocab-0oZsFDQ1.js} +6 -6
- package/dist/{vocab-Cyrb7_co.d.ts → vocab-CA7YwVEz.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-ChmcJI6-.js +0 -17
- package/dist/middleware-FDLn3UGn.js +0 -26
- /package/dist/{vocab → src/vocab}/accept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/activity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/add.yaml +0 -0
- /package/dist/{vocab → src/vocab}/announce.yaml +0 -0
- /package/dist/{vocab → src/vocab}/application.yaml +0 -0
- /package/dist/{vocab → src/vocab}/arrive.yaml +0 -0
- /package/dist/{vocab → src/vocab}/article.yaml +0 -0
- /package/dist/{vocab → src/vocab}/audio.yaml +0 -0
- /package/dist/{vocab → src/vocab}/block.yaml +0 -0
- /package/dist/{vocab → src/vocab}/chatmessage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/create.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dataintegrityproof.yaml +0 -0
- /package/dist/{vocab → src/vocab}/delete.yaml +0 -0
- /package/dist/{vocab → src/vocab}/didservice.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dislike.yaml +0 -0
- /package/dist/{vocab → src/vocab}/document.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emoji.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emojireact.yaml +0 -0
- /package/dist/{vocab → src/vocab}/endpoints.yaml +0 -0
- /package/dist/{vocab → src/vocab}/event.yaml +0 -0
- /package/dist/{vocab → src/vocab}/export.yaml +0 -0
- /package/dist/{vocab → src/vocab}/flag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/follow.yaml +0 -0
- /package/dist/{vocab → src/vocab}/group.yaml +0 -0
- /package/dist/{vocab → src/vocab}/hashtag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/ignore.yaml +0 -0
- /package/dist/{vocab → src/vocab}/image.yaml +0 -0
- /package/dist/{vocab → src/vocab}/intransitiveactivity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/invite.yaml +0 -0
- /package/dist/{vocab → src/vocab}/join.yaml +0 -0
- /package/dist/{vocab → src/vocab}/key.yaml +0 -0
- /package/dist/{vocab → src/vocab}/leave.yaml +0 -0
- /package/dist/{vocab → src/vocab}/like.yaml +0 -0
- /package/dist/{vocab → src/vocab}/link.yaml +0 -0
- /package/dist/{vocab → src/vocab}/listen.yaml +0 -0
- /package/dist/{vocab → src/vocab}/mention.yaml +0 -0
- /package/dist/{vocab → src/vocab}/move.yaml +0 -0
- /package/dist/{vocab → src/vocab}/multikey.yaml +0 -0
- /package/dist/{vocab → src/vocab}/note.yaml +0 -0
- /package/dist/{vocab → src/vocab}/object.yaml +0 -0
- /package/dist/{vocab → src/vocab}/offer.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/organization.yaml +0 -0
- /package/dist/{vocab → src/vocab}/page.yaml +0 -0
- /package/dist/{vocab → src/vocab}/person.yaml +0 -0
- /package/dist/{vocab → src/vocab}/place.yaml +0 -0
- /package/dist/{vocab → src/vocab}/profile.yaml +0 -0
- /package/dist/{vocab → src/vocab}/propertyvalue.yaml +0 -0
- /package/dist/{vocab → src/vocab}/question.yaml +0 -0
- /package/dist/{vocab → src/vocab}/read.yaml +0 -0
- /package/dist/{vocab → src/vocab}/reject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/relationship.yaml +0 -0
- /package/dist/{vocab → src/vocab}/remove.yaml +0 -0
- /package/dist/{vocab → src/vocab}/service.yaml +0 -0
- /package/dist/{vocab → src/vocab}/source.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativeaccept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativereject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tombstone.yaml +0 -0
- /package/dist/{vocab → src/vocab}/travel.yaml +0 -0
- /package/dist/{vocab → src/vocab}/undo.yaml +0 -0
- /package/dist/{vocab → src/vocab}/update.yaml +0 -0
- /package/dist/{vocab → src/vocab}/video.yaml +0 -0
- /package/dist/{vocab → src/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-Dna8Fg7k.js";
|
|
6
|
+
import "../docloader-C7WW0kMN.js";
|
|
7
|
+
import "../actor-D-8TdNPr.js";
|
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-D3v8eOPA.js";
|
|
9
|
+
import "../lookup-DDoSF4Q1.js";
|
|
10
|
+
import "../key-CZYy7mnV.js";
|
|
11
|
+
import "../http-DVY5TWhV.js";
|
|
12
|
+
import "../proof-QpYXzvLP.js";
|
|
13
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-CMX7WzeL.js";
|
|
14
|
+
import "../types-BWv51qsq.js";
|
|
15
|
+
import "../authdocloader-Bl-I2-Sq.js";
|
|
16
|
+
import "../vocab-0oZsFDQ1.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-TZK8-ARl.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../lookup-D8SjsWr2.js";
|
|
11
|
+
import { test } from "../testing-BYDK5oCn.js";
|
|
12
|
+
import { assertGreater, assertGreaterOrEqual } from "../std__assert-X-_kMxKM.js";
|
|
13
|
+
import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
|
|
14
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
15
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
16
|
+
import "../assert_throws-BOO88avQ.js";
|
|
17
17
|
import { delay } from "es-toolkit";
|
|
18
18
|
|
|
19
|
-
//#region federation/mq.ts
|
|
19
|
+
//#region src/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 federation/mq.test.ts
|
|
172
|
+
//#region src/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-2x6-IpXO.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-2x6-IpXO.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-TZK8-ARl.js";
|
|
7
|
+
import { AssertionError, assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../lookup-D8SjsWr2.js";
|
|
9
|
+
import { createExponentialBackoffPolicy } from "../retry-D4GJ670a.js";
|
|
10
|
+
import { test } from "../testing-BYDK5oCn.js";
|
|
11
|
+
import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
|
|
12
12
|
|
|
13
|
-
//#region federation/retry.test.ts
|
|
13
|
+
//#region src/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-TZK8-ARl.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { Router, RouterError } from "../lookup-D8SjsWr2.js";
|
|
11
|
+
import { test } from "../testing-BYDK5oCn.js";
|
|
12
|
+
import "../std__assert-X-_kMxKM.js";
|
|
13
|
+
import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
|
|
14
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
15
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
16
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
17
17
|
|
|
18
|
-
//#region federation/router.test.ts
|
|
18
|
+
//#region src/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-TZK8-ARl.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../lookup-D8SjsWr2.js";
|
|
11
|
+
import "../actor-DrRRDhb8.js";
|
|
12
|
+
import "../key-D7pylbp7.js";
|
|
13
|
+
import { verifyRequest } from "../http-CsB7aLbk.js";
|
|
14
|
+
import { doesActorOwnKey } from "../owner-DFOzrXnn.js";
|
|
15
|
+
import { extractInboxes, sendActivity } from "../send-Cr09S8dD.js";
|
|
16
|
+
import { mockDocumentLoader, test } from "../testing-BYDK5oCn.js";
|
|
17
|
+
import "../std__assert-X-_kMxKM.js";
|
|
18
|
+
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
19
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
20
|
+
import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
|
|
21
|
+
import "../assert_throws-BOO88avQ.js";
|
|
22
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-ED6v78Fx.js";
|
|
23
|
+
import { esm_default } from "../esm-kKgnN0F0.js";
|
|
24
24
|
|
|
25
|
-
//#region federation/send.test.ts
|
|
25
|
+
//#region src/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 federation/kv.ts
|
|
7
|
+
//#region src/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 federation/mq.ts
|
|
73
|
+
//#region src/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
|
|
@@ -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-TZK8-ARl.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-D7pylbp7.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 sig/http.ts
|
|
15
|
+
//#region src/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-C7WW0kMN.js";
|
|
6
|
+
import { CryptographicKey } from "./actor-D-8TdNPr.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-CZYy7mnV.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 sig/http.ts
|
|
15
|
+
//#region src/sig/http.ts
|
|
16
16
|
/**
|
|
17
17
|
* Signs a request using the given private key.
|
|
18
18
|
* @param request The request to sign.
|
|
@@ -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-Bz56sKV5.js";
|
|
4
|
+
import { CryptographicKey, Multikey } from "./vocab-CA7YwVEz.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
|
-
//#region sig/key.d.ts
|
|
7
|
+
//#region src/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 sig/http.d.ts
|
|
119
|
+
//#region src/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,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-TZK8-ARl.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
10
|
-
//#region federation/inbox.ts
|
|
10
|
+
//#region src/federation/inbox.ts
|
|
11
11
|
var InboxListenerSet = class InboxListenerSet {
|
|
12
12
|
#listeners;
|
|
13
13
|
constructor() {
|
|
@@ -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-C7WW0kMN.js";
|
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-D-8TdNPr.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
10
|
-
//#region sig/key.ts
|
|
10
|
+
//#region src/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.
|
|
@@ -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-TZK8-ARl.js";
|
|
7
|
+
import "./actor-DrRRDhb8.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-D7pylbp7.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-TZK8-ARl.js";
|
|
7
|
+
import { isActor } from "./actor-DrRRDhb8.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
|
|
11
|
-
//#region sig/key.ts
|
|
11
|
+
//#region src/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,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-C7WW0kMN.js";
|
|
6
|
+
import "./actor-D-8TdNPr.js";
|
|
7
|
+
import "./lookup-DDoSF4Q1.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-CZYy7mnV.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-TZK8-ARl.js";
|
|
7
7
|
|
|
8
|
-
//#region federation/keycache.ts
|
|
8
|
+
//#region src/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-TZK8-ARl.js";
|
|
7
7
|
|
|
8
|
-
//#region testing/keys.ts
|
|
8
|
+
//#region src/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-TZK8-ARl.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-D7pylbp7.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 sig/ld.ts
|
|
14
|
+
//#region src/sig/ld.ts
|
|
15
15
|
const logger = getLogger([
|
|
16
16
|
"fedify",
|
|
17
17
|
"sig",
|
|
@@ -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-Bz56sKV5.js";
|
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
|
-
//#region webfinger/jrd.d.ts
|
|
6
|
+
//#region src/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 webfinger/lookup.d.ts
|
|
59
|
+
//#region src/webfinger/lookup.d.ts
|
|
60
60
|
/**
|
|
61
61
|
* Options for {@link lookupWebFinger}.
|
|
62
62
|
* @since 1.3.0
|
|
@@ -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-TZK8-ARl.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 federation/router.ts
|
|
13
|
+
//#region src/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 vocab/handle.ts
|
|
121
|
+
//#region src/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 vocab/lookup.ts
|
|
178
|
+
//#region src/vocab/lookup.ts
|
|
179
179
|
const logger = getLogger([
|
|
180
180
|
"fedify",
|
|
181
181
|
"vocab",
|
|
@@ -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-C7WW0kMN.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
|
|
9
|
-
//#region webfinger/lookup.ts
|
|
9
|
+
//#region src/webfinger/lookup.ts
|
|
10
10
|
const logger = getLogger([
|
|
11
11
|
"fedify",
|
|
12
12
|
"webfinger",
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { getDefaultActivityTransformers } from "./transformers-
|
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
|
7
|
-
import { Activity, Collection, CollectionPage, 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-
|
|
5
|
+
import { getDefaultActivityTransformers } from "./transformers-Dna8Fg7k.js";
|
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-C7WW0kMN.js";
|
|
7
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-D-8TdNPr.js";
|
|
8
|
+
import { lookupWebFinger } from "./lookup-DDoSF4Q1.js";
|
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-CZYy7mnV.js";
|
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-DVY5TWhV.js";
|
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-QpYXzvLP.js";
|
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-BWv51qsq.js";
|
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-Bl-I2-Sq.js";
|
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-0oZsFDQ1.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";
|
|
@@ -21,7 +21,7 @@ import { parseTemplate } from "url-template";
|
|
|
21
21
|
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";
|
|
22
22
|
import { domainToASCII } from "node:url";
|
|
23
23
|
|
|
24
|
-
//#region federation/inbox.ts
|
|
24
|
+
//#region src/federation/inbox.ts
|
|
25
25
|
var InboxListenerSet = class InboxListenerSet {
|
|
26
26
|
#listeners;
|
|
27
27
|
constructor() {
|
|
@@ -180,7 +180,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
//#endregion
|
|
183
|
-
//#region federation/router.ts
|
|
183
|
+
//#region src/federation/router.ts
|
|
184
184
|
function cloneInnerRouter(router) {
|
|
185
185
|
const clone = new Router();
|
|
186
186
|
clone.nid = router.nid;
|
|
@@ -288,7 +288,7 @@ var RouterError = class extends Error {
|
|
|
288
288
|
};
|
|
289
289
|
|
|
290
290
|
//#endregion
|
|
291
|
-
//#region federation/builder.ts
|
|
291
|
+
//#region src/federation/builder.ts
|
|
292
292
|
var FederationBuilderImpl = class {
|
|
293
293
|
router;
|
|
294
294
|
actorCallbacks;
|
|
@@ -320,7 +320,7 @@ var FederationBuilderImpl = class {
|
|
|
320
320
|
this.collectionTypeIds = {};
|
|
321
321
|
}
|
|
322
322
|
async build(options) {
|
|
323
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
|
323
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-Dq3YUjC0.js");
|
|
324
324
|
const f = new FederationImpl$1(options);
|
|
325
325
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
326
326
|
f.router = this.router.clone();
|
|
@@ -837,7 +837,7 @@ function createFederationBuilder() {
|
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
//#endregion
|
|
840
|
-
//#region federation/collection.ts
|
|
840
|
+
//#region src/federation/collection.ts
|
|
841
841
|
/**
|
|
842
842
|
* Calculates the [partial follower collection digest][1].
|
|
843
843
|
*
|
|
@@ -878,7 +878,7 @@ async function buildCollectionSynchronizationHeader(collectionId, actorIds) {
|
|
|
878
878
|
}
|
|
879
879
|
|
|
880
880
|
//#endregion
|
|
881
|
-
//#region federation/keycache.ts
|
|
881
|
+
//#region src/federation/keycache.ts
|
|
882
882
|
var KvKeyCache = class {
|
|
883
883
|
kv;
|
|
884
884
|
prefix;
|
|
@@ -918,7 +918,7 @@ var KvKeyCache = class {
|
|
|
918
918
|
};
|
|
919
919
|
|
|
920
920
|
//#endregion
|
|
921
|
-
//#region federation/negotiation.ts
|
|
921
|
+
//#region src/federation/negotiation.ts
|
|
922
922
|
function compareSpecs(a, b) {
|
|
923
923
|
return b.q - a.q || (b.s ?? 0) - (a.s ?? 0) || (a.o ?? 0) - (b.o ?? 0) || a.i - b.i || 0;
|
|
924
924
|
}
|
|
@@ -976,7 +976,7 @@ function preferredMediaTypes(accept) {
|
|
|
976
976
|
}
|
|
977
977
|
|
|
978
978
|
//#endregion
|
|
979
|
-
//#region federation/handler.ts
|
|
979
|
+
//#region src/federation/handler.ts
|
|
980
980
|
function acceptsJsonLd(request) {
|
|
981
981
|
const accept = request.headers.get("Accept");
|
|
982
982
|
const types = accept ? preferredMediaTypes(accept) : ["*/*"];
|
|
@@ -1989,7 +1989,7 @@ async function respondWithObjectIfAcceptable(object, request, options) {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
|
|
1991
1991
|
//#endregion
|
|
1992
|
-
//#region nodeinfo/handler.ts
|
|
1992
|
+
//#region src/nodeinfo/handler.ts
|
|
1993
1993
|
/**
|
|
1994
1994
|
* Handles a NodeInfo request. You would not typically call this function
|
|
1995
1995
|
* directly, but instead use {@link Federation.handle} method.
|
|
@@ -2027,7 +2027,7 @@ function handleNodeInfoJrd(_request, context$1) {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
2029
|
//#endregion
|
|
2030
|
-
//#region webfinger/handler.ts
|
|
2030
|
+
//#region src/webfinger/handler.ts
|
|
2031
2031
|
const logger = getLogger([
|
|
2032
2032
|
"fedify",
|
|
2033
2033
|
"webfinger",
|
|
@@ -2157,7 +2157,7 @@ async function handleWebFingerInternal(request, { context: context$1, host, acto
|
|
|
2157
2157
|
}
|
|
2158
2158
|
|
|
2159
2159
|
//#endregion
|
|
2160
|
-
//#region federation/retry.ts
|
|
2160
|
+
//#region src/federation/retry.ts
|
|
2161
2161
|
/**
|
|
2162
2162
|
* Creates an exponential backoff retry policy. The delay between retries
|
|
2163
2163
|
* starts at the `initialDelay` and is multiplied by the `factor` for each
|
|
@@ -2188,7 +2188,7 @@ function createExponentialBackoffPolicy(options = {}) {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
|
|
2190
2190
|
//#endregion
|
|
2191
|
-
//#region federation/send.ts
|
|
2191
|
+
//#region src/federation/send.ts
|
|
2192
2192
|
/**
|
|
2193
2193
|
* Extracts the inbox URLs from recipients.
|
|
2194
2194
|
* @param parameters The parameters to extract the inboxes.
|
|
@@ -2305,7 +2305,7 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, headers
|
|
|
2305
2305
|
}
|
|
2306
2306
|
|
|
2307
2307
|
//#endregion
|
|
2308
|
-
//#region federation/middleware.ts
|
|
2308
|
+
//#region src/federation/middleware.ts
|
|
2309
2309
|
/**
|
|
2310
2310
|
* Create a new {@link Federation} instance.
|
|
2311
2311
|
* @param parameters Parameters for initializing the instance.
|