@fedify/fedify 2.0.17 → 2.0.19
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-Dgk0oJse.mjs → builder-DpMJ796G.mjs} +3 -3
- 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-BzRJ49gL.d.cts → context-CJZHWLmz.d.cts} +48 -6
- package/dist/{context-CdJ9wAQa.d.ts → context-DnsFj3yK.d.ts} +48 -6
- package/dist/{deno-Cb0U4mYY.mjs → deno-OvlgTe2z.mjs} +1 -1
- package/dist/{docloader-BtgBOjR2.mjs → docloader-LahMFnq1.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +1358 -41
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +1588 -84
- 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-CkpjqreM.mjs → http-BGqCzFFW.mjs} +2 -2
- package/dist/{http-C8fyMUjD.cjs → http-B_rBGJzj.cjs} +1 -1
- package/dist/{http-DOir4i5c.js → http-GMhBzdUg.js} +1 -1
- package/dist/{inbox-VNZAN2rq.mjs → inbox-B0rurFqy.mjs} +7 -4
- package/dist/{key-jLdTQH2f.mjs → key-v_BpXvjh.mjs} +1 -1
- package/dist/{kv-cache-D7YHL8kZ.cjs → kv-cache-B-QyKmN6.cjs} +1 -1
- package/dist/{kv-cache-BT1ZahAh.js → kv-cache-DIgdPeX1.js} +1 -1
- package/dist/ld-DHdnBuQl.mjs +550 -0
- package/dist/{middleware-Bua1eJKj.mjs → middleware-B0dEe1fJ.mjs} +309 -76
- package/dist/{middleware-ChZir5hz.mjs → middleware-D-GLLKcV.mjs} +1 -1
- package/dist/{middleware-BIaxjP-q.cjs → middleware-DQE7csTG.cjs} +399 -73
- package/dist/{middleware-o4he3VG2.js → middleware-DwMR-UJ5.js} +396 -71
- package/dist/{middleware-BmYsY7pr.cjs → middleware-zX2hBOnb.cjs} +1 -1
- package/dist/{mod-CKkpvznG.d.cts → mod-43DJyETz.d.cts} +1 -1
- package/dist/{mod-Kzr52ns8.d.ts → mod-COgmn-UO.d.ts} +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-9JLKNjOK.mjs → owner-B8gYOXYm.mjs} +2 -2
- package/dist/{proof-Bds_rOyf.js → proof-D2j9J3Sr.js} +298 -4
- package/dist/{proof-CVNf-KlO.mjs → proof-DSGV862v.mjs} +2 -2
- package/dist/{proof-DWK4MOe5.cjs → proof-RC4Q3Ozn.cjs} +345 -3
- package/dist/{send-j6vHPA3l.mjs → send-myUWQlOg.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-D4MiakbY.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 +6 -6
- package/dist/ld-C48i1Mdp.mjs +0 -256
- /package/dist/{retry-Ddbq3AcK.mjs → retry-B_E3V_Dx.mjs} +0 -0
|
@@ -2,8 +2,8 @@ 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-
|
|
6
|
-
import { t as InboxListenerSet } from "./inbox-
|
|
5
|
+
import { n as version, t as name } from "./deno-OvlgTe2z.mjs";
|
|
6
|
+
import { t as InboxListenerSet } from "./inbox-B0rurFqy.mjs";
|
|
7
7
|
import { getTypeId } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -42,7 +42,7 @@ var FederationBuilderImpl = class {
|
|
|
42
42
|
this.collectionTypeIds = {};
|
|
43
43
|
}
|
|
44
44
|
async build(options) {
|
|
45
|
-
const { FederationImpl } = await import("./middleware-
|
|
45
|
+
const { FederationImpl } = await import("./middleware-D-GLLKcV.mjs");
|
|
46
46
|
const f = new FederationImpl(options);
|
|
47
47
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
48
48
|
f.router = this.router.clone();
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { bt as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { bt as ActivityTransformer, n as Context } from "../context-CJZHWLmz.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 { bt as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { bt as ActivityTransformer, n as Context } from "../context-DnsFj3yK.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-ddO5KLpe.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
|
-
import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-
|
|
8
|
+
import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-B0dEe1fJ.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Follow, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -683,6 +683,42 @@ interface InboxMessage {
|
|
|
683
683
|
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
684
684
|
readonly baseUrl: string;
|
|
685
685
|
readonly activity: unknown;
|
|
686
|
+
/**
|
|
687
|
+
* The normalized JSON-LD representation of a signed inbox activity that
|
|
688
|
+
* Fedify already compacted successfully while accepting the request. Queue
|
|
689
|
+
* workers can reuse this producer-side parse cache under stricter loader or
|
|
690
|
+
* network constraints without changing the raw payload preserved for
|
|
691
|
+
* forwarding.
|
|
692
|
+
*
|
|
693
|
+
* This may exist even when {@link ldSignatureVerified} is `false`, because
|
|
694
|
+
* fallback-authenticated traffic and already-queued backlog items can still
|
|
695
|
+
* depend on the cached normalized form to avoid re-fetching remote custom
|
|
696
|
+
* contexts during worker processing.
|
|
697
|
+
*
|
|
698
|
+
* This is optional for backward compatibility with messages that were
|
|
699
|
+
* queued by older Fedify versions or that were already in a queue before
|
|
700
|
+
* upgrading.
|
|
701
|
+
*
|
|
702
|
+
* Fedify keeps this on the queued message itself instead of an external
|
|
703
|
+
* sidecar because generic queue backends do not provide reliable lifecycle
|
|
704
|
+
* guarantees for auxiliary storage across retries and redeliveries.
|
|
705
|
+
*
|
|
706
|
+
* @internal
|
|
707
|
+
*/
|
|
708
|
+
readonly normalizedActivity?: unknown;
|
|
709
|
+
/**
|
|
710
|
+
* Whether the producer actually verified the Linked Data Signature before
|
|
711
|
+
* queueing this message. This lets workers distinguish verified LDS replay
|
|
712
|
+
* from other authenticated inbox traffic that merely happened to include a
|
|
713
|
+
* signature block. This provenance marker is separate from the optional
|
|
714
|
+
* normalizedActivity parse cache.
|
|
715
|
+
*
|
|
716
|
+
* `undefined` preserves backward compatibility with older queued messages
|
|
717
|
+
* that predate this marker.
|
|
718
|
+
*
|
|
719
|
+
* @internal
|
|
720
|
+
*/
|
|
721
|
+
readonly ldSignatureVerified?: boolean;
|
|
686
722
|
readonly started: string;
|
|
687
723
|
readonly attempt: number;
|
|
688
724
|
readonly identifier: string | null;
|
|
@@ -2254,9 +2290,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2254
2290
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2255
2291
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2256
2292
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2257
|
-
* Integrity Proofs will not be added.
|
|
2258
|
-
*
|
|
2259
|
-
*
|
|
2293
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2294
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2295
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2296
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2297
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2298
|
+
* recipient probably will not trust the activity.
|
|
2260
2299
|
* @param forwarder The forwarder's identifier or the forwarder's username
|
|
2261
2300
|
* or the forwarder's key pair(s).
|
|
2262
2301
|
* @param recipients The recipients of the activity.
|
|
@@ -2272,9 +2311,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2272
2311
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2273
2312
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2274
2313
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2275
|
-
* Integrity Proofs will not be added.
|
|
2276
|
-
*
|
|
2277
|
-
*
|
|
2314
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2315
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2316
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2317
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2318
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2319
|
+
* recipient probably will not trust the activity.
|
|
2278
2320
|
* @param forwarder The forwarder's identifier or the forwarder's username.
|
|
2279
2321
|
* @param recipients In this case, it must be `"followers"`.
|
|
2280
2322
|
* @param options Options for forwarding the activity.
|
|
@@ -683,6 +683,42 @@ interface InboxMessage {
|
|
|
683
683
|
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
684
684
|
readonly baseUrl: string;
|
|
685
685
|
readonly activity: unknown;
|
|
686
|
+
/**
|
|
687
|
+
* The normalized JSON-LD representation of a signed inbox activity that
|
|
688
|
+
* Fedify already compacted successfully while accepting the request. Queue
|
|
689
|
+
* workers can reuse this producer-side parse cache under stricter loader or
|
|
690
|
+
* network constraints without changing the raw payload preserved for
|
|
691
|
+
* forwarding.
|
|
692
|
+
*
|
|
693
|
+
* This may exist even when {@link ldSignatureVerified} is `false`, because
|
|
694
|
+
* fallback-authenticated traffic and already-queued backlog items can still
|
|
695
|
+
* depend on the cached normalized form to avoid re-fetching remote custom
|
|
696
|
+
* contexts during worker processing.
|
|
697
|
+
*
|
|
698
|
+
* This is optional for backward compatibility with messages that were
|
|
699
|
+
* queued by older Fedify versions or that were already in a queue before
|
|
700
|
+
* upgrading.
|
|
701
|
+
*
|
|
702
|
+
* Fedify keeps this on the queued message itself instead of an external
|
|
703
|
+
* sidecar because generic queue backends do not provide reliable lifecycle
|
|
704
|
+
* guarantees for auxiliary storage across retries and redeliveries.
|
|
705
|
+
*
|
|
706
|
+
* @internal
|
|
707
|
+
*/
|
|
708
|
+
readonly normalizedActivity?: unknown;
|
|
709
|
+
/**
|
|
710
|
+
* Whether the producer actually verified the Linked Data Signature before
|
|
711
|
+
* queueing this message. This lets workers distinguish verified LDS replay
|
|
712
|
+
* from other authenticated inbox traffic that merely happened to include a
|
|
713
|
+
* signature block. This provenance marker is separate from the optional
|
|
714
|
+
* normalizedActivity parse cache.
|
|
715
|
+
*
|
|
716
|
+
* `undefined` preserves backward compatibility with older queued messages
|
|
717
|
+
* that predate this marker.
|
|
718
|
+
*
|
|
719
|
+
* @internal
|
|
720
|
+
*/
|
|
721
|
+
readonly ldSignatureVerified?: boolean;
|
|
686
722
|
readonly started: string;
|
|
687
723
|
readonly attempt: number;
|
|
688
724
|
readonly identifier: string | null;
|
|
@@ -2254,9 +2290,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2254
2290
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2255
2291
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2256
2292
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2257
|
-
* Integrity Proofs will not be added.
|
|
2258
|
-
*
|
|
2259
|
-
*
|
|
2293
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2294
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2295
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2296
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2297
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2298
|
+
* recipient probably will not trust the activity.
|
|
2260
2299
|
* @param forwarder The forwarder's identifier or the forwarder's username
|
|
2261
2300
|
* or the forwarder's key pair(s).
|
|
2262
2301
|
* @param recipients The recipients of the activity.
|
|
@@ -2272,9 +2311,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2272
2311
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2273
2312
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2274
2313
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2275
|
-
* Integrity Proofs will not be added.
|
|
2276
|
-
*
|
|
2277
|
-
*
|
|
2314
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2315
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2316
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2317
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2318
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2319
|
+
* recipient probably will not trust the activity.
|
|
2278
2320
|
* @param forwarder The forwarder's identifier or the forwarder's username.
|
|
2279
2321
|
* @param recipients In this case, it must be `"followers"`.
|
|
2280
2322
|
* @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 { a as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { a as validateCryptoKey } from "./key-v_BpXvjh.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-BGqCzFFW.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";
|
|
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import { a as assertExists } from "../std__assert-Duiq_YC9.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
|
-
import { n as createFederationBuilder } from "../builder-
|
|
8
|
+
import { n as createFederationBuilder } from "../builder-DpMJ796G.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/federation/builder.test.ts
|