@fedify/fedify 2.3.0-dev.1131 → 2.3.0-dev.1145
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/README.md +3 -0
- package/dist/{assert-DikXweDx.mjs → assert-OguE97r2.mjs} +1 -1
- package/dist/{assert_instance_of-C4Ri6VuN.mjs → assert_instance_of-DBC5X09g.mjs} +1 -1
- package/dist/{assert_not_equals--wG9hV7u.mjs → assert_not_equals-DkVK8oqV.mjs} +1 -1
- package/dist/{assert_rejects-DQP-q39h.mjs → assert_rejects-DN60FHPX.mjs} +2 -2
- package/dist/{assert_strict_equals-Dmjbg-bA.mjs → assert_strict_equals-XEgZAlrj.mjs} +1 -1
- package/dist/{assert_throws-4NwKEy2q.mjs → assert_throws-BOkhLGYc.mjs} +1 -1
- package/dist/{builder-DckAhD27.mjs → builder-ShiR1K6b.mjs} +60 -41
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/outgoing-jsonld.test.mjs +3 -3
- package/dist/compat/public-audience.test.mjs +3 -3
- package/dist/compat/transformers.test.mjs +5 -5
- package/dist/{context-Cq18Gplu.d.ts → context-DCtsSHDv.d.ts} +2 -86
- package/dist/{context-tc6VOOOL.d.cts → context-DI2gRbyN.d.cts} +1 -87
- package/dist/{context-BAE7AKLA.mjs → context-DVoTs_wM.mjs} +1 -1
- package/dist/{deno--CS-SBS9.mjs → deno-h0TWFuEz.mjs} +1 -1
- package/dist/{docloader-k6huZLQL.mjs → docloader-BdDN0Aqx.mjs} +3 -3
- package/dist/federation/builder.test.mjs +138 -10
- package/dist/federation/collection.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +12 -12
- package/dist/federation/idempotency.test.mjs +6 -6
- package/dist/federation/inbox.test.mjs +3 -3
- package/dist/federation/keycache.test.mjs +5 -5
- package/dist/federation/kv.test.mjs +3 -3
- package/dist/federation/metrics.test.mjs +63 -4
- package/dist/federation/middleware.test.mjs +30 -18
- package/dist/federation/mod.cjs +155 -3
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +153 -1
- package/dist/federation/mq.test.mjs +5 -5
- package/dist/federation/negotiation.test.mjs +4 -4
- package/dist/federation/retry.test.mjs +3 -3
- package/dist/federation/router.test.mjs +190 -9
- package/dist/federation/send.test.mjs +16 -16
- package/dist/federation/webfinger.test.mjs +151 -6
- package/dist/{getMachineId-bsd-BY01PL1n.mjs → getMachineId-bsd-etIyxDet.mjs} +1 -1
- package/dist/{getMachineId-darwin-Dr1gkBkp.mjs → getMachineId-darwin-D23zTf4g.mjs} +1 -1
- package/dist/{getMachineId-win-QEYwcJiy.mjs → getMachineId-win-Dpap6v5i.mjs} +1 -1
- package/dist/{http-CJfvRL7D.cjs → http-7kAB7PVx.cjs} +53 -1
- package/dist/{http-cqujdCRz.js → http-B2hxA7dO.js} +48 -2
- package/dist/{http-IywnQdiX.mjs → http-QzW9IWfs.mjs} +4 -4
- package/dist/{key-Df3tMleh.mjs → key-Dh2OK1XQ.mjs} +2 -2
- package/dist/{kv-cache-L0SMQkcd.cjs → kv-cache-DCPp-MT0.cjs} +1 -1
- package/dist/{kv-cache-q9Ec2ryS.mjs → kv-cache-EZRIPZXD.mjs} +1 -1
- package/dist/{kv-cache-pEejzYq4.js → kv-cache-b22dNkjt.js} +1 -1
- package/dist/{ld-BGwiJpl3.mjs → ld-eZbar1rr.mjs} +3 -3
- package/dist/{metrics-BTOMkW8C.mjs → metrics-E0hAHtLZ.mjs} +48 -2
- package/dist/{middleware-B2rtdpFV.cjs → middleware-BUl1BH4x.cjs} +163 -212
- package/dist/{middleware-DtOddSVg.js → middleware-BrGIM_Ra.js} +127 -164
- package/dist/{middleware-BB0IbDow.mjs → middleware-CyJDCmNg.mjs} +89 -37
- package/dist/{middleware-Dnql59Y8.mjs → middleware-mToCR2tG.mjs} +1 -1
- package/dist/mod-CI9fduEi.d.cts +182 -0
- package/dist/mod-CkRiJHGA.d.ts +182 -0
- package/dist/mod.cjs +6 -6
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/client.test.mjs +4 -4
- package/dist/nodeinfo/handler.test.mjs +5 -5
- package/dist/nodeinfo/types.test.mjs +4 -4
- package/dist/otel/exporter.test.mjs +3 -3
- package/dist/{outgoing-jsonld-BNL8AC14.mjs → outgoing-jsonld-BgFLCJQ_.mjs} +1 -1
- package/dist/{owner-CIt4hvmM.mjs → owner-ByO_Fw6U.mjs} +2 -2
- package/dist/{proof-DMGIjHYH.js → proof-BkRyFchv.js} +1 -1
- package/dist/{proof-BYlrRSmZ.mjs → proof-CSo0S8OK.mjs} +5 -5
- package/dist/{proof-B1_u25UV.cjs → proof-jVqClF49.cjs} +1 -1
- package/dist/{send-DJFpze7B.mjs → send-jzrTV1FU.mjs} +3 -3
- package/dist/sig/accept.test.mjs +1 -1
- package/dist/sig/http.test.mjs +9 -9
- package/dist/sig/key.test.mjs +6 -6
- package/dist/sig/ld.test.mjs +7 -7
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +6 -6
- package/dist/sig/proof.test.mjs +8 -8
- package/dist/{std__assert-BTEgfoJo.mjs → std__assert-BBjXFNOb.mjs} +4 -4
- package/dist/testing/mod.d.mts +1 -0
- package/dist/testing/mod.mjs +1 -1
- package/dist/utils/docloader.test.mjs +7 -7
- 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 +6 -7
- package/dist/mod-CajNYYkt.d.ts +0 -63
- package/dist/mod-DnzgcPcy.d.cts +0 -63
- package/dist/router-BT_F5748.mjs +0 -114
- /package/dist/{accept-CgDcxvjV.mjs → accept-CceiKpCy.mjs} +0 -0
- /package/dist/{activity-listener-BeTGV3wc.mjs → activity-listener-tztVvlNb.mjs} +0 -0
- /package/dist/{assert_equals-Ew3jOFa3.mjs → assert_equals-C-ZRDbaf.mjs} +0 -0
- /package/dist/{client-Bneh_DYR.mjs → client-B_A6mfn3.mjs} +0 -0
- /package/dist/{collection-Cc3DVAhE.mjs → collection-CA3V5zyK.mjs} +0 -0
- /package/dist/{esm-sdtqOUPu.mjs → esm-BQRw925N.mjs} +0 -0
- /package/dist/{execAsync-Dxb7rNf3.mjs → execAsync-DCBrgFiV.mjs} +0 -0
- /package/dist/{getMachineId-linux-Bbhofx-s.mjs → getMachineId-linux-ObI47Hql.mjs} +0 -0
- /package/dist/{getMachineId-unsupported-dIOte2Ct.mjs → getMachineId-unsupported-Ddu-PFeh.mjs} +0 -0
- /package/dist/{keycache-BeU0LCII.mjs → keycache-BYMd8q7F.mjs} +0 -0
- /package/dist/{keys-CSYsOMFG.mjs → keys-C3kae-6B.mjs} +0 -0
- /package/dist/{kv-QHE0oeM3.mjs → kv-x2IvBUyq.mjs} +0 -0
- /package/dist/{negotiation-DDstyBvc.mjs → negotiation-CDW-_gUU.mjs} +0 -0
- /package/dist/{public-audience-c9zmYKgA.mjs → public-audience-N3pyOx2p.mjs} +0 -0
- /package/dist/{retry-_VvV0h9f.mjs → retry-v_sGLH1d.mjs} +0 -0
- /package/dist/{types-D09GN0uZ.mjs → types-BFowWFTT.mjs} +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/// <reference lib="esnext.temporal" />
|
|
2
|
+
import { G as ActorHandleMapper, U as ActorAliasMapper, W as ActorDispatcher, ft as WebFingerLinksDispatcher, l as RequestContext } from "./context-DI2gRbyN.cjs";
|
|
3
|
+
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
4
|
+
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
5
|
+
|
|
6
|
+
//#region src/federation/router.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Options for the {@link Router}.
|
|
9
|
+
* @since 0.12.0
|
|
10
|
+
* @deprecated Import `RouterOptions` from `@fedify/uri-template` instead.
|
|
11
|
+
*/
|
|
12
|
+
interface RouterOptions$1 extends RouterOptions {}
|
|
13
|
+
/**
|
|
14
|
+
* The result of {@link Router.route} method.
|
|
15
|
+
* @since 1.3.0
|
|
16
|
+
* @deprecated Import `RouterRouteResult` from `@fedify/uri-template` instead.
|
|
17
|
+
*/
|
|
18
|
+
interface RouterRouteResult$1 extends RouterRouteResult<Record<never, never>> {}
|
|
19
|
+
/**
|
|
20
|
+
* URL router and constructor based on URI Template
|
|
21
|
+
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
22
|
+
*
|
|
23
|
+
* @deprecated Import `Router` from `@fedify/uri-template` instead. This class
|
|
24
|
+
* remains only for compatibility with older Fedify code. The
|
|
25
|
+
* `@fedify/uri-template` router is the replacement implementation
|
|
26
|
+
* and should be used directly in new code.
|
|
27
|
+
*/
|
|
28
|
+
declare class Router {
|
|
29
|
+
#private;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new {@link Router}.
|
|
32
|
+
* @param options Options for the router.
|
|
33
|
+
* @deprecated Use `new Router(options)` from `@fedify/uri-template`
|
|
34
|
+
* instead.
|
|
35
|
+
*/
|
|
36
|
+
constructor(options?: RouterOptions);
|
|
37
|
+
/**
|
|
38
|
+
* Whether to ignore trailing slashes when matching paths.
|
|
39
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. This
|
|
40
|
+
* accessor forwards to the underlying `@fedify/uri-template`
|
|
41
|
+
* router so that post-construction mutation keeps working as
|
|
42
|
+
* in older Fedify code.
|
|
43
|
+
*/
|
|
44
|
+
get trailingSlashInsensitive(): boolean;
|
|
45
|
+
set trailingSlashInsensitive(value: boolean);
|
|
46
|
+
/**
|
|
47
|
+
* Clones this router.
|
|
48
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
49
|
+
*/
|
|
50
|
+
clone(): Router;
|
|
51
|
+
/**
|
|
52
|
+
* Checks if a path name exists in the router.
|
|
53
|
+
* @param name The name of the path.
|
|
54
|
+
* @returns `true` if the path name exists, otherwise `false`.
|
|
55
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
56
|
+
*/
|
|
57
|
+
has(name: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Adds a new path rule to the router.
|
|
60
|
+
* @param template The path pattern.
|
|
61
|
+
* @param name The name of the path.
|
|
62
|
+
* @returns The names of the variables in the path pattern.
|
|
63
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. In this
|
|
64
|
+
* compatibility class, `add()` both registers the route and
|
|
65
|
+
* returns the variables in the path pattern. In
|
|
66
|
+
* `@fedify/uri-template`, these two responsibilities are split:
|
|
67
|
+
* `router.add(template, name)` registers the route and returns
|
|
68
|
+
* `void`, while the pure static method
|
|
69
|
+
* `Router.variables(template)` returns the variable names. To
|
|
70
|
+
* migrate, call `Router.variables(template)` when variables are
|
|
71
|
+
* needed, then call `router.add(template, name)` to register the
|
|
72
|
+
* route.
|
|
73
|
+
*/
|
|
74
|
+
add(template: string, name: string): Set<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Resolves a path name and values from a URL, if any match.
|
|
77
|
+
* @param url The URL to resolve.
|
|
78
|
+
* @returns The name of the path and its values, if any match. Otherwise,
|
|
79
|
+
* `null`.
|
|
80
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. Unlike the
|
|
81
|
+
* stricter `@fedify/uri-template` router, this compatibility
|
|
82
|
+
* method keeps the old Fedify 2.x contract of returning `null`
|
|
83
|
+
* (rather than throwing) for inputs that are not router paths.
|
|
84
|
+
*/
|
|
85
|
+
route(url: string): RouterRouteResult$1 | null;
|
|
86
|
+
/**
|
|
87
|
+
* Constructs a URL/path from a path name and values.
|
|
88
|
+
* @param name The name of the path.
|
|
89
|
+
* @param values The values to expand the path with.
|
|
90
|
+
* @returns The URL/path, if the name exists. Otherwise, `null`.
|
|
91
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
92
|
+
*/
|
|
93
|
+
build(name: string, values: Record<string, string>): string | null;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* An error thrown by the {@link Router}.
|
|
97
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
98
|
+
*/
|
|
99
|
+
declare class RouterError$1 extends RouterError {
|
|
100
|
+
/**
|
|
101
|
+
* Treats every `RouterError` from `@fedify/uri-template` as an instance of
|
|
102
|
+
* this deprecated class.
|
|
103
|
+
*
|
|
104
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
105
|
+
*/
|
|
106
|
+
static override [Symbol.hasInstance](instance: unknown): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Create a new {@link RouterError}.
|
|
109
|
+
* @param message The error message.
|
|
110
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
111
|
+
*/
|
|
112
|
+
constructor(message: string);
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/federation/webfinger.d.ts
|
|
116
|
+
/**
|
|
117
|
+
* Parameters for {@link handleWebFinger}.
|
|
118
|
+
*/
|
|
119
|
+
interface WebFingerHandlerParameters<TContextData> {
|
|
120
|
+
/**
|
|
121
|
+
* The request context.
|
|
122
|
+
*/
|
|
123
|
+
context: RequestContext<TContextData>;
|
|
124
|
+
/**
|
|
125
|
+
* The canonical hostname of the server, if it's explicitly configured.
|
|
126
|
+
* @since 1.5.0
|
|
127
|
+
*/
|
|
128
|
+
host?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The callback for dispatching the actor.
|
|
131
|
+
*/
|
|
132
|
+
actorDispatcher?: ActorDispatcher<TContextData>;
|
|
133
|
+
/**
|
|
134
|
+
* The callback for mapping a WebFinger username to the corresponding actor's
|
|
135
|
+
* internal identifier, or `null` if the username is not found.
|
|
136
|
+
* @since 0.15.0
|
|
137
|
+
*/
|
|
138
|
+
actorHandleMapper?: ActorHandleMapper<TContextData>;
|
|
139
|
+
/**
|
|
140
|
+
* The callback for mapping a WebFinger query to the corresponding actor's
|
|
141
|
+
* internal identifier or username, or `null` if the query is not found.
|
|
142
|
+
* @since 1.4.0
|
|
143
|
+
*/
|
|
144
|
+
actorAliasMapper?: ActorAliasMapper<TContextData>;
|
|
145
|
+
/**
|
|
146
|
+
* The callback for dispatching the Links of webFinger.
|
|
147
|
+
*/
|
|
148
|
+
webFingerLinksDispatcher?: WebFingerLinksDispatcher<TContextData>;
|
|
149
|
+
/**
|
|
150
|
+
* The function to call when the actor is not found.
|
|
151
|
+
*/
|
|
152
|
+
onNotFound(request: Request): Response | Promise<Response>;
|
|
153
|
+
/**
|
|
154
|
+
* The OpenTelemetry tracer.
|
|
155
|
+
* @since 1.3.0
|
|
156
|
+
*/
|
|
157
|
+
tracer?: Tracer;
|
|
158
|
+
/**
|
|
159
|
+
* The span for the request.
|
|
160
|
+
* @since 1.3.0
|
|
161
|
+
*/
|
|
162
|
+
span?: Span;
|
|
163
|
+
/**
|
|
164
|
+
* The OpenTelemetry meter provider used to record the `webfinger.handle`
|
|
165
|
+
* counter and `webfinger.handle.duration` histogram. When omitted, no
|
|
166
|
+
* WebFinger-specific measurements are emitted (the request still
|
|
167
|
+
* contributes to `fedify.http.server.request.*` because that metric is
|
|
168
|
+
* recorded one layer up in `Federation.fetch`).
|
|
169
|
+
* @since 2.3.0
|
|
170
|
+
*/
|
|
171
|
+
meterProvider?: MeterProvider;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Handles a WebFinger request. You would not typically call this function
|
|
175
|
+
* directly, but instead use {@link Federation.fetch} method.
|
|
176
|
+
* @param request The WebFinger request to handle.
|
|
177
|
+
* @param parameters The parameters for handling the request.
|
|
178
|
+
* @returns The response to the request.
|
|
179
|
+
*/
|
|
180
|
+
declare function handleWebFinger<TContextData>(request: Request, options: WebFingerHandlerParameters<TContextData>): Promise<Response>;
|
|
181
|
+
//#endregion
|
|
182
|
+
export { RouterOptions$1 as a, RouterError$1 as i, handleWebFinger as n, RouterRouteResult$1 as o, Router as r, WebFingerHandlerParameters as t };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/// <reference lib="esnext.temporal" />
|
|
2
|
+
import { G as ActorHandleMapper, U as ActorAliasMapper, W as ActorDispatcher, ft as WebFingerLinksDispatcher, l as RequestContext } from "./context-DCtsSHDv.js";
|
|
3
|
+
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
4
|
+
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
5
|
+
|
|
6
|
+
//#region src/federation/router.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Options for the {@link Router}.
|
|
9
|
+
* @since 0.12.0
|
|
10
|
+
* @deprecated Import `RouterOptions` from `@fedify/uri-template` instead.
|
|
11
|
+
*/
|
|
12
|
+
interface RouterOptions$1 extends RouterOptions {}
|
|
13
|
+
/**
|
|
14
|
+
* The result of {@link Router.route} method.
|
|
15
|
+
* @since 1.3.0
|
|
16
|
+
* @deprecated Import `RouterRouteResult` from `@fedify/uri-template` instead.
|
|
17
|
+
*/
|
|
18
|
+
interface RouterRouteResult$1 extends RouterRouteResult<Record<never, never>> {}
|
|
19
|
+
/**
|
|
20
|
+
* URL router and constructor based on URI Template
|
|
21
|
+
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
22
|
+
*
|
|
23
|
+
* @deprecated Import `Router` from `@fedify/uri-template` instead. This class
|
|
24
|
+
* remains only for compatibility with older Fedify code. The
|
|
25
|
+
* `@fedify/uri-template` router is the replacement implementation
|
|
26
|
+
* and should be used directly in new code.
|
|
27
|
+
*/
|
|
28
|
+
declare class Router$1 {
|
|
29
|
+
#private;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new {@link Router}.
|
|
32
|
+
* @param options Options for the router.
|
|
33
|
+
* @deprecated Use `new Router(options)` from `@fedify/uri-template`
|
|
34
|
+
* instead.
|
|
35
|
+
*/
|
|
36
|
+
constructor(options?: RouterOptions);
|
|
37
|
+
/**
|
|
38
|
+
* Whether to ignore trailing slashes when matching paths.
|
|
39
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. This
|
|
40
|
+
* accessor forwards to the underlying `@fedify/uri-template`
|
|
41
|
+
* router so that post-construction mutation keeps working as
|
|
42
|
+
* in older Fedify code.
|
|
43
|
+
*/
|
|
44
|
+
get trailingSlashInsensitive(): boolean;
|
|
45
|
+
set trailingSlashInsensitive(value: boolean);
|
|
46
|
+
/**
|
|
47
|
+
* Clones this router.
|
|
48
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
49
|
+
*/
|
|
50
|
+
clone(): Router$1;
|
|
51
|
+
/**
|
|
52
|
+
* Checks if a path name exists in the router.
|
|
53
|
+
* @param name The name of the path.
|
|
54
|
+
* @returns `true` if the path name exists, otherwise `false`.
|
|
55
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
56
|
+
*/
|
|
57
|
+
has(name: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Adds a new path rule to the router.
|
|
60
|
+
* @param template The path pattern.
|
|
61
|
+
* @param name The name of the path.
|
|
62
|
+
* @returns The names of the variables in the path pattern.
|
|
63
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. In this
|
|
64
|
+
* compatibility class, `add()` both registers the route and
|
|
65
|
+
* returns the variables in the path pattern. In
|
|
66
|
+
* `@fedify/uri-template`, these two responsibilities are split:
|
|
67
|
+
* `router.add(template, name)` registers the route and returns
|
|
68
|
+
* `void`, while the pure static method
|
|
69
|
+
* `Router.variables(template)` returns the variable names. To
|
|
70
|
+
* migrate, call `Router.variables(template)` when variables are
|
|
71
|
+
* needed, then call `router.add(template, name)` to register the
|
|
72
|
+
* route.
|
|
73
|
+
*/
|
|
74
|
+
add(template: string, name: string): Set<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Resolves a path name and values from a URL, if any match.
|
|
77
|
+
* @param url The URL to resolve.
|
|
78
|
+
* @returns The name of the path and its values, if any match. Otherwise,
|
|
79
|
+
* `null`.
|
|
80
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. Unlike the
|
|
81
|
+
* stricter `@fedify/uri-template` router, this compatibility
|
|
82
|
+
* method keeps the old Fedify 2.x contract of returning `null`
|
|
83
|
+
* (rather than throwing) for inputs that are not router paths.
|
|
84
|
+
*/
|
|
85
|
+
route(url: string): RouterRouteResult$1 | null;
|
|
86
|
+
/**
|
|
87
|
+
* Constructs a URL/path from a path name and values.
|
|
88
|
+
* @param name The name of the path.
|
|
89
|
+
* @param values The values to expand the path with.
|
|
90
|
+
* @returns The URL/path, if the name exists. Otherwise, `null`.
|
|
91
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
92
|
+
*/
|
|
93
|
+
build(name: string, values: Record<string, string>): string | null;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* An error thrown by the {@link Router}.
|
|
97
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
98
|
+
*/
|
|
99
|
+
declare class RouterError$1 extends RouterError {
|
|
100
|
+
/**
|
|
101
|
+
* Treats every `RouterError` from `@fedify/uri-template` as an instance of
|
|
102
|
+
* this deprecated class.
|
|
103
|
+
*
|
|
104
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
105
|
+
*/
|
|
106
|
+
static override [Symbol.hasInstance](instance: unknown): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Create a new {@link RouterError}.
|
|
109
|
+
* @param message The error message.
|
|
110
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
111
|
+
*/
|
|
112
|
+
constructor(message: string);
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/federation/webfinger.d.ts
|
|
116
|
+
/**
|
|
117
|
+
* Parameters for {@link handleWebFinger}.
|
|
118
|
+
*/
|
|
119
|
+
interface WebFingerHandlerParameters<TContextData> {
|
|
120
|
+
/**
|
|
121
|
+
* The request context.
|
|
122
|
+
*/
|
|
123
|
+
context: RequestContext<TContextData>;
|
|
124
|
+
/**
|
|
125
|
+
* The canonical hostname of the server, if it's explicitly configured.
|
|
126
|
+
* @since 1.5.0
|
|
127
|
+
*/
|
|
128
|
+
host?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The callback for dispatching the actor.
|
|
131
|
+
*/
|
|
132
|
+
actorDispatcher?: ActorDispatcher<TContextData>;
|
|
133
|
+
/**
|
|
134
|
+
* The callback for mapping a WebFinger username to the corresponding actor's
|
|
135
|
+
* internal identifier, or `null` if the username is not found.
|
|
136
|
+
* @since 0.15.0
|
|
137
|
+
*/
|
|
138
|
+
actorHandleMapper?: ActorHandleMapper<TContextData>;
|
|
139
|
+
/**
|
|
140
|
+
* The callback for mapping a WebFinger query to the corresponding actor's
|
|
141
|
+
* internal identifier or username, or `null` if the query is not found.
|
|
142
|
+
* @since 1.4.0
|
|
143
|
+
*/
|
|
144
|
+
actorAliasMapper?: ActorAliasMapper<TContextData>;
|
|
145
|
+
/**
|
|
146
|
+
* The callback for dispatching the Links of webFinger.
|
|
147
|
+
*/
|
|
148
|
+
webFingerLinksDispatcher?: WebFingerLinksDispatcher<TContextData>;
|
|
149
|
+
/**
|
|
150
|
+
* The function to call when the actor is not found.
|
|
151
|
+
*/
|
|
152
|
+
onNotFound(request: Request): Response | Promise<Response>;
|
|
153
|
+
/**
|
|
154
|
+
* The OpenTelemetry tracer.
|
|
155
|
+
* @since 1.3.0
|
|
156
|
+
*/
|
|
157
|
+
tracer?: Tracer;
|
|
158
|
+
/**
|
|
159
|
+
* The span for the request.
|
|
160
|
+
* @since 1.3.0
|
|
161
|
+
*/
|
|
162
|
+
span?: Span;
|
|
163
|
+
/**
|
|
164
|
+
* The OpenTelemetry meter provider used to record the `webfinger.handle`
|
|
165
|
+
* counter and `webfinger.handle.duration` histogram. When omitted, no
|
|
166
|
+
* WebFinger-specific measurements are emitted (the request still
|
|
167
|
+
* contributes to `fedify.http.server.request.*` because that metric is
|
|
168
|
+
* recorded one layer up in `Federation.fetch`).
|
|
169
|
+
* @since 2.3.0
|
|
170
|
+
*/
|
|
171
|
+
meterProvider?: MeterProvider;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Handles a WebFinger request. You would not typically call this function
|
|
175
|
+
* directly, but instead use {@link Federation.fetch} method.
|
|
176
|
+
* @param request The WebFinger request to handle.
|
|
177
|
+
* @param parameters The parameters for handling the request.
|
|
178
|
+
* @returns The response to the request.
|
|
179
|
+
*/
|
|
180
|
+
declare function handleWebFinger<TContextData>(request: Request, options: WebFingerHandlerParameters<TContextData>): Promise<Response>;
|
|
181
|
+
//#endregion
|
|
182
|
+
export { RouterOptions$1 as a, RouterError$1 as i, handleWebFinger as n, RouterRouteResult$1 as o, Router$1 as r, WebFingerHandlerParameters as t };
|
package/dist/mod.cjs
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
require("./chunk-DDcVe30Y.cjs");
|
|
5
5
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
6
6
|
require("./compat/mod.cjs");
|
|
7
|
-
const require_http = require("./http-
|
|
8
|
-
const require_middleware = require("./middleware-
|
|
9
|
-
const require_proof = require("./proof-
|
|
7
|
+
const require_http = require("./http-7kAB7PVx.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-BUl1BH4x.cjs");
|
|
9
|
+
const require_proof = require("./proof-jVqClF49.cjs");
|
|
10
10
|
const require_types = require("./types-KC4QAoxe.cjs");
|
|
11
|
-
const require_kv_cache = require("./kv-cache-
|
|
11
|
+
const require_kv_cache = require("./kv-cache-DCPp-MT0.cjs");
|
|
12
12
|
const require_federation_mod = require("./federation/mod.cjs");
|
|
13
13
|
require("./nodeinfo/mod.cjs");
|
|
14
14
|
require("./runtime/mod.cjs");
|
|
@@ -18,8 +18,8 @@ require("./utils/mod.cjs");
|
|
|
18
18
|
exports.InProcessMessageQueue = require_federation_mod.InProcessMessageQueue;
|
|
19
19
|
exports.MemoryKvStore = require_federation_mod.MemoryKvStore;
|
|
20
20
|
exports.ParallelMessageQueue = require_federation_mod.ParallelMessageQueue;
|
|
21
|
-
exports.Router =
|
|
22
|
-
exports.RouterError =
|
|
21
|
+
exports.Router = require_federation_mod.Router;
|
|
22
|
+
exports.RouterError = require_federation_mod.RouterError;
|
|
23
23
|
exports.SendActivityError = require_middleware.SendActivityError;
|
|
24
24
|
exports.actorDehydrator = require_transformers.actorDehydrator;
|
|
25
25
|
exports.attachSignature = require_proof.attachSignature;
|
package/dist/mod.d.cts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CAM_bQXx.cjs";
|
|
3
3
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-VyDTd4G3.cjs";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-DEvZuyOE.cjs";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, vt as ActivityTransformer, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "./context-DI2gRbyN.cjs";
|
|
6
6
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-gJ8LYbxX.cjs";
|
|
7
7
|
import { a as MessageQueueEnqueueOptions, i as MessageQueueDepth, n as InProcessMessageQueueOptions, o as MessageQueueListenOptions, r as MessageQueue, s as ParallelMessageQueue, t as InProcessMessageQueue } from "./mq-D8uSFzxe.cjs";
|
|
8
8
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
9
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-
|
|
9
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-CI9fduEi.cjs";
|
|
10
10
|
import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-B0hW12_O.cjs";
|
|
11
11
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-yvIXFAEi.cjs";
|
|
12
12
|
export * from "@fedify/vocab-runtime";
|
package/dist/mod.d.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CSddvgWN.js";
|
|
3
3
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-lf8Hsd91.js";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CnngXDNJ.js";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, vt as ActivityTransformer, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "./context-DCtsSHDv.js";
|
|
6
6
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-D6hNiMTK.js";
|
|
7
7
|
import { a as MessageQueueEnqueueOptions, i as MessageQueueDepth, n as InProcessMessageQueueOptions, o as MessageQueueListenOptions, r as MessageQueue, s as ParallelMessageQueue, t as InProcessMessageQueue } from "./mq-D-nlpY04.js";
|
|
8
8
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
9
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-
|
|
9
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-CkRiJHGA.js";
|
|
10
10
|
import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-COIAjwRS.js";
|
|
11
11
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DFvNJcNb.js";
|
|
12
12
|
export * from "@fedify/vocab-runtime";
|
package/dist/mod.js
CHANGED
|
@@ -3,12 +3,12 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "./chunk-CRNNMoPX.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import {
|
|
7
|
-
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader,
|
|
8
|
-
import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "./proof-
|
|
6
|
+
import { D as validateAcceptSignature, E as parseAcceptSignature, T as fulfillAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk, w as formatAcceptSignature } from "./http-B2hxA7dO.js";
|
|
7
|
+
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-BrGIM_Ra.js";
|
|
8
|
+
import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "./proof-BkRyFchv.js";
|
|
9
9
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-CAY3OdLq.js";
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
11
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-b22dNkjt.js";
|
|
11
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
14
14
|
import "./sig/mod.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as assertEquals } from "../assert_equals-
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import { t as esm_default } from "../esm-
|
|
7
|
-
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
5
|
+
import "../std__assert-BBjXFNOb.mjs";
|
|
6
|
+
import { t as esm_default } from "../esm-BQRw925N.mjs";
|
|
7
|
+
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-B_A6mfn3.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/client.test.ts
|
|
10
10
|
test("getNodeInfo()", async (t) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { r as createRequestContext } from "../context-
|
|
5
|
-
import { t as assertEquals } from "../assert_equals-
|
|
6
|
-
import "../std__assert-
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-
|
|
4
|
+
import { r as createRequestContext } from "../context-DVoTs_wM.mjs";
|
|
5
|
+
import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
6
|
+
import "../std__assert-BBjXFNOb.mjs";
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
8
|
+
import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-CyJDCmNg.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as assertEquals } from "../assert_equals-
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import { t as assertThrows } from "../assert_throws-
|
|
7
|
-
import { t as nodeInfoToJson } from "../types-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
5
|
+
import "../std__assert-BBjXFNOb.mjs";
|
|
6
|
+
import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
|
|
7
|
+
import { t as nodeInfoToJson } from "../types-BFowWFTT.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/types.test.ts
|
|
10
10
|
test("nodeInfoToJson()", () => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as assertEquals } from "../assert_equals-
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import { t as MemoryKvStore } from "../kv-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
5
|
+
import "../std__assert-BBjXFNOb.mjs";
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { ExportResultCode } from "@opentelemetry/core";
|
|
9
9
|
import { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as preloadedOnlyDocumentLoader, t as normalizePublicAudience } from "./public-audience-
|
|
4
|
+
import { n as preloadedOnlyDocumentLoader, t as normalizePublicAudience } from "./public-audience-N3pyOx2p.mjs";
|
|
5
5
|
import { getLogger } from "@logtape/logtape";
|
|
6
6
|
import { preloadedContexts } from "@fedify/vocab-runtime";
|
|
7
7
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno
|
|
5
|
-
import "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-h0TWFuEz.mjs";
|
|
5
|
+
import "./key-Dh2OK1XQ.mjs";
|
|
6
6
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import {
|
|
3
|
+
import { O as name, _ as measureSignatureKeyFetch, d as validateCryptoKey, f as getDurationMs, k as version, p as getFederationMetrics, s as fetchKey } from "./http-B2hxA7dO.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, PUBLIC_COLLECTION, getTypeId, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno
|
|
5
|
-
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-
|
|
6
|
-
import { n as fetchKey, o as validateCryptoKey } from "./key-
|
|
7
|
-
import { n as preloadedOnlyDocumentLoader } from "./public-audience-
|
|
8
|
-
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-
|
|
4
|
+
import { n as version, t as name } from "./deno-h0TWFuEz.mjs";
|
|
5
|
+
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-E0hAHtLZ.mjs";
|
|
6
|
+
import { n as fetchKey, o as validateCryptoKey } from "./key-Dh2OK1XQ.mjs";
|
|
7
|
+
import { n as preloadedOnlyDocumentLoader } from "./public-audience-N3pyOx2p.mjs";
|
|
8
|
+
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-BgFLCJQ_.mjs";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
11
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-7kAB7PVx.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _fedify_vocab = require("@fedify/vocab");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno
|
|
5
|
-
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-
|
|
6
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { n as version, t as name } from "./deno-h0TWFuEz.mjs";
|
|
5
|
+
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-E0hAHtLZ.mjs";
|
|
6
|
+
import { n as doubleKnock } from "./http-QzW9IWfs.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
//#region src/federation/send.ts
|
package/dist/sig/accept.test.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature, t as formatAcceptSignature } from "../accept-
|
|
4
|
+
import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature, t as formatAcceptSignature } from "../accept-CceiKpCy.mjs";
|
|
5
5
|
import { test } from "@fedify/fixture";
|
|
6
6
|
import { deepStrictEqual, strictEqual } from "node:assert/strict";
|
|
7
7
|
//#region src/sig/accept.test.ts
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as assertEquals } from "../assert_equals-
|
|
5
|
-
import { r as assertExists, t as assertStringIncludes } from "../std__assert-
|
|
6
|
-
import { n as assertGreaterOrEqual, r as assertFalse, t as assertRejects } from "../assert_rejects-
|
|
7
|
-
import { t as assertThrows } from "../assert_throws-
|
|
8
|
-
import { t as assert } from "../assert-
|
|
9
|
-
import { t as esm_default } from "../esm-
|
|
10
|
-
import { t as exportJwk } from "../key-
|
|
11
|
-
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-
|
|
12
|
-
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
5
|
+
import { r as assertExists, t as assertStringIncludes } from "../std__assert-BBjXFNOb.mjs";
|
|
6
|
+
import { n as assertGreaterOrEqual, r as assertFalse, t as assertRejects } from "../assert_rejects-DN60FHPX.mjs";
|
|
7
|
+
import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
|
|
8
|
+
import { t as assert } from "../assert-OguE97r2.mjs";
|
|
9
|
+
import { t as esm_default } from "../esm-BQRw925N.mjs";
|
|
10
|
+
import { t as exportJwk } from "../key-Dh2OK1XQ.mjs";
|
|
11
|
+
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-QzW9IWfs.mjs";
|
|
12
|
+
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-C3kae-6B.mjs";
|
|
13
13
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
14
|
import { FetchError, exportSpki } from "@fedify/vocab-runtime";
|
|
15
15
|
import { encodeBase64 } from "byte-encodings/base64";
|