@fedify/fedify 2.0.35-dev.2470 → 2.0.35-dev.2485
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-CusH9K0G.mjs → builder-CKbQrOH1.mjs} +3 -3
- package/dist/{client-CAM_bQXx.d.cts → client-BIBzqEIp.d.cts} +0 -1
- package/dist/{client-BUqbea1d.mjs → client-DGNacEx_.mjs} +113 -64
- package/dist/{client-CSddvgWN.d.ts → client-jE7oGvRh.d.ts} +0 -1
- 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/{context-r8sjhltN.d.cts → context-CnoWxuoB.d.cts} +2 -2
- package/dist/{context-B2iX3heK.d.ts → context-lxjaUTAI.d.ts} +2 -2
- package/dist/{deno-BtRoR9in.mjs → deno-DL_ifPJk.mjs} +1 -1
- package/dist/docloader-B0_0Fjqo.mjs +124 -0
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +6 -6
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +42 -23
- 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/send.test.mjs +445 -70
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{http-Bs6thuCC.d.cts → http-Cd8UD1ym.d.ts} +1 -2
- package/dist/{http-C7d5tddX.cjs → http-CjkqnlR2.cjs} +114 -56
- package/dist/{http-CDupyfOc.d.ts → http-DFqAb11b.d.cts} +1 -2
- package/dist/{http-BTQ5wllw.js → http-DVEBwq6e.js} +113 -55
- package/dist/{http-CMduEDST.mjs → http-Dvsq4uCu.mjs} +136 -49
- package/dist/{inbox-BkvNt_Sb.mjs → inbox-D6YbZFrZ.mjs} +1 -1
- package/dist/{key-CDAqlyxF.mjs → key-CgcWGw6W.mjs} +1 -1
- package/dist/{kv-cache-Cm0DSKFo.js → kv-cache-DC_F2WSH.js} +60 -18
- package/dist/{kv-cache-D-xcxGwU.cjs → kv-cache-nN9RaiYp.cjs} +59 -17
- package/dist/{ld-Ceiqwon2.mjs → ld-CfOIwHup.mjs} +2 -2
- package/dist/{middleware-NVjGfqSC.js → middleware-B0eqDUmD.js} +118 -33
- package/dist/{middleware-Bj0R0_D7.mjs → middleware-CA7egMDR.mjs} +12 -12
- package/dist/{middleware-Bx0vwC0P.cjs → middleware-Cu_yKroA.cjs} +1 -1
- package/dist/{middleware-bv6duFIF.mjs → middleware-DEwj7jGj.mjs} +1 -1
- package/dist/{middleware-BWtJCObq.cjs → middleware-DZvWX5af.cjs} +118 -33
- package/dist/{mod-BkPB4hPe.d.cts → mod-BPDfu4Ey.d.cts} +2 -7
- package/dist/{mod-E7YM72JZ.d.ts → mod-BS-jg3Wx.d.ts} +1 -1
- package/dist/{mod-BKJyD7nk.d.ts → mod-DGP89q0u.d.ts} +2 -7
- package/dist/{mod-IOWUF5Yr.d.cts → mod-DVPS4yam.d.cts} +1 -1
- package/dist/{mod-CM_eR8hQ.d.ts → mod-I-34OMN3.d.ts} +1 -1
- package/dist/{mod-DDTLbfce.d.cts → mod-w1oyHseQ.d.cts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +6 -6
- package/dist/mod.d.ts +6 -6
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/client.test.mjs +337 -19
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.d.cts +1 -1
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/otel/exporter.test.mjs +292 -30
- package/dist/otel/mod.cjs +36 -30
- package/dist/otel/mod.d.cts +13 -0
- package/dist/otel/mod.d.ts +13 -0
- package/dist/otel/mod.js +36 -30
- package/dist/{owner-Cmn2WKBi.mjs → owner-BvVwCoj2.mjs} +2 -2
- package/dist/{proof-DllVQdfR.cjs → proof-BssSZpMi.cjs} +1 -1
- package/dist/{proof-VZ9Ryp3F.mjs → proof-C9TBSmUR.mjs} +2 -2
- package/dist/{proof-ClDA_fq4.js → proof-Cp62GFJ3.js} +1 -1
- package/dist/{send-BiC5gxMS.mjs → send-ZWmjk2Zf.mjs} +117 -32
- package/dist/sig/http.test.mjs +411 -2
- package/dist/sig/key.test.mjs +2 -2
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +2 -2
- package/dist/sig/mod.d.ts +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +1 -1
- package/dist/{temporal-DXm8zGR8.mjs → temporal-BNtFi_ut.mjs} +1 -1
- package/dist/testing/mod.d.mts +0 -1
- package/dist/{types-miAYfiGO.js → types-B1_pRFE_.js} +112 -63
- package/dist/{types-DRPjmHVV.cjs → types-DOvyymM4.cjs} +111 -62
- package/dist/utils/docloader.test.mjs +316 -32
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
- package/dist/docloader-BF0FJHJ1.mjs +0 -82
|
@@ -9,14 +9,14 @@ import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.m
|
|
|
9
9
|
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
10
10
|
import { t as assertNotEquals } from "../assert_not_equals-BkxW5QJI.mjs";
|
|
11
11
|
import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { c as signRequest, u as verifyRequest } from "../http-Dvsq4uCu.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
|
|
14
|
-
import {
|
|
15
|
-
import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-
|
|
16
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
17
|
-
import { n as signObject, r as verifyObject } from "../proof-
|
|
14
|
+
import { n as getAuthenticatedDocumentLoader } from "../docloader-B0_0Fjqo.mjs";
|
|
15
|
+
import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-CfOIwHup.mjs";
|
|
16
|
+
import { t as doesActorOwnKey } from "../owner-BvVwCoj2.mjs";
|
|
17
|
+
import { n as signObject, r as verifyObject } from "../proof-C9TBSmUR.mjs";
|
|
18
18
|
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
19
|
-
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-
|
|
19
|
+
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-CA7egMDR.mjs";
|
|
20
20
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
21
21
|
import * as vocab from "@fedify/vocab";
|
|
22
22
|
import { Create, Offer, Person, getTypeId, lookupObject } from "@fedify/vocab";
|
|
@@ -86,7 +86,7 @@ var person2_default = {
|
|
|
86
86
|
};
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/federation/middleware.test.ts
|
|
89
|
-
const documentLoader = getDocumentLoader();
|
|
89
|
+
const documentLoader = getDocumentLoader({ allowPrivateAddress: true });
|
|
90
90
|
test("createFederation()", async (t) => {
|
|
91
91
|
const kv = new MemoryKvStore();
|
|
92
92
|
await t.step("allowPrivateAddress", () => {
|
|
@@ -216,7 +216,8 @@ test({
|
|
|
216
216
|
const federation = createFederation({
|
|
217
217
|
kv,
|
|
218
218
|
documentLoaderFactory: () => rejectingLoader,
|
|
219
|
-
contextLoaderFactory: () => mockDocumentLoader
|
|
219
|
+
contextLoaderFactory: () => mockDocumentLoader,
|
|
220
|
+
authenticatedDocumentLoaderFactory: (identity) => getAuthenticatedDocumentLoader(identity, { allowPrivateAddress: true })
|
|
220
221
|
});
|
|
221
222
|
let ctx = federation.createContext(new URL("https://example.com:1234/"), 123);
|
|
222
223
|
assertEquals(ctx.data, 123);
|
|
@@ -321,7 +322,7 @@ test({
|
|
|
321
322
|
documentUrl: "https://example.com/auth-check",
|
|
322
323
|
document: true
|
|
323
324
|
});
|
|
324
|
-
assertEquals(await ctx.lookupObject("https://example.com/object"), null);
|
|
325
|
+
assertEquals(await withDnsLookup(() => Promise.reject(/* @__PURE__ */ new Error("Resolver unavailable")), () => ctx.lookupObject("https://example.com/object")), null);
|
|
325
326
|
await assertRejects(() => ctx.sendActivity({ identifier: "handle" }, [], new vocab.Create({})), TypeError, "The activity to send must have at least one actor property.");
|
|
326
327
|
await ctx.sendActivity({ identifier: "handle" }, [], new vocab.Create({ actor: new URL("https://example.com/users/handle") }));
|
|
327
328
|
esm_default.get("https://example.com/object", () => new Response(JSON.stringify({
|
|
@@ -570,7 +571,7 @@ test({
|
|
|
570
571
|
assertStrictEquals(clone.contextLoader, ctx.contextLoader);
|
|
571
572
|
assertStrictEquals(clone.federation, ctx.federation);
|
|
572
573
|
});
|
|
573
|
-
esm_default.get("
|
|
574
|
+
esm_default.get("path:/.well-known/nodeinfo", (cl) => {
|
|
574
575
|
const headers = cl.options.headers ?? {};
|
|
575
576
|
assertEquals(new Headers(headers).get("User-Agent"), "CustomUserAgent/1.2.3");
|
|
576
577
|
return new Response(JSON.stringify({ links: [{
|
|
@@ -578,7 +579,7 @@ test({
|
|
|
578
579
|
href: "https://example.com/nodeinfo/2.1"
|
|
579
580
|
}] }));
|
|
580
581
|
});
|
|
581
|
-
esm_default.get("
|
|
582
|
+
esm_default.get("path:/nodeinfo/2.1", (cl) => {
|
|
582
583
|
const headers = cl.options.headers ?? {};
|
|
583
584
|
assertEquals(new Headers(headers).get("User-Agent"), "CustomUserAgent/1.2.3");
|
|
584
585
|
return new Response(JSON.stringify({
|
|
@@ -599,7 +600,11 @@ test({
|
|
|
599
600
|
kv,
|
|
600
601
|
userAgent: "CustomUserAgent/1.2.3"
|
|
601
602
|
}).createContext(new URL("https://example.com/"), 123);
|
|
602
|
-
|
|
603
|
+
const lookupExample = () => Promise.resolve([{
|
|
604
|
+
address: "93.184.215.14",
|
|
605
|
+
family: 4
|
|
606
|
+
}]);
|
|
607
|
+
assertEquals(await withDnsLookup(lookupExample, () => ctx.lookupNodeInfo("https://example.com/")), {
|
|
603
608
|
software: {
|
|
604
609
|
name: "foo",
|
|
605
610
|
version: "1.2.3"
|
|
@@ -611,7 +616,7 @@ test({
|
|
|
611
616
|
localComments: 456
|
|
612
617
|
}
|
|
613
618
|
});
|
|
614
|
-
assertEquals(await ctx.lookupNodeInfo("https://example.com/", { parse: "none" }), {
|
|
619
|
+
assertEquals(await withDnsLookup(lookupExample, () => ctx.lookupNodeInfo("https://example.com/", { parse: "none" })), {
|
|
615
620
|
software: {
|
|
616
621
|
name: "foo",
|
|
617
622
|
version: "1.2.3"
|
|
@@ -1071,7 +1076,7 @@ test("Federation.fetch()", async (t) => {
|
|
|
1071
1076
|
kv,
|
|
1072
1077
|
documentLoaderFactory: () => mockDocumentLoader,
|
|
1073
1078
|
authenticatedDocumentLoaderFactory(identity) {
|
|
1074
|
-
const docLoader = getAuthenticatedDocumentLoader(identity);
|
|
1079
|
+
const docLoader = getAuthenticatedDocumentLoader(identity, { allowPrivateAddress: true });
|
|
1075
1080
|
return (url) => {
|
|
1076
1081
|
if (new URL(url).host === "example.com") return docLoader(url);
|
|
1077
1082
|
return mockDocumentLoader(url);
|
|
@@ -1238,7 +1243,7 @@ test("Federation.setInboxListeners()", async (t) => {
|
|
|
1238
1243
|
kv,
|
|
1239
1244
|
documentLoaderFactory: () => mockDocumentLoader,
|
|
1240
1245
|
authenticatedDocumentLoaderFactory(identity) {
|
|
1241
|
-
const docLoader = getAuthenticatedDocumentLoader(identity);
|
|
1246
|
+
const docLoader = getAuthenticatedDocumentLoader(identity, { allowPrivateAddress: true });
|
|
1242
1247
|
return (url) => {
|
|
1243
1248
|
const urlObj = new URL(url);
|
|
1244
1249
|
authenticatedRequests.push([url, identity.keyId.href]);
|
|
@@ -1374,7 +1379,7 @@ test("Federation.setInboxListeners()", async (t) => {
|
|
|
1374
1379
|
kv,
|
|
1375
1380
|
documentLoaderFactory: () => mockDocumentLoader,
|
|
1376
1381
|
authenticatedDocumentLoaderFactory(identity) {
|
|
1377
|
-
const docLoader = getAuthenticatedDocumentLoader(identity);
|
|
1382
|
+
const docLoader = getAuthenticatedDocumentLoader(identity, { allowPrivateAddress: true });
|
|
1378
1383
|
return (url) => {
|
|
1379
1384
|
if (new URL(url).host === "example.com") return docLoader(url);
|
|
1380
1385
|
return mockDocumentLoader(url);
|
|
@@ -1509,7 +1514,7 @@ test("FederationImpl.sendActivity()", async (t) => {
|
|
|
1509
1514
|
});
|
|
1510
1515
|
const federation = new FederationImpl({
|
|
1511
1516
|
kv: new MemoryKvStore(),
|
|
1512
|
-
|
|
1517
|
+
allowPrivateAddress: true
|
|
1513
1518
|
});
|
|
1514
1519
|
const context = federation.createContext(new URL("https://example.com/"));
|
|
1515
1520
|
await t.step("success", async () => {
|
|
@@ -3476,7 +3481,7 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
3476
3481
|
const kv = new MemoryKvStore();
|
|
3477
3482
|
const federation = new FederationImpl({
|
|
3478
3483
|
kv,
|
|
3479
|
-
|
|
3484
|
+
allowPrivateAddress: true
|
|
3480
3485
|
});
|
|
3481
3486
|
federation.setActorDispatcher("/{identifier}", async (ctx, identifier) => {
|
|
3482
3487
|
if (identifier !== "1") return null;
|
|
@@ -3585,7 +3590,7 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
3585
3590
|
};
|
|
3586
3591
|
const federation2 = new FederationImpl({
|
|
3587
3592
|
kv,
|
|
3588
|
-
|
|
3593
|
+
allowPrivateAddress: true,
|
|
3589
3594
|
queue
|
|
3590
3595
|
});
|
|
3591
3596
|
federation2.setActorDispatcher("/{identifier}", async (ctx, identifier) => {
|
|
@@ -3708,7 +3713,7 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
3708
3713
|
const asyncEnqueued = [];
|
|
3709
3714
|
const fed = new FederationImpl({
|
|
3710
3715
|
kv,
|
|
3711
|
-
|
|
3716
|
+
allowPrivateAddress: true,
|
|
3712
3717
|
queue: {
|
|
3713
3718
|
enqueue(message) {
|
|
3714
3719
|
return new Promise((resolve) => {
|
|
@@ -3875,10 +3880,10 @@ test({
|
|
|
3875
3880
|
const signedInvite = await signObject(new vocab.Invite({ actor: new URL("https://example.com/person2") }), ed25519PrivateKey, ed25519Multikey.id);
|
|
3876
3881
|
assert(await ctx.routeActivity("id", signedInvite));
|
|
3877
3882
|
assertEquals(activities, [[null, signedOffer], ["id", signedInvite]]);
|
|
3878
|
-
assertFalse(await ctx.routeActivity(null, new vocab.Create({
|
|
3883
|
+
assertFalse(await withDnsLookup(() => Promise.reject(/* @__PURE__ */ new Error("Resolver unavailable")), () => ctx.routeActivity(null, new vocab.Create({
|
|
3879
3884
|
id: new URL("https://example.com/not-found"),
|
|
3880
3885
|
actor: new URL("https://example.com/person")
|
|
3881
|
-
})));
|
|
3886
|
+
}))));
|
|
3882
3887
|
assertEquals(activities, [[null, signedOffer], ["id", signedInvite]]);
|
|
3883
3888
|
assertFalse(await ctx.routeActivity(null, new vocab.Create({
|
|
3884
3889
|
id: new URL("https://example.com/person"),
|
|
@@ -4236,7 +4241,7 @@ test("InboxContextImpl.forwardActivity()", async (t) => {
|
|
|
4236
4241
|
});
|
|
4237
4242
|
const federation = new FederationImpl({
|
|
4238
4243
|
kv: new MemoryKvStore(),
|
|
4239
|
-
|
|
4244
|
+
allowPrivateAddress: true
|
|
4240
4245
|
});
|
|
4241
4246
|
await t.step("skip", async () => {
|
|
4242
4247
|
await new InboxContextImpl(null, {
|
|
@@ -4438,5 +4443,19 @@ test("Federation.fetch() bounds inbox bodies before dispatch", async () => {
|
|
|
4438
4443
|
}), { contextData: void 0 })).status, 202);
|
|
4439
4444
|
assert(dispatched);
|
|
4440
4445
|
});
|
|
4446
|
+
/**
|
|
4447
|
+
* Runs the given function while `node:dns/promises`' `lookup()`, which the
|
|
4448
|
+
* default public fetch resolves hostnames with, is replaced, so that no test
|
|
4449
|
+
* depends on the real DNS.
|
|
4450
|
+
*/
|
|
4451
|
+
async function withDnsLookup(lookup, fn) {
|
|
4452
|
+
const originalLookup = dns.lookup;
|
|
4453
|
+
dns.lookup = lookup;
|
|
4454
|
+
try {
|
|
4455
|
+
return await fn();
|
|
4456
|
+
} finally {
|
|
4457
|
+
dns.lookup = originalLookup;
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4441
4460
|
//#endregion
|
|
4442
4461
|
export {};
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -2,7 +2,7 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
require("../chunk-DDcVe30Y.cjs");
|
|
5
|
-
const require_middleware = require("../middleware-
|
|
5
|
+
const require_middleware = require("../middleware-DZvWX5af.cjs");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
//#region src/federation/kv.ts
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-
|
|
2
|
+
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-CnoWxuoB.cjs";
|
|
3
3
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-CZKl1IUS.cjs";
|
|
4
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-
|
|
4
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-w1oyHseQ.cjs";
|
|
5
5
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-
|
|
2
|
+
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-lxjaUTAI.js";
|
|
3
3
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-CxaI4eGo.js";
|
|
4
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-
|
|
4
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-I-34OMN3.js";
|
|
5
5
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-
|
|
3
|
+
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-B0eqDUmD.js";
|
|
4
4
|
import { isEqual } from "es-toolkit";
|
|
5
5
|
//#region src/federation/kv.ts
|
|
6
6
|
/**
|