@fedify/fedify 0.15.0-dev.378 → 0.15.0-dev.382
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/CHANGES.md +31 -0
- package/esm/federation/middleware.js +4 -0
- package/esm/vocab/vocab.js +4 -2
- package/esm/webfinger/handler.js +27 -9
- package/package.json +1 -1
- package/types/federation/callback.d.ts +9 -0
- package/types/federation/callback.d.ts.map +1 -1
- package/types/federation/middleware.d.ts +10 -1
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/vocab/vocab.d.ts.map +1 -1
- package/types/webfinger/handler.d.ts +7 -2
- package/types/webfinger/handler.d.ts.map +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
import type { ActorDispatcher } from "../federation/callback.js";
|
2
|
+
import type { ActorDispatcher, ActorHandleMapper } from "../federation/callback.js";
|
3
3
|
import type { RequestContext } from "../federation/context.js";
|
4
4
|
/**
|
5
5
|
* Parameters for {@link handleWebFinger}.
|
@@ -13,6 +13,11 @@ export interface WebFingerHandlerParameters<TContextData> {
|
|
13
13
|
* The callback for dispatching the actor.
|
14
14
|
*/
|
15
15
|
actorDispatcher?: ActorDispatcher<TContextData>;
|
16
|
+
/**
|
17
|
+
* The callback for mapping a WebFinger username to the corresponding actor's
|
18
|
+
* internal handle, or `null` if the username is not found.
|
19
|
+
*/
|
20
|
+
actorHandleMapper?: ActorHandleMapper<TContextData>;
|
16
21
|
/**
|
17
22
|
* The function to call when the actor is not found.
|
18
23
|
*/
|
@@ -25,5 +30,5 @@ export interface WebFingerHandlerParameters<TContextData> {
|
|
25
30
|
* @param parameters The parameters for handling the request.
|
26
31
|
* @returns The response to the request.
|
27
32
|
*/
|
28
|
-
export declare function handleWebFinger<TContextData>(request: Request, { context, actorDispatcher, onNotFound, }: WebFingerHandlerParameters<TContextData>): Promise<Response>;
|
33
|
+
export declare function handleWebFinger<TContextData>(request: Request, { context, actorDispatcher, actorHandleMapper, onNotFound, }: WebFingerHandlerParameters<TContextData>): Promise<Response>;
|
29
34
|
//# sourceMappingURL=handler.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/webfinger/handler.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/webfinger/handler.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM/D;;GAEG;AACH,MAAM,WAAW,0BAA0B,CAAC,YAAY;IACtD;;OAEG;IACH,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IAEtC;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IAEhD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAEpD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC5D;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,YAAY,EAChD,OAAO,EAAE,OAAO,EAChB,EACE,OAAO,EACP,eAAe,EACf,iBAAiB,EACjB,UAAU,GACX,EAAE,0BAA0B,CAAC,YAAY,CAAC,GAC1C,OAAO,CAAC,QAAQ,CAAC,CAsFnB"}
|