@fedify/fedify 2.2.3-dev.1098 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{builder-mqtih91o.mjs → builder-Dg2hGWk5.mjs} +2 -2
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{context-BPMgyX7m.d.ts → context-BU-1O90h.d.ts} +48 -6
- package/dist/{context-DwkhwUX9.d.cts → context-DVA8wHZ0.d.cts} +48 -6
- package/dist/{deno-CziVFvS6.mjs → deno-_3m2phl-.mjs} +1 -1
- package/dist/{docloader-fI9DeYyB.mjs → docloader-Cq_3E56G.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +1363 -43
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/middleware.test.mjs +1584 -80
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/temporal.test.d.mts +2 -0
- package/dist/federation/temporal.test.mjs +71 -0
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{http-D8qsXrUS.js → http-BauEA3uU.js} +1 -1
- package/dist/{http-BDCGf4Ac.mjs → http-C6206Ne5.mjs} +2 -2
- package/dist/{http-kPc328Pc.cjs → http-CzvQu1wC.cjs} +1 -1
- package/dist/{key-D3TgMhcs.mjs → key-ckqyhgo3.mjs} +1 -1
- package/dist/{kv-cache-zxW74Wfd.cjs → kv-cache-10y07lRd.cjs} +1 -1
- package/dist/{kv-cache-D_eVhctK.js → kv-cache-DLwx2oCr.js} +1 -1
- package/dist/ld-B3BrUVFK.mjs +573 -0
- package/dist/{middleware-2gmMVy8b.mjs → middleware-Bn8hcuAb.mjs} +314 -78
- package/dist/{middleware-BuOXw_hM.cjs → middleware-CBNvWoWG.cjs} +1 -1
- package/dist/{middleware-xR9KxICq.cjs → middleware-Cppn0oGi.cjs} +399 -73
- package/dist/{middleware-gXlDLkok.js → middleware-DkSEt8CX.js} +396 -71
- package/dist/{middleware-CfaiRKQ9.mjs → middleware-_5uCEul-.mjs} +1 -1
- package/dist/{mod-CNAHY39V.d.ts → mod-BVt6iTmH.d.ts} +1 -1
- package/dist/{mod-Bi6WOdti.d.cts → mod-q-NFLW6B.d.cts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-DBSV2TSl.mjs → owner-BIrHaRRj.mjs} +2 -2
- package/dist/{proof-tz91vdtN.mjs → proof-B9P5A7RZ.mjs} +2 -2
- package/dist/{proof-CZDkoeWG.cjs → proof-Bxo0UtfN.cjs} +351 -3
- package/dist/{proof-z93OkIov.js → proof-erB_wSQi.js} +298 -4
- package/dist/{send-CNjG31rJ.mjs → send-7FY-qDY3.mjs} +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +558 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +1 -1
- package/dist/temporal-CuaJdDfw.mjs +95 -0
- package/dist/testing/mod.d.mts +48 -6
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +5 -5
- package/dist/ld-D_u8mdpv.mjs +0 -279
- /package/dist/{retry-bMXBL97A.mjs → retry-v_sGLH1d.mjs} +0 -0
|
@@ -2,7 +2,7 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError, t as Router } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
+
import { n as version, t as name } from "./deno-_3m2phl-.mjs";
|
|
6
6
|
import { t as ActivityListenerSet } from "./activity-listener-ell7W1s9.mjs";
|
|
7
7
|
import { Tombstone, getTypeId } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -58,7 +58,7 @@ var FederationBuilderImpl = class {
|
|
|
58
58
|
this.collectionTypeIds = {};
|
|
59
59
|
}
|
|
60
60
|
async build(options) {
|
|
61
|
-
const { FederationImpl } = await import("./middleware-
|
|
61
|
+
const { FederationImpl } = await import("./middleware-_5uCEul-.mjs");
|
|
62
62
|
const f = new FederationImpl(options);
|
|
63
63
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
64
64
|
f.router = this.router.clone();
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Ot as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { Ot as ActivityTransformer, n as Context } from "../context-DVA8wHZ0.cjs";
|
|
3
3
|
import { Activity } from "@fedify/vocab";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/transformers.d.ts
|
package/dist/compat/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Ot as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { Ot as ActivityTransformer, n as Context } from "../context-BU-1O90h.js";
|
|
3
3
|
import { Activity } from "@fedify/vocab";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/transformers.d.ts
|
|
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
6
6
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
|
|
8
|
-
import { n as FederationImpl, v as actorDehydrator, y as autoIdAssigner } from "../middleware-
|
|
8
|
+
import { n as FederationImpl, v as actorDehydrator, y as autoIdAssigner } from "../middleware-Bn8hcuAb.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Follow, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -734,6 +734,42 @@ interface InboxMessage {
|
|
|
734
734
|
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
735
735
|
readonly baseUrl: string;
|
|
736
736
|
readonly activity: unknown;
|
|
737
|
+
/**
|
|
738
|
+
* The normalized JSON-LD representation of a signed inbox activity that
|
|
739
|
+
* Fedify already compacted successfully while accepting the request. Queue
|
|
740
|
+
* workers can reuse this producer-side parse cache under stricter loader or
|
|
741
|
+
* network constraints without changing the raw payload preserved for
|
|
742
|
+
* forwarding.
|
|
743
|
+
*
|
|
744
|
+
* This may exist even when {@link ldSignatureVerified} is `false`, because
|
|
745
|
+
* fallback-authenticated traffic and already-queued backlog items can still
|
|
746
|
+
* depend on the cached normalized form to avoid re-fetching remote custom
|
|
747
|
+
* contexts during worker processing.
|
|
748
|
+
*
|
|
749
|
+
* This is optional for backward compatibility with messages that were
|
|
750
|
+
* queued by older Fedify versions or that were already in a queue before
|
|
751
|
+
* upgrading.
|
|
752
|
+
*
|
|
753
|
+
* Fedify keeps this on the queued message itself instead of an external
|
|
754
|
+
* sidecar because generic queue backends do not provide reliable lifecycle
|
|
755
|
+
* guarantees for auxiliary storage across retries and redeliveries.
|
|
756
|
+
*
|
|
757
|
+
* @internal
|
|
758
|
+
*/
|
|
759
|
+
readonly normalizedActivity?: unknown;
|
|
760
|
+
/**
|
|
761
|
+
* Whether the producer actually verified the Linked Data Signature before
|
|
762
|
+
* queueing this message. This lets workers distinguish verified LDS replay
|
|
763
|
+
* from other authenticated inbox traffic that merely happened to include a
|
|
764
|
+
* signature block. This provenance marker is separate from the optional
|
|
765
|
+
* normalizedActivity parse cache.
|
|
766
|
+
*
|
|
767
|
+
* `undefined` preserves backward compatibility with older queued messages
|
|
768
|
+
* that predate this marker.
|
|
769
|
+
*
|
|
770
|
+
* @internal
|
|
771
|
+
*/
|
|
772
|
+
readonly ldSignatureVerified?: boolean;
|
|
737
773
|
readonly started: string;
|
|
738
774
|
readonly attempt: number;
|
|
739
775
|
readonly identifier: string | null;
|
|
@@ -2497,9 +2533,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2497
2533
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2498
2534
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2499
2535
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2500
|
-
* Integrity Proofs will not be added.
|
|
2501
|
-
*
|
|
2502
|
-
*
|
|
2536
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2537
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2538
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2539
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2540
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2541
|
+
* recipient probably will not trust the activity.
|
|
2503
2542
|
* @param forwarder The forwarder's identifier or the forwarder's username
|
|
2504
2543
|
* or the forwarder's key pair(s).
|
|
2505
2544
|
* @param recipients The recipients of the activity.
|
|
@@ -2515,9 +2554,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2515
2554
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2516
2555
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2517
2556
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2518
|
-
* Integrity Proofs will not be added.
|
|
2519
|
-
*
|
|
2520
|
-
*
|
|
2557
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2558
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2559
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2560
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2561
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2562
|
+
* recipient probably will not trust the activity.
|
|
2521
2563
|
* @param forwarder The forwarder's identifier or the forwarder's username.
|
|
2522
2564
|
* @param recipients In this case, it must be `"followers"`.
|
|
2523
2565
|
* @param options Options for forwarding the activity.
|
|
@@ -734,6 +734,42 @@ interface InboxMessage {
|
|
|
734
734
|
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
735
735
|
readonly baseUrl: string;
|
|
736
736
|
readonly activity: unknown;
|
|
737
|
+
/**
|
|
738
|
+
* The normalized JSON-LD representation of a signed inbox activity that
|
|
739
|
+
* Fedify already compacted successfully while accepting the request. Queue
|
|
740
|
+
* workers can reuse this producer-side parse cache under stricter loader or
|
|
741
|
+
* network constraints without changing the raw payload preserved for
|
|
742
|
+
* forwarding.
|
|
743
|
+
*
|
|
744
|
+
* This may exist even when {@link ldSignatureVerified} is `false`, because
|
|
745
|
+
* fallback-authenticated traffic and already-queued backlog items can still
|
|
746
|
+
* depend on the cached normalized form to avoid re-fetching remote custom
|
|
747
|
+
* contexts during worker processing.
|
|
748
|
+
*
|
|
749
|
+
* This is optional for backward compatibility with messages that were
|
|
750
|
+
* queued by older Fedify versions or that were already in a queue before
|
|
751
|
+
* upgrading.
|
|
752
|
+
*
|
|
753
|
+
* Fedify keeps this on the queued message itself instead of an external
|
|
754
|
+
* sidecar because generic queue backends do not provide reliable lifecycle
|
|
755
|
+
* guarantees for auxiliary storage across retries and redeliveries.
|
|
756
|
+
*
|
|
757
|
+
* @internal
|
|
758
|
+
*/
|
|
759
|
+
readonly normalizedActivity?: unknown;
|
|
760
|
+
/**
|
|
761
|
+
* Whether the producer actually verified the Linked Data Signature before
|
|
762
|
+
* queueing this message. This lets workers distinguish verified LDS replay
|
|
763
|
+
* from other authenticated inbox traffic that merely happened to include a
|
|
764
|
+
* signature block. This provenance marker is separate from the optional
|
|
765
|
+
* normalizedActivity parse cache.
|
|
766
|
+
*
|
|
767
|
+
* `undefined` preserves backward compatibility with older queued messages
|
|
768
|
+
* that predate this marker.
|
|
769
|
+
*
|
|
770
|
+
* @internal
|
|
771
|
+
*/
|
|
772
|
+
readonly ldSignatureVerified?: boolean;
|
|
737
773
|
readonly started: string;
|
|
738
774
|
readonly attempt: number;
|
|
739
775
|
readonly identifier: string | null;
|
|
@@ -2497,9 +2533,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2497
2533
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2498
2534
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2499
2535
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2500
|
-
* Integrity Proofs will not be added.
|
|
2501
|
-
*
|
|
2502
|
-
*
|
|
2536
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2537
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2538
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2539
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2540
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2541
|
+
* recipient probably will not trust the activity.
|
|
2503
2542
|
* @param forwarder The forwarder's identifier or the forwarder's username
|
|
2504
2543
|
* or the forwarder's key pair(s).
|
|
2505
2544
|
* @param recipients The recipients of the activity.
|
|
@@ -2515,9 +2554,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2515
2554
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2516
2555
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2517
2556
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2518
|
-
* Integrity Proofs will not be added.
|
|
2519
|
-
*
|
|
2520
|
-
*
|
|
2557
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2558
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2559
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2560
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2561
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2562
|
+
* recipient probably will not trust the activity.
|
|
2521
2563
|
* @param forwarder The forwarder's identifier or the forwarder's username.
|
|
2522
2564
|
* @param recipients In this case, it must be `"followers"`.
|
|
2523
2565
|
* @param options Options for forwarding the activity.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { o as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { o as validateCryptoKey } from "./key-ckqyhgo3.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-C6206Ne5.mjs";
|
|
6
6
|
import { curry } from "es-toolkit";
|
|
7
7
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -6,7 +6,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
6
6
|
import { i as assertExists } from "../std__assert-CRDpx_HF.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
8
8
|
import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
|
|
9
|
-
import { n as createFederationBuilder } from "../builder-
|
|
9
|
+
import { n as createFederationBuilder } from "../builder-Dg2hGWk5.mjs";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
12
12
|
//#region src/federation/builder.test.ts
|