@fedify/fedify 2.4.0-dev.2093 → 2.4.0-dev.2099
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-Ld4Y9ymR.mjs → builder-Bno54o_-.mjs} +2 -2
- 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-CTx_lewQ.mjs → compound-proof-X3SxXVbc.mjs} +2 -2
- package/dist/{context-CZjZYXFC.d.cts → context-C43spTGI.d.cts} +5 -2
- package/dist/{context-BSywYspi.d.ts → context-MORIQJIh.d.ts} +5 -2
- package/dist/{deno-8t8k_6Yv.mjs → deno-dxdvl2XZ.mjs} +1 -1
- package/dist/{docloader-DJKcsAiF.mjs → docloader-eBxQDsk9.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +7 -7
- 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/outgoing-proof.test.mjs +5 -5
- package/dist/federation/portable-gateway-keys.test.mjs +3 -3
- package/dist/federation/portable-inbox.test.mjs +375 -10
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-aSHO04ob.cjs → federation-C4Ef3JKa.cjs} +1211 -1089
- package/dist/{http-DSaSAN7X.cjs → http-C8cZTE3Y.cjs} +89 -2
- package/dist/{http-DyT7DP1Y.js → http-D-rbr_Sy.js} +78 -3
- package/dist/{http-B2ftY0Ha.mjs → http-DsgawTd8.mjs} +82 -7
- package/dist/{key-Dwm4VswT.mjs → key-DYfmjnmp.mjs} +2 -2
- package/dist/{kv-cache-DmroAz3M.js → kv-cache-DIxwMeNi.js} +1 -1
- package/dist/{kv-cache-BSJAlP4C.cjs → kv-cache-Dvd-Q-E2.cjs} +1 -1
- package/dist/{kv-cache-D0yYukqk.mjs → kv-cache-EvOgrFsS.mjs} +1 -1
- package/dist/{ld-BYZOoDzZ.mjs → ld-B00wWHzc.mjs} +3 -3
- package/dist/{metrics-B7YwKTFr.mjs → metrics-BP3vdBpb.mjs} +1 -1
- package/dist/{middleware-E_0IH72m.mjs → middleware-Br1_d-Ga.mjs} +627 -505
- package/dist/{middleware-Blq0882d.js → middleware-CcXMe400.js} +1307 -1185
- package/dist/{middleware-BNeqKSsL.mjs → middleware-CeBVBa61.mjs} +1 -1
- package/dist/{mod-B2h2KY0q.d.ts → mod-BL5BQHCq.d.ts} +1 -1
- package/dist/{mod-JzkaEXsi.d.cts → mod-DMI4DbOo.d.cts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-Cgx2Dc7I.mjs → owner-BJPDRDRq.mjs} +3 -3
- package/dist/{owner-szIZl4qI.cjs → owner-DSzH7wro.cjs} +1 -1
- package/dist/{owner-DAGSC5gX.js → owner-U12fDpQW.js} +1 -1
- package/dist/{portable-key-Cn1WJSN1.mjs → portable-key-D0mWbV9G.mjs} +1 -1
- package/dist/{proof-DVXC6nYz.mjs → proof-ChjBwnep.mjs} +4 -4
- package/dist/{send-D-hOvYKy.mjs → send-yFX0E-ye.mjs} +3 -3
- 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 +72 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +3 -3
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +2 -2
- package/dist/sig/portable-key.test.mjs +3 -3
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/{sig-CXOKN4Br.cjs → sig-B689Nj7y.cjs} +2 -2
- package/dist/{sig-B5Ell7pO.js → sig-C85KqAcx.js} +2 -2
- package/dist/{temporal-CqpKGEPk.mjs → temporal-Dl9x-Qw4.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +5 -2
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Wt as WebFingerLinksDispatcher, _t as ActorAliasMapper, u as RequestContext, vt as ActorDispatcher, yt as ActorHandleMapper } from "./context-
|
|
2
|
+
import { Wt as WebFingerLinksDispatcher, _t as ActorAliasMapper, u as RequestContext, vt as ActorDispatcher, yt as ActorHandleMapper } from "./context-MORIQJIh.js";
|
|
3
3
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
4
4
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Wt as WebFingerLinksDispatcher, _t as ActorAliasMapper, u as RequestContext, vt as ActorDispatcher, yt as ActorHandleMapper } from "./context-
|
|
2
|
+
import { Wt as WebFingerLinksDispatcher, _t as ActorAliasMapper, u as RequestContext, vt as ActorDispatcher, yt as ActorHandleMapper } from "./context-C43spTGI.cjs";
|
|
3
3
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
4
4
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
5
5
|
|
package/dist/mod.cjs
CHANGED
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("./rolldown-runtime-Dmm3t92W.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-BalCrSsr.cjs");
|
|
5
5
|
require("./compat/mod.cjs");
|
|
6
|
-
const require_http = require("./http-
|
|
7
|
-
const require_federation = require("./federation-
|
|
6
|
+
const require_http = require("./http-C8cZTE3Y.cjs");
|
|
7
|
+
const require_federation = require("./federation-C4Ef3JKa.cjs");
|
|
8
8
|
const require_types = require("./types-Be2zbyeG.cjs");
|
|
9
|
-
const require_owner = require("./owner-
|
|
10
|
-
const require_kv_cache = require("./kv-cache-
|
|
9
|
+
const require_owner = require("./owner-DSzH7wro.cjs");
|
|
10
|
+
const require_kv_cache = require("./kv-cache-Dvd-Q-E2.cjs");
|
|
11
11
|
require("./nodeinfo/mod.cjs");
|
|
12
12
|
require("./runtime/mod.cjs");
|
|
13
|
-
const require_sig = require("./sig-
|
|
13
|
+
const require_sig = require("./sig-B689Nj7y.cjs");
|
|
14
14
|
require("./utils/mod.cjs");
|
|
15
15
|
//#endregion
|
|
16
16
|
exports.CircuitBreaker = require_federation.CircuitBreaker;
|
package/dist/mod.d.cts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-D-XP_Ccb.cjs";
|
|
3
3
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-xlG-jRdB.cjs";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BF0L9cMt.cjs";
|
|
5
|
-
import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Xt as ActivityTransformer, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "./context-
|
|
5
|
+
import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Xt as ActivityTransformer, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "./context-C43spTGI.cjs";
|
|
6
6
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.cjs";
|
|
7
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
8
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-
|
|
8
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-DMI4DbOo.cjs";
|
|
9
9
|
import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-C8LieBzF.cjs";
|
|
10
10
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-xGFCHqq_.cjs";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
package/dist/mod.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-D-XP_Ccb.js";
|
|
3
3
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-n2v6DPxu.js";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BSzr5-I8.js";
|
|
5
|
-
import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Xt as ActivityTransformer, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "./context-
|
|
5
|
+
import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Xt as ActivityTransformer, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "./context-MORIQJIh.js";
|
|
6
6
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.js";
|
|
7
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
8
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-
|
|
8
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-BL5BQHCq.js";
|
|
9
9
|
import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-Coacostr.js";
|
|
10
10
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CVZrXSdm.js";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
package/dist/mod.js
CHANGED
|
@@ -3,15 +3,15 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "./rolldown-runtime-BC-Eo5Mj.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-DAtXl_Kc.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
6
|
+
import { B as generateCryptoKeyPair, I as exportJwk, N as verifyJsonLd, O as hasSignatureLike, P as verifySignature, R as fetchKey, S as attachSignature, T as detachSignature, V as importJwk, a as signRequest, ct as formatAcceptSignature, d as hasProofLike, dt as validateAcceptSignature, f as signObject, h as verifyPortableObjectProof, j as signJsonLd, lt as fulfillAcceptSignature, m as verifyObject, o as verifyRequest, s as verifyRequestDetailed, u as createProof, ut as parseAcceptSignature, v as verifyProof, w as createSignature, z as fetchKeyDetailed } from "./http-D-rbr_Sy.js";
|
|
7
|
+
import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-CcXMe400.js";
|
|
8
8
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-C_cNlNVK.js";
|
|
9
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
9
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-U12fDpQW.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DIxwMeNi.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
14
|
-
import { t as verifyPortableObject } from "./sig-
|
|
14
|
+
import { t as verifyPortableObject } from "./sig-C85KqAcx.js";
|
|
15
15
|
import "./utils/mod.js";
|
|
16
16
|
export * from "@fedify/vocab-runtime";
|
|
17
17
|
//#endregion
|
|
@@ -5,7 +5,7 @@ import { r as createRequestContext } from "../context-DlZhxdFT.mjs";
|
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
|
-
import { C as
|
|
8
|
+
import { C as handleNodeInfo, o as createFederation, w as handleNodeInfoJrd } from "../middleware-Br1_d-Ga.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-dxdvl2XZ.mjs";
|
|
5
5
|
import { a as isCompatibleKeyId, l as isSamePublicKey$1, s as isPortableId, t as getCanonicalPortableId } from "./portable-key-id-Bva5iT3W.mjs";
|
|
6
|
-
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-
|
|
7
|
-
import { t as fetchPortableGatewayKey } from "./portable-key-
|
|
6
|
+
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-DYfmjnmp.mjs";
|
|
7
|
+
import { t as fetchPortableGatewayKey } from "./portable-key-D0mWbV9G.mjs";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
10
10
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
|
-
const require_http = require("./http-
|
|
2
|
+
const require_http = require("./http-C8cZTE3Y.cjs");
|
|
3
3
|
let _logtape_logtape = require("@logtape/logtape");
|
|
4
4
|
let _fedify_vocab = require("@fedify/vocab");
|
|
5
5
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import {
|
|
3
|
+
import { I as exportJwk, L as fetchActorDocument, U as verifyKeyOwnership, _t as isPortableId, bt as name, c as fetchPortableGatewayKey, ft as getCanonicalPortableId, gt as isCompatibleKeyId, xt as version, yt as isSamePublicKey$1 } from "./http-D-rbr_Sy.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -2,7 +2,7 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { l as isSamePublicKey, o as isPortableActorDocument, t as getCanonicalPortableId } from "./portable-key-id-Bva5iT3W.mjs";
|
|
5
|
-
import { l as verifyPortableObjectProofWithRoot } from "./proof-
|
|
5
|
+
import { l as verifyPortableObjectProofWithRoot } from "./proof-ChjBwnep.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { CryptographicKey, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
8
8
|
import { getDocumentLoader, isGatewayUrl } from "@fedify/vocab-runtime";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-
|
|
4
|
+
import { n as version, t as name } from "./deno-dxdvl2XZ.mjs";
|
|
5
|
+
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-BP3vdBpb.mjs";
|
|
6
6
|
import { r as getPortableDid, s as isPortableId } from "./portable-key-id-Bva5iT3W.mjs";
|
|
7
|
-
import { r as fetchKey, s as validateCryptoKey } from "./key-
|
|
7
|
+
import { r as fetchKey, s as validateCryptoKey } from "./key-DYfmjnmp.mjs";
|
|
8
8
|
import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
|
|
9
9
|
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
|
|
10
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
10
|
+
import { c as getNormalizationContextLoader } from "./ld-B00wWHzc.mjs";
|
|
11
11
|
import { getLogger } from "@logtape/logtape";
|
|
12
12
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
13
13
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-
|
|
6
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { n as version, t as name } from "./deno-dxdvl2XZ.mjs";
|
|
5
|
+
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-BP3vdBpb.mjs";
|
|
6
|
+
import { n as doubleKnock } from "./http-DsgawTd8.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { FetchError, UrlError, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
|
-
import { i as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-
|
|
6
|
+
import { i as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-X3SxXVbc.mjs";
|
|
7
7
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/sig/compound-proof-discovery.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
|
-
import { i as inspectCompoundPortableObjectApplicability, r as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-
|
|
6
|
+
import { i as inspectCompoundPortableObjectApplicability, r as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-X3SxXVbc.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
//#region src/sig/compound-proof-producer.test.ts
|
|
9
9
|
const portableId = "ap+ef61://did:key:z6MkAlice/objects/1";
|
|
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
6
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
7
|
-
import { a as verifyMapLocalProof, c as verifyPortableObjectProofPolicy } from "../proof-
|
|
7
|
+
import { a as verifyMapLocalProof, c as verifyPortableObjectProofPolicy } from "../proof-ChjBwnep.mjs";
|
|
8
8
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { a as verifyCompoundPortableObjectProofs, i as inspectCompoundPortableObjectApplicability, o as verifyCompoundProofDocuments, t as containsCompoundPortableObject } from "../compound-proof-
|
|
9
|
+
import { a as verifyCompoundPortableObjectProofs, i as inspectCompoundPortableObjectApplicability, o as verifyCompoundProofDocuments, t as containsCompoundPortableObject } from "../compound-proof-X3SxXVbc.mjs";
|
|
10
10
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
11
11
|
import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
|
|
12
12
|
import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
|
|
@@ -6,9 +6,9 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
6
6
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
7
7
|
import { n as preloadedOnlyDocumentLoader } from "../public-audience--klBIOk1.mjs";
|
|
8
8
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
9
|
-
import { i as signObject, u as verifyProof } from "../proof-
|
|
9
|
+
import { i as signObject, u as verifyProof } from "../proof-ChjBwnep.mjs";
|
|
10
10
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import { o as verifyCompoundProofDocuments } from "../compound-proof-
|
|
11
|
+
import { o as verifyCompoundProofDocuments } from "../compound-proof-X3SxXVbc.mjs";
|
|
12
12
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
13
13
|
import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note, Question } from "@fedify/vocab";
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -11,8 +11,8 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
|
11
11
|
import "../std__assert-DvMDRPes.mjs";
|
|
12
12
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
13
13
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
14
|
-
import { t as exportJwk } from "../key-
|
|
15
|
-
import { a as
|
|
14
|
+
import { t as exportJwk } from "../key-DYfmjnmp.mjs";
|
|
15
|
+
import { a as listRequestSignatures, c as selectRequestSignature, d as verifyRequest, f as verifyRequestDetailed, i as formatRfc9421SignatureParameters, l as signRequest, n as doubleKnock, o as parseRfc9421Signature, r as formatRfc9421Signature, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as timingSafeEqual } from "../http-DsgawTd8.mjs";
|
|
16
16
|
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
17
17
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
18
18
|
import { FetchError, exportSpki } from "@fedify/vocab-runtime";
|
|
@@ -2098,5 +2098,75 @@ test("doubleKnock(): Accept-Signature with multiple compatible entries fulfills
|
|
|
2098
2098
|
assertEquals(requestCount, 2);
|
|
2099
2099
|
esm_default.hardReset();
|
|
2100
2100
|
});
|
|
2101
|
+
test("listRequestSignatures()", async (t) => {
|
|
2102
|
+
const request = () => new Request("https://example.com/inbox", {
|
|
2103
|
+
method: "POST",
|
|
2104
|
+
body: "Test message"
|
|
2105
|
+
});
|
|
2106
|
+
await t.step("draft-cavage", async () => {
|
|
2107
|
+
const signed = await signRequest(request(), rsaPrivateKey2, rsaPublicKey2.id);
|
|
2108
|
+
const signatures = listRequestSignatures(signed);
|
|
2109
|
+
assertEquals(signatures.map((s) => [s.keyId.href, s.label]), [[rsaPublicKey2.id.href, null]]);
|
|
2110
|
+
const components = signatures[0].components;
|
|
2111
|
+
assertEquals(components.map((c) => c.value), signed.headers.get("Signature").match(/headers="([^"]*)"/)[1].split(" "));
|
|
2112
|
+
assert(components.every((c) => Object.keys(c.params).length < 1));
|
|
2113
|
+
});
|
|
2114
|
+
await t.step("RFC 9421", async () => {
|
|
2115
|
+
const signatures = listRequestSignatures(await signRequest(request(), rsaPrivateKey2, rsaPublicKey2.id, {
|
|
2116
|
+
spec: "rfc9421",
|
|
2117
|
+
rfc9421: { label: "a" }
|
|
2118
|
+
}));
|
|
2119
|
+
assertEquals(signatures.map((s) => [s.keyId.href, s.label]), [[rsaPublicKey2.id.href, "a"]]);
|
|
2120
|
+
assertEquals(signatures[0].components.map((c) => c.value), [
|
|
2121
|
+
"@method",
|
|
2122
|
+
"@target-uri",
|
|
2123
|
+
"@authority",
|
|
2124
|
+
"host",
|
|
2125
|
+
"date",
|
|
2126
|
+
"content-digest"
|
|
2127
|
+
]);
|
|
2128
|
+
});
|
|
2129
|
+
await t.step("unsigned or malformed", () => {
|
|
2130
|
+
assertEquals(listRequestSignatures(request()), []);
|
|
2131
|
+
const malformed = request();
|
|
2132
|
+
malformed.headers.set("Signature", "keyId=\"not a URL\",signature=\"AA==\"");
|
|
2133
|
+
assertEquals(listRequestSignatures(malformed), []);
|
|
2134
|
+
const garbage = request();
|
|
2135
|
+
garbage.headers.set("Signature-Input", "((");
|
|
2136
|
+
garbage.headers.set("Signature", "((");
|
|
2137
|
+
assertEquals(listRequestSignatures(garbage), []);
|
|
2138
|
+
});
|
|
2139
|
+
});
|
|
2140
|
+
test("selectRequestSignature()", async () => {
|
|
2141
|
+
const body = "Test message";
|
|
2142
|
+
const sign = (label, keyId) => signRequest(new Request("https://example.com/inbox", {
|
|
2143
|
+
method: "POST",
|
|
2144
|
+
body
|
|
2145
|
+
}), rsaPrivateKey2, keyId, {
|
|
2146
|
+
spec: "rfc9421",
|
|
2147
|
+
rfc9421: { label }
|
|
2148
|
+
});
|
|
2149
|
+
const first = await sign("a", new URL("https://example.com/other#key"));
|
|
2150
|
+
const second = await sign("b", rsaPublicKey2.id);
|
|
2151
|
+
const headers = new Headers(second.headers);
|
|
2152
|
+
for (const name of ["Signature-Input", "Signature"]) headers.set(name, `${first.headers.get(name)}, ${second.headers.get(name)}`);
|
|
2153
|
+
const request = new Request(second.url, {
|
|
2154
|
+
method: "POST",
|
|
2155
|
+
headers,
|
|
2156
|
+
body
|
|
2157
|
+
});
|
|
2158
|
+
const signatures = listRequestSignatures(request);
|
|
2159
|
+
assertEquals(signatures.map((s) => s.label), ["a", "b"]);
|
|
2160
|
+
const selected = selectRequestSignature(request, signatures[1]);
|
|
2161
|
+
assertEquals(listRequestSignatures(selected).map((s) => [s.label, s.keyId.href]), [["b", rsaPublicKey2.id.href]]);
|
|
2162
|
+
const result = await verifyRequestDetailed(selected, {
|
|
2163
|
+
documentLoader: mockDocumentLoader,
|
|
2164
|
+
contextLoader: mockDocumentLoader
|
|
2165
|
+
});
|
|
2166
|
+
assert(result.verified);
|
|
2167
|
+
assertEquals(result.key.id, rsaPublicKey2.id);
|
|
2168
|
+
assertEquals(await selected.text(), body);
|
|
2169
|
+
assertEquals(await request.text(), body);
|
|
2170
|
+
});
|
|
2101
2171
|
//#endregion
|
|
2102
2172
|
export {};
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-
|
|
9
|
+
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-DYfmjnmp.mjs";
|
|
10
10
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
11
11
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
12
12
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -8,8 +8,8 @@ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
9
9
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
12
|
-
import { a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-
|
|
11
|
+
import { a as generateCryptoKeyPair } from "../key-DYfmjnmp.mjs";
|
|
12
|
+
import { a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-B00wWHzc.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
14
14
|
import { CryptographicKey } from "@fedify/vocab";
|
|
15
15
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_http = require("../http-
|
|
4
|
-
const require_owner = require("../owner-
|
|
5
|
-
const require_sig = require("../sig-
|
|
3
|
+
const require_http = require("../http-C8cZTE3Y.cjs");
|
|
4
|
+
const require_owner = require("../owner-DSzH7wro.cjs");
|
|
5
|
+
const require_sig = require("../sig-B689Nj7y.cjs");
|
|
6
6
|
exports.attachSignature = require_http.attachSignature;
|
|
7
7
|
exports.createProof = require_http.createProof;
|
|
8
8
|
exports.createSignature = require_http.createSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import {
|
|
4
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
5
|
-
import { t as verifyPortableObject } from "../sig-
|
|
3
|
+
import { B as generateCryptoKeyPair, I as exportJwk, N as verifyJsonLd, O as hasSignatureLike, P as verifySignature, R as fetchKey, S as attachSignature, T as detachSignature, V as importJwk, a as signRequest, ct as formatAcceptSignature, d as hasProofLike, dt as validateAcceptSignature, f as signObject, h as verifyPortableObjectProof, j as signJsonLd, lt as fulfillAcceptSignature, m as verifyObject, o as verifyRequest, s as verifyRequestDetailed, u as createProof, ut as parseAcceptSignature, v as verifyProof, w as createSignature, z as fetchKeyDetailed } from "../http-D-rbr_Sy.js";
|
|
4
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-U12fDpQW.js";
|
|
5
|
+
import { t as verifyPortableObject } from "../sig-C85KqAcx.js";
|
|
6
6
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/owner.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
8
|
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
9
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-BJPDRDRq.mjs";
|
|
10
10
|
import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
|
|
11
11
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
//#region src/sig/owner.test.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "../deno-
|
|
5
|
-
import { l as verifyPortableObjectProofWithRoot, s as verifyPortableObjectProof } from "../proof-
|
|
4
|
+
import { n as version, t as name } from "../deno-dxdvl2XZ.mjs";
|
|
5
|
+
import { l as verifyPortableObjectProofWithRoot, s as verifyPortableObjectProof } from "../proof-ChjBwnep.mjs";
|
|
6
6
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { Collection, CollectionPage, Note, Object as Object$1, OrderedCollection, Person, isActor, traverseCollection } from "@fedify/vocab";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { r as fetchKey } from "../key-
|
|
5
|
-
import {
|
|
4
|
+
import { r as fetchKey } from "../key-DYfmjnmp.mjs";
|
|
5
|
+
import { d as verifyRequest, l as signRequest } from "../http-DsgawTd8.mjs";
|
|
6
6
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
7
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
7
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-BJPDRDRq.mjs";
|
|
8
8
|
import { Create, CryptographicKey, Multikey, Person } from "@fedify/vocab";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { FetchError, encodeMultibase, exportDidKey, exportSpki, parseIri, preloadedContexts } from "@fedify/vocab-runtime";
|
package/dist/sig/proof.test.mjs
CHANGED
|
@@ -10,10 +10,10 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
13
|
-
import { i as signObject, n as createProof, o as verifyObject, r as hasProofLike, s as verifyPortableObjectProof, u as verifyProof } from "../proof-
|
|
14
|
-
import {
|
|
13
|
+
import { i as signObject, n as createProof, o as verifyObject, r as hasProofLike, s as verifyPortableObjectProof, u as verifyProof } from "../proof-ChjBwnep.mjs";
|
|
14
|
+
import { d as verifyRequest } from "../http-DsgawTd8.mjs";
|
|
15
15
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
16
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
16
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-eBxQDsk9.mjs";
|
|
17
17
|
import { Create, DataIntegrityProof, Document, Multikey, Note, PUBLIC_COLLECTION, Place, Translation } from "@fedify/vocab";
|
|
18
18
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
19
19
|
import { decodeMultibase, encodeMultibase, exportDidKey, exportMultibaseKey, formatIri, importMultibaseKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
|
-
const require_http = require("./http-
|
|
3
|
-
require("./owner-
|
|
2
|
+
const require_http = require("./http-C8cZTE3Y.cjs");
|
|
3
|
+
require("./owner-DSzH7wro.cjs");
|
|
4
4
|
let _logtape_logtape = require("@logtape/logtape");
|
|
5
5
|
let _fedify_vocab = require("@fedify/vocab");
|
|
6
6
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import {
|
|
4
|
-
import "./owner-
|
|
3
|
+
import { _ as verifyPortableObjectProofWithRoot, bt as name, h as verifyPortableObjectProof, xt as version } from "./http-D-rbr_Sy.js";
|
|
4
|
+
import "./owner-U12fDpQW.js";
|
|
5
5
|
import { getLogger } from "@logtape/logtape";
|
|
6
6
|
import { CollectionPage, Object as Object$1, isActor } from "@fedify/vocab";
|
|
7
7
|
import { trace } from "@opentelemetry/api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
4
|
+
import { c as getNormalizationContextLoader } from "./ld-B00wWHzc.mjs";
|
|
5
5
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
6
6
|
//#region src/federation/temporal.ts
|
|
7
7
|
function isPlainObject(value) {
|
package/dist/testing/kv.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
6
6
|
import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
|
|
7
7
|
import { n as baseOptions, o as stringSchema, t as MockQueue } from "../tasks-dbCShlCb.mjs";
|
|
8
8
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
9
|
+
import { o as createFederation } from "../middleware-Br1_d-Ga.mjs";
|
|
10
10
|
//#region src/testing/kv.test.ts
|
|
11
11
|
test("ManualClockKvStore keeps an entry at its exact expiration instant", async () => {
|
|
12
12
|
const kv = new ManualClockKvStore();
|
package/dist/testing/mod.d.mts
CHANGED
|
@@ -2035,8 +2035,11 @@ interface PortableInboxForwardingOptions {
|
|
|
2035
2035
|
/**
|
|
2036
2036
|
* How long a delivery waits for forwarding requests made immediately, i.e.,
|
|
2037
2037
|
* when no outbox queue is configured, before Fedify responds to it.
|
|
2038
|
-
* Requests still running afterwards continue in the background. It
|
|
2039
|
-
*
|
|
2038
|
+
* Requests still running afterwards continue in the background. It also
|
|
2039
|
+
* bounds verifying the HTTP Signature that identifies the gateway which
|
|
2040
|
+
* forwarded the delivery, with or without an outbox queue; if the
|
|
2041
|
+
* verification does not finish in time, the activity is forwarded to that
|
|
2042
|
+
* gateway as well. It cannot have calendar units,
|
|
2040
2043
|
* i.e., weeks, months, or years, and cannot be longer than
|
|
2041
2044
|
* 2,147,483,647 milliseconds (about 24.8 days), the longest delay timers
|
|
2042
2045
|
* support.
|
|
@@ -5,9 +5,9 @@ import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { d as verifyRequest } from "../http-DsgawTd8.mjs";
|
|
9
9
|
import { i as rsaPrivateKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
10
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
10
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-eBxQDsk9.mjs";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { FetchError, UrlError } from "@fedify/vocab-runtime";
|
|
13
13
|
//#region src/utils/docloader.test.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as kvCache, t as MockKvStore } from "../kv-cache-
|
|
4
|
+
import { n as kvCache, t as MockKvStore } from "../kv-cache-EvOgrFsS.mjs";
|
|
5
5
|
import { deepStrictEqual, throws } from "node:assert";
|
|
6
6
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
7
7
|
import { preloadedContexts } from "@fedify/vocab-runtime";
|
package/dist/utils/mod.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_kv_cache = require("../kv-cache-
|
|
3
|
+
const require_kv_cache = require("../kv-cache-Dvd-Q-E2.cjs");
|
|
4
4
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
|
5
5
|
exports.kvCache = require_kv_cache.kvCache;
|
package/dist/utils/mod.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-
|
|
3
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-DIxwMeNi.js";
|
|
4
4
|
export { getAuthenticatedDocumentLoader, kvCache };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/fedify",
|
|
3
|
-
"version": "2.4.0-dev.
|
|
3
|
+
"version": "2.4.0-dev.2099+cd074fe2",
|
|
4
4
|
"description": "An ActivityPub server framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ActivityPub",
|
|
@@ -151,10 +151,10 @@
|
|
|
151
151
|
"structured-field-values": "^2.0.4",
|
|
152
152
|
"temporal-polyfill": "^1.0.1",
|
|
153
153
|
"urlpattern-polyfill": "^10.1.0",
|
|
154
|
-
"@fedify/uri-template": "2.4.0-dev.
|
|
155
|
-
"@fedify/vocab": "2.4.0-dev.
|
|
156
|
-
"@fedify/
|
|
157
|
-
"@fedify/
|
|
154
|
+
"@fedify/uri-template": "2.4.0-dev.2099+cd074fe2",
|
|
155
|
+
"@fedify/vocab": "2.4.0-dev.2099+cd074fe2",
|
|
156
|
+
"@fedify/vocab-runtime": "2.4.0-dev.2099+cd074fe2",
|
|
157
|
+
"@fedify/webfinger": "2.4.0-dev.2099+cd074fe2"
|
|
158
158
|
},
|
|
159
159
|
"devDependencies": {
|
|
160
160
|
"@std/assert": "npm:@jsr/std__assert@^0.226.0",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"typescript": "^6.0.0",
|
|
168
168
|
"wrangler": "^4.17.0",
|
|
169
169
|
"@fedify/fixture": "2.0.0",
|
|
170
|
-
"@fedify/vocab-tools": "^2.4.0-dev.
|
|
170
|
+
"@fedify/vocab-tools": "^2.4.0-dev.2099+cd074fe2"
|
|
171
171
|
},
|
|
172
172
|
"scripts": {
|
|
173
173
|
"build:self": "tsdown",
|