@fedify/fedify 2.5.0-dev.2844 → 2.5.0-dev.2860
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/{client-3InDZbba.d.cts → client-DLHsPY7X.d.cts} +16 -0
- package/dist/{client-3InDZbba.d.ts → client-DLHsPY7X.d.ts} +16 -0
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/mod.js +1 -1
- package/dist/{context-ZtE85CT_.d.cts → context-BhEcRbHo.d.cts} +32 -15
- package/dist/{context-CgIOZfHW.d.ts → context-C96-nSuT.d.ts} +32 -15
- 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-BQI281O9.cjs → federation-Auvn2nQS.cjs} +525 -196
- package/dist/{http-wTHjiJ6Q.js → http-BN8Zo-nG.js} +2639 -2464
- package/dist/{http-C0rce83B.cjs → http-DcmM0AwN.cjs} +2643 -2456
- package/dist/{key-BZw-YiK5.d.ts → key-2YNB5dUS.d.cts} +5 -5
- package/dist/{key-D5fbQkKM.d.cts → key-BV9DK4qb.d.ts} +5 -5
- package/dist/{kv-cache-DflBc0cC.cjs → kv-cache-DRJgdRR0.cjs} +1 -1
- package/dist/{kv-cache-O6fntSzA.js → kv-cache-Dz6xiM-c.js} +1 -1
- package/dist/{ld-DlC78ioJ.d.ts → ld-BKOmKbuX.d.cts} +28 -6
- package/dist/{ld-DEi9ERHf.d.cts → ld-BewN9CW6.d.ts} +28 -6
- package/dist/{middleware-B8hzxJNs.js → middleware-kGZB_Ab7.js} +457 -129
- package/dist/{mod-rDDnkuR8.d.cts → mod-B9UuZYxK.d.cts} +3 -3
- package/dist/{mod-BD6xjFNY.d.ts → mod-BMHC9eZs.d.ts} +1 -1
- package/dist/{mod-Bl1EEZMj.d.cts → mod-CUXI3ede.d.cts} +1 -1
- package/dist/{mod-SgCN1wPF.d.ts → mod-DHjHSPnw.d.ts} +3 -3
- package/dist/{mod-BamwZjJx.d.cts → mod-iIOirIJV.d.ts} +3 -3
- package/dist/{mod-BJRtsw7l.d.ts → mod-oIp2uo8F.d.cts} +3 -3
- package/dist/mod.cjs +6 -6
- package/dist/mod.d.cts +9 -9
- package/dist/mod.d.ts +9 -9
- package/dist/mod.js +6 -6
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.d.cts +1 -1
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/{portable-collection-DbqytYWl.js → portable-collection-BKIPytM_.js} +3 -2
- package/dist/{portable-collection-zcu-7ozm.cjs → portable-collection-C5sRy1VN.cjs} +3 -2
- package/dist/portable-verifier-CPA86vIP.js +22 -0
- package/dist/portable-verifier-DiLU8c9T.cjs +26 -0
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +4 -4
- package/dist/sig/mod.d.ts +4 -4
- package/dist/sig/mod.js +2 -2
- package/dist/{transformers-DAtXl_Kc.js → transformers-BlJ53iKs.js} +3 -2
- package/dist/{transformers-BalCrSsr.cjs → transformers-aIK89ibB.cjs} +3 -2
- package/dist/{types-DUjZb4i6.js → types-BbCbtwZp.js} +86 -11
- package/dist/{types-hKCCjii0.cjs → types-C8gac_AD.cjs} +85 -10
- 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 +6 -6
|
@@ -165,6 +165,22 @@ interface GetNodeInfoOptions {
|
|
|
165
165
|
* @since 1.3.0
|
|
166
166
|
*/
|
|
167
167
|
userAgent?: GetUserAgentOptions | string;
|
|
168
|
+
/**
|
|
169
|
+
* The timeout in milliseconds for the entire NodeInfo lookup, including
|
|
170
|
+
* discovery, redirects, and reading the document. Defaults to 10 seconds.
|
|
171
|
+
* Set to `null` to disable the timeout. A timeout returns `undefined`.
|
|
172
|
+
* Fractional values are rounded up.
|
|
173
|
+
* @throws {RangeError} If the value is not a positive finite number or is
|
|
174
|
+
* greater than 2,147,483,647.
|
|
175
|
+
* @since 2.0.36
|
|
176
|
+
*/
|
|
177
|
+
timeout?: number | null;
|
|
178
|
+
/**
|
|
179
|
+
* A signal to cancel the entire NodeInfo lookup. Cancellation returns
|
|
180
|
+
* `undefined`, including when the timeout is disabled.
|
|
181
|
+
* @since 2.0.36
|
|
182
|
+
*/
|
|
183
|
+
signal?: AbortSignal;
|
|
168
184
|
}
|
|
169
185
|
/**
|
|
170
186
|
* Fetches a NodeInfo document from the given URL.
|
|
@@ -165,6 +165,22 @@ interface GetNodeInfoOptions {
|
|
|
165
165
|
* @since 1.3.0
|
|
166
166
|
*/
|
|
167
167
|
userAgent?: GetUserAgentOptions | string;
|
|
168
|
+
/**
|
|
169
|
+
* The timeout in milliseconds for the entire NodeInfo lookup, including
|
|
170
|
+
* discovery, redirects, and reading the document. Defaults to 10 seconds.
|
|
171
|
+
* Set to `null` to disable the timeout. A timeout returns `undefined`.
|
|
172
|
+
* Fractional values are rounded up.
|
|
173
|
+
* @throws {RangeError} If the value is not a positive finite number or is
|
|
174
|
+
* greater than 2,147,483,647.
|
|
175
|
+
* @since 2.0.36
|
|
176
|
+
*/
|
|
177
|
+
timeout?: number | null;
|
|
178
|
+
/**
|
|
179
|
+
* A signal to cancel the entire NodeInfo lookup. Cancellation returns
|
|
180
|
+
* `undefined`, including when the timeout is disabled.
|
|
181
|
+
* @since 2.0.36
|
|
182
|
+
*/
|
|
183
|
+
signal?: AbortSignal;
|
|
168
184
|
}
|
|
169
185
|
/**
|
|
170
186
|
* Fetches a NodeInfo document from the given URL.
|
package/dist/compat/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_transformers = require("../transformers-
|
|
3
|
+
const require_transformers = require("../transformers-aIK89ibB.cjs");
|
|
4
4
|
exports.actorDehydrator = require_transformers.actorDehydrator;
|
|
5
5
|
exports.autoIdAssigner = require_transformers.autoIdAssigner;
|
|
6
6
|
exports.getDefaultActivityTransformers = require_transformers.getDefaultActivityTransformers;
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { in as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { in as ActivityTransformer, n as Context } from "../context-BhEcRbHo.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 { in as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { in as ActivityTransformer, n as Context } from "../context-C96-nSuT.js";
|
|
3
3
|
import { Activity } from "@fedify/vocab";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/transformers.d.ts
|
package/dist/compat/mod.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "../transformers-
|
|
3
|
+
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "../transformers-BlJ53iKs.js";
|
|
4
4
|
export { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-
|
|
3
|
-
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, h as InboxVerificationAttempt, w as VerifyRequestFailureReason, y as HttpMessageSignaturesSpec } from "./key-
|
|
4
|
-
import { m as GetKeyOwnerOptions, n as EffectiveContextLoaderPolicy } from "./ld-
|
|
2
|
+
import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-DLHsPY7X.cjs";
|
|
3
|
+
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, h as InboxVerificationAttempt, w as VerifyRequestFailureReason, y as HttpMessageSignaturesSpec } from "./key-2YNB5dUS.cjs";
|
|
4
|
+
import { m as GetKeyOwnerOptions, n as EffectiveContextLoaderPolicy } from "./ld-BKOmKbuX.cjs";
|
|
5
5
|
import { n as KvKey, r as KvStore } from "./kv-B0eIwj06.cjs";
|
|
6
6
|
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, Tombstone, TraverseCollectionOptions } from "@fedify/vocab";
|
|
7
|
-
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions, PortableObjectVerifier, RemoteDocument } from "@fedify/vocab-runtime";
|
|
7
|
+
import { AuthenticatedDocumentLoaderFactory, CryptoKeyLike, CryptoKeyPairLike, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions, PortableObjectVerifier, RemoteDocument } from "@fedify/vocab-runtime";
|
|
8
8
|
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
|
|
9
9
|
import { MeterProvider, Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
10
10
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -1163,13 +1163,18 @@ interface InboxMessage {
|
|
|
1163
1163
|
//#region src/federation/send.d.ts
|
|
1164
1164
|
/**
|
|
1165
1165
|
* A key pair for an actor who sends an activity.
|
|
1166
|
+
*
|
|
1167
|
+
* The private key type is parameterized so that Fedify can accept keys from
|
|
1168
|
+
* `node:crypto` at its input boundaries while `SenderKeyPair` still exposes the
|
|
1169
|
+
* ambient `CryptoKey` type by default.
|
|
1170
|
+
* @template TKey The type of the private key.
|
|
1166
1171
|
* @since 0.10.0
|
|
1167
1172
|
*/
|
|
1168
|
-
interface SenderKeyPair {
|
|
1173
|
+
interface SenderKeyPair<TKey extends CryptoKeyLike = CryptoKey> {
|
|
1169
1174
|
/**
|
|
1170
1175
|
* The actor's private key to sign the request.
|
|
1171
1176
|
*/
|
|
1172
|
-
readonly privateKey:
|
|
1177
|
+
readonly privateKey: TKey;
|
|
1173
1178
|
/**
|
|
1174
1179
|
* The public key ID that corresponds to the private key.
|
|
1175
1180
|
*/
|
|
@@ -1241,13 +1246,19 @@ type ActorDispatcher<TContextData> = (context: RequestContext<TContextData>, ide
|
|
|
1241
1246
|
/**
|
|
1242
1247
|
* A callback that dispatches key pairs for an actor.
|
|
1243
1248
|
*
|
|
1249
|
+
* The returned key pairs may come from any supported runtime, including keys
|
|
1250
|
+
* obtained from `node:crypto`'s Web Crypto API, so the key pair type is
|
|
1251
|
+
* parameterized. It defaults to the ambient `CryptoKeyPair` type for
|
|
1252
|
+
* compatibility with code that calls a dispatcher directly.
|
|
1253
|
+
*
|
|
1244
1254
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
1255
|
+
* @template TKeyPair The type of the key pairs the dispatcher returns.
|
|
1245
1256
|
* @param context The context.
|
|
1246
1257
|
* @param identifier The actor's internal identifier or username.
|
|
1247
1258
|
* @returns The key pairs.
|
|
1248
1259
|
* @since 0.10.0
|
|
1249
1260
|
*/
|
|
1250
|
-
type ActorKeyPairsDispatcher<TContextData> = (context: Context<TContextData>, identifier: string) =>
|
|
1261
|
+
type ActorKeyPairsDispatcher<TContextData, TKeyPair extends CryptoKeyPairLike = CryptoKeyPair> = (context: Context<TContextData>, identifier: string) => TKeyPair[] | Promise<TKeyPair[]>;
|
|
1251
1262
|
/**
|
|
1252
1263
|
* A callback that maps a WebFinger username to the corresponding actor's
|
|
1253
1264
|
* internal identifier, or `null` if the username is not found.
|
|
@@ -1502,11 +1513,11 @@ type OutboxListenerErrorHandler<TContextData> = (context: OutboxContext<TContext
|
|
|
1502
1513
|
* not authorized.
|
|
1503
1514
|
* @since 0.11.0
|
|
1504
1515
|
*/
|
|
1505
|
-
type SharedInboxKeyDispatcher<TContextData> = (context: Context<TContextData>) => SenderKeyPair | {
|
|
1516
|
+
type SharedInboxKeyDispatcher<TContextData, TKeyPair extends CryptoKeyLike = CryptoKey> = (context: Context<TContextData>) => SenderKeyPair<TKeyPair> | {
|
|
1506
1517
|
identifier: string;
|
|
1507
1518
|
} | {
|
|
1508
1519
|
username: string;
|
|
1509
|
-
} | null | Promise<SenderKeyPair | {
|
|
1520
|
+
} | null | Promise<SenderKeyPair<TKeyPair> | {
|
|
1510
1521
|
identifier: string;
|
|
1511
1522
|
} | {
|
|
1512
1523
|
username: string;
|
|
@@ -3269,6 +3280,12 @@ interface FederationOptions<TContextData> {
|
|
|
3269
3280
|
*
|
|
3270
3281
|
* By default, the queue starts automatically.
|
|
3271
3282
|
*
|
|
3283
|
+
* Automatic startup is best-effort: if a queue cannot start listening,
|
|
3284
|
+
* a warning is logged once per federation instance and the failed worker is
|
|
3285
|
+
* not retried, while an explicit {@link Federation.startQueue} call rejects.
|
|
3286
|
+
* Runtimes that consume the queue elsewhere, such as Cloudflare Workers with
|
|
3287
|
+
* {@link Federation.processQueuedTask}, should set this to `true`.
|
|
3288
|
+
*
|
|
3272
3289
|
* @since 0.12.0
|
|
3273
3290
|
*/
|
|
3274
3291
|
manuallyStartQueue?: boolean;
|
|
@@ -3569,7 +3586,7 @@ interface ActorCallbackSetters<TContextData> {
|
|
|
3569
3586
|
* @returns The setters object so that settings can be chained.
|
|
3570
3587
|
* @since 0.10.0
|
|
3571
3588
|
*/
|
|
3572
|
-
setKeyPairsDispatcher(dispatcher: ActorKeyPairsDispatcher<TContextData>): ActorCallbackSetters<TContextData>;
|
|
3589
|
+
setKeyPairsDispatcher(dispatcher: ActorKeyPairsDispatcher<TContextData, CryptoKeyPairLike>): ActorCallbackSetters<TContextData>;
|
|
3573
3590
|
/**
|
|
3574
3591
|
* Sets the callback function that maps a WebFinger username to
|
|
3575
3592
|
* the corresponding actor's identifier. If it's omitted, the identifier
|
|
@@ -3845,7 +3862,7 @@ interface InboxListenerSetters<TContextData> {
|
|
|
3845
3862
|
* @returns The setters object so that settings can be chained.
|
|
3846
3863
|
* @since 0.11.0
|
|
3847
3864
|
*/
|
|
3848
|
-
setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData>): InboxListenerSetters<TContextData>;
|
|
3865
|
+
setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData, CryptoKeyLike>): InboxListenerSetters<TContextData>;
|
|
3849
3866
|
/**
|
|
3850
3867
|
* Configures the strategy for handling activity idempotency in inbox processing.
|
|
3851
3868
|
*
|
|
@@ -4522,7 +4539,7 @@ interface Context<TContextData> {
|
|
|
4522
4539
|
*/
|
|
4523
4540
|
getDocumentLoader(identity: {
|
|
4524
4541
|
keyId: URL;
|
|
4525
|
-
privateKey:
|
|
4542
|
+
privateKey: CryptoKeyLike;
|
|
4526
4543
|
}): DocumentLoader;
|
|
4527
4544
|
/**
|
|
4528
4545
|
* Looks up an ActivityStreams object by its URI (including `acct:` URIs)
|
|
@@ -4648,7 +4665,7 @@ interface Context<TContextData> {
|
|
|
4648
4665
|
* @param activity The activity to send.
|
|
4649
4666
|
* @param options Options for sending the activity.
|
|
4650
4667
|
*/
|
|
4651
|
-
sendActivity(sender: SenderKeyPair | SenderKeyPair[] | {
|
|
4668
|
+
sendActivity(sender: SenderKeyPair<CryptoKeyLike> | SenderKeyPair<CryptoKeyLike>[] | {
|
|
4652
4669
|
identifier: string;
|
|
4653
4670
|
} | {
|
|
4654
4671
|
username: string;
|
|
@@ -5378,7 +5395,7 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
5378
5395
|
* @param options Options for forwarding the activity.
|
|
5379
5396
|
* @since 1.0.0
|
|
5380
5397
|
*/
|
|
5381
|
-
forwardActivity(forwarder: SenderKeyPair | SenderKeyPair[] | {
|
|
5398
|
+
forwardActivity(forwarder: SenderKeyPair<CryptoKeyLike> | SenderKeyPair<CryptoKeyLike>[] | {
|
|
5382
5399
|
identifier: string;
|
|
5383
5400
|
} | {
|
|
5384
5401
|
username: string;
|
|
@@ -5436,7 +5453,7 @@ interface OutboxContext<TContextData> extends Context<TContextData> {
|
|
|
5436
5453
|
* @param options Options for forwarding the activity.
|
|
5437
5454
|
* @since 2.2.0
|
|
5438
5455
|
*/
|
|
5439
|
-
forwardActivity(forwarder: SenderKeyPair | SenderKeyPair[] | {
|
|
5456
|
+
forwardActivity(forwarder: SenderKeyPair<CryptoKeyLike> | SenderKeyPair<CryptoKeyLike>[] | {
|
|
5440
5457
|
identifier: string;
|
|
5441
5458
|
} | {
|
|
5442
5459
|
username: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-
|
|
3
|
-
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, h as InboxVerificationAttempt, w as VerifyRequestFailureReason, y as HttpMessageSignaturesSpec } from "./key-
|
|
4
|
-
import { m as GetKeyOwnerOptions, n as EffectiveContextLoaderPolicy } from "./ld-
|
|
2
|
+
import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-DLHsPY7X.js";
|
|
3
|
+
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, h as InboxVerificationAttempt, w as VerifyRequestFailureReason, y as HttpMessageSignaturesSpec } from "./key-BV9DK4qb.js";
|
|
4
|
+
import { m as GetKeyOwnerOptions, n as EffectiveContextLoaderPolicy } from "./ld-BewN9CW6.js";
|
|
5
5
|
import { n as KvKey, r as KvStore } from "./kv-B0eIwj06.js";
|
|
6
|
-
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions, PortableObjectVerifier, RemoteDocument } from "@fedify/vocab-runtime";
|
|
6
|
+
import { AuthenticatedDocumentLoaderFactory, CryptoKeyLike, CryptoKeyPairLike, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions, PortableObjectVerifier, RemoteDocument } from "@fedify/vocab-runtime";
|
|
7
7
|
import { Router } from "@fedify/uri-template";
|
|
8
8
|
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, Tombstone, TraverseCollectionOptions } from "@fedify/vocab";
|
|
9
9
|
import { MeterProvider, Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
@@ -1165,13 +1165,18 @@ interface InboxMessage {
|
|
|
1165
1165
|
//#region src/federation/send.d.ts
|
|
1166
1166
|
/**
|
|
1167
1167
|
* A key pair for an actor who sends an activity.
|
|
1168
|
+
*
|
|
1169
|
+
* The private key type is parameterized so that Fedify can accept keys from
|
|
1170
|
+
* `node:crypto` at its input boundaries while `SenderKeyPair` still exposes the
|
|
1171
|
+
* ambient `CryptoKey` type by default.
|
|
1172
|
+
* @template TKey The type of the private key.
|
|
1168
1173
|
* @since 0.10.0
|
|
1169
1174
|
*/
|
|
1170
|
-
interface SenderKeyPair {
|
|
1175
|
+
interface SenderKeyPair<TKey extends CryptoKeyLike = CryptoKey> {
|
|
1171
1176
|
/**
|
|
1172
1177
|
* The actor's private key to sign the request.
|
|
1173
1178
|
*/
|
|
1174
|
-
readonly privateKey:
|
|
1179
|
+
readonly privateKey: TKey;
|
|
1175
1180
|
/**
|
|
1176
1181
|
* The public key ID that corresponds to the private key.
|
|
1177
1182
|
*/
|
|
@@ -1243,13 +1248,19 @@ type ActorDispatcher<TContextData> = (context: RequestContext<TContextData>, ide
|
|
|
1243
1248
|
/**
|
|
1244
1249
|
* A callback that dispatches key pairs for an actor.
|
|
1245
1250
|
*
|
|
1251
|
+
* The returned key pairs may come from any supported runtime, including keys
|
|
1252
|
+
* obtained from `node:crypto`'s Web Crypto API, so the key pair type is
|
|
1253
|
+
* parameterized. It defaults to the ambient `CryptoKeyPair` type for
|
|
1254
|
+
* compatibility with code that calls a dispatcher directly.
|
|
1255
|
+
*
|
|
1246
1256
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
1257
|
+
* @template TKeyPair The type of the key pairs the dispatcher returns.
|
|
1247
1258
|
* @param context The context.
|
|
1248
1259
|
* @param identifier The actor's internal identifier or username.
|
|
1249
1260
|
* @returns The key pairs.
|
|
1250
1261
|
* @since 0.10.0
|
|
1251
1262
|
*/
|
|
1252
|
-
type ActorKeyPairsDispatcher<TContextData> = (context: Context<TContextData>, identifier: string) =>
|
|
1263
|
+
type ActorKeyPairsDispatcher<TContextData, TKeyPair extends CryptoKeyPairLike = CryptoKeyPair> = (context: Context<TContextData>, identifier: string) => TKeyPair[] | Promise<TKeyPair[]>;
|
|
1253
1264
|
/**
|
|
1254
1265
|
* A callback that maps a WebFinger username to the corresponding actor's
|
|
1255
1266
|
* internal identifier, or `null` if the username is not found.
|
|
@@ -1504,11 +1515,11 @@ type OutboxListenerErrorHandler<TContextData> = (context: OutboxContext<TContext
|
|
|
1504
1515
|
* not authorized.
|
|
1505
1516
|
* @since 0.11.0
|
|
1506
1517
|
*/
|
|
1507
|
-
type SharedInboxKeyDispatcher<TContextData> = (context: Context<TContextData>) => SenderKeyPair | {
|
|
1518
|
+
type SharedInboxKeyDispatcher<TContextData, TKeyPair extends CryptoKeyLike = CryptoKey> = (context: Context<TContextData>) => SenderKeyPair<TKeyPair> | {
|
|
1508
1519
|
identifier: string;
|
|
1509
1520
|
} | {
|
|
1510
1521
|
username: string;
|
|
1511
|
-
} | null | Promise<SenderKeyPair | {
|
|
1522
|
+
} | null | Promise<SenderKeyPair<TKeyPair> | {
|
|
1512
1523
|
identifier: string;
|
|
1513
1524
|
} | {
|
|
1514
1525
|
username: string;
|
|
@@ -3271,6 +3282,12 @@ interface FederationOptions<TContextData> {
|
|
|
3271
3282
|
*
|
|
3272
3283
|
* By default, the queue starts automatically.
|
|
3273
3284
|
*
|
|
3285
|
+
* Automatic startup is best-effort: if a queue cannot start listening,
|
|
3286
|
+
* a warning is logged once per federation instance and the failed worker is
|
|
3287
|
+
* not retried, while an explicit {@link Federation.startQueue} call rejects.
|
|
3288
|
+
* Runtimes that consume the queue elsewhere, such as Cloudflare Workers with
|
|
3289
|
+
* {@link Federation.processQueuedTask}, should set this to `true`.
|
|
3290
|
+
*
|
|
3274
3291
|
* @since 0.12.0
|
|
3275
3292
|
*/
|
|
3276
3293
|
manuallyStartQueue?: boolean;
|
|
@@ -3571,7 +3588,7 @@ interface ActorCallbackSetters<TContextData> {
|
|
|
3571
3588
|
* @returns The setters object so that settings can be chained.
|
|
3572
3589
|
* @since 0.10.0
|
|
3573
3590
|
*/
|
|
3574
|
-
setKeyPairsDispatcher(dispatcher: ActorKeyPairsDispatcher<TContextData>): ActorCallbackSetters<TContextData>;
|
|
3591
|
+
setKeyPairsDispatcher(dispatcher: ActorKeyPairsDispatcher<TContextData, CryptoKeyPairLike>): ActorCallbackSetters<TContextData>;
|
|
3575
3592
|
/**
|
|
3576
3593
|
* Sets the callback function that maps a WebFinger username to
|
|
3577
3594
|
* the corresponding actor's identifier. If it's omitted, the identifier
|
|
@@ -3847,7 +3864,7 @@ interface InboxListenerSetters<TContextData> {
|
|
|
3847
3864
|
* @returns The setters object so that settings can be chained.
|
|
3848
3865
|
* @since 0.11.0
|
|
3849
3866
|
*/
|
|
3850
|
-
setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData>): InboxListenerSetters<TContextData>;
|
|
3867
|
+
setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData, CryptoKeyLike>): InboxListenerSetters<TContextData>;
|
|
3851
3868
|
/**
|
|
3852
3869
|
* Configures the strategy for handling activity idempotency in inbox processing.
|
|
3853
3870
|
*
|
|
@@ -4524,7 +4541,7 @@ interface Context<TContextData> {
|
|
|
4524
4541
|
*/
|
|
4525
4542
|
getDocumentLoader(identity: {
|
|
4526
4543
|
keyId: URL;
|
|
4527
|
-
privateKey:
|
|
4544
|
+
privateKey: CryptoKeyLike;
|
|
4528
4545
|
}): DocumentLoader;
|
|
4529
4546
|
/**
|
|
4530
4547
|
* Looks up an ActivityStreams object by its URI (including `acct:` URIs)
|
|
@@ -4650,7 +4667,7 @@ interface Context<TContextData> {
|
|
|
4650
4667
|
* @param activity The activity to send.
|
|
4651
4668
|
* @param options Options for sending the activity.
|
|
4652
4669
|
*/
|
|
4653
|
-
sendActivity(sender: SenderKeyPair | SenderKeyPair[] | {
|
|
4670
|
+
sendActivity(sender: SenderKeyPair<CryptoKeyLike> | SenderKeyPair<CryptoKeyLike>[] | {
|
|
4654
4671
|
identifier: string;
|
|
4655
4672
|
} | {
|
|
4656
4673
|
username: string;
|
|
@@ -5380,7 +5397,7 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
5380
5397
|
* @param options Options for forwarding the activity.
|
|
5381
5398
|
* @since 1.0.0
|
|
5382
5399
|
*/
|
|
5383
|
-
forwardActivity(forwarder: SenderKeyPair | SenderKeyPair[] | {
|
|
5400
|
+
forwardActivity(forwarder: SenderKeyPair<CryptoKeyLike> | SenderKeyPair<CryptoKeyLike>[] | {
|
|
5384
5401
|
identifier: string;
|
|
5385
5402
|
} | {
|
|
5386
5403
|
username: string;
|
|
@@ -5438,7 +5455,7 @@ interface OutboxContext<TContextData> extends Context<TContextData> {
|
|
|
5438
5455
|
* @param options Options for forwarding the activity.
|
|
5439
5456
|
* @since 2.2.0
|
|
5440
5457
|
*/
|
|
5441
|
-
forwardActivity(forwarder: SenderKeyPair | SenderKeyPair[] | {
|
|
5458
|
+
forwardActivity(forwarder: SenderKeyPair<CryptoKeyLike> | SenderKeyPair<CryptoKeyLike>[] | {
|
|
5442
5459
|
identifier: string;
|
|
5443
5460
|
} | {
|
|
5444
5461
|
username: string;
|
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-Auvn2nQS.cjs");
|
|
4
4
|
exports.CircuitBreaker = require_federation.CircuitBreaker;
|
|
5
5
|
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
|
6
6
|
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, m as InboxSignatureIdentity, p as InboxSignatureFailureReason } from "../key-
|
|
3
|
-
import { $ as respondWithObjectIfAcceptable, $t as IsActorAuthenticatedOptions, A as InboxChallengePolicy, An as OutboundResponseBodyEvent, At as HashlinkMediaDispatcher, B as createFederation, Bt as OutboxListenerErrorHandler, C as FederationBenchmarkOptions, Cn as OutboundInboxRequest, Ct as AuthorizePredicate, D as FederationStartQueueOptions, Dn as OutboundPreparationResult, Dt as CustomCollectionCounter, E as FederationOptions, En as OutboundObservers, Et as CollectionDispatcher, F as PortableInboxForwardingOptions, Fn as OutboundWorkerPreparationDiagnostic, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as Rfc6570Expression, In as OutboundWorkerReport, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationKvPrefixes, Ln as OutboundWorkerSchedule, Lt as ObjectDispatcher, M as MediaUploaderSetters, Mn as OutboundSourceMetadata, Mt as InboxErrorHandler, N as ObjectCallbackSetters, Nn as OutboundWorkerAction, Nt as InboxListener, O as IdempotencyKeyCallback, On as OutboundProvenance, Ot as CustomCollectionCursor, P as OutboxListenerSetters, Pn as OutboundWorkerChild, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as InboxPrincipal, R as FederationOrigin, Rt as OutboxErrorHandler, S as Federation, Sn as OutboundHttpResponseMetadata, St as ActorKeyPairsDispatcher, T as FederationFetchOptions, Tn as OutboundLocalContext, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as Message, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as InboxAuthenticationEvidence, _ as ActorCallbackSetters, _n as OutboundBroadcastEvent, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, an as InboxAuthentication, at as MessageQueueListenOptions, b as CustomCollectionCallbackSetters, bn as OutboundHeaderSnapshot, bt as ActorDispatcher, c as IsSignedByAudienceOptions, cn as InboxRequestFinishedHandler, ct as CircuitBreakerActivityDrop, d as ParseUriResult, dn as InboxListenerOptions, dt as CircuitBreakerFailurePolicy, en as isActorAuthenticated, et as InProcessMessageQueue, f as PortableRequest, fn as OutboundActivityReference, ft as CircuitBreakerKvState, g as SendActivityOptionsForCollection, gn as OutboundBodyCaptureSummary, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptions, hn as OutboundAttemptResponse, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as InboxListenerSetters, jn as OutboundSenderPayload, jt as HashlinkMediaRequest, k as IdempotencyStrategy, kn as OutboundResponseBodyCapture, kt as CustomCollectionDispatcher, l as OutboxContext, ln as InboxRequestOutcome, lt as CircuitBreakerBeforeSendDecision, m as RouteActivityOptions, mn as OutboundAttemptReport, mt as CircuitBreakerState, n as Context, nn as buildCollectionSynchronizationHeader, nt as MessageQueue, o as GetSignedKeyOptions, on as InboxJsonValue, ot as ParallelMessageQueue, p as RequestContext, pn as OutboundAttemptFailure, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rn as digest, rt as MessageQueueDepth, s as InboxContext, sn as InboxRequestCancellation, st as CircuitBreaker, t as ActorKeyPair, tn as PageItems, tt as InProcessMessageQueueOptions, u as ParseUriOptions, un as InboxRequestReport, ut as CircuitBreakerCreateOptions, v as CollectionCallbackSetters, vn as OutboundDeliveryEvent, vt as parseCircuitBreakerKvState, w as FederationBuilder, wn as OutboundJsonValue, wt as CollectionCounter, x as Federatable, xn as OutboundHttpExchangeReport, xt as ActorHandleMapper, y as ConstructorWithTypeId, yn as OutboundHeaderPolicy, yt as ActorAliasMapper, z as FederationQueueOptions, zt as OutboxListener } from "../context-
|
|
2
|
+
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, m as InboxSignatureIdentity, p as InboxSignatureFailureReason } from "../key-2YNB5dUS.cjs";
|
|
3
|
+
import { $ as respondWithObjectIfAcceptable, $t as IsActorAuthenticatedOptions, A as InboxChallengePolicy, An as OutboundResponseBodyEvent, At as HashlinkMediaDispatcher, B as createFederation, Bt as OutboxListenerErrorHandler, C as FederationBenchmarkOptions, Cn as OutboundInboxRequest, Ct as AuthorizePredicate, D as FederationStartQueueOptions, Dn as OutboundPreparationResult, Dt as CustomCollectionCounter, E as FederationOptions, En as OutboundObservers, Et as CollectionDispatcher, F as PortableInboxForwardingOptions, Fn as OutboundWorkerPreparationDiagnostic, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as Rfc6570Expression, In as OutboundWorkerReport, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationKvPrefixes, Ln as OutboundWorkerSchedule, Lt as ObjectDispatcher, M as MediaUploaderSetters, Mn as OutboundSourceMetadata, Mt as InboxErrorHandler, N as ObjectCallbackSetters, Nn as OutboundWorkerAction, Nt as InboxListener, O as IdempotencyKeyCallback, On as OutboundProvenance, Ot as CustomCollectionCursor, P as OutboxListenerSetters, Pn as OutboundWorkerChild, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as InboxPrincipal, R as FederationOrigin, Rt as OutboxErrorHandler, S as Federation, Sn as OutboundHttpResponseMetadata, St as ActorKeyPairsDispatcher, T as FederationFetchOptions, Tn as OutboundLocalContext, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as Message, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as InboxAuthenticationEvidence, _ as ActorCallbackSetters, _n as OutboundBroadcastEvent, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, an as InboxAuthentication, at as MessageQueueListenOptions, b as CustomCollectionCallbackSetters, bn as OutboundHeaderSnapshot, bt as ActorDispatcher, c as IsSignedByAudienceOptions, cn as InboxRequestFinishedHandler, ct as CircuitBreakerActivityDrop, d as ParseUriResult, dn as InboxListenerOptions, dt as CircuitBreakerFailurePolicy, en as isActorAuthenticated, et as InProcessMessageQueue, f as PortableRequest, fn as OutboundActivityReference, ft as CircuitBreakerKvState, g as SendActivityOptionsForCollection, gn as OutboundBodyCaptureSummary, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptions, hn as OutboundAttemptResponse, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as InboxListenerSetters, jn as OutboundSenderPayload, jt as HashlinkMediaRequest, k as IdempotencyStrategy, kn as OutboundResponseBodyCapture, kt as CustomCollectionDispatcher, l as OutboxContext, ln as InboxRequestOutcome, lt as CircuitBreakerBeforeSendDecision, m as RouteActivityOptions, mn as OutboundAttemptReport, mt as CircuitBreakerState, n as Context, nn as buildCollectionSynchronizationHeader, nt as MessageQueue, o as GetSignedKeyOptions, on as InboxJsonValue, ot as ParallelMessageQueue, p as RequestContext, pn as OutboundAttemptFailure, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rn as digest, rt as MessageQueueDepth, s as InboxContext, sn as InboxRequestCancellation, st as CircuitBreaker, t as ActorKeyPair, tn as PageItems, tt as InProcessMessageQueueOptions, u as ParseUriOptions, un as InboxRequestReport, ut as CircuitBreakerCreateOptions, v as CollectionCallbackSetters, vn as OutboundDeliveryEvent, vt as parseCircuitBreakerKvState, w as FederationBuilder, wn as OutboundJsonValue, wt as CollectionCounter, x as Federatable, xn as OutboundHttpExchangeReport, xt as ActorHandleMapper, y as ConstructorWithTypeId, yn as OutboundHeaderPolicy, yt as ActorAliasMapper, z as FederationQueueOptions, zt as OutboxListener } from "../context-BhEcRbHo.cjs";
|
|
4
4
|
import { a as KvStoreListEntry, c as MemoryKvStore, i as KvStoreCasEntry, l as isAtomicKvStore, n as KvKey, o as KvStoreSetEntry, r as KvStore, s as KvStoreSetOptions, t as AtomicKvStore } from "../kv-B0eIwj06.cjs";
|
|
5
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-
|
|
5
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-CUXI3ede.cjs";
|
|
6
6
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AtomicKvStore, 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, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxAuthentication, InboxAuthenticationEvidence, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxJsonValue, InboxListener, InboxListenerOptions, InboxListenerSetters, InboxPrincipal, InboxProofPolicyFailureReason, InboxRequestCancellation, InboxRequestFinishedHandler, InboxRequestOutcome, InboxRequestReport, InboxSignatureCheck, InboxSignatureFailureReason, InboxSignatureIdentity, InboxVerificationAttempt, InboxVerificationFailureReason, InboxVerificationKey, IsActorAuthenticatedOptions, IsSignedByAudienceOptions, KvKey, KvStore, KvStoreCasEntry, KvStoreListEntry, KvStoreSetEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundActivityReference, OutboundAttemptFailure, OutboundAttemptReport, OutboundAttemptResponse, OutboundBodyCaptureSummary, OutboundBroadcastEvent, OutboundDeliveryEvent, OutboundHeaderPolicy, OutboundHeaderSnapshot, OutboundHttpExchangeReport, OutboundHttpResponseMetadata, OutboundInboxRequest, OutboundJsonValue, OutboundLocalContext, OutboundObservers, OutboundPreparationResult, OutboundProvenance, OutboundResponseBodyCapture, OutboundResponseBodyEvent, OutboundSenderPayload, OutboundSourceMetadata, OutboundWorkerAction, OutboundWorkerChild, OutboundWorkerPreparationDiagnostic, OutboundWorkerReport, OutboundWorkerSchedule, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, 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, isActorAuthenticated, isAtomicKvStore, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, m as InboxSignatureIdentity, p as InboxSignatureFailureReason } from "../key-
|
|
3
|
-
import { $ as respondWithObjectIfAcceptable, $t as IsActorAuthenticatedOptions, A as InboxChallengePolicy, An as OutboundResponseBodyEvent, At as HashlinkMediaDispatcher, B as createFederation, Bt as OutboxListenerErrorHandler, C as FederationBenchmarkOptions, Cn as OutboundInboxRequest, Ct as AuthorizePredicate, D as FederationStartQueueOptions, Dn as OutboundPreparationResult, Dt as CustomCollectionCounter, E as FederationOptions, En as OutboundObservers, Et as CollectionDispatcher, F as PortableInboxForwardingOptions, Fn as OutboundWorkerPreparationDiagnostic, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as Rfc6570Expression, In as OutboundWorkerReport, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationKvPrefixes, Ln as OutboundWorkerSchedule, Lt as ObjectDispatcher, M as MediaUploaderSetters, Mn as OutboundSourceMetadata, Mt as InboxErrorHandler, N as ObjectCallbackSetters, Nn as OutboundWorkerAction, Nt as InboxListener, O as IdempotencyKeyCallback, On as OutboundProvenance, Ot as CustomCollectionCursor, P as OutboxListenerSetters, Pn as OutboundWorkerChild, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as InboxPrincipal, R as FederationOrigin, Rt as OutboxErrorHandler, S as Federation, Sn as OutboundHttpResponseMetadata, St as ActorKeyPairsDispatcher, T as FederationFetchOptions, Tn as OutboundLocalContext, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as Message, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as InboxAuthenticationEvidence, _ as ActorCallbackSetters, _n as OutboundBroadcastEvent, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, an as InboxAuthentication, at as MessageQueueListenOptions, b as CustomCollectionCallbackSetters, bn as OutboundHeaderSnapshot, bt as ActorDispatcher, c as IsSignedByAudienceOptions, cn as InboxRequestFinishedHandler, ct as CircuitBreakerActivityDrop, d as ParseUriResult, dn as InboxListenerOptions, dt as CircuitBreakerFailurePolicy, en as isActorAuthenticated, et as InProcessMessageQueue, f as PortableRequest, fn as OutboundActivityReference, ft as CircuitBreakerKvState, g as SendActivityOptionsForCollection, gn as OutboundBodyCaptureSummary, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptions, hn as OutboundAttemptResponse, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as InboxListenerSetters, jn as OutboundSenderPayload, jt as HashlinkMediaRequest, k as IdempotencyStrategy, kn as OutboundResponseBodyCapture, kt as CustomCollectionDispatcher, l as OutboxContext, ln as InboxRequestOutcome, lt as CircuitBreakerBeforeSendDecision, m as RouteActivityOptions, mn as OutboundAttemptReport, mt as CircuitBreakerState, n as Context, nn as buildCollectionSynchronizationHeader, nt as MessageQueue, o as GetSignedKeyOptions, on as InboxJsonValue, ot as ParallelMessageQueue, p as RequestContext, pn as OutboundAttemptFailure, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rn as digest, rt as MessageQueueDepth, s as InboxContext, sn as InboxRequestCancellation, st as CircuitBreaker, t as ActorKeyPair, tn as PageItems, tt as InProcessMessageQueueOptions, u as ParseUriOptions, un as InboxRequestReport, ut as CircuitBreakerCreateOptions, v as CollectionCallbackSetters, vn as OutboundDeliveryEvent, vt as parseCircuitBreakerKvState, w as FederationBuilder, wn as OutboundJsonValue, wt as CollectionCounter, x as Federatable, xn as OutboundHttpExchangeReport, xt as ActorHandleMapper, y as ConstructorWithTypeId, yn as OutboundHeaderPolicy, yt as ActorAliasMapper, z as FederationQueueOptions, zt as OutboxListener } from "../context-
|
|
2
|
+
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, m as InboxSignatureIdentity, p as InboxSignatureFailureReason } from "../key-BV9DK4qb.js";
|
|
3
|
+
import { $ as respondWithObjectIfAcceptable, $t as IsActorAuthenticatedOptions, A as InboxChallengePolicy, An as OutboundResponseBodyEvent, At as HashlinkMediaDispatcher, B as createFederation, Bt as OutboxListenerErrorHandler, C as FederationBenchmarkOptions, Cn as OutboundInboxRequest, Ct as AuthorizePredicate, D as FederationStartQueueOptions, Dn as OutboundPreparationResult, Dt as CustomCollectionCounter, E as FederationOptions, En as OutboundObservers, Et as CollectionDispatcher, F as PortableInboxForwardingOptions, Fn as OutboundWorkerPreparationDiagnostic, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as Rfc6570Expression, In as OutboundWorkerReport, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationKvPrefixes, Ln as OutboundWorkerSchedule, Lt as ObjectDispatcher, M as MediaUploaderSetters, Mn as OutboundSourceMetadata, Mt as InboxErrorHandler, N as ObjectCallbackSetters, Nn as OutboundWorkerAction, Nt as InboxListener, O as IdempotencyKeyCallback, On as OutboundProvenance, Ot as CustomCollectionCursor, P as OutboxListenerSetters, Pn as OutboundWorkerChild, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as InboxPrincipal, R as FederationOrigin, Rt as OutboxErrorHandler, S as Federation, Sn as OutboundHttpResponseMetadata, St as ActorKeyPairsDispatcher, T as FederationFetchOptions, Tn as OutboundLocalContext, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as Message, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as InboxAuthenticationEvidence, _ as ActorCallbackSetters, _n as OutboundBroadcastEvent, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, an as InboxAuthentication, at as MessageQueueListenOptions, b as CustomCollectionCallbackSetters, bn as OutboundHeaderSnapshot, bt as ActorDispatcher, c as IsSignedByAudienceOptions, cn as InboxRequestFinishedHandler, ct as CircuitBreakerActivityDrop, d as ParseUriResult, dn as InboxListenerOptions, dt as CircuitBreakerFailurePolicy, en as isActorAuthenticated, et as InProcessMessageQueue, f as PortableRequest, fn as OutboundActivityReference, ft as CircuitBreakerKvState, g as SendActivityOptionsForCollection, gn as OutboundBodyCaptureSummary, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptions, hn as OutboundAttemptResponse, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as InboxListenerSetters, jn as OutboundSenderPayload, jt as HashlinkMediaRequest, k as IdempotencyStrategy, kn as OutboundResponseBodyCapture, kt as CustomCollectionDispatcher, l as OutboxContext, ln as InboxRequestOutcome, lt as CircuitBreakerBeforeSendDecision, m as RouteActivityOptions, mn as OutboundAttemptReport, mt as CircuitBreakerState, n as Context, nn as buildCollectionSynchronizationHeader, nt as MessageQueue, o as GetSignedKeyOptions, on as InboxJsonValue, ot as ParallelMessageQueue, p as RequestContext, pn as OutboundAttemptFailure, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rn as digest, rt as MessageQueueDepth, s as InboxContext, sn as InboxRequestCancellation, st as CircuitBreaker, t as ActorKeyPair, tn as PageItems, tt as InProcessMessageQueueOptions, u as ParseUriOptions, un as InboxRequestReport, ut as CircuitBreakerCreateOptions, v as CollectionCallbackSetters, vn as OutboundDeliveryEvent, vt as parseCircuitBreakerKvState, w as FederationBuilder, wn as OutboundJsonValue, wt as CollectionCounter, x as Federatable, xn as OutboundHttpExchangeReport, xt as ActorHandleMapper, y as ConstructorWithTypeId, yn as OutboundHeaderPolicy, yt as ActorAliasMapper, z as FederationQueueOptions, zt as OutboxListener } from "../context-C96-nSuT.js";
|
|
4
4
|
import { a as KvStoreListEntry, c as MemoryKvStore, i as KvStoreCasEntry, l as isAtomicKvStore, n as KvKey, o as KvStoreSetEntry, r as KvStore, s as KvStoreSetOptions, t as AtomicKvStore } from "../kv-B0eIwj06.js";
|
|
5
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-
|
|
5
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-BMHC9eZs.js";
|
|
6
6
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AtomicKvStore, 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, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxAuthentication, InboxAuthenticationEvidence, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxJsonValue, InboxListener, InboxListenerOptions, InboxListenerSetters, InboxPrincipal, InboxProofPolicyFailureReason, InboxRequestCancellation, InboxRequestFinishedHandler, InboxRequestOutcome, InboxRequestReport, InboxSignatureCheck, InboxSignatureFailureReason, InboxSignatureIdentity, InboxVerificationAttempt, InboxVerificationFailureReason, InboxVerificationKey, IsActorAuthenticatedOptions, IsSignedByAudienceOptions, KvKey, KvStore, KvStoreCasEntry, KvStoreListEntry, KvStoreSetEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundActivityReference, OutboundAttemptFailure, OutboundAttemptReport, OutboundAttemptResponse, OutboundBodyCaptureSummary, OutboundBroadcastEvent, OutboundDeliveryEvent, OutboundHeaderPolicy, OutboundHeaderSnapshot, OutboundHttpExchangeReport, OutboundHttpResponseMetadata, OutboundInboxRequest, OutboundJsonValue, OutboundLocalContext, OutboundObservers, OutboundPreparationResult, OutboundProvenance, OutboundResponseBodyCapture, OutboundResponseBodyEvent, OutboundSenderPayload, OutboundSourceMetadata, OutboundWorkerAction, OutboundWorkerChild, OutboundWorkerPreparationDiagnostic, OutboundWorkerReport, OutboundWorkerSchedule, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, 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, isActorAuthenticated, isAtomicKvStore, 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 respondWithObjectIfAcceptable, c as buildCollectionSynchronizationHeader, d as normalizeCircuitBreakerOptions, f as parseCircuitBreakerKvState, i as respondWithObject, l as digest, n as handleWebFinger, o as SendActivityError, p as createFederationBuilder, r as createExponentialBackoffPolicy, s as isActorAuthenticated, t as createFederation, u as CircuitBreaker } from "../middleware-
|
|
3
|
+
import { a as respondWithObjectIfAcceptable, c as buildCollectionSynchronizationHeader, d as normalizeCircuitBreakerOptions, f as parseCircuitBreakerKvState, i as respondWithObject, l as digest, n as handleWebFinger, o as SendActivityError, p as createFederationBuilder, r as createExponentialBackoffPolicy, s as isActorAuthenticated, t as createFederation, u as CircuitBreaker } from "../middleware-kGZB_Ab7.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";
|