@fedify/fedify 2.3.0-dev.1021 → 2.3.0-dev.1034
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-Nn2r1dKd.mjs → builder-y06Dq5bp.mjs} +3 -3
- package/dist/chunk-QSgtlS85.mjs +29 -0
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/outgoing-jsonld.test.mjs +1 -1
- package/dist/compat/public-audience.test.mjs +1 -1
- package/dist/compat/transformers.test.mjs +2 -2
- package/dist/{context-Dk_tacqz.mjs → context-7Azky82W.mjs} +3 -2
- package/dist/{context-Bxs4cdIZ.d.cts → context-BKLGj9QO.d.cts} +12 -1
- package/dist/{context-CVNXcFHR.d.ts → context-DrNqYkPw.d.ts} +12 -1
- package/dist/{deno-BnQyJ03o.mjs → deno-DB1H1VHx.mjs} +1 -1
- package/dist/{docloader-mEJ3hsMB.mjs → docloader-3HwiWeYL.mjs} +2 -2
- package/dist/{esm-DVILvP5e.mjs → esm-DhnRLoG9.mjs} +1 -24
- package/dist/execAsync-eck5rbtb.mjs +13 -0
- package/dist/federation/builder.test.mjs +2 -2
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +48 -11
- package/dist/federation/idempotency.test.mjs +4 -4
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/keycache.test.mjs +2 -2
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +103 -12
- 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/negotiation.test.mjs +1 -1
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/send.test.mjs +4540 -11
- package/dist/federation/webfinger.test.mjs +3 -3
- package/dist/getMachineId-bsd-DqZ4QRFp.mjs +29 -0
- package/dist/getMachineId-darwin-DMbbW3m7.mjs +26 -0
- package/dist/getMachineId-linux-lyeD2ug3.mjs +22 -0
- package/dist/getMachineId-unsupported-JuKr57jY.mjs +17 -0
- package/dist/getMachineId-win-Dxyf5pJq.mjs +28 -0
- package/dist/{http-BJ-t29n_.js → http-BUr93aO6.js} +1 -1
- package/dist/{http-CfToB_iu.mjs → http-D9zG-L9N.mjs} +3 -3
- package/dist/{http-D4xMqSqO.cjs → http-FnUTcdMf.cjs} +1 -1
- package/dist/{key-CeANlo1H.mjs → key-CV57mOYH.mjs} +1 -1
- package/dist/{kv-cache-DRwOjOkl.cjs → kv-cache-BG9O8wVV.cjs} +1 -1
- package/dist/{kv-cache-B142kDZL.js → kv-cache-C3esyJFP.js} +1 -1
- package/dist/{ld-CUlVC-TS.mjs → ld-sUf94RJ8.mjs} +2 -2
- package/dist/{middleware-I5XEZ_pZ.cjs → middleware-CKkBrsOD.cjs} +185 -27
- package/dist/{middleware-Cgy7UwfR.mjs → middleware-cMxbPxDe.mjs} +1 -1
- package/dist/{middleware-CysDkaXo.js → middleware-fAuUxD9-.js} +185 -27
- package/dist/{middleware-ASvK22Do.cjs → middleware-ohzkLsW4.cjs} +1 -1
- package/dist/{middleware-BPZEcrMG.mjs → middleware-pb2EqN_r.mjs} +67 -22
- package/dist/{mod-Bc6p4npy.d.ts → mod-B8Z8mBLk.d.ts} +1 -1
- package/dist/{mod-zA6NZHUG.d.cts → mod-DClCOv0M.d.cts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/client.test.mjs +2 -2
- package/dist/nodeinfo/handler.test.mjs +3 -3
- package/dist/nodeinfo/types.test.mjs +1 -1
- package/dist/otel/exporter.test.mjs +25 -22
- package/dist/otel/mod.cjs +6 -5
- package/dist/otel/mod.d.cts +3 -2
- package/dist/otel/mod.d.ts +3 -2
- package/dist/otel/mod.js +6 -5
- package/dist/{outgoing-jsonld-CNmZLixq.mjs → outgoing-jsonld-Bi7n-dEy.mjs} +1 -1
- package/dist/{owner-CuW0S2XY.mjs → owner-DsPgl527.mjs} +2 -2
- package/dist/{proof-oGiWJkX0.cjs → proof-BhJpq_J9.cjs} +1 -1
- package/dist/{proof-CFPGr1xC.mjs → proof-iVfYyJpY.mjs} +4 -4
- package/dist/{proof-CtMmqa09.js → proof-k4mEvvdS.js} +1 -1
- package/dist/send-D-vYdfC6.mjs +306 -0
- package/dist/sig/accept.test.mjs +1 -1
- package/dist/sig/http.test.mjs +4 -4
- package/dist/sig/key.test.mjs +2 -2
- package/dist/sig/ld.test.mjs +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +2 -2
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/testing/mod.d.mts +6 -1
- package/dist/testing/mod.mjs +1 -1
- package/dist/utils/docloader.test.mjs +4 -4
- 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 -6
- package/dist/send-dhl-s8G0.mjs +0 -193
- /package/dist/{accept-CPkZzmGN.mjs → accept-CceiKpCy.mjs} +0 -0
- /package/dist/{activity-listener-ell7W1s9.mjs → activity-listener-tztVvlNb.mjs} +0 -0
- /package/dist/{client-D_1QpnWt.mjs → client-CIiz1WX7.mjs} +0 -0
- /package/dist/{collection-D-HqUuA2.mjs → collection-CA3V5zyK.mjs} +0 -0
- /package/dist/{keycache-EGATflN-.mjs → keycache-BeU0LCII.mjs} +0 -0
- /package/dist/{keys-DGu1NFwu.mjs → keys-C3kae-6B.mjs} +0 -0
- /package/dist/{kv-cache-U__xU4qR.mjs → kv-cache-Bmv7tUzz.mjs} +0 -0
- /package/dist/{kv-rV3vodCc.mjs → kv-x2IvBUyq.mjs} +0 -0
- /package/dist/{negotiation-SQvQgUqe.mjs → negotiation-VnHNB0Q5.mjs} +0 -0
- /package/dist/{public-audience-DYFHzm_c.mjs → public-audience-PVTwU_Ex.mjs} +0 -0
- /package/dist/{retry-bMXBL97A.mjs → retry-_VvV0h9f.mjs} +0 -0
- /package/dist/{types-J53Kw7so.mjs → types-BFowWFTT.mjs} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as esm_default } from "../esm-DVILvP5e.mjs";
|
|
5
4
|
import { n as RouterError } from "../router-CrMLXoOr.mjs";
|
|
6
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
6
|
import { i as assertExists } from "../std__assert-CRDpx_HF.mjs";
|
|
@@ -11,15 +10,16 @@ import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
|
11
10
|
import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
12
11
|
import { t as assertStrictEquals } from "../assert_strict_equals-Dmjbg-bA.mjs";
|
|
13
12
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
13
|
+
import { t as esm_default } from "../esm-DhnRLoG9.mjs";
|
|
14
|
+
import { l as verifyRequest, s as signRequest } from "../http-D9zG-L9N.mjs";
|
|
15
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-C3kae-6B.mjs";
|
|
16
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-3HwiWeYL.mjs";
|
|
17
|
+
import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-sUf94RJ8.mjs";
|
|
18
|
+
import { t as doesActorOwnKey } from "../owner-DsPgl527.mjs";
|
|
19
|
+
import { i as verifyObject, r as signObject } from "../proof-iVfYyJpY.mjs";
|
|
20
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
21
|
+
import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-pb2EqN_r.mjs";
|
|
22
|
+
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
23
23
|
import * as vocab from "@fedify/vocab";
|
|
24
24
|
import { getTypeId, lookupObject } from "@fedify/vocab";
|
|
25
25
|
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -2086,6 +2086,49 @@ test("FederationImpl.processQueuedTask()", async (t) => {
|
|
|
2086
2086
|
attempt: 1
|
|
2087
2087
|
}]);
|
|
2088
2088
|
});
|
|
2089
|
+
await t.step("records queued inbox processing duration", async () => {
|
|
2090
|
+
const kv = new MemoryKvStore();
|
|
2091
|
+
const [meterProvider, recorder] = createTestMeterProvider();
|
|
2092
|
+
const federation = new FederationImpl({
|
|
2093
|
+
kv,
|
|
2094
|
+
meterProvider,
|
|
2095
|
+
queue: {
|
|
2096
|
+
enqueue(_message, _options) {
|
|
2097
|
+
return Promise.resolve();
|
|
2098
|
+
},
|
|
2099
|
+
listen(_handler, _options) {
|
|
2100
|
+
return Promise.resolve();
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
let handled = false;
|
|
2105
|
+
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").on(vocab.Create, () => {
|
|
2106
|
+
handled = true;
|
|
2107
|
+
});
|
|
2108
|
+
await federation.processQueuedTask(void 0, {
|
|
2109
|
+
type: "inbox",
|
|
2110
|
+
id: crypto.randomUUID(),
|
|
2111
|
+
baseUrl: "https://example.com",
|
|
2112
|
+
activity: {
|
|
2113
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
2114
|
+
type: "Create",
|
|
2115
|
+
id: "https://remote.example/activities/1",
|
|
2116
|
+
actor: "https://remote.example/users/alice",
|
|
2117
|
+
object: {
|
|
2118
|
+
type: "Note",
|
|
2119
|
+
content: "Hello world"
|
|
2120
|
+
}
|
|
2121
|
+
},
|
|
2122
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2123
|
+
attempt: 0,
|
|
2124
|
+
identifier: null,
|
|
2125
|
+
traceContext: {}
|
|
2126
|
+
});
|
|
2127
|
+
assert(handled);
|
|
2128
|
+
const durations = recorder.getMeasurements("activitypub.inbox.processing_duration");
|
|
2129
|
+
assertEquals(durations.length, 1);
|
|
2130
|
+
assertEquals(durations[0].attributes["activitypub.activity.type"], "https://www.w3.org/ns/activitystreams#Create");
|
|
2131
|
+
});
|
|
2089
2132
|
});
|
|
2090
2133
|
test("FederationImpl.processQueuedTask() permanent failure", async (t) => {
|
|
2091
2134
|
esm_default.spyGlobal();
|
|
@@ -2120,7 +2163,9 @@ test("FederationImpl.processQueuedTask() permanent failure", async (t) => {
|
|
|
2120
2163
|
return Promise.resolve();
|
|
2121
2164
|
}
|
|
2122
2165
|
},
|
|
2123
|
-
...options.permanentFailureStatusCodes ? { permanentFailureStatusCodes: options.permanentFailureStatusCodes } : {}
|
|
2166
|
+
...options.permanentFailureStatusCodes ? { permanentFailureStatusCodes: options.permanentFailureStatusCodes } : {},
|
|
2167
|
+
...options.meterProvider ? { meterProvider: options.meterProvider } : {},
|
|
2168
|
+
...options.tracerProvider ? { tracerProvider: options.tracerProvider } : {}
|
|
2124
2169
|
});
|
|
2125
2170
|
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox");
|
|
2126
2171
|
return {
|
|
@@ -2155,7 +2200,12 @@ test("FederationImpl.processQueuedTask() permanent failure", async (t) => {
|
|
|
2155
2200
|
};
|
|
2156
2201
|
}
|
|
2157
2202
|
await t.step("410 Gone triggers permanent failure handler", async () => {
|
|
2158
|
-
const
|
|
2203
|
+
const [meterProvider, recorder] = createTestMeterProvider();
|
|
2204
|
+
const [tracerProvider, exporter] = createTestTracerProvider();
|
|
2205
|
+
const { federation, queuedMessages } = setup({
|
|
2206
|
+
meterProvider,
|
|
2207
|
+
tracerProvider
|
|
2208
|
+
});
|
|
2159
2209
|
let handlerCalled = false;
|
|
2160
2210
|
let handlerValues = {};
|
|
2161
2211
|
federation.setOutboxPermanentFailureHandler((_ctx, values) => {
|
|
@@ -2169,6 +2219,17 @@ test("FederationImpl.processQueuedTask() permanent failure", async (t) => {
|
|
|
2169
2219
|
assertInstanceOf(handlerValues.activity, vocab.Create);
|
|
2170
2220
|
assertEquals(handlerValues.actorIds, [new URL("https://gone.example/users/bob"), new URL("https://gone.example/users/charlie")]);
|
|
2171
2221
|
assertEquals(queuedMessages, []);
|
|
2222
|
+
const failures = recorder.getMeasurements("activitypub.delivery.permanent_failure");
|
|
2223
|
+
assertEquals(failures.length, 1);
|
|
2224
|
+
assertEquals(failures[0].value, 1);
|
|
2225
|
+
assertEquals(failures[0].attributes["activitypub.remote.host"], "gone.example");
|
|
2226
|
+
assertEquals(failures[0].attributes["http.response.status_code"], 410);
|
|
2227
|
+
const events = exporter.getEvents("activitypub.outbox", "activitypub.delivery.failed");
|
|
2228
|
+
assertEquals(events.length, 1);
|
|
2229
|
+
assertEquals(events[0].attributes?.["activitypub.remote.host"], "gone.example");
|
|
2230
|
+
assertEquals(events[0].attributes?.["activitypub.delivery.attempt"], 0);
|
|
2231
|
+
assertEquals(events[0].attributes?.["activitypub.delivery.permanent_failure"], true);
|
|
2232
|
+
assertEquals(events[0].attributes?.["http.response.status_code"], 410);
|
|
2172
2233
|
});
|
|
2173
2234
|
await t.step("404 Not Found triggers permanent failure handler", async () => {
|
|
2174
2235
|
const { federation, queuedMessages } = setup();
|
|
@@ -2244,6 +2305,36 @@ test("FederationImpl.processQueuedTask() permanent failure", async (t) => {
|
|
|
2244
2305
|
assertEquals(handlerActorIds, []);
|
|
2245
2306
|
assertEquals(queuedMessages, []);
|
|
2246
2307
|
});
|
|
2308
|
+
await t.step("malformed inbox does not break failure handling", async () => {
|
|
2309
|
+
await withLogtapeLock(async () => {
|
|
2310
|
+
const [tracerProvider, exporter] = createTestTracerProvider();
|
|
2311
|
+
const { federation, queuedMessages } = setup({ tracerProvider });
|
|
2312
|
+
const records = [];
|
|
2313
|
+
await reset();
|
|
2314
|
+
try {
|
|
2315
|
+
await configure({
|
|
2316
|
+
sinks: { buffer(record) {
|
|
2317
|
+
records.push(record);
|
|
2318
|
+
} },
|
|
2319
|
+
filters: {},
|
|
2320
|
+
loggers: [{
|
|
2321
|
+
category: [],
|
|
2322
|
+
sinks: ["buffer"]
|
|
2323
|
+
}]
|
|
2324
|
+
});
|
|
2325
|
+
await federation.processQueuedTask(void 0, createOutboxMessage("not a url", "https://example.com/activity/9", ["https://gone.example/users/bob"]));
|
|
2326
|
+
assertEquals(queuedMessages.length, 1);
|
|
2327
|
+
assertEquals(queuedMessages[0].attempt, 1);
|
|
2328
|
+
const events = exporter.getEvents("activitypub.outbox", "activitypub.delivery.failed");
|
|
2329
|
+
assertEquals(events.length, 1);
|
|
2330
|
+
assertEquals(events[0].attributes?.["activitypub.remote.host"], void 0);
|
|
2331
|
+
assertEquals(events[0].attributes?.["activitypub.delivery.attempt"], 0);
|
|
2332
|
+
assertEquals(records.some((record) => record.rawMessage === "Invalid inbox URL in queued outbox message: {inbox}" && record.properties.inbox === "not a url"), true);
|
|
2333
|
+
} finally {
|
|
2334
|
+
await reset();
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
});
|
|
2247
2338
|
esm_default.hardReset();
|
|
2248
2339
|
});
|
|
2249
2340
|
test("ContextImpl.lookupObject()", async (t) => {
|
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-CKkBrsOD.cjs");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
//#region src/federation/kv.ts
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-
|
|
1
|
+
import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-BKLGj9QO.cjs";
|
|
2
2
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-CbLNp3zQ.cjs";
|
|
3
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-
|
|
3
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-DClCOv0M.cjs";
|
|
4
4
|
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, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-
|
|
3
|
+
import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-DrNqYkPw.js";
|
|
4
4
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-GFYnFoOl.js";
|
|
5
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-
|
|
5
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-B8Z8mBLk.js";
|
|
6
6
|
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, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, 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-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-fAuUxD9-.js";
|
|
4
4
|
import { isEqual } from "es-toolkit";
|
|
5
5
|
//#region src/federation/kv.ts
|
|
6
6
|
/**
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import "../std__assert-CRDpx_HF.mjs";
|
|
5
5
|
import { n as assertFalse } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
6
6
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
7
|
-
import { t as acceptsJsonLd } from "../negotiation-
|
|
7
|
+
import { t as acceptsJsonLd } from "../negotiation-VnHNB0Q5.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/federation/negotiation.test.ts
|
|
10
10
|
test("acceptsJsonLd()", () => {
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { l as AssertionError, t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
6
|
-
import { t as createExponentialBackoffPolicy } from "../retry-
|
|
6
|
+
import { t as createExponentialBackoffPolicy } from "../retry-_VvV0h9f.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
//#region src/federation/retry.test.ts
|
|
9
9
|
test("createExponentialBackoffPolicy()", () => {
|