@fedify/fedify 2.3.0-dev.1131 → 2.3.0-dev.1137
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-BCkBXxky.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-B_9yJW3w.mjs} +1 -1
- package/dist/{docloader-k6huZLQL.mjs → docloader-BT89tyFr.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 +4 -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 +5 -5
- 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-cqujdCRz.js → http-CToqG5ap.js} +1 -1
- package/dist/{http-CJfvRL7D.cjs → http-CWoeyogl.cjs} +1 -1
- package/dist/{http-IywnQdiX.mjs → http-Cyx5SNuu.mjs} +4 -4
- package/dist/{key-Df3tMleh.mjs → key-CkkMJBjF.mjs} +2 -2
- package/dist/{kv-cache-pEejzYq4.js → kv-cache-CuCn2xvM.js} +1 -1
- package/dist/{kv-cache-L0SMQkcd.cjs → kv-cache-DuEwFYcN.cjs} +1 -1
- package/dist/{kv-cache-q9Ec2ryS.mjs → kv-cache-VHFP42vY.mjs} +1 -1
- package/dist/{ld-BGwiJpl3.mjs → ld-k8yqD2a-.mjs} +3 -3
- package/dist/{metrics-BTOMkW8C.mjs → metrics-iRBg8jTk.mjs} +1 -1
- package/dist/{middleware-B2rtdpFV.cjs → middleware-BWLUrbS9.cjs} +95 -196
- package/dist/{middleware-Dnql59Y8.mjs → middleware-CztxpARM.mjs} +1 -1
- package/dist/{middleware-DtOddSVg.js → middleware-D7FrhN9q.js} +59 -148
- package/dist/{middleware-BB0IbDow.mjs → middleware-DQEgdr83.mjs} +21 -21
- package/dist/mod-C504qevA.d.cts +173 -0
- package/dist/mod-wYfuXeDE.d.ts +173 -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-nmXdvXpc.mjs} +2 -2
- package/dist/{proof-B1_u25UV.cjs → proof-CcsIJLTn.cjs} +1 -1
- package/dist/{proof-BYlrRSmZ.mjs → proof-DpwO1T4S.mjs} +5 -5
- package/dist/{proof-DMGIjHYH.js → proof-NRmtrTDu.js} +1 -1
- package/dist/{send-DJFpze7B.mjs → send-DvX2tYyZ.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 +7 -8
- 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
package/README.md
CHANGED
|
@@ -123,6 +123,7 @@ Here is the list of packages:
|
|
|
123
123
|
| [@fedify/sqlite](/packages/sqlite/) | [JSR][jsr:@fedify/sqlite] | [npm][npm:@fedify/sqlite] | SQLite driver |
|
|
124
124
|
| [@fedify/sveltekit](/packages/sveltekit/) | [JSR][jsr:@fedify/sveltekit] | [npm][npm:@fedify/sveltekit] | SvelteKit integration |
|
|
125
125
|
| [@fedify/testing](/packages/testing/) | [JSR][jsr:@fedify/testing] | [npm][npm:@fedify/testing] | Testing utilities |
|
|
126
|
+
| [@fedify/uri-template](/packages/uri-template/) | [JSR][jsr:@fedify/uri-template] | [npm][npm:@fedify/uri-template] | RFC 6570 URI Template library |
|
|
126
127
|
| [@fedify/vocab](/packages/vocab/) | [JSR][jsr:@fedify/vocab] | [npm][npm:@fedify/vocab] | Activity Vocabulary library |
|
|
127
128
|
| [@fedify/vocab-runtime](/packages/vocab-runtime/) | [JSR][jsr:@fedify/vocab-runtime] | [npm][npm:@fedify/vocab-runtime] | Runtime library for code-generated vocab |
|
|
128
129
|
| [@fedify/vocab-tools](/packages/vocab-tools/) | [JSR][jsr:@fedify/vocab-tools] | [npm][npm:@fedify/vocab-tools] | Code generation tools for Activity Vocab |
|
|
@@ -176,6 +177,8 @@ Here is the list of packages:
|
|
|
176
177
|
[npm:@fedify/sveltekit]: https://www.npmjs.com/package/@fedify/sveltekit
|
|
177
178
|
[jsr:@fedify/testing]: https://jsr.io/@fedify/testing
|
|
178
179
|
[npm:@fedify/testing]: https://www.npmjs.com/package/@fedify/testing
|
|
180
|
+
[jsr:@fedify/uri-template]: https://jsr.io/@fedify/uri-template
|
|
181
|
+
[npm:@fedify/uri-template]: https://www.npmjs.com/package/@fedify/uri-template
|
|
179
182
|
[jsr:@fedify/vocab]: https://jsr.io/@fedify/vocab
|
|
180
183
|
[npm:@fedify/vocab]: https://www.npmjs.com/package/@fedify/vocab
|
|
181
184
|
[jsr:@fedify/vocab-runtime]: https://jsr.io/@fedify/vocab-runtime
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { l as AssertionError } from "./assert_equals-
|
|
4
|
+
import { l as AssertionError } from "./assert_equals-C-ZRDbaf.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js
|
|
6
6
|
/**
|
|
7
7
|
* Make an assertion, error will be thrown if `expr` does not have truthy value.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { l as AssertionError } from "./assert_equals-
|
|
4
|
+
import { l as AssertionError } from "./assert_equals-C-ZRDbaf.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js
|
|
6
6
|
/**
|
|
7
7
|
* Make an assertion that `obj` is an instance of `type`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { c as equal, l as AssertionError } from "./assert_equals-
|
|
4
|
+
import { c as equal, l as AssertionError } from "./assert_equals-C-ZRDbaf.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js
|
|
6
6
|
/**
|
|
7
7
|
* Make an assertion that `actual` and `expected` are not equal, deeply.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { l as AssertionError, s as format } from "./assert_equals-
|
|
5
|
-
import { n as assertIsError } from "./assert_throws-
|
|
4
|
+
import { l as AssertionError, s as format } from "./assert_equals-C-ZRDbaf.mjs";
|
|
5
|
+
import { n as assertIsError } from "./assert_throws-BOkhLGYc.mjs";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js
|
|
7
7
|
/**
|
|
8
8
|
* Make an assertion, error will be thrown if `expr` have truthy value.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { a as red, i as buildMessage, l as AssertionError, n as diffStr, r as diff, s as format } from "./assert_equals-
|
|
4
|
+
import { a as red, i as buildMessage, l as AssertionError, n as diffStr, r as diff, s as format } from "./assert_equals-C-ZRDbaf.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_strict_equals.js
|
|
6
6
|
/**
|
|
7
7
|
* Make an assertion that `actual` and `expected` are equal using
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { l as AssertionError, o as stripAnsiCode } from "./assert_equals-
|
|
4
|
+
import { l as AssertionError, o as stripAnsiCode } from "./assert_equals-C-ZRDbaf.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js
|
|
6
6
|
/**
|
|
7
7
|
* Make an assertion that `error` is an `Error`.
|
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import { t as ActivityListenerSet } from "./activity-listener-BeTGV3wc.mjs";
|
|
4
|
+
import { n as version, t as name } from "./deno-B_9yJW3w.mjs";
|
|
5
|
+
import { t as ActivityListenerSet } from "./activity-listener-tztVvlNb.mjs";
|
|
7
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
|
+
import { Router, RouterError, assertPath } from "@fedify/uri-template";
|
|
8
8
|
import { Tombstone, getTypeId } from "@fedify/vocab";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
//#region src/federation/builder.ts
|
|
11
11
|
const ACTOR_ALIAS_PREFIX = "actorAlias:";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Route options shared by every dispatcher whose path must expose exactly
|
|
14
|
+
* one `{identifier}` variable bound to a single, non-empty value
|
|
15
|
+
* for `setOutboxDispatcher/Listener()`.
|
|
16
|
+
*/
|
|
17
|
+
const identifierSingular = {
|
|
18
|
+
exact: true,
|
|
19
|
+
variables: { identifier: { operatables: [""] } }
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Route options shared by every dispatcher whose path must expose
|
|
23
|
+
* `{identifier}` and `{+identifier}` variables bound to the same single,
|
|
24
|
+
* non-empty value for following setters:
|
|
25
|
+
* - `setActorDispatcher()` (actor path)
|
|
26
|
+
* - `setInboxDispatcher/Listener()` (inbox path)
|
|
27
|
+
* - `setFollowingDispatcher()` (following path)
|
|
28
|
+
* - `setFollowersDispatcher()` (followers path)
|
|
29
|
+
* - `setLikedDispatcher()` (liked path)
|
|
30
|
+
* - `setFeaturedDispatcher()` (featured path)
|
|
31
|
+
* - `setFeaturedTagsDispatcher()` (featured tags path)
|
|
32
|
+
*/
|
|
33
|
+
const identifierSingularAllowPlus = {
|
|
34
|
+
exact: true,
|
|
35
|
+
variables: { identifier: { operatables: ["", "+"] } }
|
|
36
|
+
};
|
|
23
37
|
var FederationBuilderImpl = class {
|
|
24
38
|
router;
|
|
25
39
|
actorCallbacks;
|
|
@@ -59,7 +73,7 @@ var FederationBuilderImpl = class {
|
|
|
59
73
|
this.collectionTypeIds = {};
|
|
60
74
|
}
|
|
61
75
|
async build(options) {
|
|
62
|
-
const { FederationImpl } = await import("./middleware-
|
|
76
|
+
const { FederationImpl } = await import("./middleware-CztxpARM.mjs");
|
|
63
77
|
const f = new FederationImpl(options);
|
|
64
78
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
65
79
|
f.router = this.router.clone();
|
|
@@ -95,8 +109,8 @@ var FederationBuilderImpl = class {
|
|
|
95
109
|
}
|
|
96
110
|
setActorDispatcher(path, dispatcher) {
|
|
97
111
|
if (this.router.has("actor")) throw new RouterError("Actor dispatcher already set.");
|
|
98
|
-
|
|
99
|
-
|
|
112
|
+
assertPath(path);
|
|
113
|
+
this.router.add(path, "actor", identifierSingularAllowPlus);
|
|
100
114
|
const callbacks = { dispatcher: async (context, identifier) => {
|
|
101
115
|
const actor = await this._getTracer().startActiveSpan("activitypub.dispatch_actor", {
|
|
102
116
|
kind: SpanKind.SERVER,
|
|
@@ -198,7 +212,7 @@ var FederationBuilderImpl = class {
|
|
|
198
212
|
mapActorAlias: (path, identifier) => {
|
|
199
213
|
if (identifier === "") throw new RouterError("Identifier cannot be empty.");
|
|
200
214
|
if (this.router.has(`actorAlias:${identifier}`)) throw new RouterError(`Actor alias for "${identifier}" already set.`);
|
|
201
|
-
if (
|
|
215
|
+
if (Router.variables(path).size > 0) throw new RouterError("Path for actor alias must have no variables.");
|
|
202
216
|
const existingRoute = this.router.route(path);
|
|
203
217
|
if (existingRoute != null) throw new RouterError(`Actor alias path "${path}" conflicts with existing route "${existingRoute.name}".`);
|
|
204
218
|
this.router.add(path, `${ACTOR_ALIAS_PREFIX}${identifier}`);
|
|
@@ -213,7 +227,8 @@ var FederationBuilderImpl = class {
|
|
|
213
227
|
}
|
|
214
228
|
setNodeInfoDispatcher(path, dispatcher) {
|
|
215
229
|
if (this.router.has("nodeInfo")) throw new RouterError("NodeInfo dispatcher already set.");
|
|
216
|
-
if (
|
|
230
|
+
if (Router.variables(path).size !== 0) throw new RouterError("Path for NodeInfo dispatcher must have no variables.");
|
|
231
|
+
this.router.add(path, "nodeInfo");
|
|
217
232
|
this.nodeInfoDispatcher = dispatcher;
|
|
218
233
|
}
|
|
219
234
|
setWebFingerLinksDispatcher(dispatcher) {
|
|
@@ -222,8 +237,9 @@ var FederationBuilderImpl = class {
|
|
|
222
237
|
setObjectDispatcher(cls, path, dispatcher) {
|
|
223
238
|
const routeName = `object:${cls.typeId.href}`;
|
|
224
239
|
if (this.router.has(routeName)) throw new RouterError(`Object dispatcher for ${cls.name} already set.`);
|
|
225
|
-
|
|
226
|
-
|
|
240
|
+
assertPath(path);
|
|
241
|
+
const variables = Router.variables(path);
|
|
242
|
+
this.router.add(path, routeName);
|
|
227
243
|
const callbacks = {
|
|
228
244
|
dispatcher: (ctx, values) => {
|
|
229
245
|
return this._getTracer().startActiveSpan("activitypub.dispatch_object", {
|
|
@@ -265,8 +281,8 @@ var FederationBuilderImpl = class {
|
|
|
265
281
|
if (this.router.has("inbox")) {
|
|
266
282
|
if (this.inboxPath !== path) throw new RouterError("Inbox dispatcher path must match inbox listener path.");
|
|
267
283
|
} else {
|
|
268
|
-
|
|
269
|
-
|
|
284
|
+
assertPath(path);
|
|
285
|
+
this.router.add(path, "inbox", identifierSingularAllowPlus);
|
|
270
286
|
this.inboxPath = path;
|
|
271
287
|
}
|
|
272
288
|
const callbacks = { dispatcher };
|
|
@@ -296,8 +312,8 @@ var FederationBuilderImpl = class {
|
|
|
296
312
|
if (this.router.has("outbox")) {
|
|
297
313
|
if (this.outboxPath !== path) throw new RouterError("Outbox dispatcher path must match outbox listener path.");
|
|
298
314
|
} else {
|
|
299
|
-
|
|
300
|
-
this.router.add(path, "outbox");
|
|
315
|
+
assertPath(path);
|
|
316
|
+
this.router.add(path, "outbox", identifierSingular);
|
|
301
317
|
this.outboxPath = path;
|
|
302
318
|
}
|
|
303
319
|
const callbacks = { dispatcher };
|
|
@@ -327,8 +343,8 @@ var FederationBuilderImpl = class {
|
|
|
327
343
|
if (this.router.has("outbox")) {
|
|
328
344
|
if (this.outboxPath !== outboxPath) throw new RouterError("Outbox listener path must match outbox dispatcher path.");
|
|
329
345
|
} else {
|
|
330
|
-
|
|
331
|
-
this.router.add(outboxPath, "outbox");
|
|
346
|
+
assertPath(outboxPath);
|
|
347
|
+
this.router.add(outboxPath, "outbox", identifierSingular);
|
|
332
348
|
this.outboxPath = outboxPath;
|
|
333
349
|
}
|
|
334
350
|
const listeners = this.outboxListeners = new ActivityListenerSet();
|
|
@@ -350,8 +366,8 @@ var FederationBuilderImpl = class {
|
|
|
350
366
|
}
|
|
351
367
|
setFollowingDispatcher(path, dispatcher) {
|
|
352
368
|
if (this.router.has("following")) throw new RouterError("Following collection dispatcher already set.");
|
|
353
|
-
|
|
354
|
-
|
|
369
|
+
assertPath(path);
|
|
370
|
+
this.router.add(path, "following", identifierSingularAllowPlus);
|
|
355
371
|
const callbacks = { dispatcher };
|
|
356
372
|
this.followingCallbacks = callbacks;
|
|
357
373
|
const setters = {
|
|
@@ -376,8 +392,8 @@ var FederationBuilderImpl = class {
|
|
|
376
392
|
}
|
|
377
393
|
setFollowersDispatcher(path, dispatcher) {
|
|
378
394
|
if (this.router.has("followers")) throw new RouterError("Followers collection dispatcher already set.");
|
|
379
|
-
|
|
380
|
-
|
|
395
|
+
assertPath(path);
|
|
396
|
+
this.router.add(path, "followers", identifierSingularAllowPlus);
|
|
381
397
|
const callbacks = { dispatcher };
|
|
382
398
|
this.followersCallbacks = callbacks;
|
|
383
399
|
const setters = {
|
|
@@ -402,8 +418,8 @@ var FederationBuilderImpl = class {
|
|
|
402
418
|
}
|
|
403
419
|
setLikedDispatcher(path, dispatcher) {
|
|
404
420
|
if (this.router.has("liked")) throw new RouterError("Liked collection dispatcher already set.");
|
|
405
|
-
|
|
406
|
-
|
|
421
|
+
assertPath(path);
|
|
422
|
+
this.router.add(path, "liked", identifierSingularAllowPlus);
|
|
407
423
|
const callbacks = { dispatcher };
|
|
408
424
|
this.likedCallbacks = callbacks;
|
|
409
425
|
const setters = {
|
|
@@ -428,8 +444,8 @@ var FederationBuilderImpl = class {
|
|
|
428
444
|
}
|
|
429
445
|
setFeaturedDispatcher(path, dispatcher) {
|
|
430
446
|
if (this.router.has("featured")) throw new RouterError("Featured collection dispatcher already set.");
|
|
431
|
-
|
|
432
|
-
|
|
447
|
+
assertPath(path);
|
|
448
|
+
this.router.add(path, "featured", identifierSingularAllowPlus);
|
|
433
449
|
const callbacks = { dispatcher };
|
|
434
450
|
this.featuredCallbacks = callbacks;
|
|
435
451
|
const setters = {
|
|
@@ -454,8 +470,8 @@ var FederationBuilderImpl = class {
|
|
|
454
470
|
}
|
|
455
471
|
setFeaturedTagsDispatcher(path, dispatcher) {
|
|
456
472
|
if (this.router.has("featuredTags")) throw new RouterError("Featured tags collection dispatcher already set.");
|
|
457
|
-
|
|
458
|
-
|
|
473
|
+
assertPath(path);
|
|
474
|
+
this.router.add(path, "featuredTags", identifierSingularAllowPlus);
|
|
459
475
|
const callbacks = { dispatcher };
|
|
460
476
|
this.featuredTagsCallbacks = callbacks;
|
|
461
477
|
const setters = {
|
|
@@ -483,12 +499,13 @@ var FederationBuilderImpl = class {
|
|
|
483
499
|
if (this.router.has("inbox")) {
|
|
484
500
|
if (this.inboxPath !== inboxPath) throw new RouterError("Inbox listener path must match inbox dispatcher path.");
|
|
485
501
|
} else {
|
|
486
|
-
|
|
487
|
-
|
|
502
|
+
assertPath(inboxPath);
|
|
503
|
+
this.router.add(inboxPath, "inbox", identifierSingularAllowPlus);
|
|
488
504
|
this.inboxPath = inboxPath;
|
|
489
505
|
}
|
|
490
506
|
if (sharedInboxPath != null) {
|
|
491
|
-
if (
|
|
507
|
+
if (Router.variables(sharedInboxPath).size !== 0) throw new RouterError("Path for shared inbox must have no variables.");
|
|
508
|
+
this.router.add(sharedInboxPath, "sharedInbox");
|
|
492
509
|
}
|
|
493
510
|
const listeners = this.inboxListeners = new ActivityListenerSet();
|
|
494
511
|
const setters = {
|
|
@@ -526,7 +543,9 @@ var FederationBuilderImpl = class {
|
|
|
526
543
|
const routeName = `${collectionType}:${this.#uniqueCollectionId(name)}`;
|
|
527
544
|
if (this.router.has(routeName)) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
|
|
528
545
|
if (this.collectionCallbacks[name] != null) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
|
|
529
|
-
|
|
546
|
+
assertPath(path);
|
|
547
|
+
if (Router.variables(path).size < 1) throw new RouterError("Path for collection dispatcher must have at least one variable.");
|
|
548
|
+
this.router.add(path, routeName);
|
|
530
549
|
const callbacks = { dispatcher };
|
|
531
550
|
this.collectionCallbacks[name] = callbacks;
|
|
532
551
|
this.collectionTypeIds[name] = itemType;
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import {
|
|
2
|
+
import { n as Context, vt as ActivityTransformer } from "../context-DI2gRbyN.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 {
|
|
2
|
+
import { n as Context, vt as ActivityTransformer } from "../context-DCtsSHDv.js";
|
|
3
3
|
import { Activity } from "@fedify/vocab";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/transformers.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { t as assertStrictEquals } from "../assert_strict_equals-
|
|
6
|
-
import { n as normalizeAttachmentArrays, r as normalizeOutgoingActivityJsonLd, t as isPreloadedContextAttachmentSafe } from "../outgoing-jsonld-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
5
|
+
import { t as assertStrictEquals } from "../assert_strict_equals-XEgZAlrj.mjs";
|
|
6
|
+
import { n as normalizeAttachmentArrays, r as normalizeOutgoingActivityJsonLd, t as isPreloadedContextAttachmentSafe } from "../outgoing-jsonld-BgFLCJQ_.mjs";
|
|
7
7
|
import { Create, Document, Note, PUBLIC_COLLECTION } from "@fedify/vocab";
|
|
8
8
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
9
9
|
//#region src/compat/outgoing-jsonld.test.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { t as assertNotEquals } from "../assert_not_equals
|
|
6
|
-
import { t as normalizePublicAudience } from "../public-audience-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
5
|
+
import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
|
|
6
|
+
import { t as normalizePublicAudience } from "../public-audience-N3pyOx2p.mjs";
|
|
7
7
|
import { Create, Note, PUBLIC_COLLECTION } from "@fedify/vocab";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
import { getDocumentLoader, preloadedContexts } from "@fedify/vocab-runtime";
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { t as assertInstanceOf } from "../assert_instance_of-
|
|
6
|
-
import { t as assert } from "../assert-
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { n as FederationImpl, v as actorDehydrator, y as autoIdAssigner } from "../middleware-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
5
|
+
import { t as assertInstanceOf } from "../assert_instance_of-DBC5X09g.mjs";
|
|
6
|
+
import { t as assert } from "../assert-OguE97r2.mjs";
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
8
|
+
import { n as FederationImpl, v as actorDehydrator, y as autoIdAssigner } from "../middleware-DQEgdr83.mjs";
|
|
9
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -4,6 +4,7 @@ import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from
|
|
|
4
4
|
import { n as GetKeyOwnerOptions } from "./owner-CnngXDNJ.js";
|
|
5
5
|
import { n as KvStore, t as KvKey } from "./kv-D6hNiMTK.js";
|
|
6
6
|
import { r as MessageQueue } from "./mq-D-nlpY04.js";
|
|
7
|
+
import { Router } from "@fedify/uri-template";
|
|
7
8
|
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, Tombstone, TraverseCollectionOptions } from "@fedify/vocab";
|
|
8
9
|
import { MeterProvider, Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
9
10
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
@@ -414,91 +415,6 @@ declare function respondWithObject(object: Object$1, options?: RespondWithObject
|
|
|
414
415
|
*/
|
|
415
416
|
declare function respondWithObjectIfAcceptable(object: Object$1, request: Request, options?: RespondWithObjectOptions): Promise<Response | null>;
|
|
416
417
|
//#endregion
|
|
417
|
-
//#region src/federation/router.d.ts
|
|
418
|
-
/**
|
|
419
|
-
* Options for the {@link Router}.
|
|
420
|
-
* @since 0.12.0
|
|
421
|
-
*/
|
|
422
|
-
interface RouterOptions {
|
|
423
|
-
/**
|
|
424
|
-
* Whether to ignore trailing slashes when matching paths.
|
|
425
|
-
*/
|
|
426
|
-
trailingSlashInsensitive?: boolean;
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* The result of {@link Router.route} method.
|
|
430
|
-
* @since 1.3.0
|
|
431
|
-
*/
|
|
432
|
-
interface RouterRouteResult {
|
|
433
|
-
/**
|
|
434
|
-
* The matched route name.
|
|
435
|
-
*/
|
|
436
|
-
name: string;
|
|
437
|
-
/**
|
|
438
|
-
* The URL template of the matched route.
|
|
439
|
-
*/
|
|
440
|
-
template: string;
|
|
441
|
-
/**
|
|
442
|
-
* The values extracted from the URL.
|
|
443
|
-
*/
|
|
444
|
-
values: Record<string, string>;
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* URL router and constructor based on URI Template
|
|
448
|
-
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
449
|
-
*/
|
|
450
|
-
declare class Router {
|
|
451
|
-
#private;
|
|
452
|
-
/**
|
|
453
|
-
* Whether to ignore trailing slashes when matching paths.
|
|
454
|
-
* @since 1.6.0
|
|
455
|
-
*/
|
|
456
|
-
trailingSlashInsensitive: boolean;
|
|
457
|
-
/**
|
|
458
|
-
* Create a new {@link Router}.
|
|
459
|
-
* @param options Options for the router.
|
|
460
|
-
*/
|
|
461
|
-
constructor(options?: RouterOptions);
|
|
462
|
-
clone(): Router;
|
|
463
|
-
/**
|
|
464
|
-
* Checks if a path name exists in the router.
|
|
465
|
-
* @param name The name of the path.
|
|
466
|
-
* @returns `true` if the path name exists, otherwise `false`.
|
|
467
|
-
*/
|
|
468
|
-
has(name: string): boolean;
|
|
469
|
-
/**
|
|
470
|
-
* Adds a new path rule to the router.
|
|
471
|
-
* @param template The path pattern.
|
|
472
|
-
* @param name The name of the path.
|
|
473
|
-
* @returns The names of the variables in the path pattern.
|
|
474
|
-
*/
|
|
475
|
-
add(template: string, name: string): Set<string>;
|
|
476
|
-
/**
|
|
477
|
-
* Resolves a path name and values from a URL, if any match.
|
|
478
|
-
* @param url The URL to resolve.
|
|
479
|
-
* @returns The name of the path and its values, if any match. Otherwise,
|
|
480
|
-
* `null`.
|
|
481
|
-
*/
|
|
482
|
-
route(url: string): RouterRouteResult | null;
|
|
483
|
-
/**
|
|
484
|
-
* Constructs a URL/path from a path name and values.
|
|
485
|
-
* @param name The name of the path.
|
|
486
|
-
* @param values The values to expand the path with.
|
|
487
|
-
* @returns The URL/path, if the name exists. Otherwise, `null`.
|
|
488
|
-
*/
|
|
489
|
-
build(name: string, values: Record<string, string>): string | null;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* An error thrown by the {@link Router}.
|
|
493
|
-
*/
|
|
494
|
-
declare class RouterError extends Error {
|
|
495
|
-
/**
|
|
496
|
-
* Create a new {@link RouterError}.
|
|
497
|
-
* @param message The error message.
|
|
498
|
-
*/
|
|
499
|
-
constructor(message: string);
|
|
500
|
-
}
|
|
501
|
-
//#endregion
|
|
502
418
|
//#region src/federation/builder.d.ts
|
|
503
419
|
/**
|
|
504
420
|
* Creates a new {@link FederationBuilder} instance.
|
|
@@ -2665,4 +2581,4 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
2665
2581
|
readonly multikey: Multikey;
|
|
2666
2582
|
}
|
|
2667
2583
|
//#endregion
|
|
2668
|
-
export {
|
|
2584
|
+
export { CustomCollectionDispatcher as $, FederationKvPrefixes as A, RespondWithObjectOptions as B, IdempotencyKeyCallback as C, ObjectCallbackSetters as D, InboxListenerSetters as E, RetryContext as F, ActorHandleMapper as G, respondWithObjectIfAcceptable as H, RetryPolicy as I, CollectionCounter as J, ActorKeyPairsDispatcher as K, createExponentialBackoffPolicy as L, FederationQueueOptions as M, createFederation as N, OutboxListenerSetters as O, CreateExponentialBackoffPolicyOptions as P, CustomCollectionCursor as Q, Message as R, FederationStartQueueOptions as S, InboxChallengePolicy as T, ActorAliasMapper as U, respondWithObject as V, ActorDispatcher as W, CollectionDispatcher as X, CollectionCursor as Y, CustomCollectionCounter as Z, Federatable as _, digest as _t, GetSignedKeyOptions as a, OutboxErrorHandler as at, FederationFetchOptions as b, ParseUriResult as c, OutboxPermanentFailureHandler as ct, SendActivityOptions as d, UnverifiedActivityReason as dt, InboxErrorHandler as et, SendActivityOptionsForCollection as f, WebFingerLinksDispatcher as ft, CustomCollectionCallbackSetters as g, buildCollectionSynchronizationHeader as gt, ConstructorWithTypeId as h, PageItems as ht, GetActorOptions as i, ObjectDispatcher as it, FederationOrigin as j, Rfc6570Expression as k, RequestContext as l, SharedInboxKeyDispatcher as lt, CollectionCallbackSetters as m, SenderKeyPair as mt, Context as n, NodeInfoDispatcher as nt, InboxContext as o, OutboxListener as ot, ActorCallbackSetters as p, SendActivityError as pt, AuthorizePredicate as q, ForwardActivityOptions as r, ObjectAuthorizePredicate as rt, OutboxContext as s, OutboxListenerErrorHandler as st, ActorKeyPair as t, InboxListener as tt, RouteActivityOptions as u, UnverifiedActivityHandler as ut, Federation as v, ActivityTransformer as vt, IdempotencyStrategy as w, FederationOptions as x, FederationBuilder as y, createFederationBuilder as z };
|
|
@@ -8,7 +8,6 @@ import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObj
|
|
|
8
8
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
9
9
|
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
|
|
10
10
|
import { MeterProvider, Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
11
|
-
|
|
12
11
|
//#region src/compat/types.d.ts
|
|
13
12
|
/**
|
|
14
13
|
* A function that transforms an activity object.
|
|
@@ -414,91 +413,6 @@ declare function respondWithObject(object: Object$1, options?: RespondWithObject
|
|
|
414
413
|
*/
|
|
415
414
|
declare function respondWithObjectIfAcceptable(object: Object$1, request: Request, options?: RespondWithObjectOptions): Promise<Response | null>;
|
|
416
415
|
//#endregion
|
|
417
|
-
//#region src/federation/router.d.ts
|
|
418
|
-
/**
|
|
419
|
-
* Options for the {@link Router}.
|
|
420
|
-
* @since 0.12.0
|
|
421
|
-
*/
|
|
422
|
-
interface RouterOptions {
|
|
423
|
-
/**
|
|
424
|
-
* Whether to ignore trailing slashes when matching paths.
|
|
425
|
-
*/
|
|
426
|
-
trailingSlashInsensitive?: boolean;
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* The result of {@link Router.route} method.
|
|
430
|
-
* @since 1.3.0
|
|
431
|
-
*/
|
|
432
|
-
interface RouterRouteResult {
|
|
433
|
-
/**
|
|
434
|
-
* The matched route name.
|
|
435
|
-
*/
|
|
436
|
-
name: string;
|
|
437
|
-
/**
|
|
438
|
-
* The URL template of the matched route.
|
|
439
|
-
*/
|
|
440
|
-
template: string;
|
|
441
|
-
/**
|
|
442
|
-
* The values extracted from the URL.
|
|
443
|
-
*/
|
|
444
|
-
values: Record<string, string>;
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* URL router and constructor based on URI Template
|
|
448
|
-
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
449
|
-
*/
|
|
450
|
-
declare class Router {
|
|
451
|
-
#private;
|
|
452
|
-
/**
|
|
453
|
-
* Whether to ignore trailing slashes when matching paths.
|
|
454
|
-
* @since 1.6.0
|
|
455
|
-
*/
|
|
456
|
-
trailingSlashInsensitive: boolean;
|
|
457
|
-
/**
|
|
458
|
-
* Create a new {@link Router}.
|
|
459
|
-
* @param options Options for the router.
|
|
460
|
-
*/
|
|
461
|
-
constructor(options?: RouterOptions);
|
|
462
|
-
clone(): Router;
|
|
463
|
-
/**
|
|
464
|
-
* Checks if a path name exists in the router.
|
|
465
|
-
* @param name The name of the path.
|
|
466
|
-
* @returns `true` if the path name exists, otherwise `false`.
|
|
467
|
-
*/
|
|
468
|
-
has(name: string): boolean;
|
|
469
|
-
/**
|
|
470
|
-
* Adds a new path rule to the router.
|
|
471
|
-
* @param template The path pattern.
|
|
472
|
-
* @param name The name of the path.
|
|
473
|
-
* @returns The names of the variables in the path pattern.
|
|
474
|
-
*/
|
|
475
|
-
add(template: string, name: string): Set<string>;
|
|
476
|
-
/**
|
|
477
|
-
* Resolves a path name and values from a URL, if any match.
|
|
478
|
-
* @param url The URL to resolve.
|
|
479
|
-
* @returns The name of the path and its values, if any match. Otherwise,
|
|
480
|
-
* `null`.
|
|
481
|
-
*/
|
|
482
|
-
route(url: string): RouterRouteResult | null;
|
|
483
|
-
/**
|
|
484
|
-
* Constructs a URL/path from a path name and values.
|
|
485
|
-
* @param name The name of the path.
|
|
486
|
-
* @param values The values to expand the path with.
|
|
487
|
-
* @returns The URL/path, if the name exists. Otherwise, `null`.
|
|
488
|
-
*/
|
|
489
|
-
build(name: string, values: Record<string, string>): string | null;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* An error thrown by the {@link Router}.
|
|
493
|
-
*/
|
|
494
|
-
declare class RouterError extends Error {
|
|
495
|
-
/**
|
|
496
|
-
* Create a new {@link RouterError}.
|
|
497
|
-
* @param message The error message.
|
|
498
|
-
*/
|
|
499
|
-
constructor(message: string);
|
|
500
|
-
}
|
|
501
|
-
//#endregion
|
|
502
416
|
//#region src/federation/builder.d.ts
|
|
503
417
|
/**
|
|
504
418
|
* Creates a new {@link FederationBuilder} instance.
|
|
@@ -2665,4 +2579,4 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
2665
2579
|
readonly multikey: Multikey;
|
|
2666
2580
|
}
|
|
2667
2581
|
//#endregion
|
|
2668
|
-
export {
|
|
2582
|
+
export { CustomCollectionDispatcher as $, FederationKvPrefixes as A, RespondWithObjectOptions as B, IdempotencyKeyCallback as C, ObjectCallbackSetters as D, InboxListenerSetters as E, RetryContext as F, ActorHandleMapper as G, respondWithObjectIfAcceptable as H, RetryPolicy as I, CollectionCounter as J, ActorKeyPairsDispatcher as K, createExponentialBackoffPolicy as L, FederationQueueOptions as M, createFederation as N, OutboxListenerSetters as O, CreateExponentialBackoffPolicyOptions as P, CustomCollectionCursor as Q, Message as R, FederationStartQueueOptions as S, InboxChallengePolicy as T, ActorAliasMapper as U, respondWithObject as V, ActorDispatcher as W, CollectionDispatcher as X, CollectionCursor as Y, CustomCollectionCounter as Z, Federatable as _, digest as _t, GetSignedKeyOptions as a, OutboxErrorHandler as at, FederationFetchOptions as b, ParseUriResult as c, OutboxPermanentFailureHandler as ct, SendActivityOptions as d, UnverifiedActivityReason as dt, InboxErrorHandler as et, SendActivityOptionsForCollection as f, WebFingerLinksDispatcher as ft, CustomCollectionCallbackSetters as g, buildCollectionSynchronizationHeader as gt, ConstructorWithTypeId as h, PageItems as ht, GetActorOptions as i, ObjectDispatcher as it, FederationOrigin as j, Rfc6570Expression as k, RequestContext as l, SharedInboxKeyDispatcher as lt, CollectionCallbackSetters as m, SenderKeyPair as mt, Context as n, NodeInfoDispatcher as nt, InboxContext as o, OutboxListener as ot, ActorCallbackSetters as p, SendActivityError as pt, AuthorizePredicate as q, ForwardActivityOptions as r, ObjectAuthorizePredicate as rt, OutboxContext as s, OutboxListenerErrorHandler as st, ActorKeyPair as t, InboxListener as tt, RouteActivityOptions as u, UnverifiedActivityHandler as ut, Federation as v, ActivityTransformer as vt, IdempotencyStrategy as w, FederationOptions as x, FederationBuilder as y, createFederationBuilder as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as RouterError } from "./router-BT_F5748.mjs";
|
|
5
4
|
import { getLogger } from "@logtape/logtape";
|
|
6
5
|
import "@opentelemetry/sdk-trace-base";
|
|
7
6
|
import "@opentelemetry/core";
|
|
7
|
+
import { RouterError } from "@fedify/uri-template";
|
|
8
8
|
import { lookupObject, traverseCollection } from "@fedify/vocab";
|
|
9
9
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
10
10
|
import { metrics, trace } from "@opentelemetry/api";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { o as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { o as validateCryptoKey } from "./key-CkkMJBjF.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-Cyx5SNuu.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
|
-
import { curry } from "es-toolkit";
|
|
8
7
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
|
+
import { curry } from "es-toolkit";
|
|
9
9
|
//#region src/utils/docloader.ts
|
|
10
10
|
const logger = getLogger([
|
|
11
11
|
"fedify",
|