@fedify/fedify 2.4.0-dev.2099 → 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-Bno54o_-.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-X3SxXVbc.mjs → compound-proof-DKKH_Nr1.mjs} +2 -2
- package/dist/{context-MORIQJIh.d.ts → context-CfJE_oQu.d.ts} +73 -11
- package/dist/{context-DlZhxdFT.mjs → context-CoNRxGYp.mjs} +2 -1
- package/dist/{context-C43spTGI.d.cts → context-mDTxTw-S.d.cts} +73 -11
- package/dist/{deno-dxdvl2XZ.mjs → deno-CkjiYK_Z.mjs} +1 -1
- package/dist/{docloader-eBxQDsk9.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 +25 -4
- 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-C4Ef3JKa.cjs → federation-C1dL6SiT.cjs} +70 -11
- package/dist/{http-DsgawTd8.mjs → http-BU-8fUrz.mjs} +4 -4
- package/dist/{http-C8cZTE3Y.cjs → http-Cala2Grs.cjs} +1 -1
- package/dist/{http-D-rbr_Sy.js → http-tTlTeFa0.js} +1 -1
- package/dist/{key-DYfmjnmp.mjs → key-I8gLBkcf.mjs} +2 -2
- package/dist/{kv-cache-Dvd-Q-E2.cjs → kv-cache-Bl5EBFrU.cjs} +1 -1
- package/dist/{kv-cache-DIxwMeNi.js → kv-cache-CxQu_cd4.js} +1 -1
- package/dist/{kv-cache-EvOgrFsS.mjs → kv-cache-DJFoGRWQ.mjs} +1 -1
- package/dist/{ld-B00wWHzc.mjs → ld-wiJbqJHa.mjs} +3 -3
- package/dist/{metrics-BP3vdBpb.mjs → metrics-BCAa5-kE.mjs} +1 -1
- package/dist/{middleware-CeBVBa61.mjs → middleware-6p2dYEVA.mjs} +1 -1
- package/dist/{middleware-CcXMe400.js → middleware-B6IVTVL0.js} +70 -11
- package/dist/{middleware-Br1_d-Ga.mjs → middleware-FnITXhtz.mjs} +80 -21
- package/dist/{mod-DMI4DbOo.d.cts → mod-B3OzOobN.d.cts} +1 -1
- package/dist/{mod-BL5BQHCq.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-BJPDRDRq.mjs → owner-BJp47LxN.mjs} +3 -3
- package/dist/{owner-DSzH7wro.cjs → owner-DCt8W_Cv.cjs} +1 -1
- package/dist/{owner-U12fDpQW.js → owner-j5yrbXS1.js} +1 -1
- package/dist/{portable-key-D0mWbV9G.mjs → portable-key-B5oKE_wZ.mjs} +1 -1
- package/dist/{proof-ChjBwnep.mjs → proof-BE4T5zF6.mjs} +4 -4
- package/dist/{send-yFX0E-ye.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 +2 -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-C85KqAcx.js → sig-CJHdGk9w.js} +2 -2
- package/dist/{sig-B689Nj7y.cjs → sig-CRTRoouH.cjs} +2 -2
- package/dist/{temporal-Dl9x-Qw4.mjs → temporal-CyDDbE4i.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +73 -11
- 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 { E as autoIdAssigner, T as actorDehydrator, n as FederationImpl } from "../middleware-
|
|
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
|
|
@@ -2927,6 +2927,37 @@ interface Context<TContextData> {
|
|
|
2927
2927
|
*/
|
|
2928
2928
|
getActorUri(identifier: string): URL;
|
|
2929
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
|
+
/**
|
|
2930
2961
|
* Builds the URI of an object with the given class and values.
|
|
2931
2962
|
* @param cls The class of the object.
|
|
2932
2963
|
* @param values The values to pass to the object dispatcher.
|
|
@@ -2961,7 +2992,9 @@ interface Context<TContextData> {
|
|
|
2961
2992
|
* a path, query, or fragment.
|
|
2962
2993
|
* @returns The object's portable ID.
|
|
2963
2994
|
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
2964
|
-
* @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.
|
|
2965
2998
|
* @since 2.4.0
|
|
2966
2999
|
*/
|
|
2967
3000
|
getPortableObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, authority: string): URL;
|
|
@@ -2990,7 +3023,8 @@ interface Context<TContextData> {
|
|
|
2990
3023
|
* a path, query, or fragment.
|
|
2991
3024
|
* @returns The inbox's portable ID.
|
|
2992
3025
|
* @throws {RouterError} If no inbox path is registered.
|
|
2993
|
-
* @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.
|
|
2994
3028
|
* @since 2.4.0
|
|
2995
3029
|
*/
|
|
2996
3030
|
getPortableInboxUri(identifier: string, authority: string): URL;
|
|
@@ -3371,12 +3405,13 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3371
3405
|
/**
|
|
3372
3406
|
* Information about the [FEP-ef61] portable object requested through
|
|
3373
3407
|
* the gateway endpoint, e.g.,
|
|
3374
|
-
* `GET /.well-known/apgateway/did:key:z6Mk.../notes/123
|
|
3375
|
-
* `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.
|
|
3376
3411
|
*
|
|
3377
3412
|
* The authority comes from the request path, so it is not evidence that
|
|
3378
|
-
* this server hosts objects for the DID. An object dispatcher
|
|
3379
|
-
* 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.
|
|
3380
3415
|
*
|
|
3381
3416
|
* It describes the incoming request, so it stays the same in contexts
|
|
3382
3417
|
* derived from this one, e.g., by {@link RequestContext.getObject}.
|
|
@@ -3386,6 +3421,31 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3386
3421
|
*/
|
|
3387
3422
|
readonly portableRequest?: PortableRequest;
|
|
3388
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
|
+
/**
|
|
3389
3449
|
* Builds the [FEP-ef61] portable ID of an object with the given class and
|
|
3390
3450
|
* values. It works the same as {@link Context.getPortableObjectUri}, except
|
|
3391
3451
|
* that the authority can be omitted while handling a portable gateway
|
|
@@ -3402,9 +3462,10 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3402
3462
|
* the requested portable object.
|
|
3403
3463
|
* @returns The object's portable ID.
|
|
3404
3464
|
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
3405
|
-
* @throws {TypeError} If values are invalid, the authority is not a DID,
|
|
3406
|
-
*
|
|
3407
|
-
*
|
|
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.
|
|
3408
3469
|
* @since 2.4.0
|
|
3409
3470
|
*/
|
|
3410
3471
|
getPortableObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, authority?: string): URL;
|
|
@@ -3426,8 +3487,9 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3426
3487
|
* the requested portable object, if any.
|
|
3427
3488
|
* @returns The inbox's portable ID.
|
|
3428
3489
|
* @throws {RouterError} If no inbox path is registered.
|
|
3429
|
-
* @throws {TypeError} If the authority is not a DID,
|
|
3430
|
-
*
|
|
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.
|
|
3431
3493
|
* @since 2.4.0
|
|
3432
3494
|
*/
|
|
3433
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,
|
|
@@ -2925,6 +2925,37 @@ interface Context<TContextData> {
|
|
|
2925
2925
|
*/
|
|
2926
2926
|
getActorUri(identifier: string): URL;
|
|
2927
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
|
+
/**
|
|
2928
2959
|
* Builds the URI of an object with the given class and values.
|
|
2929
2960
|
* @param cls The class of the object.
|
|
2930
2961
|
* @param values The values to pass to the object dispatcher.
|
|
@@ -2959,7 +2990,9 @@ interface Context<TContextData> {
|
|
|
2959
2990
|
* a path, query, or fragment.
|
|
2960
2991
|
* @returns The object's portable ID.
|
|
2961
2992
|
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
2962
|
-
* @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.
|
|
2963
2996
|
* @since 2.4.0
|
|
2964
2997
|
*/
|
|
2965
2998
|
getPortableObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, authority: string): URL;
|
|
@@ -2988,7 +3021,8 @@ interface Context<TContextData> {
|
|
|
2988
3021
|
* a path, query, or fragment.
|
|
2989
3022
|
* @returns The inbox's portable ID.
|
|
2990
3023
|
* @throws {RouterError} If no inbox path is registered.
|
|
2991
|
-
* @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.
|
|
2992
3026
|
* @since 2.4.0
|
|
2993
3027
|
*/
|
|
2994
3028
|
getPortableInboxUri(identifier: string, authority: string): URL;
|
|
@@ -3369,12 +3403,13 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3369
3403
|
/**
|
|
3370
3404
|
* Information about the [FEP-ef61] portable object requested through
|
|
3371
3405
|
* the gateway endpoint, e.g.,
|
|
3372
|
-
* `GET /.well-known/apgateway/did:key:z6Mk.../notes/123
|
|
3373
|
-
* `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.
|
|
3374
3409
|
*
|
|
3375
3410
|
* The authority comes from the request path, so it is not evidence that
|
|
3376
|
-
* this server hosts objects for the DID. An object dispatcher
|
|
3377
|
-
* 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.
|
|
3378
3413
|
*
|
|
3379
3414
|
* It describes the incoming request, so it stays the same in contexts
|
|
3380
3415
|
* derived from this one, e.g., by {@link RequestContext.getObject}.
|
|
@@ -3384,6 +3419,31 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3384
3419
|
*/
|
|
3385
3420
|
readonly portableRequest?: PortableRequest;
|
|
3386
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
|
+
/**
|
|
3387
3447
|
* Builds the [FEP-ef61] portable ID of an object with the given class and
|
|
3388
3448
|
* values. It works the same as {@link Context.getPortableObjectUri}, except
|
|
3389
3449
|
* that the authority can be omitted while handling a portable gateway
|
|
@@ -3400,9 +3460,10 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3400
3460
|
* the requested portable object.
|
|
3401
3461
|
* @returns The object's portable ID.
|
|
3402
3462
|
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
3403
|
-
* @throws {TypeError} If values are invalid, the authority is not a DID,
|
|
3404
|
-
*
|
|
3405
|
-
*
|
|
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.
|
|
3406
3467
|
* @since 2.4.0
|
|
3407
3468
|
*/
|
|
3408
3469
|
getPortableObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, authority?: string): URL;
|
|
@@ -3424,8 +3485,9 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3424
3485
|
* the requested portable object, if any.
|
|
3425
3486
|
* @returns The inbox's portable ID.
|
|
3426
3487
|
* @throws {RouterError} If no inbox path is registered.
|
|
3427
|
-
* @throws {TypeError} If the authority is not a DID,
|
|
3428
|
-
*
|
|
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.
|
|
3429
3491
|
* @since 2.4.0
|
|
3430
3492
|
*/
|
|
3431
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 { l as signRequest } from "../http-
|
|
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 { f as handleInbox, o as createFederation } from "../middleware-
|
|
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 { l as signRequest } from "../http-
|
|
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 { 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-
|
|
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 { o as createFederation, x as parseHashlinkGatewayRequest } from "../middleware-
|
|
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 { d as verifyRequest, l as signRequest } from "../http-
|
|
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 { S as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-
|
|
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 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-
|
|
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";
|
|
@@ -7,12 +7,12 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import { t as exportJwk } from "../key-
|
|
11
|
-
import { s as detachSignature } from "../ld-
|
|
12
|
-
import { i as signObject } from "../proof-
|
|
10
|
+
import { t as exportJwk } from "../key-I8gLBkcf.mjs";
|
|
11
|
+
import { s as detachSignature } from "../ld-wiJbqJHa.mjs";
|
|
12
|
+
import { i as signObject } from "../proof-BE4T5zF6.mjs";
|
|
13
13
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import { c as assertPortableActorActivity, n as FederationImpl, o as createFederation } from "../middleware-
|
|
15
|
-
import { a as verifyCompoundPortableObjectProofs } from "../compound-proof-
|
|
14
|
+
import { c as assertPortableActorActivity, n as FederationImpl, o as createFederation } from "../middleware-FnITXhtz.mjs";
|
|
15
|
+
import { a as verifyCompoundPortableObjectProofs } from "../compound-proof-DKKH_Nr1.mjs";
|
|
16
16
|
import { configure, reset } from "@logtape/logtape";
|
|
17
17
|
import { Create, Note, Person } from "@fedify/vocab";
|
|
18
18
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|