@fedify/fedify 2.4.0-dev.2093 → 2.4.0-dev.2103
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-Ld4Y9ymR.mjs → builder-CHht75pX.mjs} +2 -2
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-CTx_lewQ.mjs → compound-proof-DKKH_Nr1.mjs} +2 -2
- package/dist/{context-BSywYspi.d.ts → context-CfJE_oQu.d.ts} +78 -13
- package/dist/{context-DlZhxdFT.mjs → context-CoNRxGYp.mjs} +2 -1
- package/dist/{context-CZjZYXFC.d.cts → context-mDTxTw-S.d.cts} +78 -13
- package/dist/{deno-8t8k_6Yv.mjs → deno-CkjiYK_Z.mjs} +1 -1
- package/dist/{docloader-DJKcsAiF.mjs → docloader-C1hAJnWc.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +4 -4
- package/dist/federation/handler.test.mjs +6 -6
- 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 +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +5 -5
- package/dist/federation/portable-actor.test.d.mts +2 -0
- package/dist/federation/portable-actor.test.mjs +446 -0
- package/dist/federation/portable-gateway-keys.test.mjs +4 -4
- package/dist/federation/portable-inbox.test.mjs +396 -10
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +2 -2
- package/dist/federation/tasks/tasks.test.mjs +3 -3
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +2 -2
- package/dist/{federation-aSHO04ob.cjs → federation-C1dL6SiT.cjs} +1267 -1086
- package/dist/{http-B2ftY0Ha.mjs → http-BU-8fUrz.mjs} +82 -7
- package/dist/{http-DSaSAN7X.cjs → http-Cala2Grs.cjs} +89 -2
- package/dist/{http-DyT7DP1Y.js → http-tTlTeFa0.js} +78 -3
- package/dist/{key-Dwm4VswT.mjs → key-I8gLBkcf.mjs} +2 -2
- package/dist/{kv-cache-BSJAlP4C.cjs → kv-cache-Bl5EBFrU.cjs} +1 -1
- package/dist/{kv-cache-DmroAz3M.js → kv-cache-CxQu_cd4.js} +1 -1
- package/dist/{kv-cache-D0yYukqk.mjs → kv-cache-DJFoGRWQ.mjs} +1 -1
- package/dist/{ld-BYZOoDzZ.mjs → ld-wiJbqJHa.mjs} +3 -3
- package/dist/{metrics-B7YwKTFr.mjs → metrics-BCAa5-kE.mjs} +1 -1
- package/dist/{middleware-BNeqKSsL.mjs → middleware-6p2dYEVA.mjs} +1 -1
- package/dist/{middleware-Blq0882d.js → middleware-B6IVTVL0.js} +1362 -1181
- package/dist/{middleware-E_0IH72m.mjs → middleware-FnITXhtz.mjs} +549 -368
- package/dist/{mod-JzkaEXsi.d.cts → mod-B3OzOobN.d.cts} +1 -1
- package/dist/{mod-B2h2KY0q.d.ts → mod-BYvPz_T0.d.ts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/handler.test.mjs +2 -2
- package/dist/{owner-Cgx2Dc7I.mjs → owner-BJp47LxN.mjs} +3 -3
- package/dist/{owner-szIZl4qI.cjs → owner-DCt8W_Cv.cjs} +1 -1
- package/dist/{owner-DAGSC5gX.js → owner-j5yrbXS1.js} +1 -1
- package/dist/{portable-key-Cn1WJSN1.mjs → portable-key-B5oKE_wZ.mjs} +1 -1
- package/dist/{proof-DVXC6nYz.mjs → proof-BE4T5zF6.mjs} +4 -4
- package/dist/{send-D-hOvYKy.mjs → send-BFITuKHw.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 +2 -2
- package/dist/sig/http.test.mjs +72 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +3 -3
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +2 -2
- package/dist/sig/portable-key.test.mjs +3 -3
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/{sig-B5Ell7pO.js → sig-CJHdGk9w.js} +2 -2
- package/dist/{sig-CXOKN4Br.cjs → sig-CRTRoouH.cjs} +2 -2
- package/dist/{temporal-CqpKGEPk.mjs → temporal-CyDDbE4i.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +78 -13
- package/dist/testing/mod.mjs +2 -2
- package/dist/{testing-CO_cEvQc.mjs → testing-BWq1dCzx.mjs} +1 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +7 -7
|
@@ -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-CkjiYK_Z.mjs";
|
|
5
5
|
import { s as isPortableId } from "./portable-key-id-Bva5iT3W.mjs";
|
|
6
6
|
import { t as ActivityListenerSet } from "./activity-listener-C-BSbKI7.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -89,7 +89,7 @@ var FederationBuilderImpl = class {
|
|
|
89
89
|
* specified.
|
|
90
90
|
*/
|
|
91
91
|
async build(options) {
|
|
92
|
-
const { FederationImpl } = await import("./middleware-
|
|
92
|
+
const { FederationImpl } = await import("./middleware-6p2dYEVA.mjs");
|
|
93
93
|
const f = new FederationImpl(options);
|
|
94
94
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
95
95
|
f.router = this.router.clone();
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Xt as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { Xt as ActivityTransformer, n as Context } from "../context-mDTxTw-S.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 { Xt as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { Xt as ActivityTransformer, n as Context } from "../context-CfJE_oQu.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 {
|
|
8
|
+
import { E as autoIdAssigner, T as actorDehydrator, n as FederationImpl } from "../middleware-FnITXhtz.mjs";
|
|
9
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { s as isPortableId, t as getCanonicalPortableId } from "./portable-key-id-Bva5iT3W.mjs";
|
|
5
5
|
import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
|
|
6
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
7
|
-
import { a as verifyMapLocalProof, c as verifyPortableObjectProofPolicy } from "./proof-
|
|
6
|
+
import { c as getNormalizationContextLoader } from "./ld-wiJbqJHa.mjs";
|
|
7
|
+
import { a as verifyMapLocalProof, c as verifyPortableObjectProofPolicy } from "./proof-BE4T5zF6.mjs";
|
|
8
8
|
import { fromCompatibleEf61Id, parseIri } from "@fedify/vocab-runtime";
|
|
9
9
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
10
10
|
//#region src/sig/compound-proof.ts
|
|
@@ -2068,8 +2068,11 @@ interface PortableInboxForwardingOptions {
|
|
|
2068
2068
|
/**
|
|
2069
2069
|
* How long a delivery waits for forwarding requests made immediately, i.e.,
|
|
2070
2070
|
* when no outbox queue is configured, before Fedify responds to it.
|
|
2071
|
-
* Requests still running afterwards continue in the background. It
|
|
2072
|
-
*
|
|
2071
|
+
* Requests still running afterwards continue in the background. It also
|
|
2072
|
+
* bounds verifying the HTTP Signature that identifies the gateway which
|
|
2073
|
+
* forwarded the delivery, with or without an outbox queue; if the
|
|
2074
|
+
* verification does not finish in time, the activity is forwarded to that
|
|
2075
|
+
* gateway as well. It cannot have calendar units,
|
|
2073
2076
|
* i.e., weeks, months, or years, and cannot be longer than
|
|
2074
2077
|
* 2,147,483,647 milliseconds (about 24.8 days), the longest delay timers
|
|
2075
2078
|
* support.
|
|
@@ -2924,6 +2927,37 @@ interface Context<TContextData> {
|
|
|
2924
2927
|
*/
|
|
2925
2928
|
getActorUri(identifier: string): URL;
|
|
2926
2929
|
/**
|
|
2930
|
+
* Builds the [FEP-ef61] portable ID of an actor with the given identifier
|
|
2931
|
+
* under the given DID authority.
|
|
2932
|
+
*
|
|
2933
|
+
* The path is the same as the one {@link Context.getActorUri} builds, but
|
|
2934
|
+
* the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
2935
|
+
* `ap+ef61://did:key:z6Mk.../users/alice`. Such an actor can be served
|
|
2936
|
+
* through the FEP-ef61 gateway endpoint,
|
|
2937
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice`, by the same actor
|
|
2938
|
+
* dispatcher.
|
|
2939
|
+
*
|
|
2940
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
2941
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
2942
|
+
* from `@fedify/vocab-runtime` to get the canonical string, e.g.,
|
|
2943
|
+
* `ap+ef61://did:key:z6Mk.../users/alice`.
|
|
2944
|
+
*
|
|
2945
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
2946
|
+
*
|
|
2947
|
+
* @param identifier The actor's identifier.
|
|
2948
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
2949
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
2950
|
+
* a path, query, or fragment. A `did:key` DID must be
|
|
2951
|
+
* encoded in base58-btc, as FEP-ef61 requires; see
|
|
2952
|
+
* `exportDidKey()` from `@fedify/vocab-runtime`.
|
|
2953
|
+
* @returns The actor's portable ID.
|
|
2954
|
+
* @throws {RouterError} If no actor dispatcher is available.
|
|
2955
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
2956
|
+
* DID that is not encoded in base58-btc.
|
|
2957
|
+
* @since 2.4.0
|
|
2958
|
+
*/
|
|
2959
|
+
getPortableActorUri(identifier: string, authority: string): URL;
|
|
2960
|
+
/**
|
|
2927
2961
|
* Builds the URI of an object with the given class and values.
|
|
2928
2962
|
* @param cls The class of the object.
|
|
2929
2963
|
* @param values The values to pass to the object dispatcher.
|
|
@@ -2958,7 +2992,9 @@ interface Context<TContextData> {
|
|
|
2958
2992
|
* a path, query, or fragment.
|
|
2959
2993
|
* @returns The object's portable ID.
|
|
2960
2994
|
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
2961
|
-
* @throws {TypeError} If values are invalid or the authority is not a DID
|
|
2995
|
+
* @throws {TypeError} If values are invalid, or the authority is not a DID
|
|
2996
|
+
* or is a `did:key` DID that is not encoded in
|
|
2997
|
+
* base58-btc.
|
|
2962
2998
|
* @since 2.4.0
|
|
2963
2999
|
*/
|
|
2964
3000
|
getPortableObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, authority: string): URL;
|
|
@@ -2987,7 +3023,8 @@ interface Context<TContextData> {
|
|
|
2987
3023
|
* a path, query, or fragment.
|
|
2988
3024
|
* @returns The inbox's portable ID.
|
|
2989
3025
|
* @throws {RouterError} If no inbox path is registered.
|
|
2990
|
-
* @throws {TypeError} If the authority is not a DID
|
|
3026
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
3027
|
+
* DID that is not encoded in base58-btc.
|
|
2991
3028
|
* @since 2.4.0
|
|
2992
3029
|
*/
|
|
2993
3030
|
getPortableInboxUri(identifier: string, authority: string): URL;
|
|
@@ -3368,12 +3405,13 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3368
3405
|
/**
|
|
3369
3406
|
* Information about the [FEP-ef61] portable object requested through
|
|
3370
3407
|
* the gateway endpoint, e.g.,
|
|
3371
|
-
* `GET /.well-known/apgateway/did:key:z6Mk.../notes/123
|
|
3372
|
-
* `undefined` for
|
|
3408
|
+
* `GET /.well-known/apgateway/did:key:z6Mk.../notes/123`, which is served
|
|
3409
|
+
* by an object dispatcher or the actor dispatcher. It is `undefined` for
|
|
3410
|
+
* ordinary requests.
|
|
3373
3411
|
*
|
|
3374
3412
|
* The authority comes from the request path, so it is not evidence that
|
|
3375
|
-
* this server hosts objects for the DID. An object dispatcher
|
|
3376
|
-
* that by itself.
|
|
3413
|
+
* this server hosts objects for the DID. An object dispatcher or the actor
|
|
3414
|
+
* dispatcher has to check that by itself.
|
|
3377
3415
|
*
|
|
3378
3416
|
* It describes the incoming request, so it stays the same in contexts
|
|
3379
3417
|
* derived from this one, e.g., by {@link RequestContext.getObject}.
|
|
@@ -3383,6 +3421,31 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3383
3421
|
*/
|
|
3384
3422
|
readonly portableRequest?: PortableRequest;
|
|
3385
3423
|
/**
|
|
3424
|
+
* Builds the [FEP-ef61] portable ID of an actor with the given identifier.
|
|
3425
|
+
* It works the same as {@link Context.getPortableActorUri}, except that
|
|
3426
|
+
* the authority can be omitted while handling a portable gateway request.
|
|
3427
|
+
* In that case, the DID in {@link RequestContext.portableRequest} is used.
|
|
3428
|
+
*
|
|
3429
|
+
* The DID in the request comes from the request path, so the default is
|
|
3430
|
+
* only a convenience for building IDs; it is not evidence that this server
|
|
3431
|
+
* hosts the actor for the DID.
|
|
3432
|
+
*
|
|
3433
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3434
|
+
*
|
|
3435
|
+
* @param identifier The actor's identifier.
|
|
3436
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3437
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3438
|
+
* a path, query, or fragment. Defaults to the DID of
|
|
3439
|
+
* the requested portable object.
|
|
3440
|
+
* @returns The actor's portable ID.
|
|
3441
|
+
* @throws {RouterError} If no actor dispatcher is available.
|
|
3442
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3443
|
+
* that is not encoded in base58-btc, or the authority
|
|
3444
|
+
* is omitted outside a portable gateway request.
|
|
3445
|
+
* @since 2.4.0
|
|
3446
|
+
*/
|
|
3447
|
+
getPortableActorUri(identifier: string, authority?: string): URL;
|
|
3448
|
+
/**
|
|
3386
3449
|
* Builds the [FEP-ef61] portable ID of an object with the given class and
|
|
3387
3450
|
* values. It works the same as {@link Context.getPortableObjectUri}, except
|
|
3388
3451
|
* that the authority can be omitted while handling a portable gateway
|
|
@@ -3399,9 +3462,10 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3399
3462
|
* the requested portable object.
|
|
3400
3463
|
* @returns The object's portable ID.
|
|
3401
3464
|
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
3402
|
-
* @throws {TypeError} If values are invalid, the authority is not a DID,
|
|
3403
|
-
*
|
|
3404
|
-
*
|
|
3465
|
+
* @throws {TypeError} If values are invalid, the authority is not a DID,
|
|
3466
|
+
* it is a `did:key` DID that is not encoded in
|
|
3467
|
+
* base58-btc, or the authority is omitted outside
|
|
3468
|
+
* a portable gateway request.
|
|
3405
3469
|
* @since 2.4.0
|
|
3406
3470
|
*/
|
|
3407
3471
|
getPortableObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, authority?: string): URL;
|
|
@@ -3423,8 +3487,9 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3423
3487
|
* the requested portable object, if any.
|
|
3424
3488
|
* @returns The inbox's portable ID.
|
|
3425
3489
|
* @throws {RouterError} If no inbox path is registered.
|
|
3426
|
-
* @throws {TypeError} If the authority is not a DID,
|
|
3427
|
-
*
|
|
3490
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3491
|
+
* that is not encoded in base58-btc, or the authority
|
|
3492
|
+
* is omitted outside a portable gateway request.
|
|
3428
3493
|
* @since 2.4.0
|
|
3429
3494
|
*/
|
|
3430
3495
|
getPortableInboxUri(identifier: string, authority?: string): URL;
|
|
@@ -8,7 +8,7 @@ import { lookupWebFinger } from "@fedify/webfinger";
|
|
|
8
8
|
import { metrics, trace } from "@opentelemetry/api";
|
|
9
9
|
//#region src/testing/context.ts
|
|
10
10
|
function createContext(values) {
|
|
11
|
-
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getPortableObjectUri, getPortableInboxUri, getCollectionUri, getOutboxUri, getMediaUploaderUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity, enqueueTask, enqueueTaskMany } = values;
|
|
11
|
+
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getPortableActorUri, getObjectUri, getPortableObjectUri, getPortableInboxUri, getCollectionUri, getOutboxUri, getMediaUploaderUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity, enqueueTask, enqueueTaskMany } = values;
|
|
12
12
|
function throwRouterError() {
|
|
13
13
|
throw new RouterError("Not implemented");
|
|
14
14
|
}
|
|
@@ -29,6 +29,7 @@ function createContext(values) {
|
|
|
29
29
|
})),
|
|
30
30
|
getNodeInfoUri: getNodeInfoUri ?? throwRouterError,
|
|
31
31
|
getActorUri: getActorUri ?? throwRouterError,
|
|
32
|
+
getPortableActorUri: getPortableActorUri ?? throwRouterError,
|
|
32
33
|
getObjectUri: getObjectUri ?? throwRouterError,
|
|
33
34
|
getPortableObjectUri: getPortableObjectUri ?? throwRouterError,
|
|
34
35
|
getPortableInboxUri: getPortableInboxUri ?? throwRouterError,
|
|
@@ -2066,8 +2066,11 @@ interface PortableInboxForwardingOptions {
|
|
|
2066
2066
|
/**
|
|
2067
2067
|
* How long a delivery waits for forwarding requests made immediately, i.e.,
|
|
2068
2068
|
* when no outbox queue is configured, before Fedify responds to it.
|
|
2069
|
-
* Requests still running afterwards continue in the background. It
|
|
2070
|
-
*
|
|
2069
|
+
* Requests still running afterwards continue in the background. It also
|
|
2070
|
+
* bounds verifying the HTTP Signature that identifies the gateway which
|
|
2071
|
+
* forwarded the delivery, with or without an outbox queue; if the
|
|
2072
|
+
* verification does not finish in time, the activity is forwarded to that
|
|
2073
|
+
* gateway as well. It cannot have calendar units,
|
|
2071
2074
|
* i.e., weeks, months, or years, and cannot be longer than
|
|
2072
2075
|
* 2,147,483,647 milliseconds (about 24.8 days), the longest delay timers
|
|
2073
2076
|
* support.
|
|
@@ -2922,6 +2925,37 @@ interface Context<TContextData> {
|
|
|
2922
2925
|
*/
|
|
2923
2926
|
getActorUri(identifier: string): URL;
|
|
2924
2927
|
/**
|
|
2928
|
+
* Builds the [FEP-ef61] portable ID of an actor with the given identifier
|
|
2929
|
+
* under the given DID authority.
|
|
2930
|
+
*
|
|
2931
|
+
* The path is the same as the one {@link Context.getActorUri} builds, but
|
|
2932
|
+
* the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
2933
|
+
* `ap+ef61://did:key:z6Mk.../users/alice`. Such an actor can be served
|
|
2934
|
+
* through the FEP-ef61 gateway endpoint,
|
|
2935
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice`, by the same actor
|
|
2936
|
+
* dispatcher.
|
|
2937
|
+
*
|
|
2938
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
2939
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
2940
|
+
* from `@fedify/vocab-runtime` to get the canonical string, e.g.,
|
|
2941
|
+
* `ap+ef61://did:key:z6Mk.../users/alice`.
|
|
2942
|
+
*
|
|
2943
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
2944
|
+
*
|
|
2945
|
+
* @param identifier The actor's identifier.
|
|
2946
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
2947
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
2948
|
+
* a path, query, or fragment. A `did:key` DID must be
|
|
2949
|
+
* encoded in base58-btc, as FEP-ef61 requires; see
|
|
2950
|
+
* `exportDidKey()` from `@fedify/vocab-runtime`.
|
|
2951
|
+
* @returns The actor's portable ID.
|
|
2952
|
+
* @throws {RouterError} If no actor dispatcher is available.
|
|
2953
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
2954
|
+
* DID that is not encoded in base58-btc.
|
|
2955
|
+
* @since 2.4.0
|
|
2956
|
+
*/
|
|
2957
|
+
getPortableActorUri(identifier: string, authority: string): URL;
|
|
2958
|
+
/**
|
|
2925
2959
|
* Builds the URI of an object with the given class and values.
|
|
2926
2960
|
* @param cls The class of the object.
|
|
2927
2961
|
* @param values The values to pass to the object dispatcher.
|
|
@@ -2956,7 +2990,9 @@ interface Context<TContextData> {
|
|
|
2956
2990
|
* a path, query, or fragment.
|
|
2957
2991
|
* @returns The object's portable ID.
|
|
2958
2992
|
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
2959
|
-
* @throws {TypeError} If values are invalid or the authority is not a DID
|
|
2993
|
+
* @throws {TypeError} If values are invalid, or the authority is not a DID
|
|
2994
|
+
* or is a `did:key` DID that is not encoded in
|
|
2995
|
+
* base58-btc.
|
|
2960
2996
|
* @since 2.4.0
|
|
2961
2997
|
*/
|
|
2962
2998
|
getPortableObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, authority: string): URL;
|
|
@@ -2985,7 +3021,8 @@ interface Context<TContextData> {
|
|
|
2985
3021
|
* a path, query, or fragment.
|
|
2986
3022
|
* @returns The inbox's portable ID.
|
|
2987
3023
|
* @throws {RouterError} If no inbox path is registered.
|
|
2988
|
-
* @throws {TypeError} If the authority is not a DID
|
|
3024
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
3025
|
+
* DID that is not encoded in base58-btc.
|
|
2989
3026
|
* @since 2.4.0
|
|
2990
3027
|
*/
|
|
2991
3028
|
getPortableInboxUri(identifier: string, authority: string): URL;
|
|
@@ -3366,12 +3403,13 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3366
3403
|
/**
|
|
3367
3404
|
* Information about the [FEP-ef61] portable object requested through
|
|
3368
3405
|
* the gateway endpoint, e.g.,
|
|
3369
|
-
* `GET /.well-known/apgateway/did:key:z6Mk.../notes/123
|
|
3370
|
-
* `undefined` for
|
|
3406
|
+
* `GET /.well-known/apgateway/did:key:z6Mk.../notes/123`, which is served
|
|
3407
|
+
* by an object dispatcher or the actor dispatcher. It is `undefined` for
|
|
3408
|
+
* ordinary requests.
|
|
3371
3409
|
*
|
|
3372
3410
|
* The authority comes from the request path, so it is not evidence that
|
|
3373
|
-
* this server hosts objects for the DID. An object dispatcher
|
|
3374
|
-
* that by itself.
|
|
3411
|
+
* this server hosts objects for the DID. An object dispatcher or the actor
|
|
3412
|
+
* dispatcher has to check that by itself.
|
|
3375
3413
|
*
|
|
3376
3414
|
* It describes the incoming request, so it stays the same in contexts
|
|
3377
3415
|
* derived from this one, e.g., by {@link RequestContext.getObject}.
|
|
@@ -3381,6 +3419,31 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3381
3419
|
*/
|
|
3382
3420
|
readonly portableRequest?: PortableRequest;
|
|
3383
3421
|
/**
|
|
3422
|
+
* Builds the [FEP-ef61] portable ID of an actor with the given identifier.
|
|
3423
|
+
* It works the same as {@link Context.getPortableActorUri}, except that
|
|
3424
|
+
* the authority can be omitted while handling a portable gateway request.
|
|
3425
|
+
* In that case, the DID in {@link RequestContext.portableRequest} is used.
|
|
3426
|
+
*
|
|
3427
|
+
* The DID in the request comes from the request path, so the default is
|
|
3428
|
+
* only a convenience for building IDs; it is not evidence that this server
|
|
3429
|
+
* hosts the actor for the DID.
|
|
3430
|
+
*
|
|
3431
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3432
|
+
*
|
|
3433
|
+
* @param identifier The actor's identifier.
|
|
3434
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3435
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3436
|
+
* a path, query, or fragment. Defaults to the DID of
|
|
3437
|
+
* the requested portable object.
|
|
3438
|
+
* @returns The actor's portable ID.
|
|
3439
|
+
* @throws {RouterError} If no actor dispatcher is available.
|
|
3440
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3441
|
+
* that is not encoded in base58-btc, or the authority
|
|
3442
|
+
* is omitted outside a portable gateway request.
|
|
3443
|
+
* @since 2.4.0
|
|
3444
|
+
*/
|
|
3445
|
+
getPortableActorUri(identifier: string, authority?: string): URL;
|
|
3446
|
+
/**
|
|
3384
3447
|
* Builds the [FEP-ef61] portable ID of an object with the given class and
|
|
3385
3448
|
* values. It works the same as {@link Context.getPortableObjectUri}, except
|
|
3386
3449
|
* that the authority can be omitted while handling a portable gateway
|
|
@@ -3397,9 +3460,10 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3397
3460
|
* the requested portable object.
|
|
3398
3461
|
* @returns The object's portable ID.
|
|
3399
3462
|
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
3400
|
-
* @throws {TypeError} If values are invalid, the authority is not a DID,
|
|
3401
|
-
*
|
|
3402
|
-
*
|
|
3463
|
+
* @throws {TypeError} If values are invalid, the authority is not a DID,
|
|
3464
|
+
* it is a `did:key` DID that is not encoded in
|
|
3465
|
+
* base58-btc, or the authority is omitted outside
|
|
3466
|
+
* a portable gateway request.
|
|
3403
3467
|
* @since 2.4.0
|
|
3404
3468
|
*/
|
|
3405
3469
|
getPortableObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, authority?: string): URL;
|
|
@@ -3421,8 +3485,9 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3421
3485
|
* the requested portable object, if any.
|
|
3422
3486
|
* @returns The inbox's portable ID.
|
|
3423
3487
|
* @throws {RouterError} If no inbox path is registered.
|
|
3424
|
-
* @throws {TypeError} If the authority is not a DID,
|
|
3425
|
-
*
|
|
3488
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3489
|
+
* that is not encoded in base58-btc, or the authority
|
|
3490
|
+
* is omitted outside a portable gateway request.
|
|
3426
3491
|
* @since 2.4.0
|
|
3427
3492
|
*/
|
|
3428
3493
|
getPortableInboxUri(identifier: string, authority?: string): URL;
|
|
@@ -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-I8gLBkcf.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-BU-8fUrz.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-CHht75pX.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-
|
|
9
|
+
import { t as exportJwk } from "../key-I8gLBkcf.mjs";
|
|
10
10
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
11
|
-
import { i as signObject, u as verifyProof } from "../proof-
|
|
11
|
+
import { i as signObject, u as verifyProof } from "../proof-BE4T5zF6.mjs";
|
|
12
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-
|
|
13
|
+
import { n as FederationImpl } from "../middleware-FnITXhtz.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";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { r as createRequestContext, t as createInboxContext } from "../context-
|
|
4
|
+
import { r as createRequestContext, t as createInboxContext } from "../context-CoNRxGYp.mjs";
|
|
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 { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-
|
|
9
|
-
import {
|
|
8
|
+
import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-wiJbqJHa.mjs";
|
|
9
|
+
import { l as signRequest } from "../http-BU-8fUrz.mjs";
|
|
10
10
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { f as handleInbox, o as createFederation } from "../middleware-FnITXhtz.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-
|
|
4
|
+
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-CoNRxGYp.mjs";
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BlafOF4-.mjs";
|
|
@@ -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 { a as compactJsonLd, p as signJsonLd } from "../ld-
|
|
15
|
-
import { i as signObject } from "../proof-
|
|
16
|
-
import {
|
|
13
|
+
import { a as generateCryptoKeyPair } from "../key-I8gLBkcf.mjs";
|
|
14
|
+
import { a as compactJsonLd, p as signJsonLd } from "../ld-wiJbqJHa.mjs";
|
|
15
|
+
import { i as signObject } from "../proof-BE4T5zF6.mjs";
|
|
16
|
+
import { l as signRequest } from "../http-BU-8fUrz.mjs";
|
|
17
17
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
18
|
-
import {
|
|
18
|
+
import { d as handleCustomCollection, f as handleInbox, g as respondWithObjectIfAcceptable, h as respondWithObject, l as handleActor, m as handleOutbox, o as createFederation, p as handleObject, u as handleCollection } from "../middleware-FnITXhtz.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 {
|
|
14
|
-
import { r as createFederationBuilder } from "../builder-
|
|
13
|
+
import { o as createFederation, x as parseHashlinkGatewayRequest } from "../middleware-FnITXhtz.mjs";
|
|
14
|
+
import { r as createFederationBuilder } from "../builder-CHht75pX.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 { i as signObject } from "../proof-
|
|
7
|
+
import { i as signObject } from "../proof-BE4T5zF6.mjs";
|
|
8
8
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
9
|
+
import { o as createFederation } from "../middleware-FnITXhtz.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-BCAa5-kE.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";
|
|
@@ -5,7 +5,7 @@ import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
|
|
7
7
|
import { a as numberSchema, r as envelopeSchema, t as MockQueue } from "../tasks-dbCShlCb.mjs";
|
|
8
|
-
import "../testing-
|
|
8
|
+
import "../testing-BWq1dCzx.mjs";
|
|
9
9
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
10
10
|
import { t as assertExists } from "../assert_exists-cffSpJ7X.mjs";
|
|
11
11
|
import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
@@ -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 { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-
|
|
21
|
-
import { i as signObject, o as verifyObject } from "../proof-
|
|
22
|
-
import {
|
|
19
|
+
import { g as recordInboxActivity } from "../metrics-BCAa5-kE.mjs";
|
|
20
|
+
import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-wiJbqJHa.mjs";
|
|
21
|
+
import { i as signObject, o as verifyObject } from "../proof-BE4T5zF6.mjs";
|
|
22
|
+
import { d as verifyRequest, l as signRequest } from "../http-BU-8fUrz.mjs";
|
|
23
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";
|
|
24
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
25
|
-
import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl
|
|
26
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
24
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-C1hAJnWc.mjs";
|
|
25
|
+
import { S as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-FnITXhtz.mjs";
|
|
26
|
+
import { t as doesActorOwnKey } from "../owner-BJp47LxN.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";
|
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-C1dL6SiT.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 InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "../context-
|
|
2
|
+
import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "../context-mDTxTw-S.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-
|
|
4
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-B3OzOobN.cjs";
|
|
5
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, 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, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "../context-
|
|
2
|
+
import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "../context-CfJE_oQu.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-
|
|
4
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-BYvPz_T0.js";
|
|
5
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, 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, 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
|
|
3
|
+
import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "../middleware-B6IVTVL0.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";
|