@fedify/fedify 2.4.0-dev.1666 → 2.4.0-dev.1727
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 +1 -1
- package/dist/{assert-CJ1KXcvv.mjs → assert-CebeUf0C.mjs} +1 -1
- package/dist/assert_exists-DtzkXC47.mjs +28 -0
- package/dist/assert_false-3pLLLsO4.mjs +23 -0
- package/dist/assert_greater_or_equal-BApOTh1h.mjs +30 -0
- package/dist/{assert_instance_of-Q9KTBnrf.mjs → assert_instance_of-g3WcyYNR.mjs} +1 -1
- package/dist/{assert_not_equals-EPJPoxuf.mjs → assert_not_equals-BN7yDMWe.mjs} +1 -1
- package/dist/assert_rejects-wFbSPn1O.mjs +39 -0
- package/dist/{assert_strict_equals-Ec20AUwa.mjs → assert_strict_equals-Bpjl4Psw.mjs} +1 -1
- package/dist/{assert_throws-NiFfqbnH.mjs → assert_throws-BJ5wuvR2.mjs} +1 -1
- package/dist/{builder-BGpBs-US.mjs → builder-f5-YwHfj.mjs} +5 -3
- package/dist/{circuit-breaker-CBGyz5F7.mjs → circuit-breaker-BT7CiPbz.mjs} +191 -9
- package/dist/circuit-breaker-test-utils-BYIHoliq.mjs +14 -0
- package/dist/{client-CjF5IYQS.mjs → client-CtxvmazV.mjs} +63 -5
- package/dist/{collection-BIhlldqK.mjs → collection-CnnP1UAv.mjs} +1 -1
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/mod.js +1 -1
- package/dist/compat/outgoing-jsonld.test.mjs +3 -3
- package/dist/compat/public-audience.test.mjs +3 -3
- package/dist/compat/transformers.test.mjs +5 -5
- package/dist/{context-C05Rgxmu.d.cts → context-B-dsBjZ9.d.cts} +281 -7
- package/dist/{context-Cjnr0ig1.d.ts → context-DrLXudbA.d.ts} +281 -7
- package/dist/{deno-CaQlEENR.mjs → deno-Deyoxesx.mjs} +1 -1
- package/dist/{docloader-CTm2Lcpn.mjs → docloader-B3kuDBg9.mjs} +2 -2
- package/dist/{esm-yYQfPhIY.mjs → esm-BHXXx4Wx.mjs} +13 -6
- package/dist/federation/builder.test.mjs +18 -5
- package/dist/federation/circuit-breaker.test.mjs +626 -7
- package/dist/federation/collection.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +14 -13
- package/dist/federation/idempotency.test.mjs +6 -6
- package/dist/federation/inbox.test.mjs +3 -3
- package/dist/federation/keycache.test.mjs +5 -5
- package/dist/federation/kv.test.mjs +3 -3
- package/dist/federation/metrics.test.mjs +4 -4
- package/dist/federation/middleware.test.mjs +37 -28
- package/dist/federation/mod.cjs +18 -540
- package/dist/federation/mod.d.cts +3 -4
- package/dist/federation/mod.d.ts +3 -4
- package/dist/federation/mod.js +1 -1
- package/dist/federation/mq.test.mjs +32 -5
- package/dist/federation/negotiation.test.mjs +4 -4
- package/dist/federation/retry.test.mjs +3 -3
- package/dist/federation/router.test.mjs +7 -7
- package/dist/federation/send.test.mjs +28 -26
- package/dist/federation/tasks/codec.test.mjs +4 -4
- package/dist/federation/tasks/enqueue.test.mjs +4 -4
- package/dist/federation/tasks/tasks.test.mjs +6 -6
- package/dist/federation/temporal.test.mjs +4 -4
- package/dist/federation/webfinger.test.mjs +74 -12
- package/dist/{middleware-Dnzqy4sk.cjs → federation-BzRjeOky.cjs} +855 -114
- package/dist/{temporal-polyfill-BCdTHexd.cjs → http-AyKngJ_h.cjs} +2801 -104
- package/dist/{http-BX5xiNUh.js → http-Bw6s_dOB.js} +3 -3
- package/dist/{http-BaSuRiWJ.mjs → http-TjhZfiSN.mjs} +5 -5
- package/dist/{key-BvJYxJoY.mjs → key-b4kf4yZT.mjs} +2 -2
- package/dist/{kv-cache-BPapnm-V.cjs → kv-cache-BTVaZrf-.cjs} +2 -4
- package/dist/{kv-cache-C04NtL2n.js → kv-cache-CQsh-KUw.js} +1 -1
- package/dist/{kv-cache-B9fTkVpc.mjs → kv-cache-CpILvhUV.mjs} +1 -1
- package/dist/{ld-DU12IAt8.mjs → ld-CKujkAfG.mjs} +5 -5
- package/dist/{metrics-BYUxSscw.mjs → metrics-AlCGTDrr.mjs} +2 -2
- package/dist/metrics-DVKYY6K1.d.cts +36 -0
- package/dist/metrics-DoRtI0qU.d.ts +36 -0
- package/dist/{middleware-BEd40QBF.mjs → middleware-C9Y5lLZN.mjs} +60 -43
- package/dist/{middleware-_VQWtF1B.js → middleware-CZcuedl-.js} +241 -40
- package/dist/{middleware-C4oS_tdq.mjs → middleware-LPbZz6-1.mjs} +1 -1
- package/dist/{mod-BrpVsSfY.d.cts → mod-CLHkCwLm.d.cts} +3 -3
- package/dist/{mod-B0hW12_O.d.cts → mod-CuDDaIIt.d.cts} +1 -1
- package/dist/{mod-COIAjwRS.d.ts → mod-D-IhOEOP.d.ts} +1 -1
- package/dist/{mod-DdONo-ep.d.cts → mod-D-abvu2C.d.cts} +1 -1
- package/dist/{mod-BsCE5Ihq.d.ts → mod-D6O8C7eN.d.ts} +1 -1
- package/dist/{mod-CNef4in0.d.ts → mod-DypxPS9H.d.ts} +3 -3
- package/dist/mod.cjs +24 -25
- package/dist/mod.d.cts +8 -9
- package/dist/mod.d.ts +8 -9
- package/dist/mod.js +7 -7
- package/dist/nodeinfo/client.test.mjs +64 -4
- package/dist/nodeinfo/handler.test.mjs +5 -5
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.d.cts +1 -1
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/nodeinfo/types.test.mjs +4 -4
- package/dist/otel/exporter.test.mjs +3 -3
- package/dist/otel/mod.cjs +0 -1
- package/dist/otel/mod.d.cts +1 -1
- package/dist/otel/mod.d.ts +1 -1
- package/dist/{outgoing-jsonld-URuqsICz.mjs → outgoing-jsonld-BQSHRLhg.mjs} +2 -2
- package/dist/{owner-DFF9ltAs.mjs → owner-D1O8v8FB.mjs} +2 -2
- package/dist/{proof-rOoEb_P4.js → proof-BTBolSnd.js} +6 -6
- package/dist/{proof-DcbeTQMG.cjs → proof-DcSm-2eG.cjs} +10 -11
- package/dist/{proof-DEV-fO9I.mjs → proof-DeMR7Akd.mjs} +6 -6
- package/dist/{public-audience-Cr5MsnMq.mjs → public-audience--9hx7IGx.mjs} +1 -1
- package/dist/runtime/mod.cjs +1 -1
- package/dist/runtime/mod.js +1 -1
- package/dist/{send-BVkabUz0.mjs → send-DG7JG280.mjs} +3 -3
- package/dist/sig/accept.test.mjs +1 -1
- package/dist/sig/http.test.mjs +37 -11
- package/dist/sig/key.test.mjs +6 -6
- package/dist/sig/ld.test.mjs +9 -7
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +6 -6
- package/dist/sig/proof.test.mjs +10 -8
- package/dist/std__assert-CxFT0MNt.mjs +8 -0
- package/dist/{temporal-X0BllGgC.mjs → temporal-DA3jx8x1.mjs} +3 -3
- package/dist/testing/mod.d.mts +10 -0
- package/dist/testing/mod.mjs +2 -2
- package/dist/{testing-CO7ftO8A.mjs → testing-BX0Nicyq.mjs} +2 -2
- package/dist/{transformers-DGwl-hD1.cjs → transformers-BalCrSsr.cjs} +0 -1
- package/dist/{types-DC1pNgJA.js → types-Dtyf8lVj.js} +63 -5
- package/dist/{types-CPym83zc.cjs → types-RXm5YxpC.cjs} +62 -5
- package/dist/utils/docloader.test.mjs +7 -7
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +7 -7
- package/skills/fedify/SKILL.md +462 -0
- package/dist/assert_rejects-EgstcQy5.mjs +0 -82
- package/dist/http-BIJdA1mF.cjs +0 -2694
- package/dist/metrics-DN13mCAw.d.cts +0 -294
- package/dist/metrics-v_e0n5GQ.d.ts +0 -294
- package/dist/std__assert-B2NnY9bq.mjs +0 -79
- /package/dist/{accept-8PiolDP7.mjs → accept-CPVqki78.mjs} +0 -0
- /package/dist/{activity-listener-BtTSxZWA.mjs → activity-listener-C-BSbKI7.mjs} +0 -0
- /package/dist/{assert_equals-BV7oLMxm.mjs → assert_equals-CBlRfA-_.mjs} +0 -0
- /package/dist/{client-CAM_bQXx.d.cts → client-D-XP_Ccb.d.cts} +0 -0
- /package/dist/{client-CSddvgWN.d.ts → client-D-XP_Ccb.d.ts} +0 -0
- /package/dist/{codec-BBga-FWI.mjs → codec-peqOdBaE.mjs} +0 -0
- /package/dist/{context-BJXxPElm.mjs → context-Dt36KFEJ.mjs} +0 -0
- /package/dist/{http-VyDTd4G3.d.cts → http-6TI0tI03.d.cts} +0 -0
- /package/dist/{http-lf8Hsd91.d.ts → http-CdrSn2ip.d.ts} +0 -0
- /package/dist/{keycache-_DHqz5z_.mjs → keycache-0Jk78XmB.mjs} +0 -0
- /package/dist/{keys-Dbyd7bhl.mjs → keys-DIJNHW-Y.mjs} +0 -0
- /package/dist/{kv-D6hNiMTK.d.ts → kv-BhNbN8Ed.d.cts} +0 -0
- /package/dist/{kv-gJ8LYbxX.d.cts → kv-BhNbN8Ed.d.ts} +0 -0
- /package/dist/{kv-CXBAok3k.mjs → kv-DCHkaJ9-.mjs} +0 -0
- /package/dist/{mq-Bo7Etgh6.mjs → mq-Dm1Wmtm-.mjs} +0 -0
- /package/dist/{negotiation-RuwrPFqi.mjs → negotiation-CCocWT_N.mjs} +0 -0
- /package/dist/{owner-CnngXDNJ.d.ts → owner-DGSfntI-.d.ts} +0 -0
- /package/dist/{owner-DEvZuyOE.d.cts → owner-r_waTiQj.d.cts} +0 -0
- /package/dist/{retry-DgFqeS5k.mjs → retry-zX5xw5e0.mjs} +0 -0
- /package/dist/{chunk-D5IdezsZ.js → rolldown-runtime-BC-Eo5Mj.js} +0 -0
- /package/dist/{chunk-Czpeue4M.cjs → rolldown-runtime-Dmm3t92W.cjs} +0 -0
- /package/dist/{transformers-DXze6FUB.js → transformers-DAtXl_Kc.js} +0 -0
- /package/dist/{types-CrtdVuDP.mjs → types-DE_LV1JB.mjs} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as assertEquals } from "../assert_equals-
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
5
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
6
|
+
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-CnnP1UAv.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { decodeHex } from "byte-encodings/hex";
|
|
9
9
|
//#region src/federation/collection.test.ts
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-
|
|
5
|
-
import { t as MemoryKvStore } from "../kv-
|
|
6
|
-
import { t as assertEquals } from "../assert_equals-
|
|
7
|
-
import "../
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { a as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
4
|
+
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-Dt36KFEJ.mjs";
|
|
5
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
7
|
+
import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BApOTh1h.mjs";
|
|
8
|
+
import { t as assertInstanceOf } from "../assert_instance_of-g3WcyYNR.mjs";
|
|
9
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
10
|
+
import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
|
|
11
|
+
import { t as assert } from "../assert-CebeUf0C.mjs";
|
|
12
|
+
import { r as parseAcceptSignature } from "../accept-CPVqki78.mjs";
|
|
13
|
+
import { s as signRequest } from "../http-TjhZfiSN.mjs";
|
|
14
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
15
|
+
import { a as compactJsonLd, p as signJsonLd } from "../ld-CKujkAfG.mjs";
|
|
16
|
+
import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-C9Y5lLZN.mjs";
|
|
17
|
+
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
17
18
|
import { Activity, Create, Note, Person, Tombstone } from "@fedify/vocab";
|
|
18
19
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
19
20
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as MemoryKvStore } from "../kv-
|
|
5
|
-
import { t as assertEquals } from "../assert_equals-
|
|
6
|
-
import "../std__assert-
|
|
7
|
-
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-
|
|
8
|
-
import { r as signObject } from "../proof-
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
4
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
6
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
7
|
+
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
8
|
+
import { r as signObject } from "../proof-DeMR7Akd.mjs";
|
|
9
|
+
import { o as createFederation } from "../middleware-C9Y5lLZN.mjs";
|
|
10
10
|
import { Create, Follow, Person } from "@fedify/vocab";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
//#region src/federation/idempotency.test.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as assertEquals } from "../assert_equals-
|
|
5
|
-
import { t as assertThrows } from "../assert_throws-
|
|
6
|
-
import { t as ActivityListenerSet } from "../activity-listener-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
5
|
+
import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
|
|
6
|
+
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
7
7
|
import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/federation/inbox.test.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as MemoryKvStore } from "../kv-
|
|
5
|
-
import { t as assertEquals } from "../assert_equals-
|
|
6
|
-
import { t as assertInstanceOf } from "../assert_instance_of-
|
|
7
|
-
import { t as assert } from "../assert-
|
|
8
|
-
import { t as KvKeyCache } from "../keycache-
|
|
4
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
6
|
+
import { t as assertInstanceOf } from "../assert_instance_of-g3WcyYNR.mjs";
|
|
7
|
+
import { t as assert } from "../assert-CebeUf0C.mjs";
|
|
8
|
+
import { t as KvKeyCache } from "../keycache-0Jk78XmB.mjs";
|
|
9
9
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
//#region src/federation/keycache.test.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as MemoryKvStore } from "../kv-
|
|
5
|
-
import { t as assertEquals } from "../assert_equals-
|
|
6
|
-
import "../std__assert-
|
|
4
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
6
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
//#region src/federation/kv.test.ts
|
|
9
9
|
test("MemoryKvStore", async (t) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as assertEquals } from "../assert_equals-
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import { t as assertRejects } from "../assert_rejects-
|
|
7
|
-
import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
5
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
6
|
+
import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
|
|
7
|
+
import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-AlCGTDrr.mjs";
|
|
8
8
|
import { createTestMeterProvider, test } from "@fedify/fixture";
|
|
9
9
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
10
10
|
import { DataPointType, MeterProvider, MetricReader } from "@opentelemetry/sdk-metrics";
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as esm_default } from "../esm-
|
|
5
|
-
import { t as MemoryKvStore } from "../kv-
|
|
6
|
-
import { a as numberSchema, r as envelopeSchema, t as MockQueue } from "../testing-
|
|
7
|
-
import { t as assertEquals } from "../assert_equals-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as assertInstanceOf } from "../assert_instance_of-
|
|
11
|
-
import { t as assertThrows } from "../assert_throws-
|
|
12
|
-
import { t as assertNotEquals } from "../assert_not_equals-
|
|
13
|
-
import
|
|
14
|
-
import { t as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { a as
|
|
20
|
-
import { t as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { t as
|
|
4
|
+
import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
5
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
|
+
import { a as numberSchema, r as envelopeSchema, t as MockQueue } from "../testing-BX0Nicyq.mjs";
|
|
7
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
8
|
+
import { t as assertExists } from "../assert_exists-DtzkXC47.mjs";
|
|
9
|
+
import { t as assertFalse } from "../assert_false-3pLLLsO4.mjs";
|
|
10
|
+
import { t as assertInstanceOf } from "../assert_instance_of-g3WcyYNR.mjs";
|
|
11
|
+
import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
|
|
12
|
+
import { t as assertNotEquals } from "../assert_not_equals-BN7yDMWe.mjs";
|
|
13
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
14
|
+
import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
|
|
15
|
+
import { t as assertStrictEquals } from "../assert_strict_equals-Bpjl4Psw.mjs";
|
|
16
|
+
import { t as assert } from "../assert-CebeUf0C.mjs";
|
|
17
|
+
import { g as recordInboxActivity } from "../metrics-AlCGTDrr.mjs";
|
|
18
|
+
import { l as verifyRequest, s as signRequest } from "../http-TjhZfiSN.mjs";
|
|
19
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
20
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-B3kuDBg9.mjs";
|
|
21
|
+
import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-CKujkAfG.mjs";
|
|
22
|
+
import { t as doesActorOwnKey } from "../owner-D1O8v8FB.mjs";
|
|
23
|
+
import { i as verifyObject, r as signObject } from "../proof-DeMR7Akd.mjs";
|
|
24
|
+
import { g as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-C9Y5lLZN.mjs";
|
|
25
|
+
import { t as CircuitBreaker } from "../circuit-breaker-BT7CiPbz.mjs";
|
|
26
|
+
import { t as TaskCodec } from "../codec-peqOdBaE.mjs";
|
|
27
|
+
import { t as markCircuitBreakerLegacySweepDone } from "../circuit-breaker-test-utils-BYIHoliq.mjs";
|
|
25
28
|
import { configure, reset } from "@logtape/logtape";
|
|
26
29
|
import { RouterError } from "@fedify/uri-template";
|
|
27
30
|
import * as vocab from "@fedify/vocab";
|
|
@@ -33,11 +36,10 @@ import { deepStrictEqual, ok, rejects, strictEqual } from "node:assert/strict";
|
|
|
33
36
|
import serialize from "json-canon";
|
|
34
37
|
import { DataPointType, MeterProvider as MeterProvider$1, MetricReader } from "@opentelemetry/sdk-metrics";
|
|
35
38
|
//#region ../fixture/src/fixtures/example.com/create.json
|
|
36
|
-
var id$2 = "https://example.com/create";
|
|
37
39
|
var create_default = {
|
|
38
40
|
"@context": "https://www.w3.org/ns/activitystreams",
|
|
39
41
|
type: "Create",
|
|
40
|
-
id:
|
|
42
|
+
id: "https://example.com/create",
|
|
41
43
|
actor: "https://example.com/person"
|
|
42
44
|
};
|
|
43
45
|
//#endregion
|
|
@@ -1269,7 +1271,7 @@ test("Federation.fetch()", async (t) => {
|
|
|
1269
1271
|
}), rsaPrivateKey2, rsaPublicKey2.id);
|
|
1270
1272
|
assertEquals((await federation.fetch(request, { contextData: void 0 })).status, 202);
|
|
1271
1273
|
assertEquals(inbox.length, 1, "Expected one item in the inbox, json");
|
|
1272
|
-
assertEquals(inbox[0], id
|
|
1274
|
+
assertEquals(inbox[0], create_default.id);
|
|
1273
1275
|
});
|
|
1274
1276
|
await t.step("GET with application/json", async () => {
|
|
1275
1277
|
const { federation, dispatches } = createTestContext();
|
|
@@ -1292,7 +1294,7 @@ test("Federation.fetch()", async (t) => {
|
|
|
1292
1294
|
}), rsaPrivateKey2, rsaPublicKey2.id);
|
|
1293
1295
|
assertEquals((await federation.fetch(request, { contextData: void 0 })).status, 202);
|
|
1294
1296
|
assertEquals(inbox.length, 1, "Expected one inbox activity, ld+json");
|
|
1295
|
-
assertEquals(inbox[0], id
|
|
1297
|
+
assertEquals(inbox[0], create_default.id);
|
|
1296
1298
|
});
|
|
1297
1299
|
await t.step("GET with application/ld+json", async () => {
|
|
1298
1300
|
const { federation, dispatches } = createTestContext();
|
|
@@ -1316,7 +1318,7 @@ test("Federation.fetch()", async (t) => {
|
|
|
1316
1318
|
}), rsaPrivateKey2, rsaPublicKey2.id);
|
|
1317
1319
|
assertEquals((await federation.fetch(request, { contextData: void 0 })).status, 202);
|
|
1318
1320
|
assertEquals(inbox.length, 1);
|
|
1319
|
-
assertEquals(inbox[0], id
|
|
1321
|
+
assertEquals(inbox[0], create_default.id);
|
|
1320
1322
|
});
|
|
1321
1323
|
await t.step("GET with application/activity+json", async () => {
|
|
1322
1324
|
const { federation, dispatches } = createTestContext();
|
|
@@ -2044,7 +2046,7 @@ test("Federation.setOutboxListeners()", async (t) => {
|
|
|
2044
2046
|
}
|
|
2045
2047
|
}), { contextData: void 0 });
|
|
2046
2048
|
assertEquals([response.status, await response.text()], [202, ""]);
|
|
2047
|
-
assertEquals(received, [`john:${id
|
|
2049
|
+
assertEquals(received, [`john:${create_default.id}`]);
|
|
2048
2050
|
response = await federation.fetch(new Request("https://example.com/users/no-one/outbox", {
|
|
2049
2051
|
method: "POST",
|
|
2050
2052
|
body: JSON.stringify(create_default),
|
|
@@ -2106,7 +2108,7 @@ test("Federation.setOutboxListeners()", async (t) => {
|
|
|
2106
2108
|
}
|
|
2107
2109
|
}), { contextData: void 0 });
|
|
2108
2110
|
assertEquals([response.status, await response.text()], [202, ""]);
|
|
2109
|
-
assertEquals(received, [`john:${id
|
|
2111
|
+
assertEquals(received, [`john:${create_default.id}`]);
|
|
2110
2112
|
});
|
|
2111
2113
|
await t.step("warns when listener omits delivery", async () => {
|
|
2112
2114
|
await withLogtapeLock(async () => {
|
|
@@ -5316,6 +5318,7 @@ test("FederationImpl.processQueuedTask() circuit breaker", async (t) => {
|
|
|
5316
5318
|
body: ""
|
|
5317
5319
|
});
|
|
5318
5320
|
const { federation, queued, kv } = setup({ failureThreshold: 1 });
|
|
5321
|
+
await markCircuitBreakerLegacySweepDone(kv);
|
|
5319
5322
|
await kv.set([
|
|
5320
5323
|
"_fedify",
|
|
5321
5324
|
"circuit",
|
|
@@ -5449,6 +5452,7 @@ test("FederationImpl.processQueuedTask() circuit breaker", async (t) => {
|
|
|
5449
5452
|
body: "server error"
|
|
5450
5453
|
});
|
|
5451
5454
|
const { federation, queued, kv } = setup({ failureThreshold: 1 }, { permanentFailureStatusCodes: [500] });
|
|
5455
|
+
await markCircuitBreakerLegacySweepDone(kv);
|
|
5452
5456
|
await kv.set([
|
|
5453
5457
|
"_fedify",
|
|
5454
5458
|
"circuit",
|
|
@@ -5681,6 +5685,7 @@ test("FederationImpl.processQueuedTask() circuit breaker", async (t) => {
|
|
|
5681
5685
|
failureThreshold: 1,
|
|
5682
5686
|
releaseInterval: { seconds: 1 }
|
|
5683
5687
|
}, { permanentFailureStatusCodes: [500] });
|
|
5688
|
+
await markCircuitBreakerLegacySweepDone(kv);
|
|
5684
5689
|
await kv.set([
|
|
5685
5690
|
"_fedify",
|
|
5686
5691
|
"circuit",
|
|
@@ -5715,6 +5720,7 @@ test("FederationImpl.processQueuedTask() circuit breaker", async (t) => {
|
|
|
5715
5720
|
failureThreshold: 1,
|
|
5716
5721
|
releaseInterval: { seconds: 1 }
|
|
5717
5722
|
});
|
|
5723
|
+
await markCircuitBreakerLegacySweepDone(kv);
|
|
5718
5724
|
await kv.set([
|
|
5719
5725
|
"_fedify",
|
|
5720
5726
|
"circuit",
|
|
@@ -5806,6 +5812,7 @@ test("FederationImpl.processQueuedTask() circuit breaker", async (t) => {
|
|
|
5806
5812
|
releaseInterval: { minutes: 1 }
|
|
5807
5813
|
}
|
|
5808
5814
|
});
|
|
5815
|
+
await markCircuitBreakerLegacySweepDone(kv);
|
|
5809
5816
|
await kv.set([
|
|
5810
5817
|
"_fedify",
|
|
5811
5818
|
"circuit",
|
|
@@ -5848,6 +5855,7 @@ test("FederationImpl.processQueuedTask() circuit breaker", async (t) => {
|
|
|
5848
5855
|
recoveryDelay: { seconds: 1 }
|
|
5849
5856
|
}
|
|
5850
5857
|
});
|
|
5858
|
+
await markCircuitBreakerLegacySweepDone(kv);
|
|
5851
5859
|
await kv.set([
|
|
5852
5860
|
"_fedify",
|
|
5853
5861
|
"circuit",
|
|
@@ -5936,6 +5944,7 @@ test("FederationImpl.processQueuedTask() circuit breaker", async (t) => {
|
|
|
5936
5944
|
}
|
|
5937
5945
|
}
|
|
5938
5946
|
});
|
|
5947
|
+
await markCircuitBreakerLegacySweepDone(kv);
|
|
5939
5948
|
await kv.set([
|
|
5940
5949
|
"_fedify",
|
|
5941
5950
|
"circuit",
|