@fedify/fedify 1.9.2 → 1.10.0-dev.13
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 +3 -0
- package/dist/{actor-BaXKN5Ej.js → actor-CDQZRBP-.js} +187 -187
- package/dist/{actor-BAstyozC.js → actor-Cw9cVmoL.js} +1 -1
- package/dist/{actor-Dsgf-C4Y.cjs → actor-Duz-L4nY.cjs} +187 -187
- package/dist/{authdocloader-BktPIjBD.cjs → authdocloader-BKDz9vny.cjs} +3 -3
- package/dist/{authdocloader-1dCXK3q3.js → authdocloader-DPrQJxry.js} +3 -3
- package/dist/{authdocloader-CUm83Hvn.js → authdocloader-t-QeEOCn.js} +3 -3
- package/dist/{builder-CSrVPCO8.js → builder-CNwQ0WzF.js} +4 -4
- package/dist/{client-CKpgJtdZ.js → client-DRoADUgx.js} +1 -1
- package/dist/compat/transformers.test.js +16 -16
- package/dist/{docloader-KPfUmgAy.js → docloader-q9WEqLHs.js} +38 -9
- package/dist/{docloader-MEUNyObm.cjs → docloader-zkxF1PmR.cjs} +38 -9
- package/dist/{esm-Bnt_HpYZ.js → esm-BxEjqLZz.js} +1 -1
- package/dist/federation/builder.test.js +5 -5
- package/dist/federation/collection.test.js +3 -3
- package/dist/federation/handler.test.js +104 -17
- package/dist/federation/idempotency.test.js +17 -17
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +3 -3
- package/dist/federation/middleware.test.js +18 -18
- package/dist/federation/mod.cjs +10 -10
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +5 -5
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +53 -10
- package/dist/{http-DvK0TBir.cjs → http-BHsgKdSm.cjs} +3 -3
- package/dist/{http-CPr3oiyB.js → http-D75_ny7B.js} +2 -2
- package/dist/{http-CrJR424K.js → http-DPNYDD5M.js} +3 -3
- package/dist/{inbox-BiSbdaqa.js → inbox-DAF7kpCN.js} +1 -1
- package/dist/{key-Uq7CaTCd.js → key-BCBBekkX.js} +4 -4
- package/dist/{key-Dcr6_gMa.cjs → key-BGdegHw9.cjs} +2 -2
- package/dist/{key-B8RAO96y.js → key-BP04cHsl.js} +3 -3
- package/dist/{key-C64H6CwX.js → key-D32Jfjk2.js} +2 -2
- package/dist/{key-DfKrxpBu.js → key-DqyfKhfx.js} +2 -2
- package/dist/key-OmfDM97A.cjs +10 -0
- package/dist/{keycache-D2aDD7YW.js → keycache-DMufhmCo.js} +1 -1
- package/dist/{keys-DGTaM7oU.js → keys-BE9AYjZ2.js} +1 -1
- package/dist/{ld-BOwiTi7h.js → ld-CQ0n-GsQ.js} +2 -2
- package/dist/{lookup-DNtgpqRL.cjs → lookup-B3t8ex49.cjs} +1 -1
- package/dist/{lookup-d9ZMJ3NQ.js → lookup-BekaPUOl.js} +6 -1
- package/dist/{lookup-Dl4-FMDI.js → lookup-Bl75V_IC.js} +1 -1
- package/dist/{middleware-BVThL1DS.js → middleware-BzwIATMD.js} +20 -13
- package/dist/{middleware-CZazEQMb.js → middleware-CINhhLIp.js} +24 -12
- package/dist/middleware-Ca5gFiWe.cjs +17 -0
- package/dist/middleware-CfI5z0Us.js +26 -0
- package/dist/{middleware-CtGEcAgj.cjs → middleware-Cjb4tczO.cjs} +24 -12
- package/dist/middleware-DOro1tAw.js +17 -0
- package/dist/mod.cjs +10 -10
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.cjs +2 -2
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/otel-Chy5T2Xh.js +64 -0
- package/dist/{owner-DEwshTIE.js → owner-CHAeXfy5.js} +44 -8
- package/dist/{proof-CZ7ubW2_.js → proof-CN7hPt9v.js} +2 -2
- package/dist/{proof-BWzYeDim.js → proof-bptr0d9N.js} +45 -9
- package/dist/{proof-Dy06xOgR.cjs → proof-hWHGJUGP.cjs} +44 -8
- package/dist/runtime/authdocloader.test.js +9 -9
- package/dist/runtime/docloader.test.js +70 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/link.test.js +3 -3
- package/dist/runtime/mod.cjs +6 -6
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/{send-DI6p7SEX.js → send-DyihI71l.js} +9 -4
- package/dist/sig/http.test.js +8 -8
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.cjs +6 -6
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +31 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-DEaTlPoD.js → testing-B37qHMaw.js} +2 -2
- package/dist/{type-DoTVUIma.js → type-CUsSzBHf.js} +222 -194
- package/dist/{types-cMyEbCut.cjs → types-CApXZYze.cjs} +1 -1
- package/dist/{types-D3Kk5T-1.js → types-DXFscIV2.js} +1 -1
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +27 -5
- package/dist/vocab/mod.cjs +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-CtmlT5Ro.js → vocab-D9LaPkRq.js} +8 -3
- package/dist/{vocab-CHxzDLCH.cjs → vocab-DwRVe0P7.cjs} +8 -3
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.cjs +2 -2
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +3 -3
- package/package.json +5 -3
- package/dist/key-P1HTQxeO.cjs +0 -10
- package/dist/middleware-B4eH2aYG.cjs +0 -17
- package/dist/middleware-B5nymyYY.js +0 -26
- package/dist/middleware-BNPES31N.js +0 -17
- /package/dist/{denokv-Bv33Xxea.js → denokv-D0nfNQ1x.js} +0 -0
|
@@ -3,37 +3,37 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-
|
|
6
|
+
import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-CUsSzBHf.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-
|
|
11
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-BzwIATMD.js";
|
|
12
12
|
import "../semver-dArNLkR9.js";
|
|
13
|
-
import "../client-
|
|
14
|
-
import { RouterError, lookupObject } from "../lookup-
|
|
13
|
+
import "../client-DRoADUgx.js";
|
|
14
|
+
import { RouterError, lookupObject } from "../lookup-BekaPUOl.js";
|
|
15
15
|
import "../types-BIgY6c-l.js";
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import { signRequest, verifyRequest } from "../http-
|
|
19
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
|
20
|
-
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-
|
|
21
|
-
import { doesActorOwnKey } from "../owner-
|
|
22
|
-
import { signObject, verifyObject } from "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
16
|
+
import "../actor-Cw9cVmoL.js";
|
|
17
|
+
import "../key-DqyfKhfx.js";
|
|
18
|
+
import { signRequest, verifyRequest } from "../http-D75_ny7B.js";
|
|
19
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-t-QeEOCn.js";
|
|
20
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-CQ0n-GsQ.js";
|
|
21
|
+
import { doesActorOwnKey } from "../owner-CHAeXfy5.js";
|
|
22
|
+
import { signObject, verifyObject } from "../proof-CN7hPt9v.js";
|
|
23
|
+
import "../inbox-DAF7kpCN.js";
|
|
24
|
+
import "../builder-CNwQ0WzF.js";
|
|
25
25
|
import "../collection-CSzG2j1P.js";
|
|
26
|
-
import "../keycache-
|
|
26
|
+
import "../keycache-DMufhmCo.js";
|
|
27
27
|
import "../retry-D4GJ670a.js";
|
|
28
|
-
import "../send-
|
|
29
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
28
|
+
import "../send-DyihI71l.js";
|
|
29
|
+
import { mockDocumentLoader, test } from "../testing-B37qHMaw.js";
|
|
30
30
|
import { assertStrictEquals } from "../std__assert-X-_kMxKM.js";
|
|
31
31
|
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
32
32
|
import "../assert_is_error-BPGph1Jx.js";
|
|
33
33
|
import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
|
|
34
34
|
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
35
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
|
36
|
-
import { esm_default } from "../esm-
|
|
35
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-BE9AYjZ2.js";
|
|
36
|
+
import { esm_default } from "../esm-BxEjqLZz.js";
|
|
37
37
|
|
|
38
38
|
//#region src/testing/fixtures/example.com/person.json
|
|
39
39
|
var __context$1 = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"];
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
require('../transformers-CoBS-oFG.cjs');
|
|
6
|
-
require('../docloader-
|
|
7
|
-
require('../actor-
|
|
8
|
-
const require_middleware = require('../middleware-
|
|
9
|
-
require('../lookup-
|
|
10
|
-
require('../key-
|
|
11
|
-
require('../http-
|
|
12
|
-
require('../proof-
|
|
6
|
+
require('../docloader-zkxF1PmR.cjs');
|
|
7
|
+
require('../actor-Duz-L4nY.cjs');
|
|
8
|
+
const require_middleware = require('../middleware-Cjb4tczO.cjs');
|
|
9
|
+
require('../lookup-B3t8ex49.cjs');
|
|
10
|
+
require('../key-BGdegHw9.cjs');
|
|
11
|
+
require('../http-BHsgKdSm.cjs');
|
|
12
|
+
require('../proof-hWHGJUGP.cjs');
|
|
13
13
|
const require_federation = require('../federation-H2_En3j5.cjs');
|
|
14
|
-
require('../types-
|
|
15
|
-
require('../authdocloader-
|
|
16
|
-
require('../vocab-
|
|
14
|
+
require('../types-CApXZYze.cjs');
|
|
15
|
+
require('../authdocloader-BKDz9vny.cjs');
|
|
16
|
+
require('../vocab-DwRVe0P7.cjs');
|
|
17
17
|
|
|
18
18
|
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
|
19
19
|
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
package/dist/federation/mod.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import "../transformers-BFT6d7J5.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-q9WEqLHs.js";
|
|
7
|
+
import "../actor-CDQZRBP-.js";
|
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-CINhhLIp.js";
|
|
9
|
+
import "../lookup-Bl75V_IC.js";
|
|
10
|
+
import "../key-D32Jfjk2.js";
|
|
11
|
+
import "../http-DPNYDD5M.js";
|
|
12
|
+
import "../proof-bptr0d9N.js";
|
|
13
13
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-D1U8YY9t.js";
|
|
14
|
-
import "../types-
|
|
15
|
-
import "../authdocloader-
|
|
16
|
-
import "../vocab-
|
|
14
|
+
import "../types-DXFscIV2.js";
|
|
15
|
+
import "../authdocloader-DPrQJxry.js";
|
|
16
|
+
import "../vocab-D9LaPkRq.js";
|
|
17
17
|
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-CUsSzBHf.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
10
|
+
import "../lookup-BekaPUOl.js";
|
|
11
|
+
import { test } from "../testing-B37qHMaw.js";
|
|
12
12
|
import { assertGreater, assertGreaterOrEqual } from "../std__assert-X-_kMxKM.js";
|
|
13
13
|
import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
|
|
14
14
|
import "../assert_is_error-BPGph1Jx.js";
|
|
@@ -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-D0nfNQ1x.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-D0nfNQ1x.js");
|
|
270
270
|
queues.DenoKvMessageQueue = async () => new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
|
271
271
|
}
|
|
272
272
|
for (const mqName in queues) test({
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-CUsSzBHf.js";
|
|
7
7
|
import { AssertionError, assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
-
import "../lookup-
|
|
8
|
+
import "../lookup-BekaPUOl.js";
|
|
9
9
|
import { createExponentialBackoffPolicy } from "../retry-D4GJ670a.js";
|
|
10
|
-
import { test } from "../testing-
|
|
10
|
+
import { test } from "../testing-B37qHMaw.js";
|
|
11
11
|
import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
|
|
12
12
|
|
|
13
13
|
//#region src/federation/retry.test.ts
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-CUsSzBHf.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { Router, RouterError } from "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
10
|
+
import { Router, RouterError } from "../lookup-BekaPUOl.js";
|
|
11
|
+
import { test } from "../testing-B37qHMaw.js";
|
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
|
13
13
|
import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
|
|
14
14
|
import "../assert_is_error-BPGph1Jx.js";
|
|
@@ -3,24 +3,25 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Application, Endpoints, Group, Person, Service } from "../type-
|
|
6
|
+
import { Activity, Application, Endpoints, Group, Person, Service } from "../type-CUsSzBHf.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
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-
|
|
10
|
+
import "../lookup-BekaPUOl.js";
|
|
11
|
+
import "../actor-Cw9cVmoL.js";
|
|
12
|
+
import "../key-DqyfKhfx.js";
|
|
13
|
+
import { verifyRequest } from "../http-D75_ny7B.js";
|
|
14
|
+
import { doesActorOwnKey } from "../owner-CHAeXfy5.js";
|
|
15
|
+
import { extractInboxes, sendActivity } from "../send-DyihI71l.js";
|
|
16
|
+
import { mockDocumentLoader, test } from "../testing-B37qHMaw.js";
|
|
17
17
|
import "../std__assert-X-_kMxKM.js";
|
|
18
18
|
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
19
19
|
import "../assert_is_error-BPGph1Jx.js";
|
|
20
20
|
import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
|
|
21
21
|
import "../assert_throws-BOO88avQ.js";
|
|
22
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
|
23
|
-
import {
|
|
22
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-BE9AYjZ2.js";
|
|
23
|
+
import { createTestTracerProvider } from "../otel-Chy5T2Xh.js";
|
|
24
|
+
import { esm_default } from "../esm-BxEjqLZz.js";
|
|
24
25
|
|
|
25
26
|
//#region src/federation/send.test.ts
|
|
26
27
|
test("extractInboxes()", () => {
|
|
@@ -214,5 +215,47 @@ test("sendActivity()", async (t) => {
|
|
|
214
215
|
});
|
|
215
216
|
esm_default.hardReset();
|
|
216
217
|
});
|
|
218
|
+
test("sendActivity() records OpenTelemetry span events", async (t) => {
|
|
219
|
+
const [tracerProvider, exporter] = createTestTracerProvider();
|
|
220
|
+
esm_default.spyGlobal();
|
|
221
|
+
await t.step("successful send", async () => {
|
|
222
|
+
esm_default.get("https://example.com/", { status: 404 });
|
|
223
|
+
esm_default.post("https://example.com/inbox", { status: 202 });
|
|
224
|
+
const activity = {
|
|
225
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
226
|
+
type: "Create",
|
|
227
|
+
id: "https://example.com/activity",
|
|
228
|
+
actor: "https://example.com/person"
|
|
229
|
+
};
|
|
230
|
+
await sendActivity({
|
|
231
|
+
activity,
|
|
232
|
+
activityId: "https://example.com/activity",
|
|
233
|
+
activityType: "https://www.w3.org/ns/activitystreams#Create",
|
|
234
|
+
keys: [{
|
|
235
|
+
keyId: new URL("https://example.com/person#key"),
|
|
236
|
+
privateKey: rsaPrivateKey2
|
|
237
|
+
}],
|
|
238
|
+
inbox: new URL("https://example.com/inbox"),
|
|
239
|
+
tracerProvider
|
|
240
|
+
});
|
|
241
|
+
const spans = exporter.getSpans("activitypub.send_activity");
|
|
242
|
+
assertEquals(spans.length, 1);
|
|
243
|
+
const span = spans[0];
|
|
244
|
+
assertEquals(span.attributes["activitypub.activity.id"], "https://example.com/activity");
|
|
245
|
+
assertEquals(span.attributes["activitypub.activity.type"], "https://www.w3.org/ns/activitystreams#Create");
|
|
246
|
+
const events = exporter.getEvents("activitypub.send_activity", "activitypub.activity.sent");
|
|
247
|
+
assertEquals(events.length, 1);
|
|
248
|
+
const event = events[0];
|
|
249
|
+
assert(event.attributes != null);
|
|
250
|
+
assertEquals(event.attributes["activitypub.inbox.url"], "https://example.com/inbox");
|
|
251
|
+
assertEquals(event.attributes["activitypub.activity.id"], "https://example.com/activity");
|
|
252
|
+
assert(typeof event.attributes["activitypub.activity.json"] === "string");
|
|
253
|
+
const recordedActivity = JSON.parse(event.attributes["activitypub.activity.json"]);
|
|
254
|
+
assertEquals(recordedActivity.id, "https://example.com/activity");
|
|
255
|
+
assertEquals(recordedActivity.type, "Create");
|
|
256
|
+
exporter.clear();
|
|
257
|
+
esm_default.hardReset();
|
|
258
|
+
});
|
|
259
|
+
});
|
|
217
260
|
|
|
218
261
|
//#endregion
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
|
6
|
-
const require_docloader = require('./docloader-
|
|
7
|
-
const require_actor = require('./actor-
|
|
8
|
-
const require_key = require('./key-
|
|
6
|
+
const require_docloader = require('./docloader-zkxF1PmR.cjs');
|
|
7
|
+
const require_actor = require('./actor-Duz-L4nY.cjs');
|
|
8
|
+
const require_key = require('./key-BGdegHw9.cjs');
|
|
9
9
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
10
10
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
11
11
|
const byte_encodings_base64 = require_chunk.__toESM(require("byte-encodings/base64"));
|
|
@@ -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-CUsSzBHf.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-DqyfKhfx.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";
|
|
@@ -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-q9WEqLHs.js";
|
|
6
|
+
import { CryptographicKey } from "./actor-CDQZRBP-.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-D32Jfjk2.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";
|
|
@@ -3,7 +3,7 @@
|
|
|
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-CUsSzBHf.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
@@ -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-q9WEqLHs.js";
|
|
6
|
+
import "./actor-CDQZRBP-.js";
|
|
7
|
+
import "./lookup-Bl75V_IC.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-D32Jfjk2.js";
|
|
9
9
|
|
|
10
10
|
export { validateCryptoKey };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
|
6
|
-
const require_docloader = require('./docloader-
|
|
7
|
-
const require_actor = require('./actor-
|
|
6
|
+
const require_docloader = require('./docloader-zkxF1PmR.cjs');
|
|
7
|
+
const require_actor = require('./actor-Duz-L4nY.cjs');
|
|
8
8
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
9
9
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
10
10
|
|
|
@@ -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-CUsSzBHf.js";
|
|
7
|
+
import "./actor-Cw9cVmoL.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-DqyfKhfx.js";
|
|
9
9
|
|
|
10
10
|
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-q9WEqLHs.js";
|
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-CDQZRBP-.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
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-CUsSzBHf.js";
|
|
7
|
+
import { isActor } from "./actor-Cw9cVmoL.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
|
+
|
|
5
|
+
require('./docloader-zkxF1PmR.cjs');
|
|
6
|
+
require('./actor-Duz-L4nY.cjs');
|
|
7
|
+
require('./lookup-B3t8ex49.cjs');
|
|
8
|
+
const require_key = require('./key-BGdegHw9.cjs');
|
|
9
|
+
|
|
10
|
+
exports.validateCryptoKey = require_key.validateCryptoKey;
|
|
@@ -3,7 +3,7 @@
|
|
|
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-CUsSzBHf.js";
|
|
7
7
|
|
|
8
8
|
//#region src/federation/keycache.ts
|
|
9
9
|
var KvKeyCache = class {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey, importSpki } from "./type-
|
|
6
|
+
import { CryptographicKey, Multikey, importSpki } from "./type-CUsSzBHf.js";
|
|
7
7
|
|
|
8
8
|
//#region src/testing/keys.ts
|
|
9
9
|
const rsaPublicKey1 = new CryptographicKey({
|
|
@@ -3,8 +3,8 @@
|
|
|
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-CUsSzBHf.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-DqyfKhfx.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";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
|
6
|
-
const require_docloader = require('./docloader-
|
|
6
|
+
const require_docloader = require('./docloader-zkxF1PmR.cjs');
|
|
7
7
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
8
8
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
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-CUsSzBHf.js";
|
|
7
7
|
import { cloneDeep, delay } from "es-toolkit";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -224,9 +224,14 @@ async function lookupObject(identifier, options = {}) {
|
|
|
224
224
|
if (result.id != null) span.setAttribute("activitypub.object.id", result.id.href);
|
|
225
225
|
span.setAttribute("activitypub.object.type", getTypeId(result).href);
|
|
226
226
|
if (result.replyTargetIds.length > 0) span.setAttribute("activitypub.object.in_reply_to", result.replyTargetIds.map((id) => id.href));
|
|
227
|
+
span.addEvent("activitypub.object.fetched", {
|
|
228
|
+
"activitypub.object.type": getTypeId(result).href,
|
|
229
|
+
"activitypub.object.json": JSON.stringify(await result.toJsonLd(options))
|
|
230
|
+
});
|
|
227
231
|
}
|
|
228
232
|
return result;
|
|
229
233
|
} catch (error) {
|
|
234
|
+
span.recordException(error);
|
|
230
235
|
span.setStatus({
|
|
231
236
|
code: SpanStatusCode.ERROR,
|
|
232
237
|
message: String(error)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-
|
|
5
|
+
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-q9WEqLHs.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
|
|
@@ -3,22 +3,22 @@
|
|
|
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-
|
|
6
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-CUsSzBHf.js";
|
|
7
|
+
import { getNodeInfo } from "./client-DRoADUgx.js";
|
|
8
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-BekaPUOl.js";
|
|
9
9
|
import { nodeInfoToJson } from "./types-BIgY6c-l.js";
|
|
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-
|
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-DqyfKhfx.js";
|
|
11
|
+
import { verifyRequest } from "./http-D75_ny7B.js";
|
|
12
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-t-QeEOCn.js";
|
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-CQ0n-GsQ.js";
|
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-CHAeXfy5.js";
|
|
15
|
+
import { signObject, verifyObject } from "./proof-CN7hPt9v.js";
|
|
16
|
+
import { routeActivity } from "./inbox-DAF7kpCN.js";
|
|
17
|
+
import { FederationBuilderImpl } from "./builder-CNwQ0WzF.js";
|
|
18
18
|
import { buildCollectionSynchronizationHeader } from "./collection-CSzG2j1P.js";
|
|
19
|
-
import { KvKeyCache } from "./keycache-
|
|
19
|
+
import { KvKeyCache } from "./keycache-DMufhmCo.js";
|
|
20
20
|
import { createExponentialBackoffPolicy } from "./retry-D4GJ670a.js";
|
|
21
|
-
import { extractInboxes, sendActivity } from "./send-
|
|
21
|
+
import { extractInboxes, sendActivity } from "./send-DyihI71l.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";
|
|
@@ -846,6 +846,13 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
846
846
|
}
|
|
847
847
|
if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
|
|
848
848
|
span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
|
|
849
|
+
span.addEvent("activitypub.activity.received", {
|
|
850
|
+
"activitypub.activity.json": JSON.stringify(json),
|
|
851
|
+
"activitypub.activity.verified": activity != null,
|
|
852
|
+
"ld_signatures.verified": ldSigVerified,
|
|
853
|
+
"http_signatures.verified": httpSigKey != null,
|
|
854
|
+
"http_signatures.key_id": httpSigKey?.id?.href ?? ""
|
|
855
|
+
});
|
|
849
856
|
if (httpSigKey != null && !await doesActorOwnKey(activity, httpSigKey, ctx)) {
|
|
850
857
|
logger$2.error("The signer ({keyId}) and the actor ({actorId}) do not match.", {
|
|
851
858
|
activity: json,
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import { getDefaultActivityTransformers } from "./transformers-BFT6d7J5.js";
|
|
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-
|
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-q9WEqLHs.js";
|
|
7
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-CDQZRBP-.js";
|
|
8
|
+
import { lookupWebFinger } from "./lookup-Bl75V_IC.js";
|
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-D32Jfjk2.js";
|
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-DPNYDD5M.js";
|
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-bptr0d9N.js";
|
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-DXFscIV2.js";
|
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-DPrQJxry.js";
|
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-D9LaPkRq.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";
|
|
@@ -344,7 +344,7 @@ var FederationBuilderImpl = class {
|
|
|
344
344
|
this.collectionTypeIds = {};
|
|
345
345
|
}
|
|
346
346
|
async build(options) {
|
|
347
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
|
347
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-DOro1tAw.js");
|
|
348
348
|
const f = new FederationImpl$1(options);
|
|
349
349
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
350
350
|
f.router = this.router.clone();
|
|
@@ -1499,6 +1499,13 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
|
|
1501
1501
|
span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
|
|
1502
|
+
span.addEvent("activitypub.activity.received", {
|
|
1503
|
+
"activitypub.activity.json": JSON.stringify(json),
|
|
1504
|
+
"activitypub.activity.verified": activity != null,
|
|
1505
|
+
"ld_signatures.verified": ldSigVerified,
|
|
1506
|
+
"http_signatures.verified": httpSigKey != null,
|
|
1507
|
+
"http_signatures.key_id": httpSigKey?.id?.href ?? ""
|
|
1508
|
+
});
|
|
1502
1509
|
if (httpSigKey != null && !await doesActorOwnKey(activity, httpSigKey, ctx)) {
|
|
1503
1510
|
logger$1.error("The signer ({keyId}) and the actor ({actorId}) do not match.", {
|
|
1504
1511
|
activity: json,
|
|
@@ -2272,7 +2279,7 @@ function sendActivity(options) {
|
|
|
2272
2279
|
await sendActivityInternal({
|
|
2273
2280
|
...options,
|
|
2274
2281
|
tracerProvider
|
|
2275
|
-
});
|
|
2282
|
+
}, span);
|
|
2276
2283
|
} catch (e) {
|
|
2277
2284
|
span.setStatus({
|
|
2278
2285
|
code: SpanStatusCode.ERROR,
|
|
@@ -2284,7 +2291,7 @@ function sendActivity(options) {
|
|
|
2284
2291
|
}
|
|
2285
2292
|
});
|
|
2286
2293
|
}
|
|
2287
|
-
async function sendActivityInternal({ activity, activityId, keys, inbox, headers, specDeterminer, tracerProvider }) {
|
|
2294
|
+
async function sendActivityInternal({ activity, activityId, keys, inbox, headers, specDeterminer, tracerProvider }, span) {
|
|
2288
2295
|
const logger$1 = getLogger([
|
|
2289
2296
|
"fedify",
|
|
2290
2297
|
"federation",
|
|
@@ -2339,6 +2346,11 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, headers
|
|
|
2339
2346
|
});
|
|
2340
2347
|
throw new Error(`Failed to send activity ${activityId} to ${inbox.href} (${response.status} ${response.statusText}):\n${error}`);
|
|
2341
2348
|
}
|
|
2349
|
+
span.addEvent("activitypub.activity.sent", {
|
|
2350
|
+
"activitypub.activity.json": JSON.stringify(activity),
|
|
2351
|
+
"activitypub.inbox.url": inbox.href,
|
|
2352
|
+
"activitypub.activity.id": activityId ?? ""
|
|
2353
|
+
});
|
|
2342
2354
|
}
|
|
2343
2355
|
|
|
2344
2356
|
//#endregion
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
|
+
|
|
5
|
+
require('./transformers-CoBS-oFG.cjs');
|
|
6
|
+
require('./docloader-zkxF1PmR.cjs');
|
|
7
|
+
require('./actor-Duz-L4nY.cjs');
|
|
8
|
+
const require_middleware = require('./middleware-Cjb4tczO.cjs');
|
|
9
|
+
require('./lookup-B3t8ex49.cjs');
|
|
10
|
+
require('./key-BGdegHw9.cjs');
|
|
11
|
+
require('./http-BHsgKdSm.cjs');
|
|
12
|
+
require('./proof-hWHGJUGP.cjs');
|
|
13
|
+
require('./types-CApXZYze.cjs');
|
|
14
|
+
require('./authdocloader-BKDz9vny.cjs');
|
|
15
|
+
require('./vocab-DwRVe0P7.cjs');
|
|
16
|
+
|
|
17
|
+
exports.FederationImpl = require_middleware.FederationImpl;
|