@fedify/fedify 2.3.0-dev.1145 → 2.3.0-dev.1150
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-ShiR1K6b.mjs → builder-Bjm1Jq9n.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-DI2gRbyN.d.cts → context-CRXCkTM6.d.cts} +48 -6
- package/dist/{context-DCtsSHDv.d.ts → context-MgCh7YGu.d.ts} +48 -6
- package/dist/{deno-h0TWFuEz.mjs → deno-CKFE6Uya.mjs} +1 -1
- package/dist/{docloader-BdDN0Aqx.mjs → docloader-B-ZE1cZf.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +1363 -44
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +1667 -163
- 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 +8 -8
- 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/{getMachineId-bsd-etIyxDet.mjs → getMachineId-bsd-BY01PL1n.mjs} +1 -1
- package/dist/{getMachineId-darwin-D23zTf4g.mjs → getMachineId-darwin-Dr1gkBkp.mjs} +1 -1
- package/dist/{getMachineId-win-Dpap6v5i.mjs → getMachineId-win-QEYwcJiy.mjs} +1 -1
- package/dist/{http-7kAB7PVx.cjs → http-DQYEA7AZ.cjs} +1 -1
- package/dist/{http-B2hxA7dO.js → http-WbS1gKzr.js} +1 -1
- package/dist/{http-QzW9IWfs.mjs → http-vHCgbhTg.mjs} +3 -3
- package/dist/{key-Dh2OK1XQ.mjs → key-N0zP_oJA.mjs} +2 -2
- package/dist/{kv-cache-b22dNkjt.js → kv-cache-DM2O-Yjy.js} +1 -1
- package/dist/{kv-cache-DCPp-MT0.cjs → kv-cache-Dsg_bi4N.cjs} +1 -1
- package/dist/{kv-cache-EZRIPZXD.mjs → kv-cache-GXXZEemD.mjs} +1 -1
- package/dist/{ld-eZbar1rr.mjs → ld-BwKhquPx.mjs} +302 -6
- package/dist/{metrics-E0hAHtLZ.mjs → metrics-7Vy9FvEw.mjs} +1 -1
- package/dist/{middleware-BrGIM_Ra.js → middleware-BscgvU-m.js} +428 -99
- package/dist/{middleware-BUl1BH4x.cjs → middleware-D_iXrYHJ.cjs} +429 -99
- package/dist/{middleware-mToCR2tG.mjs → middleware-Db1_qAFG.mjs} +1 -1
- package/dist/{middleware-CyJDCmNg.mjs → middleware-ZuUcO0t1.mjs} +348 -108
- package/dist/{mod-CI9fduEi.d.cts → mod-C7HOzGqH.d.cts} +1 -1
- package/dist/{mod-CkRiJHGA.d.ts → mod-CpQHB3Ys.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-ByO_Fw6U.mjs → owner-FD0H_vpj.mjs} +2 -2
- package/dist/{proof-jVqClF49.cjs → proof-CYK8T8IS.cjs} +353 -3
- package/dist/{proof-BkRyFchv.js → proof-I3EokKN-.js} +300 -4
- package/dist/{proof-CSo0S8OK.mjs → proof-V_lafPmA.mjs} +3 -3
- package/dist/{send-jzrTV1FU.mjs → send-Cc2_10tF.mjs} +3 -3
- 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-BkmBfs__.mjs +95 -0
- package/dist/testing/mod.d.mts +48 -6
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +7 -7
- /package/dist/{execAsync-DCBrgFiV.mjs → execAsync-Dxb7rNf3.mjs} +0 -0
- /package/dist/{getMachineId-linux-ObI47Hql.mjs → getMachineId-linux-Bbhofx-s.mjs} +0 -0
- /package/dist/{getMachineId-unsupported-Ddu-PFeh.mjs → getMachineId-unsupported-dIOte2Ct.mjs} +0 -0
- /package/dist/{retry-v_sGLH1d.mjs → retry-_VvV0h9f.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-CKFE6Uya.mjs";
|
|
5
5
|
import { t as ActivityListenerSet } from "./activity-listener-tztVvlNb.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { Router, RouterError, assertPath } from "@fedify/uri-template";
|
|
@@ -73,7 +73,7 @@ var FederationBuilderImpl = class {
|
|
|
73
73
|
this.collectionTypeIds = {};
|
|
74
74
|
}
|
|
75
75
|
async build(options) {
|
|
76
|
-
const { FederationImpl } = await import("./middleware-
|
|
76
|
+
const { FederationImpl } = await import("./middleware-Db1_qAFG.mjs");
|
|
77
77
|
const f = new FederationImpl(options);
|
|
78
78
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
79
79
|
f.router = this.router.clone();
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as Context, vt as ActivityTransformer } from "../context-
|
|
2
|
+
import { n as Context, vt as ActivityTransformer } from "../context-CRXCkTM6.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 { n as Context, vt as ActivityTransformer } from "../context-
|
|
2
|
+
import { n as Context, vt as ActivityTransformer } from "../context-MgCh7YGu.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-C-ZRDbaf.mjs";
|
|
|
5
5
|
import { t as assertInstanceOf } from "../assert_instance_of-DBC5X09g.mjs";
|
|
6
6
|
import { t as assert } from "../assert-OguE97r2.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-x2IvBUyq.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-ZuUcO0t1.mjs";
|
|
9
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -483,6 +483,42 @@ interface InboxMessage {
|
|
|
483
483
|
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
484
484
|
readonly baseUrl: string;
|
|
485
485
|
readonly activity: unknown;
|
|
486
|
+
/**
|
|
487
|
+
* The normalized JSON-LD representation of a signed inbox activity that
|
|
488
|
+
* Fedify already compacted successfully while accepting the request. Queue
|
|
489
|
+
* workers can reuse this producer-side parse cache under stricter loader or
|
|
490
|
+
* network constraints without changing the raw payload preserved for
|
|
491
|
+
* forwarding.
|
|
492
|
+
*
|
|
493
|
+
* This may exist even when {@link ldSignatureVerified} is `false`, because
|
|
494
|
+
* fallback-authenticated traffic and already-queued backlog items can still
|
|
495
|
+
* depend on the cached normalized form to avoid re-fetching remote custom
|
|
496
|
+
* contexts during worker processing.
|
|
497
|
+
*
|
|
498
|
+
* This is optional for backward compatibility with messages that were
|
|
499
|
+
* queued by older Fedify versions or that were already in a queue before
|
|
500
|
+
* upgrading.
|
|
501
|
+
*
|
|
502
|
+
* Fedify keeps this on the queued message itself instead of an external
|
|
503
|
+
* sidecar because generic queue backends do not provide reliable lifecycle
|
|
504
|
+
* guarantees for auxiliary storage across retries and redeliveries.
|
|
505
|
+
*
|
|
506
|
+
* @internal
|
|
507
|
+
*/
|
|
508
|
+
readonly normalizedActivity?: unknown;
|
|
509
|
+
/**
|
|
510
|
+
* Whether the producer actually verified the Linked Data Signature before
|
|
511
|
+
* queueing this message. This lets workers distinguish verified LDS replay
|
|
512
|
+
* from other authenticated inbox traffic that merely happened to include a
|
|
513
|
+
* signature block. This provenance marker is separate from the optional
|
|
514
|
+
* normalizedActivity parse cache.
|
|
515
|
+
*
|
|
516
|
+
* `undefined` preserves backward compatibility with older queued messages
|
|
517
|
+
* that predate this marker.
|
|
518
|
+
*
|
|
519
|
+
* @internal
|
|
520
|
+
*/
|
|
521
|
+
readonly ldSignatureVerified?: boolean;
|
|
486
522
|
readonly started: string;
|
|
487
523
|
readonly attempt: number;
|
|
488
524
|
readonly identifier: string | null;
|
|
@@ -2269,9 +2305,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2269
2305
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2270
2306
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2271
2307
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2272
|
-
* Integrity Proofs will not be added.
|
|
2273
|
-
*
|
|
2274
|
-
*
|
|
2308
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2309
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2310
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2311
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2312
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2313
|
+
* recipient probably will not trust the activity.
|
|
2275
2314
|
* @param forwarder The forwarder's identifier or the forwarder's username
|
|
2276
2315
|
* or the forwarder's key pair(s).
|
|
2277
2316
|
* @param recipients The recipients of the activity.
|
|
@@ -2287,9 +2326,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2287
2326
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2288
2327
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2289
2328
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2290
|
-
* Integrity Proofs will not be added.
|
|
2291
|
-
*
|
|
2292
|
-
*
|
|
2329
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2330
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2331
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2332
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2333
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2334
|
+
* recipient probably will not trust the activity.
|
|
2293
2335
|
* @param forwarder The forwarder's identifier or the forwarder's username.
|
|
2294
2336
|
* @param recipients In this case, it must be `"followers"`.
|
|
2295
2337
|
* @param options Options for forwarding the activity.
|
|
@@ -485,6 +485,42 @@ interface InboxMessage {
|
|
|
485
485
|
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
486
486
|
readonly baseUrl: string;
|
|
487
487
|
readonly activity: unknown;
|
|
488
|
+
/**
|
|
489
|
+
* The normalized JSON-LD representation of a signed inbox activity that
|
|
490
|
+
* Fedify already compacted successfully while accepting the request. Queue
|
|
491
|
+
* workers can reuse this producer-side parse cache under stricter loader or
|
|
492
|
+
* network constraints without changing the raw payload preserved for
|
|
493
|
+
* forwarding.
|
|
494
|
+
*
|
|
495
|
+
* This may exist even when {@link ldSignatureVerified} is `false`, because
|
|
496
|
+
* fallback-authenticated traffic and already-queued backlog items can still
|
|
497
|
+
* depend on the cached normalized form to avoid re-fetching remote custom
|
|
498
|
+
* contexts during worker processing.
|
|
499
|
+
*
|
|
500
|
+
* This is optional for backward compatibility with messages that were
|
|
501
|
+
* queued by older Fedify versions or that were already in a queue before
|
|
502
|
+
* upgrading.
|
|
503
|
+
*
|
|
504
|
+
* Fedify keeps this on the queued message itself instead of an external
|
|
505
|
+
* sidecar because generic queue backends do not provide reliable lifecycle
|
|
506
|
+
* guarantees for auxiliary storage across retries and redeliveries.
|
|
507
|
+
*
|
|
508
|
+
* @internal
|
|
509
|
+
*/
|
|
510
|
+
readonly normalizedActivity?: unknown;
|
|
511
|
+
/**
|
|
512
|
+
* Whether the producer actually verified the Linked Data Signature before
|
|
513
|
+
* queueing this message. This lets workers distinguish verified LDS replay
|
|
514
|
+
* from other authenticated inbox traffic that merely happened to include a
|
|
515
|
+
* signature block. This provenance marker is separate from the optional
|
|
516
|
+
* normalizedActivity parse cache.
|
|
517
|
+
*
|
|
518
|
+
* `undefined` preserves backward compatibility with older queued messages
|
|
519
|
+
* that predate this marker.
|
|
520
|
+
*
|
|
521
|
+
* @internal
|
|
522
|
+
*/
|
|
523
|
+
readonly ldSignatureVerified?: boolean;
|
|
488
524
|
readonly started: string;
|
|
489
525
|
readonly attempt: number;
|
|
490
526
|
readonly identifier: string | null;
|
|
@@ -2271,9 +2307,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2271
2307
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2272
2308
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2273
2309
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2274
|
-
* Integrity Proofs will not be added.
|
|
2275
|
-
*
|
|
2276
|
-
*
|
|
2310
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2311
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2312
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2313
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2314
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2315
|
+
* recipient probably will not trust the activity.
|
|
2277
2316
|
* @param forwarder The forwarder's identifier or the forwarder's username
|
|
2278
2317
|
* or the forwarder's key pair(s).
|
|
2279
2318
|
* @param recipients The recipients of the activity.
|
|
@@ -2289,9 +2328,12 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2289
2328
|
* Forwards a received activity to the recipients' inboxes. The forwarded
|
|
2290
2329
|
* activity will be signed in HTTP Signatures by the forwarder, but its
|
|
2291
2330
|
* payload will not be modified, i.e., Linked Data Signatures and Object
|
|
2292
|
-
* Integrity Proofs will not be added.
|
|
2293
|
-
*
|
|
2294
|
-
*
|
|
2331
|
+
* Integrity Proofs will not be added. Even when Fedify internally
|
|
2332
|
+
* normalizes a Linked Data Signature activity for parsing, this method still
|
|
2333
|
+
* forwards the original received payload so the sender's signatures/proofs
|
|
2334
|
+
* are preserved as-is. Therefore, if the activity is not signed (i.e., it
|
|
2335
|
+
* has neither Linked Data Signatures nor Object Integrity Proofs), the
|
|
2336
|
+
* recipient probably will not trust the activity.
|
|
2295
2337
|
* @param forwarder The forwarder's identifier or the forwarder's username.
|
|
2296
2338
|
* @param recipients In this case, it must be `"followers"`.
|
|
2297
2339
|
* @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-N0zP_oJA.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-vHCgbhTg.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
8
|
import { curry } from "es-toolkit";
|
|
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
|
5
5
|
import { r as assertExists } from "../std__assert-BBjXFNOb.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
8
|
-
import { r as createFederationBuilder } from "../builder-
|
|
8
|
+
import { r as createFederationBuilder } from "../builder-Bjm1Jq9n.mjs";
|
|
9
9
|
import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
|
|
10
10
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
11
11
|
import { test } from "@fedify/fixture";
|