@fedify/fedify 2.4.0-dev.2063 → 2.4.0-dev.2071
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-BzS4brdy.mjs → builder-DVQ0yhKJ.mjs} +6 -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/{compound-proof-BrSXP5so.mjs → compound-proof-KmXDfWFp.mjs} +1 -1
- package/dist/{context-b36TpPoG.d.cts → context-DijrgHDe.d.cts} +45 -2
- package/dist/{context-D_gg4M0n.d.ts → context-DsB9kF6q.d.ts} +45 -2
- package/dist/{deno-CVZgG4sc.mjs → deno-B-NtYZVW.mjs} +1 -1
- package/dist/{docloader-DBb8z7_l.mjs → docloader-C6yOVoaF.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +4 -4
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +8 -8
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +6 -6
- package/dist/federation/portable-gateway-keys.test.d.mts +2 -0
- package/dist/federation/portable-gateway-keys.test.mjs +363 -0
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-BrsIzNK5.cjs → federation-CUiHc7dP.cjs} +182 -76
- package/dist/http-BoWBwC0g.js +5087 -0
- package/dist/{http-CVjwUCCu.cjs → http-CuLWIJdf.cjs} +2684 -48
- package/dist/{http-znjq5j6a.mjs → http-DKWi8RjI.mjs} +20 -5
- package/dist/{http-65PYi9jY.d.ts → http-n2v6DPxu.d.ts} +52 -2
- package/dist/{http-CP-7OdSq.d.cts → http-xlG-jRdB.d.cts} +52 -2
- package/dist/{key-BnMA6vpl.mjs → key-lfcx_NaE.mjs} +147 -7
- package/dist/{kv-cache-aijDx_jN.js → kv-cache-BdnmnAVc.js} +1 -1
- package/dist/{kv-cache-D2O0JspA.cjs → kv-cache-DE8kSNQU.cjs} +1 -1
- package/dist/{kv-cache--REpvHgG.mjs → kv-cache-d8EjO29d.mjs} +1 -1
- package/dist/{ld-BBVP8ock.mjs → ld-jyjdrWjG.mjs} +3 -3
- package/dist/{metrics-B5spFq82.mjs → metrics-B5Rei-HC.mjs} +1 -1
- package/dist/{middleware-CzYM4cJI.js → middleware-CAObohey.js} +149 -43
- package/dist/{middleware-Cw8EWwAT.mjs → middleware-CPx4ZWwt.mjs} +155 -53
- package/dist/{middleware-ClrGS1xy.mjs → middleware-CdVnCDXD.mjs} +1 -1
- package/dist/{mod-Dhm7SqyE.d.ts → mod-C9WSpZWm.d.ts} +1 -1
- package/dist/{mod-C0BYc0OU.d.ts → mod-CVZrXSdm.d.ts} +1 -1
- package/dist/{mod-BhMvsgdF.d.ts → mod-DMkflQdF.d.ts} +1 -1
- package/dist/{mod-Bfenkg_c.d.cts → mod-DTAaBwiY.d.cts} +1 -1
- package/dist/{mod-pLbeNwcC.d.cts → mod-HDSvS-ww.d.cts} +1 -1
- package/dist/{mod-CyiSjRkk.d.cts → mod-xGFCHqq_.d.cts} +1 -1
- package/dist/mod.cjs +18 -18
- package/dist/mod.d.cts +7 -7
- package/dist/mod.d.ts +7 -7
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/owner-1TFakcTF.js +215 -0
- package/dist/owner-BXufwAzm.cjs +225 -0
- package/dist/{owner-Hc0hvbbX.mjs → owner-ByqNQVaa.mjs} +45 -2
- package/dist/portable-key-Cw_ow5vn.mjs +194 -0
- package/dist/{proof-B69bJaSn.mjs → proof-B6gwdhN5.mjs} +5 -5
- package/dist/{send-BB5rBhvN.mjs → send-DsK7xevO.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +2 -2
- package/dist/sig/compound-proof.test.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 +2 -2
- package/dist/sig/mod.cjs +16 -16
- package/dist/sig/mod.d.cts +2 -2
- package/dist/sig/mod.d.ts +2 -2
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +76 -3
- package/dist/sig/portable-key.test.d.mts +2 -0
- package/dist/sig/portable-key.test.mjs +275 -0
- package/dist/sig/proof.test.mjs +4 -4
- package/dist/{sig-B8WDBV-h.js → sig-BR_Z6mpY.js} +2 -2
- package/dist/{sig-dut4BzEW.cjs → sig-TTn9wYrE.cjs} +4 -4
- package/dist/{temporal-CcRkOx3C.mjs → temporal-Bw5jtrBY.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +43 -0
- 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.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/dist/http-99KVDtMr.js +0 -2647
- package/dist/owner-CHBQ0sSj.cjs +0 -2446
- package/dist/owner-Cu_KMvQN.js +0 -2276
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "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-B-NtYZVW.mjs";
|
|
5
5
|
import { t as ActivityListenerSet } from "./activity-listener-C-BSbKI7.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { Router, RouterError, assertPath } from "@fedify/uri-template";
|
|
@@ -86,7 +86,7 @@ var FederationBuilderImpl = class {
|
|
|
86
86
|
* specified.
|
|
87
87
|
*/
|
|
88
88
|
async build(options) {
|
|
89
|
-
const { FederationImpl } = await import("./middleware-
|
|
89
|
+
const { FederationImpl } = await import("./middleware-CdVnCDXD.mjs");
|
|
90
90
|
const f = new FederationImpl(options);
|
|
91
91
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
92
92
|
f.router = this.router.clone();
|
|
@@ -234,6 +234,10 @@ var FederationBuilderImpl = class {
|
|
|
234
234
|
callbacks.aliasMapper = mapper;
|
|
235
235
|
return setters;
|
|
236
236
|
},
|
|
237
|
+
mapPortableActorId(mapper) {
|
|
238
|
+
callbacks.portableActorIdMapper = mapper;
|
|
239
|
+
return setters;
|
|
240
|
+
},
|
|
237
241
|
mapActorAlias: (path, identifier) => {
|
|
238
242
|
if (identifier === "") throw new RouterError("Identifier cannot be empty.");
|
|
239
243
|
if (this.router.has(`actorAlias:${identifier}`)) throw new RouterError(`Actor alias for "${identifier}" already set.`);
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import {
|
|
2
|
+
import { Yt as ActivityTransformer, n as Context } from "../context-DijrgHDe.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 {
|
|
2
|
+
import { Yt as ActivityTransformer, n as Context } from "../context-DsB9kF6q.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 MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
7
7
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
|
-
import { S as autoIdAssigner, n as FederationImpl, x as actorDehydrator } from "../middleware-
|
|
8
|
+
import { S as autoIdAssigner, n as FederationImpl, x as actorDehydrator } from "../middleware-CPx4ZWwt.mjs";
|
|
9
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { i as verifyMapLocalProof, s as verifyPortableObjectProofPolicy } from "./proof-
|
|
4
|
+
import { i as verifyMapLocalProof, s as verifyPortableObjectProofPolicy } from "./proof-B6gwdhN5.mjs";
|
|
5
5
|
//#region src/sig/compound-proof.ts
|
|
6
6
|
const textEncoder = new TextEncoder();
|
|
7
7
|
const PORTABLE_OBJECT_ID_PATTERN = /^ap(?:\+ef61)?:\/\//i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-D-XP_Ccb.cjs";
|
|
3
|
-
import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from "./http-
|
|
3
|
+
import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from "./http-xlG-jRdB.cjs";
|
|
4
4
|
import { n as GetKeyOwnerOptions } from "./owner-BF0L9cMt.cjs";
|
|
5
5
|
import { n as KvStore, t as KvKey } from "./kv-BhNbN8Ed.cjs";
|
|
6
6
|
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, Tombstone, TraverseCollectionOptions } from "@fedify/vocab";
|
|
@@ -142,6 +142,25 @@ type ActorKeyPairsDispatcher<TContextData> = (context: Context<TContextData>, id
|
|
|
142
142
|
*/
|
|
143
143
|
type ActorHandleMapper<TContextData> = (context: Context<TContextData>, username: string) => string | null | Promise<string | null>;
|
|
144
144
|
/**
|
|
145
|
+
* A callback that maps an actor's internal identifier to the ID of the
|
|
146
|
+
* [FEP-ef61] portable actor it dispatches, or `null` if the actor is not
|
|
147
|
+
* portable.
|
|
148
|
+
*
|
|
149
|
+
* The returned ID is an `ap:` or `ap+ef61:` URI, e.g.,
|
|
150
|
+
* `ap+ef61://did:key:z6Mk.../actors/alice`, or its compatible identifier.
|
|
151
|
+
* It must be the same ID that the actor dispatcher puts in the actor's `id`,
|
|
152
|
+
* and must not have a fragment.
|
|
153
|
+
*
|
|
154
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
155
|
+
*
|
|
156
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
157
|
+
* @param context The context.
|
|
158
|
+
* @param identifier The actor's internal identifier.
|
|
159
|
+
* @returns The portable actor's ID, or `null` if the actor is not portable.
|
|
160
|
+
* @since 2.4.0
|
|
161
|
+
*/
|
|
162
|
+
type PortableActorIdMapper<TContextData> = (context: Context<TContextData>, identifier: string) => URL | null | Promise<URL | null>;
|
|
163
|
+
/**
|
|
145
164
|
* A callback that maps a WebFinger query to the corresponding actor's
|
|
146
165
|
* internal identifier or username, or `null` if the query is not found.
|
|
147
166
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
@@ -2397,6 +2416,30 @@ interface ActorCallbackSetters<TContextData> {
|
|
|
2397
2416
|
*/
|
|
2398
2417
|
mapAlias(mapper: ActorAliasMapper<TContextData>): ActorCallbackSetters<TContextData>;
|
|
2399
2418
|
/**
|
|
2419
|
+
* Sets the callback function that maps an actor's identifier to the ID of
|
|
2420
|
+
* the [FEP-ef61] portable actor it dispatches. If the callback returns
|
|
2421
|
+
* a portable ID for an identifier, the key pairs of that actor are treated
|
|
2422
|
+
* as this server's *gateway keys* for the portable actor:
|
|
2423
|
+
* {@link Context.getActorKeyPairs} derives their key IDs from the actor's
|
|
2424
|
+
* compatible identifier on this server, e.g.,
|
|
2425
|
+
* `https://example.com/.well-known/apgateway/did:key:z6Mk.../actors/alice#main-key`,
|
|
2426
|
+
* and makes the portable actor their owner, so that requests this server
|
|
2427
|
+
* makes on behalf of the actor, such as activity deliveries and signed
|
|
2428
|
+
* fetches, are signed with them. Gateway keys are only used for HTTP
|
|
2429
|
+
* Signatures; they never make Object Integrity Proofs or Linked Data
|
|
2430
|
+
* Signatures.
|
|
2431
|
+
*
|
|
2432
|
+
* If it's omitted, or it returns `null`, the actor's keys are derived from
|
|
2433
|
+
* {@link Context.getActorUri} as usual.
|
|
2434
|
+
*
|
|
2435
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
2436
|
+
* @param mapper A callback that maps an actor's identifier to its portable
|
|
2437
|
+
* ID, or `null` if the actor is not portable.
|
|
2438
|
+
* @returns The setters object so that settings can be chained.
|
|
2439
|
+
* @since 2.4.0
|
|
2440
|
+
*/
|
|
2441
|
+
mapPortableActorId(mapper: PortableActorIdMapper<TContextData>): ActorCallbackSetters<TContextData>;
|
|
2442
|
+
/**
|
|
2400
2443
|
* Maps a fixed path to a sentinel identifier. It is useful for exposing
|
|
2401
2444
|
* a single, instance-level actor at a fixed path, such as `/actor` for
|
|
2402
2445
|
* a relay or `/bot` for a bot.
|
|
@@ -3750,4 +3793,4 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
3750
3793
|
readonly multikey: Multikey;
|
|
3751
3794
|
}
|
|
3752
3795
|
//#endregion
|
|
3753
|
-
export { MessageQueue as $, ObjectCallbackSetters as A, InboxListener as At, TaskDefinitionOptions as B,
|
|
3796
|
+
export { MessageQueue as $, ObjectCallbackSetters as A, InboxListener as At, TaskDefinitionOptions as B, SharedInboxKeyDispatcher as Bt, FederationOptions as C, CollectionDispatcher as Ct, InboxChallengePolicy as D, HashlinkMediaDispatcher as Dt, IdempotencyStrategy as E, CustomCollectionDispatcher as Et, FederationQueueOptions as F, OutboxErrorHandler as Ft, RetryContext as G, SenderKeyPair as Gt, TaskHandler as H, UnverifiedActivityReason as Ht, createFederation as I, OutboxListener as It, RespondWithObjectOptions as J, digest as Jt, RetryPolicy as K, PageItems as Kt, Message as L, OutboxListenerErrorHandler as Lt, Rfc6570Expression as M, NodeInfoDispatcher as Mt, FederationKvPrefixes as N, ObjectAuthorizePredicate as Nt, InboxListenerSetters as O, HashlinkMediaRequest as Ot, FederationOrigin as P, ObjectDispatcher as Pt, InProcessMessageQueueOptions as Q, createFederationBuilder as R, OutboxPermanentFailureHandler as Rt, FederationFetchOptions as S, CollectionCursor as St, IdempotencyKeyCallback as T, CustomCollectionCursor as Tt, TaskRegistry as U, WebFingerLinksDispatcher as Ut, TaskEnqueueOptions as V, UnverifiedActivityHandler as Vt, CreateExponentialBackoffPolicyOptions as W, SendActivityError as Wt, respondWithObjectIfAcceptable as X, respondWithObject as Y, ActivityTransformer as Yt, InProcessMessageQueue as Z, CustomCollectionCallbackSetters as _, ActorDispatcher as _t, GetSignedKeyOptions as a, CircuitBreakerActivityDrop as at, FederationBenchmarkOptions as b, AuthorizePredicate as bt, ParseUriResult as c, CircuitBreakerFailurePolicy as ct, RouteActivityOptions as d, CircuitBreakerState as dt, MessageQueueDepth as et, SendActivityOptions as f, CircuitBreakerStateChange as ft, ConstructorWithTypeId as g, ActorAliasMapper as gt, CollectionCallbackSetters as h, parseCircuitBreakerKvState as ht, GetActorOptions as i, CircuitBreaker as it, OutboxListenerSetters as j, MediaUploaderCallback as jt, MediaUploaderSetters as k, InboxErrorHandler as kt, PortableRequest as l, CircuitBreakerKvState as lt, ActorCallbackSetters as m, normalizeCircuitBreakerOptions as mt, Context as n, MessageQueueListenOptions as nt, InboxContext as o, CircuitBreakerBeforeSendDecision as ot, SendActivityOptionsForCollection as p, NormalizedCircuitBreakerOptions as pt, createExponentialBackoffPolicy as q, buildCollectionSynchronizationHeader as qt, ForwardActivityOptions as r, ParallelMessageQueue as rt, OutboxContext as s, CircuitBreakerCreateOptions as st, ActorKeyPair as t, MessageQueueEnqueueOptions as tt, RequestContext as u, CircuitBreakerOptions as ut, Federatable as v, ActorHandleMapper as vt, FederationStartQueueOptions as w, CustomCollectionCounter as wt, FederationBuilder as x, CollectionCounter as xt, Federation as y, ActorKeyPairsDispatcher as yt, TaskDefinition as z, PortableActorIdMapper as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-D-XP_Ccb.js";
|
|
3
|
-
import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from "./http-
|
|
3
|
+
import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from "./http-n2v6DPxu.js";
|
|
4
4
|
import { n as GetKeyOwnerOptions } from "./owner-BSzr5-I8.js";
|
|
5
5
|
import { n as KvStore, t as KvKey } from "./kv-BhNbN8Ed.js";
|
|
6
6
|
import { Router } from "@fedify/uri-template";
|
|
@@ -144,6 +144,25 @@ type ActorKeyPairsDispatcher<TContextData> = (context: Context<TContextData>, id
|
|
|
144
144
|
*/
|
|
145
145
|
type ActorHandleMapper<TContextData> = (context: Context<TContextData>, username: string) => string | null | Promise<string | null>;
|
|
146
146
|
/**
|
|
147
|
+
* A callback that maps an actor's internal identifier to the ID of the
|
|
148
|
+
* [FEP-ef61] portable actor it dispatches, or `null` if the actor is not
|
|
149
|
+
* portable.
|
|
150
|
+
*
|
|
151
|
+
* The returned ID is an `ap:` or `ap+ef61:` URI, e.g.,
|
|
152
|
+
* `ap+ef61://did:key:z6Mk.../actors/alice`, or its compatible identifier.
|
|
153
|
+
* It must be the same ID that the actor dispatcher puts in the actor's `id`,
|
|
154
|
+
* and must not have a fragment.
|
|
155
|
+
*
|
|
156
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
157
|
+
*
|
|
158
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
159
|
+
* @param context The context.
|
|
160
|
+
* @param identifier The actor's internal identifier.
|
|
161
|
+
* @returns The portable actor's ID, or `null` if the actor is not portable.
|
|
162
|
+
* @since 2.4.0
|
|
163
|
+
*/
|
|
164
|
+
type PortableActorIdMapper<TContextData> = (context: Context<TContextData>, identifier: string) => URL | null | Promise<URL | null>;
|
|
165
|
+
/**
|
|
147
166
|
* A callback that maps a WebFinger query to the corresponding actor's
|
|
148
167
|
* internal identifier or username, or `null` if the query is not found.
|
|
149
168
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
@@ -2399,6 +2418,30 @@ interface ActorCallbackSetters<TContextData> {
|
|
|
2399
2418
|
*/
|
|
2400
2419
|
mapAlias(mapper: ActorAliasMapper<TContextData>): ActorCallbackSetters<TContextData>;
|
|
2401
2420
|
/**
|
|
2421
|
+
* Sets the callback function that maps an actor's identifier to the ID of
|
|
2422
|
+
* the [FEP-ef61] portable actor it dispatches. If the callback returns
|
|
2423
|
+
* a portable ID for an identifier, the key pairs of that actor are treated
|
|
2424
|
+
* as this server's *gateway keys* for the portable actor:
|
|
2425
|
+
* {@link Context.getActorKeyPairs} derives their key IDs from the actor's
|
|
2426
|
+
* compatible identifier on this server, e.g.,
|
|
2427
|
+
* `https://example.com/.well-known/apgateway/did:key:z6Mk.../actors/alice#main-key`,
|
|
2428
|
+
* and makes the portable actor their owner, so that requests this server
|
|
2429
|
+
* makes on behalf of the actor, such as activity deliveries and signed
|
|
2430
|
+
* fetches, are signed with them. Gateway keys are only used for HTTP
|
|
2431
|
+
* Signatures; they never make Object Integrity Proofs or Linked Data
|
|
2432
|
+
* Signatures.
|
|
2433
|
+
*
|
|
2434
|
+
* If it's omitted, or it returns `null`, the actor's keys are derived from
|
|
2435
|
+
* {@link Context.getActorUri} as usual.
|
|
2436
|
+
*
|
|
2437
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
2438
|
+
* @param mapper A callback that maps an actor's identifier to its portable
|
|
2439
|
+
* ID, or `null` if the actor is not portable.
|
|
2440
|
+
* @returns The setters object so that settings can be chained.
|
|
2441
|
+
* @since 2.4.0
|
|
2442
|
+
*/
|
|
2443
|
+
mapPortableActorId(mapper: PortableActorIdMapper<TContextData>): ActorCallbackSetters<TContextData>;
|
|
2444
|
+
/**
|
|
2402
2445
|
* Maps a fixed path to a sentinel identifier. It is useful for exposing
|
|
2403
2446
|
* a single, instance-level actor at a fixed path, such as `/actor` for
|
|
2404
2447
|
* a relay or `/bot` for a bot.
|
|
@@ -3752,4 +3795,4 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
3752
3795
|
readonly multikey: Multikey;
|
|
3753
3796
|
}
|
|
3754
3797
|
//#endregion
|
|
3755
|
-
export { MessageQueue as $, ObjectCallbackSetters as A, InboxListener as At, TaskDefinitionOptions as B,
|
|
3798
|
+
export { MessageQueue as $, ObjectCallbackSetters as A, InboxListener as At, TaskDefinitionOptions as B, SharedInboxKeyDispatcher as Bt, FederationOptions as C, CollectionDispatcher as Ct, InboxChallengePolicy as D, HashlinkMediaDispatcher as Dt, IdempotencyStrategy as E, CustomCollectionDispatcher as Et, FederationQueueOptions as F, OutboxErrorHandler as Ft, RetryContext as G, SenderKeyPair as Gt, TaskHandler as H, UnverifiedActivityReason as Ht, createFederation as I, OutboxListener as It, RespondWithObjectOptions as J, digest as Jt, RetryPolicy as K, PageItems as Kt, Message as L, OutboxListenerErrorHandler as Lt, Rfc6570Expression as M, NodeInfoDispatcher as Mt, FederationKvPrefixes as N, ObjectAuthorizePredicate as Nt, InboxListenerSetters as O, HashlinkMediaRequest as Ot, FederationOrigin as P, ObjectDispatcher as Pt, InProcessMessageQueueOptions as Q, createFederationBuilder as R, OutboxPermanentFailureHandler as Rt, FederationFetchOptions as S, CollectionCursor as St, IdempotencyKeyCallback as T, CustomCollectionCursor as Tt, TaskRegistry as U, WebFingerLinksDispatcher as Ut, TaskEnqueueOptions as V, UnverifiedActivityHandler as Vt, CreateExponentialBackoffPolicyOptions as W, SendActivityError as Wt, respondWithObjectIfAcceptable as X, respondWithObject as Y, ActivityTransformer as Yt, InProcessMessageQueue as Z, CustomCollectionCallbackSetters as _, ActorDispatcher as _t, GetSignedKeyOptions as a, CircuitBreakerActivityDrop as at, FederationBenchmarkOptions as b, AuthorizePredicate as bt, ParseUriResult as c, CircuitBreakerFailurePolicy as ct, RouteActivityOptions as d, CircuitBreakerState as dt, MessageQueueDepth as et, SendActivityOptions as f, CircuitBreakerStateChange as ft, ConstructorWithTypeId as g, ActorAliasMapper as gt, CollectionCallbackSetters as h, parseCircuitBreakerKvState as ht, GetActorOptions as i, CircuitBreaker as it, OutboxListenerSetters as j, MediaUploaderCallback as jt, MediaUploaderSetters as k, InboxErrorHandler as kt, PortableRequest as l, CircuitBreakerKvState as lt, ActorCallbackSetters as m, normalizeCircuitBreakerOptions as mt, Context as n, MessageQueueListenOptions as nt, InboxContext as o, CircuitBreakerBeforeSendDecision as ot, SendActivityOptionsForCollection as p, NormalizedCircuitBreakerOptions as pt, createExponentialBackoffPolicy as q, buildCollectionSynchronizationHeader as qt, ForwardActivityOptions as r, ParallelMessageQueue as rt, OutboxContext as s, CircuitBreakerCreateOptions as st, ActorKeyPair as t, MessageQueueEnqueueOptions as tt, RequestContext as u, CircuitBreakerOptions as ut, Federatable as v, ActorHandleMapper as vt, FederationStartQueueOptions as w, CustomCollectionCounter as wt, FederationBuilder as x, CollectionCounter as xt, Federation as y, ActorKeyPairsDispatcher as yt, TaskDefinition as z, PortableActorIdMapper as zt };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { s as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { s as validateCryptoKey } from "./key-lfcx_NaE.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-DKWi8RjI.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { curry } from "es-toolkit";
|
|
8
8
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -6,7 +6,7 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
6
6
|
import { t as assertExists } from "../assert_exists-cffSpJ7X.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
|
-
import { r as createFederationBuilder } from "../builder-
|
|
9
|
+
import { r as createFederationBuilder } from "../builder-DVQ0yhKJ.mjs";
|
|
10
10
|
import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
|
|
11
11
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
12
12
|
import { test } from "@fedify/fixture";
|
|
@@ -6,11 +6,11 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import { t as exportJwk } from "../key-
|
|
10
|
-
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
+
import { t as exportJwk } from "../key-lfcx_NaE.mjs";
|
|
11
10
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
11
|
+
import { l as verifyProof, r as signObject } from "../proof-B6gwdhN5.mjs";
|
|
12
|
+
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
+
import { n as FederationImpl } from "../middleware-CPx4ZWwt.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note } from "@fedify/vocab";
|
|
15
15
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
16
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -5,10 +5,10 @@ import { r as createRequestContext, t as createInboxContext } from "../context-D
|
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { p as signJsonLd } from "../ld-jyjdrWjG.mjs";
|
|
9
|
+
import { s as signRequest } from "../http-DKWi8RjI.mjs";
|
|
9
10
|
import { a as rsaPrivateKey3, c as rsaPublicKey3 } from "../keys-DIJNHW-Y.mjs";
|
|
10
|
-
import { d as handleInbox, o as createFederation } from "../middleware-
|
|
11
|
-
import { p as signJsonLd } from "../ld-BBVP8ock.mjs";
|
|
11
|
+
import { d as handleInbox, o as createFederation } from "../middleware-CPx4ZWwt.mjs";
|
|
12
12
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
13
13
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
14
14
|
import { Create } from "@fedify/vocab";
|
|
@@ -10,12 +10,12 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { r as parseAcceptSignature } from "../accept-CPVqki78.mjs";
|
|
13
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
14
|
-
import {
|
|
13
|
+
import { a as generateCryptoKeyPair } from "../key-lfcx_NaE.mjs";
|
|
14
|
+
import { a as compactJsonLd, p as signJsonLd } from "../ld-jyjdrWjG.mjs";
|
|
15
|
+
import { r as signObject } from "../proof-B6gwdhN5.mjs";
|
|
16
|
+
import { s as signRequest } from "../http-DKWi8RjI.mjs";
|
|
15
17
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.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-
|
|
17
|
-
import { a as compactJsonLd, p as signJsonLd } from "../ld-BBVP8ock.mjs";
|
|
18
|
-
import { r as signObject } from "../proof-B69bJaSn.mjs";
|
|
18
|
+
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-CPx4ZWwt.mjs";
|
|
19
19
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
20
20
|
import { Activity, Create, CryptographicKey, Multikey, Note, Person, Tombstone } from "@fedify/vocab";
|
|
21
21
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -10,8 +10,8 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { _ as parseHashlinkGatewayRequest, o as createFederation } from "../middleware-
|
|
14
|
-
import { r as createFederationBuilder } from "../builder-
|
|
13
|
+
import { _ as parseHashlinkGatewayRequest, o as createFederation } from "../middleware-CPx4ZWwt.mjs";
|
|
14
|
+
import { r as createFederationBuilder } from "../builder-DVQ0yhKJ.mjs";
|
|
15
15
|
import { n as RouterError } from "../router-u5O5KCQr.mjs";
|
|
16
16
|
import { Note } from "@fedify/vocab";
|
|
17
17
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
|
+
import { r as signObject } from "../proof-B6gwdhN5.mjs";
|
|
7
8
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
8
|
-
import { o as createFederation } from "../middleware-
|
|
9
|
-
import { r as signObject } from "../proof-B69bJaSn.mjs";
|
|
9
|
+
import { o as createFederation } from "../middleware-CPx4ZWwt.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
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.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-
|
|
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-B5Rei-HC.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";
|
|
@@ -16,14 +16,14 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
16
16
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
17
17
|
import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
|
|
18
18
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
19
|
-
import { g as recordInboxActivity } from "../metrics-
|
|
20
|
-
import {
|
|
19
|
+
import { g as recordInboxActivity } from "../metrics-B5Rei-HC.mjs";
|
|
20
|
+
import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-jyjdrWjG.mjs";
|
|
21
|
+
import { a as verifyObject, r as signObject } from "../proof-B6gwdhN5.mjs";
|
|
22
|
+
import { l as verifyRequest, s as signRequest } from "../http-DKWi8RjI.mjs";
|
|
21
23
|
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";
|
|
22
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
23
|
-
import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl, v as handleBenchmarkTrigger } from "../middleware-
|
|
24
|
-
import {
|
|
25
|
-
import { t as doesActorOwnKey } from "../owner-Hc0hvbbX.mjs";
|
|
26
|
-
import { a as verifyObject, r as signObject } from "../proof-B69bJaSn.mjs";
|
|
24
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-C6yOVoaF.mjs";
|
|
25
|
+
import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl, v as handleBenchmarkTrigger } from "../middleware-CPx4ZWwt.mjs";
|
|
26
|
+
import { t as doesActorOwnKey } from "../owner-ByqNQVaa.mjs";
|
|
27
27
|
import { t as CircuitBreaker } from "../circuit-breaker-C5NqoLBJ.mjs";
|
|
28
28
|
import { t as TaskCodec } from "../codec-C6rTrpIp.mjs";
|
|
29
29
|
import { t as markCircuitBreakerLegacySweepDone } from "../circuit-breaker-test-utils-DW6YC_Pe.mjs";
|
|
@@ -34,8 +34,8 @@ import { Create, Note, Offer, Person, getTypeId, lookupObject } from "@fedify/vo
|
|
|
34
34
|
import { SpanStatusCode, metrics } from "@opentelemetry/api";
|
|
35
35
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
36
36
|
import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
37
|
-
import { deepStrictEqual, ok, rejects, strictEqual } from "node:assert/strict";
|
|
38
37
|
import serialize from "json-canon";
|
|
38
|
+
import { deepStrictEqual, ok, rejects, strictEqual } from "node:assert/strict";
|
|
39
39
|
import { DataPointType, MeterProvider as MeterProvider$1, MetricReader } from "@opentelemetry/sdk-metrics";
|
|
40
40
|
//#region ../fixture/src/fixtures/example.com/create.json
|
|
41
41
|
var create_default = {
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_federation = require("../federation-
|
|
3
|
+
const require_federation = require("../federation-CUiHc7dP.cjs");
|
|
4
4
|
exports.CircuitBreaker = require_federation.CircuitBreaker;
|
|
5
5
|
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
|
6
6
|
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { $ as MessageQueue, A as ObjectCallbackSetters, At as InboxListener, B as TaskDefinitionOptions, Bt as
|
|
2
|
+
import { $ as MessageQueue, A as ObjectCallbackSetters, At as InboxListener, B as TaskDefinitionOptions, Bt as SharedInboxKeyDispatcher, C as FederationOptions, Ct as CollectionDispatcher, D as InboxChallengePolicy, Dt as HashlinkMediaDispatcher, E as IdempotencyStrategy, Et as CustomCollectionDispatcher, F as FederationQueueOptions, Ft as OutboxErrorHandler, G as RetryContext, Gt as SenderKeyPair, H as TaskHandler, Ht as UnverifiedActivityReason, I as createFederation, It as OutboxListener, J as RespondWithObjectOptions, Jt as digest, K as RetryPolicy, Kt as PageItems, L as Message, Lt as OutboxListenerErrorHandler, M as Rfc6570Expression, Mt as NodeInfoDispatcher, N as FederationKvPrefixes, Nt as ObjectAuthorizePredicate, O as InboxListenerSetters, Ot as HashlinkMediaRequest, P as FederationOrigin, Pt as ObjectDispatcher, Q as InProcessMessageQueueOptions, R as createFederationBuilder, Rt as OutboxPermanentFailureHandler, S as FederationFetchOptions, St as CollectionCursor, T as IdempotencyKeyCallback, Tt as CustomCollectionCursor, U as TaskRegistry, Ut as WebFingerLinksDispatcher, V as TaskEnqueueOptions, Vt as UnverifiedActivityHandler, W as CreateExponentialBackoffPolicyOptions, Wt as SendActivityError, X as respondWithObjectIfAcceptable, Y as respondWithObject, Z as InProcessMessageQueue, _ as CustomCollectionCallbackSetters, _t as ActorDispatcher, a as GetSignedKeyOptions, at as CircuitBreakerActivityDrop, b as FederationBenchmarkOptions, bt as AuthorizePredicate, c as ParseUriResult, ct as CircuitBreakerFailurePolicy, d as RouteActivityOptions, dt as CircuitBreakerState, et as MessageQueueDepth, f as SendActivityOptions, ft as CircuitBreakerStateChange, g as ConstructorWithTypeId, gt as ActorAliasMapper, h as CollectionCallbackSetters, ht as parseCircuitBreakerKvState, i as GetActorOptions, it as CircuitBreaker, j as OutboxListenerSetters, jt as MediaUploaderCallback, k as MediaUploaderSetters, kt as InboxErrorHandler, l as PortableRequest, lt as CircuitBreakerKvState, m as ActorCallbackSetters, mt as normalizeCircuitBreakerOptions, n as Context, nt as MessageQueueListenOptions, o as InboxContext, ot as CircuitBreakerBeforeSendDecision, p as SendActivityOptionsForCollection, pt as NormalizedCircuitBreakerOptions, q as createExponentialBackoffPolicy, qt as buildCollectionSynchronizationHeader, r as ForwardActivityOptions, rt as ParallelMessageQueue, s as OutboxContext, st as CircuitBreakerCreateOptions, t as ActorKeyPair, tt as MessageQueueEnqueueOptions, u as RequestContext, ut as CircuitBreakerOptions, v as Federatable, vt as ActorHandleMapper, w as FederationStartQueueOptions, wt as CustomCollectionCounter, x as FederationBuilder, xt as CollectionCounter, y as Federation, yt as ActorKeyPairsDispatcher, z as TaskDefinition, zt as PortableActorIdMapper } from "../context-DijrgHDe.cjs";
|
|
3
3
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-BhNbN8Ed.cjs";
|
|
4
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-
|
|
5
|
-
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
|
4
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-DTAaBwiY.cjs";
|
|
5
|
+
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, PortableActorIdMapper, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { $ as MessageQueue, A as ObjectCallbackSetters, At as InboxListener, B as TaskDefinitionOptions, Bt as
|
|
2
|
+
import { $ as MessageQueue, A as ObjectCallbackSetters, At as InboxListener, B as TaskDefinitionOptions, Bt as SharedInboxKeyDispatcher, C as FederationOptions, Ct as CollectionDispatcher, D as InboxChallengePolicy, Dt as HashlinkMediaDispatcher, E as IdempotencyStrategy, Et as CustomCollectionDispatcher, F as FederationQueueOptions, Ft as OutboxErrorHandler, G as RetryContext, Gt as SenderKeyPair, H as TaskHandler, Ht as UnverifiedActivityReason, I as createFederation, It as OutboxListener, J as RespondWithObjectOptions, Jt as digest, K as RetryPolicy, Kt as PageItems, L as Message, Lt as OutboxListenerErrorHandler, M as Rfc6570Expression, Mt as NodeInfoDispatcher, N as FederationKvPrefixes, Nt as ObjectAuthorizePredicate, O as InboxListenerSetters, Ot as HashlinkMediaRequest, P as FederationOrigin, Pt as ObjectDispatcher, Q as InProcessMessageQueueOptions, R as createFederationBuilder, Rt as OutboxPermanentFailureHandler, S as FederationFetchOptions, St as CollectionCursor, T as IdempotencyKeyCallback, Tt as CustomCollectionCursor, U as TaskRegistry, Ut as WebFingerLinksDispatcher, V as TaskEnqueueOptions, Vt as UnverifiedActivityHandler, W as CreateExponentialBackoffPolicyOptions, Wt as SendActivityError, X as respondWithObjectIfAcceptable, Y as respondWithObject, Z as InProcessMessageQueue, _ as CustomCollectionCallbackSetters, _t as ActorDispatcher, a as GetSignedKeyOptions, at as CircuitBreakerActivityDrop, b as FederationBenchmarkOptions, bt as AuthorizePredicate, c as ParseUriResult, ct as CircuitBreakerFailurePolicy, d as RouteActivityOptions, dt as CircuitBreakerState, et as MessageQueueDepth, f as SendActivityOptions, ft as CircuitBreakerStateChange, g as ConstructorWithTypeId, gt as ActorAliasMapper, h as CollectionCallbackSetters, ht as parseCircuitBreakerKvState, i as GetActorOptions, it as CircuitBreaker, j as OutboxListenerSetters, jt as MediaUploaderCallback, k as MediaUploaderSetters, kt as InboxErrorHandler, l as PortableRequest, lt as CircuitBreakerKvState, m as ActorCallbackSetters, mt as normalizeCircuitBreakerOptions, n as Context, nt as MessageQueueListenOptions, o as InboxContext, ot as CircuitBreakerBeforeSendDecision, p as SendActivityOptionsForCollection, pt as NormalizedCircuitBreakerOptions, q as createExponentialBackoffPolicy, qt as buildCollectionSynchronizationHeader, r as ForwardActivityOptions, rt as ParallelMessageQueue, s as OutboxContext, st as CircuitBreakerCreateOptions, t as ActorKeyPair, tt as MessageQueueEnqueueOptions, u as RequestContext, ut as CircuitBreakerOptions, v as Federatable, vt as ActorHandleMapper, w as FederationStartQueueOptions, wt as CustomCollectionCounter, x as FederationBuilder, xt as CollectionCounter, y as Federation, yt as ActorKeyPairsDispatcher, z as TaskDefinition, zt as PortableActorIdMapper } from "../context-DsB9kF6q.js";
|
|
3
3
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-BhNbN8Ed.js";
|
|
4
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-
|
|
5
|
-
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
|
4
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-DMkflQdF.js";
|
|
5
|
+
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, PortableActorIdMapper, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "../middleware-
|
|
3
|
+
import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "../middleware-CAObohey.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Router as Router$1, RouterError as RouterError$1, assertPath, isPath } from "@fedify/uri-template";
|
|
6
6
|
import { isEqual } from "es-toolkit";
|
|
@@ -7,12 +7,12 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import { t as exportJwk } from "../key-
|
|
10
|
+
import { t as exportJwk } from "../key-lfcx_NaE.mjs";
|
|
11
|
+
import { s as detachSignature } from "../ld-jyjdrWjG.mjs";
|
|
12
|
+
import { r as signObject } from "../proof-B6gwdhN5.mjs";
|
|
11
13
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
12
|
-
import { n as FederationImpl, o as createFederation } from "../middleware-
|
|
13
|
-
import {
|
|
14
|
-
import { r as signObject } from "../proof-B69bJaSn.mjs";
|
|
15
|
-
import { a as verifyCompoundPortableObjectProofs } from "../compound-proof-BrSXP5so.mjs";
|
|
14
|
+
import { n as FederationImpl, o as createFederation } from "../middleware-CPx4ZWwt.mjs";
|
|
15
|
+
import { a as verifyCompoundPortableObjectProofs } from "../compound-proof-KmXDfWFp.mjs";
|
|
16
16
|
import { Create, Note, Person } from "@fedify/vocab";
|
|
17
17
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
18
18
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -153,7 +153,7 @@ test("a portable activity with one Ed25519 key gets one direct proof", async ()
|
|
|
153
153
|
assertEquals(bodies.length, 1);
|
|
154
154
|
assertEquals(proofOf(bodies[0]).verificationMethod, owner.keyId.href);
|
|
155
155
|
assert(requests[0].headers.has("Signature"));
|
|
156
|
-
|
|
156
|
+
assertEquals(bodies[0].signature, void 0);
|
|
157
157
|
await assertCompoundVerifies(bodies[0]);
|
|
158
158
|
});
|
|
159
159
|
test("a portable activity is signed only by the key matching its DID", async () => {
|