@fedify/fedify 2.5.0-dev.2446 → 2.5.0-dev.2492
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/{activity-listener-C-BSbKI7.mjs → activity-listener-CELFAodc.mjs} +8 -4
- package/dist/{builder-Da8b9O6v.mjs → builder-DphK9v7f.mjs} +5 -5
- package/dist/{client-D-XP_Ccb.d.ts → client-3InDZbba.d.cts} +0 -1
- package/dist/{client-D-XP_Ccb.d.cts → client-3InDZbba.d.ts} +0 -1
- package/dist/{client-CEnNz8O7.mjs → client-5SIFzW3q.mjs} +113 -64
- 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/{compound-proof-D1djO5fa.mjs → compound-proof-cYtvlTgF.mjs} +2 -2
- package/dist/{context-8Tu9kea0.mjs → context-COHd1Rsh.mjs} +2 -0
- package/dist/{context-BdB54V-A.d.ts → context-DQJE9YfH.d.ts} +332 -6
- package/dist/{context-CQ9H8vNW.d.cts → context-DSuL3YWx.d.cts} +332 -6
- package/dist/{deno-eNpfj4oR.mjs → deno-iOAA7iRN.mjs} +1 -1
- package/dist/docloader-DCZkiTeF.mjs +136 -0
- package/dist/{exporter-DThFfe7P.mjs → exporter-DVG68ozH.mjs} +36 -30
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +6 -3
- package/dist/federation/handler-compound-proof.test.mjs +5 -5
- package/dist/federation/handler.test.mjs +22 -7
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox-actorless.test.d.mts +2 -0
- package/dist/federation/inbox-actorless.test.mjs +487 -0
- package/dist/federation/inbox-authentication.test.d.mts +2 -0
- package/dist/federation/inbox-authentication.test.mjs +116 -0
- package/dist/federation/inbox-report.test.mjs +5 -5
- package/dist/federation/inbox-view.test.d.mts +2 -0
- package/dist/federation/inbox-view.test.mjs +369 -0
- package/dist/federation/inbox.test.mjs +22 -12
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +470 -35
- package/dist/federation/mod.cjs +2 -1
- package/dist/federation/mod.d.cts +4 -4
- package/dist/federation/mod.d.ts +4 -4
- package/dist/federation/mod.js +8 -2
- package/dist/federation/mq.test.mjs +36 -1
- package/dist/federation/outgoing-proof.test.mjs +9 -6
- package/dist/federation/portable-actor.test.mjs +3 -3
- package/dist/federation/portable-chain.test.mjs +3 -3
- package/dist/federation/portable-collection.test.mjs +4 -4
- package/dist/federation/portable-delivery.test.mjs +2 -2
- package/dist/federation/portable-gateway-keys.test.mjs +13 -7
- package/dist/federation/portable-inbox.test.mjs +4 -4
- package/dist/federation/portable-parse-uri.test.mjs +1 -1
- package/dist/federation/portable-route-activity.test.mjs +2 -2
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/send.test.mjs +502 -93
- package/dist/federation/tasks/enqueue.test.mjs +3 -3
- package/dist/federation/tasks/tasks.test.mjs +4 -4
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +2 -2
- package/dist/{federation-BVH7drJA.cjs → federation-D0AZw_aw.cjs} +1415 -236
- package/dist/{http-BUJ5SFh6.mjs → http-BoJCMnjY.mjs} +204 -106
- package/dist/{http-DlNxxW_5.js → http-ChXUU_3c.js} +319 -123
- package/dist/{http-BfW3wyQ4.cjs → http-kv1LZw-r.cjs} +339 -125
- package/dist/inbox-BjihTKLo.mjs +312 -0
- package/dist/inbox-authentication-DflPYlLL.mjs +171 -0
- package/dist/inbox-view-D-skypg-.mjs +385 -0
- package/dist/{key-nYGY4QB9.d.cts → key-DbLNT-vA.d.ts} +1 -2
- package/dist/{key-DhsBxxZN.d.ts → key-DlHT4R6k.d.cts} +1 -2
- package/dist/{kv-cache-D_m3A241.mjs → kv-cache-Cmsyke4d.mjs} +1 -1
- package/dist/{kv-cache-7015lbrx.js → kv-cache-DQcte7ES.js} +73 -28
- package/dist/{kv-cache-kkBB0vbI.cjs → kv-cache-Ddh5sMxH.cjs} +72 -27
- package/dist/ld-CWVpo_NM.d.cts +250 -0
- package/dist/{ld-CD2CsPxq.mjs → ld-CdvcOEXQ.mjs} +52 -9
- package/dist/ld-Inagww4R.d.ts +250 -0
- package/dist/{metrics-D3LHk6Z4.mjs → metrics-CpxvUrBz.mjs} +1 -1
- package/dist/{middleware-N9eM16XE.js → middleware-BHb5toqA.js} +1413 -247
- package/dist/{middleware-CCDXvXOG.mjs → middleware-BKs2DLUF.mjs} +1 -1
- package/dist/{middleware-CzoWvrdZ.mjs → middleware-CoBLrTKX.mjs} +533 -132
- package/dist/{mod-B0dGgQsg.d.cts → mod-6TQ4UQZb.d.cts} +1 -1
- package/dist/mod-B4kBw1-8.d.ts +154 -0
- package/dist/{mod-DkhfZC1u.d.ts → mod-B7j30IQf.d.ts} +2 -9
- package/dist/mod-C1nT74IG.d.cts +154 -0
- package/dist/{mod-D0bxB8jS.d.ts → mod-CIeBgsOC.d.ts} +1 -1
- package/dist/{mod-B5-wdzmJ.d.cts → mod-YvA4Rk8J.d.cts} +2 -9
- package/dist/mod.cjs +6 -5
- package/dist/mod.d.cts +9 -9
- package/dist/mod.d.ts +9 -9
- package/dist/mod.js +6 -6
- package/dist/{mq-Dm1Wmtm-.mjs → mq-eF96QxUT.mjs} +6 -0
- package/dist/nodeinfo/client.test.mjs +337 -19
- package/dist/nodeinfo/handler.test.mjs +2 -2
- 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 +257 -1
- 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-C5-FVX6t.mjs → owner-DTnVpUKA.mjs} +3 -3
- package/dist/{portable-collection-Cony3_LC.mjs → portable-collection-CJeYTL61.mjs} +2 -2
- package/dist/{portable-collection-C-Z1SKDy.cjs → portable-collection-DciwBIia.cjs} +1 -1
- package/dist/{portable-collection-CC2zNAje.js → portable-collection-TmtpzD4E.js} +1 -1
- package/dist/{portable-key-DNc_flH-.mjs → portable-key-DcYok4ki.mjs} +1 -1
- package/dist/{proof-Cryb1c70.mjs → proof-GH7Poos_.mjs} +98 -10
- package/dist/{send-AF25pWaJ.mjs → send-BgGJh6pv.mjs} +174 -76
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +2 -2
- package/dist/sig/compound-proof.test.mjs +2 -2
- package/dist/sig/http.test.mjs +553 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +1 -1
- package/dist/sig/mitra-receive-interop.test.mjs +4 -4
- package/dist/sig/mitra-send-interop.test.mjs +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +1 -1
- package/dist/sig/portable-interop.test.mjs +3 -3
- package/dist/sig/portable-key.test.mjs +5 -5
- package/dist/sig/proof.test.mjs +45 -5
- package/dist/sig/tootik-request-interop.test.mjs +4 -4
- package/dist/sig/tootik-send-interop.test.mjs +3 -3
- package/dist/sig/verification.test.mjs +3 -3
- package/dist/{temporal-BsAeuUJj.mjs → temporal-gJINzcL4.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +288 -2
- package/dist/testing/mod.mjs +2 -2
- package/dist/{testing-t8xDeJZ5.mjs → testing-Dbr21vZk.mjs} +1 -1
- package/dist/{types-_S2_MeLF.js → types-DUjZb4i6.js} +112 -63
- package/dist/{types-poIao40f.cjs → types-hKCCjii0.cjs} +111 -62
- package/dist/utils/docloader.test.mjs +344 -36
- package/dist/utils/kv-cache.test.mjs +1 -1
- 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 +7 -7
- package/dist/docloader-B-0nqOB1.mjs +0 -91
- package/dist/inbox-CHvMaIFX.mjs +0 -188
- package/dist/mod-BRpER-B0.d.ts +0 -320
- package/dist/mod-xAfaLS4T.d.cts +0 -320
- package/dist/owner-BF0L9cMt.d.cts +0 -78
- package/dist/owner-BSzr5-I8.d.ts +0 -78
package/dist/federation/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_federation = require("../federation-
|
|
3
|
+
const require_federation = require("../federation-D0AZw_aw.cjs");
|
|
4
4
|
exports.CircuitBreaker = require_federation.CircuitBreaker;
|
|
5
5
|
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
|
6
6
|
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
|
@@ -14,6 +14,7 @@ exports.createFederation = require_federation.createFederation;
|
|
|
14
14
|
exports.createFederationBuilder = require_federation.createFederationBuilder;
|
|
15
15
|
exports.digest = require_federation.digest;
|
|
16
16
|
exports.handleWebFinger = require_federation.handleWebFinger;
|
|
17
|
+
exports.isActorAuthenticated = require_federation.isActorAuthenticated;
|
|
17
18
|
exports.normalizeCircuitBreakerOptions = require_federation.normalizeCircuitBreakerOptions;
|
|
18
19
|
exports.parseCircuitBreakerKvState = require_federation.parseCircuitBreakerKvState;
|
|
19
20
|
exports.respondWithObject = require_federation.respondWithObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, m as InboxSignatureIdentity, p as InboxSignatureFailureReason } from "../key-
|
|
3
|
-
import { $ as respondWithObject, $t as
|
|
2
|
+
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, m as InboxSignatureIdentity, p as InboxSignatureFailureReason } from "../key-DlHT4R6k.cjs";
|
|
3
|
+
import { $ as respondWithObject, $t as SendActivityError, A as InboxChallengePolicy, At as CollectionCursor, B as createFederation, Bt as NodeInfoDispatcher, C as FederationBenchmarkOptions, Ct as parseCircuitBreakerKvState, D as FederationStartQueueOptions, Dt as ActorKeyPairsDispatcher, E as FederationOptions, Et as ActorHandleMapper, F as PortableInboxForwardingOptions, Ft as HashlinkMediaDispatcher, G as TaskEnqueueOptions, Gt as OutboxListenerErrorHandler, H as createFederationBuilder, Ht as ObjectDispatcher, I as Rfc6570Expression, It as HashlinkMediaRequest, J as CreateExponentialBackoffPolicyOptions, Jt as PortableCollectionOwnerMapper, K as TaskHandler, Kt as OutboxPermanentFailureHandler, L as FederationKvPrefixes, Lt as InboxErrorHandler, M as MediaUploaderSetters, Mt as CustomCollectionCounter, N as ObjectCallbackSetters, Nt as CustomCollectionCursor, O as IdempotencyKeyCallback, Ot as AuthorizePredicate, P as OutboxListenerSetters, Pt as CustomCollectionDispatcher, Q as RespondWithObjectOptions, Qt as WebFingerLinksDispatcher, R as FederationOrigin, Rt as InboxListener, S as Federation, St as normalizeCircuitBreakerOptions, T as FederationFetchOptions, Tt as ActorDispatcher, U as TaskDefinition, Ut as OutboxErrorHandler, V as Message, Vt as ObjectAuthorizePredicate, W as TaskDefinitionOptions, Wt as OutboxListener, X as RetryPolicy, Xt as UnverifiedActivityHandler, Y as RetryContext, Yt as SharedInboxKeyDispatcher, Z as createExponentialBackoffPolicy, Zt as UnverifiedActivityReason, _ as ActorCallbackSetters, _t as CircuitBreakerKvState, a as GetObjectOptions, an as InboxAuthentication, at as InProcessMessageQueue, b as CustomCollectionCallbackSetters, bt as CircuitBreakerStateChange, c as IsSignedByAudienceOptions, cn as InboxRequestOutcome, ct as MessageQueueDepth, d as ParseUriResult, dt as ParallelMessageQueue, en as SenderKeyPair, et as respondWithObjectIfAcceptable, f as PortableRequest, ft as CircuitBreaker, g as SendActivityOptionsForCollection, gt as CircuitBreakerFailurePolicy, h as SendActivityOptions, ht as CircuitBreakerCreateOptions, i as GetActorOptions, it as isActorAuthenticated, j as InboxListenerSetters, jt as CollectionDispatcher, k as IdempotencyStrategy, kt as CollectionCounter, l as OutboxContext, ln as InboxRequestReport, lt as MessageQueueEnqueueOptions, m as RouteActivityOptions, mt as CircuitBreakerBeforeSendDecision, n as Context, nn as buildCollectionSynchronizationHeader, nt as InboxPrincipal, o as GetSignedKeyOptions, on as InboxJsonValue, ot as InProcessMessageQueueOptions, p as RequestContext, pt as CircuitBreakerActivityDrop, q as TaskRegistry, qt as PortableActorIdMapper, r as ForwardActivityOptions, rn as digest, rt as IsActorAuthenticatedOptions, s as InboxContext, sn as InboxRequestFinishedHandler, st as MessageQueue, t as ActorKeyPair, tn as PageItems, tt as InboxAuthenticationEvidence, u as ParseUriOptions, un as InboxListenerOptions, ut as MessageQueueListenOptions, v as CollectionCallbackSetters, vt as CircuitBreakerOptions, w as FederationBuilder, wt as ActorAliasMapper, x as Federatable, xt as NormalizedCircuitBreakerOptions, y as ConstructorWithTypeId, yt as CircuitBreakerState, z as FederationQueueOptions, zt as MediaUploaderCallback } from "../context-DSuL3YWx.cjs";
|
|
4
4
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-B2mzK5tl.cjs";
|
|
5
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-
|
|
6
|
-
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxAuthentication, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxJsonValue, InboxListener, InboxListenerSetters, InboxProofPolicyFailureReason, InboxRequestFinishedHandler, InboxRequestOutcome, InboxRequestReport, InboxSignatureCheck, InboxSignatureFailureReason, InboxSignatureIdentity, InboxVerificationAttempt, InboxVerificationFailureReason, InboxVerificationKey, IsSignedByAudienceOptions, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
|
5
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-6TQ4UQZb.cjs";
|
|
6
|
+
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxAuthentication, InboxAuthenticationEvidence, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxJsonValue, InboxListener, InboxListenerOptions, InboxListenerSetters, InboxPrincipal, InboxProofPolicyFailureReason, InboxRequestFinishedHandler, InboxRequestOutcome, InboxRequestReport, InboxSignatureCheck, InboxSignatureFailureReason, InboxSignatureIdentity, InboxVerificationAttempt, InboxVerificationFailureReason, InboxVerificationKey, IsActorAuthenticatedOptions, IsSignedByAudienceOptions, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, isActorAuthenticated, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, m as InboxSignatureIdentity, p as InboxSignatureFailureReason } from "../key-
|
|
3
|
-
import { $ as respondWithObject, $t as
|
|
2
|
+
import { _ as InboxVerificationKey, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, m as InboxSignatureIdentity, p as InboxSignatureFailureReason } from "../key-DbLNT-vA.js";
|
|
3
|
+
import { $ as respondWithObject, $t as SendActivityError, A as InboxChallengePolicy, At as CollectionCursor, B as createFederation, Bt as NodeInfoDispatcher, C as FederationBenchmarkOptions, Ct as parseCircuitBreakerKvState, D as FederationStartQueueOptions, Dt as ActorKeyPairsDispatcher, E as FederationOptions, Et as ActorHandleMapper, F as PortableInboxForwardingOptions, Ft as HashlinkMediaDispatcher, G as TaskEnqueueOptions, Gt as OutboxListenerErrorHandler, H as createFederationBuilder, Ht as ObjectDispatcher, I as Rfc6570Expression, It as HashlinkMediaRequest, J as CreateExponentialBackoffPolicyOptions, Jt as PortableCollectionOwnerMapper, K as TaskHandler, Kt as OutboxPermanentFailureHandler, L as FederationKvPrefixes, Lt as InboxErrorHandler, M as MediaUploaderSetters, Mt as CustomCollectionCounter, N as ObjectCallbackSetters, Nt as CustomCollectionCursor, O as IdempotencyKeyCallback, Ot as AuthorizePredicate, P as OutboxListenerSetters, Pt as CustomCollectionDispatcher, Q as RespondWithObjectOptions, Qt as WebFingerLinksDispatcher, R as FederationOrigin, Rt as InboxListener, S as Federation, St as normalizeCircuitBreakerOptions, T as FederationFetchOptions, Tt as ActorDispatcher, U as TaskDefinition, Ut as OutboxErrorHandler, V as Message, Vt as ObjectAuthorizePredicate, W as TaskDefinitionOptions, Wt as OutboxListener, X as RetryPolicy, Xt as UnverifiedActivityHandler, Y as RetryContext, Yt as SharedInboxKeyDispatcher, Z as createExponentialBackoffPolicy, Zt as UnverifiedActivityReason, _ as ActorCallbackSetters, _t as CircuitBreakerKvState, a as GetObjectOptions, an as InboxAuthentication, at as InProcessMessageQueue, b as CustomCollectionCallbackSetters, bt as CircuitBreakerStateChange, c as IsSignedByAudienceOptions, cn as InboxRequestOutcome, ct as MessageQueueDepth, d as ParseUriResult, dt as ParallelMessageQueue, en as SenderKeyPair, et as respondWithObjectIfAcceptable, f as PortableRequest, ft as CircuitBreaker, g as SendActivityOptionsForCollection, gt as CircuitBreakerFailurePolicy, h as SendActivityOptions, ht as CircuitBreakerCreateOptions, i as GetActorOptions, it as isActorAuthenticated, j as InboxListenerSetters, jt as CollectionDispatcher, k as IdempotencyStrategy, kt as CollectionCounter, l as OutboxContext, ln as InboxRequestReport, lt as MessageQueueEnqueueOptions, m as RouteActivityOptions, mt as CircuitBreakerBeforeSendDecision, n as Context, nn as buildCollectionSynchronizationHeader, nt as InboxPrincipal, o as GetSignedKeyOptions, on as InboxJsonValue, ot as InProcessMessageQueueOptions, p as RequestContext, pt as CircuitBreakerActivityDrop, q as TaskRegistry, qt as PortableActorIdMapper, r as ForwardActivityOptions, rn as digest, rt as IsActorAuthenticatedOptions, s as InboxContext, sn as InboxRequestFinishedHandler, st as MessageQueue, t as ActorKeyPair, tn as PageItems, tt as InboxAuthenticationEvidence, u as ParseUriOptions, un as InboxListenerOptions, ut as MessageQueueListenOptions, v as CollectionCallbackSetters, vt as CircuitBreakerOptions, w as FederationBuilder, wt as ActorAliasMapper, x as Federatable, xt as NormalizedCircuitBreakerOptions, y as ConstructorWithTypeId, yt as CircuitBreakerState, z as FederationQueueOptions, zt as MediaUploaderCallback } from "../context-DQJE9YfH.js";
|
|
4
4
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-B2mzK5tl.js";
|
|
5
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-
|
|
6
|
-
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxAuthentication, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxJsonValue, InboxListener, InboxListenerSetters, InboxProofPolicyFailureReason, InboxRequestFinishedHandler, InboxRequestOutcome, InboxRequestReport, InboxSignatureCheck, InboxSignatureFailureReason, InboxSignatureIdentity, InboxVerificationAttempt, InboxVerificationFailureReason, InboxVerificationKey, IsSignedByAudienceOptions, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
|
5
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-CIeBgsOC.js";
|
|
6
|
+
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxAuthentication, InboxAuthenticationEvidence, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxJsonValue, InboxListener, InboxListenerOptions, InboxListenerSetters, InboxPrincipal, InboxProofPolicyFailureReason, InboxRequestFinishedHandler, InboxRequestOutcome, InboxRequestReport, InboxSignatureCheck, InboxSignatureFailureReason, InboxSignatureIdentity, InboxVerificationAttempt, InboxVerificationFailureReason, InboxVerificationKey, IsActorAuthenticatedOptions, IsSignedByAudienceOptions, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, isActorAuthenticated, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { a as respondWithObjectIfAcceptable, c as
|
|
3
|
+
import { a as respondWithObjectIfAcceptable, c as buildCollectionSynchronizationHeader, d as normalizeCircuitBreakerOptions, f as parseCircuitBreakerKvState, i as respondWithObject, l as digest, n as handleWebFinger, o as SendActivityError, p as createFederationBuilder, r as createExponentialBackoffPolicy, s as isActorAuthenticated, t as createFederation, u as CircuitBreaker } from "../middleware-BHb5toqA.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Router as Router$1, RouterError as RouterError$1, assertPath, isPath } from "@fedify/uri-template";
|
|
6
6
|
import { isEqual } from "es-toolkit";
|
|
@@ -267,6 +267,11 @@ var ParallelMessageQueue = class ParallelMessageQueue {
|
|
|
267
267
|
* @since 2.4.0
|
|
268
268
|
*/
|
|
269
269
|
atomicEnqueueMany;
|
|
270
|
+
/**
|
|
271
|
+
* Inherits the message size limit from the wrapped queue.
|
|
272
|
+
* @since 2.5.0
|
|
273
|
+
*/
|
|
274
|
+
maxMessageSize;
|
|
270
275
|
getDepth;
|
|
271
276
|
/**
|
|
272
277
|
* Tracks which ordering keys are currently being processed to ensure
|
|
@@ -292,6 +297,7 @@ var ParallelMessageQueue = class ParallelMessageQueue {
|
|
|
292
297
|
this.workers = workers;
|
|
293
298
|
this.nativeRetrial = queue.nativeRetrial;
|
|
294
299
|
this.nativeDeduplication = queue.nativeDeduplication;
|
|
300
|
+
this.maxMessageSize = queue.maxMessageSize;
|
|
295
301
|
this.atomicEnqueueMany = queue.enqueueMany == null ? false : queue.atomicEnqueueMany;
|
|
296
302
|
if (queue.getDepth != null) this.getDepth = () => queue.getDepth();
|
|
297
303
|
}
|
|
@@ -519,4 +525,4 @@ function convertRouterError(func) {
|
|
|
519
525
|
}
|
|
520
526
|
}
|
|
521
527
|
//#endregion
|
|
522
|
-
export { CircuitBreaker, InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
|
528
|
+
export { CircuitBreaker, InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, isActorAuthenticated, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -7,7 +7,8 @@ import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BlafOF4-.m
|
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { r as estimateQueuedMessageSize } from "../inbox-BjihTKLo.mjs";
|
|
11
|
+
import { n as ParallelMessageQueue, t as InProcessMessageQueue } from "../mq-eF96QxUT.mjs";
|
|
11
12
|
import { delay } from "es-toolkit";
|
|
12
13
|
import { test } from "@fedify/fixture";
|
|
13
14
|
//#region src/federation/mq.test.ts
|
|
@@ -342,6 +343,27 @@ test("MessageQueue.nativeRetrial", async (t) => {
|
|
|
342
343
|
const { DenoKvMessageQueue } = await import(packageName());
|
|
343
344
|
const mq = new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
|
344
345
|
assert(mq.nativeRetrial);
|
|
346
|
+
assert(mq.maxMessageSize < 64 * 1024);
|
|
347
|
+
for (const item of [
|
|
348
|
+
[],
|
|
349
|
+
{},
|
|
350
|
+
.1,
|
|
351
|
+
"",
|
|
352
|
+
"é",
|
|
353
|
+
"한",
|
|
354
|
+
"x".repeat(100),
|
|
355
|
+
true,
|
|
356
|
+
"a".repeat(1e3) + "한"
|
|
357
|
+
]) {
|
|
358
|
+
const items = [];
|
|
359
|
+
const message = () => ({
|
|
360
|
+
type: "inbox",
|
|
361
|
+
payload: { items }
|
|
362
|
+
});
|
|
363
|
+
while (estimateQueuedMessageSize(message()) < mq.maxMessageSize - 64) items.push(item);
|
|
364
|
+
items.pop();
|
|
365
|
+
await mq.enqueue(message());
|
|
366
|
+
}
|
|
345
367
|
await disposeMessageQueue(mq);
|
|
346
368
|
});
|
|
347
369
|
await t.step("WorkersMessageQueue mock", () => {
|
|
@@ -552,5 +574,18 @@ async function waitFor(predicate, timeoutMs) {
|
|
|
552
574
|
if (Date.now() - started > timeoutMs) throw new Error("Timeout");
|
|
553
575
|
}
|
|
554
576
|
}
|
|
577
|
+
test("ParallelMessageQueue inherits maxMessageSize", () => {
|
|
578
|
+
class BoundedQueue {
|
|
579
|
+
maxMessageSize = 1024;
|
|
580
|
+
enqueue() {
|
|
581
|
+
return Promise.resolve();
|
|
582
|
+
}
|
|
583
|
+
listen() {
|
|
584
|
+
return Promise.resolve();
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
assertEquals(new ParallelMessageQueue(new BoundedQueue(), 2).maxMessageSize, 1024);
|
|
588
|
+
assertEquals(new ParallelMessageQueue(new InProcessMessageQueue(), 2).maxMessageSize, void 0);
|
|
589
|
+
});
|
|
555
590
|
//#endregion
|
|
556
591
|
export {};
|
|
@@ -7,11 +7,11 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import { s as detachSignature,
|
|
11
|
-
import {
|
|
10
|
+
import { s as detachSignature, x as exportJwk } from "../ld-CdvcOEXQ.mjs";
|
|
11
|
+
import { s as signObject } from "../proof-GH7Poos_.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { C as getEmbeddedFirstGateway, S as getCompactRootId, c as assertPortableActorActivity, n as FederationImpl, o as createFederation, w as warnCompatibleIdsInJson } from "../middleware-
|
|
14
|
-
import { o as verifyCompoundPortableObjectProofs } from "../compound-proof-
|
|
13
|
+
import { C as getEmbeddedFirstGateway, S as getCompactRootId, c as assertPortableActorActivity, n as FederationImpl, o as createFederation, w as warnCompatibleIdsInJson } from "../middleware-CoBLrTKX.mjs";
|
|
14
|
+
import { o as verifyCompoundPortableObjectProofs } from "../compound-proof-cYtvlTgF.mjs";
|
|
15
15
|
import { configure, reset } from "@logtape/logtape";
|
|
16
16
|
import { Accept, Announce, Create, Follow, Note, Person } from "@fedify/vocab";
|
|
17
17
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -105,6 +105,7 @@ function createTestFederation(queue) {
|
|
|
105
105
|
contextLoaderFactory: () => mockDocumentLoader,
|
|
106
106
|
documentLoaderFactory: () => mockDocumentLoader
|
|
107
107
|
});
|
|
108
|
+
federation.allowPrivateAddress = true;
|
|
108
109
|
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox");
|
|
109
110
|
return federation;
|
|
110
111
|
}
|
|
@@ -740,12 +741,14 @@ test("fanout warns once before enqueueing a compatible activity", async () => {
|
|
|
740
741
|
test("an embedded actor supplies gateways to a plain send context", async () => {
|
|
741
742
|
const owner = await didKey();
|
|
742
743
|
const ownerId = parseIri(`ap://${owner.did}/users/alice`);
|
|
743
|
-
const
|
|
744
|
+
const federation = new FederationImpl({
|
|
744
745
|
kv: new MemoryKvStore(),
|
|
745
746
|
contextLoaderFactory: () => mockDocumentLoader,
|
|
746
747
|
documentLoaderFactory: () => mockDocumentLoader,
|
|
747
748
|
activityTransformers: []
|
|
748
|
-
})
|
|
749
|
+
});
|
|
750
|
+
federation.allowPrivateAddress = true;
|
|
751
|
+
const ctx = federation.createContext(new URL("https://example.com/"));
|
|
749
752
|
const activity = await signObject(new Create({
|
|
750
753
|
id: compatibleId(owner.did, "/activities/embedded-actor", "https://secondary.example"),
|
|
751
754
|
actor: new Person({
|
|
@@ -8,10 +8,10 @@ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
9
9
|
import "../std__assert-DvMDRPes.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { d as verifyPortableObjectProof, s as signObject } from "../proof-GH7Poos_.mjs";
|
|
12
|
+
import { p as verifyRequest, u as signRequest } from "../http-BoJCMnjY.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-
|
|
14
|
+
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-CoBLrTKX.mjs";
|
|
15
15
|
import { n as RouterError } from "../router-u5O5KCQr.mjs";
|
|
16
16
|
import { configure, reset } from "@logtape/logtape";
|
|
17
17
|
import { Note, Person, Tombstone, lookupObject } from "@fedify/vocab";
|
|
@@ -7,10 +7,10 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
7
7
|
import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { x as exportJwk } from "../ld-CdvcOEXQ.mjs";
|
|
11
|
+
import { d as verifyPortableObjectProof, l as verifyObject } from "../proof-GH7Poos_.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { n as FederationImpl } from "../middleware-
|
|
13
|
+
import { n as FederationImpl } from "../middleware-CoBLrTKX.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note, OrderedCollection, Person, traverseCollection } from "@fedify/vocab";
|
|
15
15
|
import { FetchError, encodeMultibase, exportDidKey } from "@fedify/vocab-runtime";
|
|
16
16
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -7,11 +7,11 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { d as verifyPortableObjectProof, s as signObject } from "../proof-GH7Poos_.mjs";
|
|
11
11
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
12
|
-
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-
|
|
13
|
-
import { t as verifyPortableObject } from "../portable-collection-
|
|
14
|
-
import { c as verifyServedPortableObjects } from "../compound-proof-
|
|
12
|
+
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-CoBLrTKX.mjs";
|
|
13
|
+
import { t as verifyPortableObject } from "../portable-collection-CJeYTL61.mjs";
|
|
14
|
+
import { c as verifyServedPortableObjects } from "../compound-proof-cYtvlTgF.mjs";
|
|
15
15
|
import { n as RouterError } from "../router-u5O5KCQr.mjs";
|
|
16
16
|
import { configure, reset } from "@logtape/logtape";
|
|
17
17
|
import { Create, Note, Object as Object$1, OrderedCollection, PUBLIC_COLLECTION, Person, Tombstone, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { i as rsaPrivateKey2, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
7
|
-
import { n as FederationImpl, r as InboxContextImpl } from "../middleware-
|
|
8
|
-
import { n as extractInboxes, t as SendActivityError } from "../send-
|
|
7
|
+
import { n as FederationImpl, r as InboxContextImpl } from "../middleware-CoBLrTKX.mjs";
|
|
8
|
+
import { n as extractInboxes, t as SendActivityError } from "../send-BgGJh6pv.mjs";
|
|
9
9
|
import { Create, Endpoints, Note, Person } from "@fedify/vocab";
|
|
10
10
|
import { parseIri } from "@fedify/vocab-runtime";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -2,18 +2,19 @@ import { Temporal } from "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
5
|
-
import { r as createRequestContext, t as createInboxContext } from "../context-
|
|
5
|
+
import { r as createRequestContext, t as createInboxContext } from "../context-COHd1Rsh.mjs";
|
|
6
6
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
7
7
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
10
10
|
import { r as getVerifiedKeyOwnerEvidence } from "../key-owner-evidence-APB6NpSk.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { m as signJsonLd } from "../ld-CdvcOEXQ.mjs";
|
|
12
|
+
import { m as verifyRequestDetailed, p as verifyRequest, u as signRequest } from "../http-BoJCMnjY.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import {
|
|
15
|
-
import { n as
|
|
16
|
-
import { t as
|
|
14
|
+
import { n as getAuthenticatedDocumentLoader } from "../docloader-DCZkiTeF.mjs";
|
|
15
|
+
import { f as handleInbox, n as FederationImpl, o as createFederation } from "../middleware-CoBLrTKX.mjs";
|
|
16
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-DTnVpUKA.mjs";
|
|
17
|
+
import { t as ActivityListenerSet } from "../activity-listener-CELFAodc.mjs";
|
|
17
18
|
import { t as KvKeyCache } from "../keycache-N2opu4-3.mjs";
|
|
18
19
|
import { Create, CryptographicKey, Person } from "@fedify/vocab";
|
|
19
20
|
import { FetchError, encodeMultibase, exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -68,8 +69,13 @@ function createTestFederation(mapper) {
|
|
|
68
69
|
kv: new MemoryKvStore(),
|
|
69
70
|
manuallyStartQueue: true,
|
|
70
71
|
contextLoaderFactory: () => mockDocumentLoader,
|
|
71
|
-
documentLoaderFactory: () => mockDocumentLoader
|
|
72
|
+
documentLoaderFactory: () => mockDocumentLoader,
|
|
73
|
+
authenticatedDocumentLoaderFactory: (identity, options) => getAuthenticatedDocumentLoader(identity, {
|
|
74
|
+
...options,
|
|
75
|
+
allowPrivateAddress: true
|
|
76
|
+
})
|
|
72
77
|
});
|
|
78
|
+
federation.allowPrivateAddress = true;
|
|
73
79
|
const setters = federation.setActorDispatcher("/users/{identifier}", () => null).setKeyPairsDispatcher(() => [rsaGatewayKeyPair, ed25519GatewayKeyPair]);
|
|
74
80
|
if (mapper != null) setters.mapPortableActorId((_ctx, id) => mapper(id));
|
|
75
81
|
return federation;
|
|
@@ -8,11 +8,11 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
9
9
|
import "../std__assert-DvMDRPes.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
11
|
+
import { m as signJsonLd } from "../ld-CdvcOEXQ.mjs";
|
|
12
|
+
import { s as signObject } from "../proof-GH7Poos_.mjs";
|
|
13
|
+
import { m as verifyRequestDetailed, u as signRequest } from "../http-BoJCMnjY.mjs";
|
|
14
14
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
15
|
-
import { _ as coversDelivery, o as createFederation, v as forwardPortableInboxActivity, y as resolvePortableInboxForwardingOptions } from "../middleware-
|
|
15
|
+
import { _ as coversDelivery, o as createFederation, v as forwardPortableInboxActivity, y as resolvePortableInboxForwardingOptions } from "../middleware-CoBLrTKX.mjs";
|
|
16
16
|
import { Create, CryptographicKey, Follow, Note, Person, Tombstone } from "@fedify/vocab";
|
|
17
17
|
import { exportDidKey, formatIri, parseIri } from "@fedify/vocab-runtime";
|
|
18
18
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -7,7 +7,7 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
9
|
import { r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
10
|
-
import { o as createFederation } from "../middleware-
|
|
10
|
+
import { o as createFederation } from "../middleware-CoBLrTKX.mjs";
|
|
11
11
|
import { Note, Object as Object$1, Person } from "@fedify/vocab";
|
|
12
12
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
13
13
|
import { test } from "@fedify/fixture";
|
|
@@ -6,9 +6,9 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
6
6
|
import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { s as signObject } from "../proof-GH7Poos_.mjs";
|
|
10
10
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import { o as createFederation } from "../middleware-
|
|
11
|
+
import { o as createFederation } from "../middleware-CoBLrTKX.mjs";
|
|
12
12
|
import { Create, Note } from "@fedify/vocab";
|
|
13
13
|
import { exportDidKey, formatIri, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
|
|
14
14
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -8,10 +8,10 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { d as verifyPortableObjectProof, s as signObject } from "../proof-GH7Poos_.mjs";
|
|
12
|
+
import { u as signRequest } from "../http-BoJCMnjY.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-
|
|
14
|
+
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-CoBLrTKX.mjs";
|
|
15
15
|
import { configure, reset } from "@logtape/logtape";
|
|
16
16
|
import { Collection, Create, Note, Object as Object$1, PUBLIC_COLLECTION, Person, Tombstone, lookupObject } from "@fedify/vocab";
|
|
17
17
|
import { exportDidKey, formatIri, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
|