@fedify/fedify 2.4.0-dev.1959 → 2.4.0-pr.1006.44

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.
Files changed (70) hide show
  1. package/README.md +2 -0
  2. package/dist/{builder-sMkz-MdT.mjs → builder-BdcA_1Rt.mjs} +2 -2
  3. package/dist/compat/mod.d.cts +1 -1
  4. package/dist/compat/mod.d.ts +1 -1
  5. package/dist/compat/transformers.test.mjs +1 -1
  6. package/dist/{context-COLwHogJ.d.cts → context-BOnn653X.d.cts} +0 -27
  7. package/dist/{context-DiiCt4S7.d.ts → context-CmjP-cgJ.d.ts} +0 -27
  8. package/dist/{deno-Xg7DR4LS.mjs → deno-tSRHKXbU.mjs} +1 -1
  9. package/dist/{docloader-4YqMWBpt.mjs → docloader-BAO-cgto.mjs} +2 -2
  10. package/dist/federation/builder.test.mjs +1 -1
  11. package/dist/federation/handler.test.mjs +3 -3
  12. package/dist/federation/idempotency.test.mjs +2 -2
  13. package/dist/federation/keycache.test.mjs +4 -30
  14. package/dist/federation/metrics.test.mjs +1 -1
  15. package/dist/federation/middleware.test.mjs +8 -195
  16. package/dist/federation/mod.cjs +1 -1
  17. package/dist/federation/mod.d.cts +2 -2
  18. package/dist/federation/mod.d.ts +2 -2
  19. package/dist/federation/mod.js +1 -1
  20. package/dist/federation/send.test.mjs +3 -3
  21. package/dist/federation/tasks/enqueue.test.mjs +2 -3
  22. package/dist/federation/tasks/tasks.test.mjs +3 -4
  23. package/dist/federation/temporal.test.mjs +1 -1
  24. package/dist/federation/webfinger.test.mjs +1 -1
  25. package/dist/{federation-BNJgxgH6.cjs → federation-BzLBT04I.cjs} +13 -32
  26. package/dist/{http-Bh37_81O.js → http-CcFURGbR.js} +1 -1
  27. package/dist/{http-DyXZdUng.mjs → http-Cp_Byhf8.mjs} +3 -3
  28. package/dist/{http-BuOvqNbW.cjs → http-DBbZNv2i.cjs} +1 -1
  29. package/dist/{key-CXsAkAt6.mjs → key-CEDlSMK7.mjs} +2 -2
  30. package/dist/{keycache-ZLqIfrkL.mjs → keycache-0Jk78XmB.mjs} +1 -3
  31. package/dist/{kv-cache-Btl0s7i7.cjs → kv-cache-B-JFZafn.cjs} +1 -1
  32. package/dist/{kv-cache-BubmP7z9.mjs → kv-cache-C7qYJ4To.mjs} +1 -1
  33. package/dist/{kv-cache-DjFxdXjk.js → kv-cache-CocB_ME8.js} +1 -1
  34. package/dist/{ld-C5Qv0_xn.mjs → ld-B8k-089e.mjs} +3 -3
  35. package/dist/{metrics-B7-JxJSv.mjs → metrics-CIK7ZY_B.mjs} +1 -1
  36. package/dist/{middleware-DB_evWhA.mjs → middleware--nGmJXXx.mjs} +22 -39
  37. package/dist/{middleware-CF539vn2.js → middleware-CBO16r56.js} +13 -32
  38. package/dist/{middleware-BfRUvR8e.mjs → middleware-Dx9byvw-.mjs} +1 -1
  39. package/dist/{mod-CSH1Ee-I.d.ts → mod-BYuZ0WXt.d.ts} +1 -1
  40. package/dist/{mod-BZldCEU0.d.cts → mod-kUSY5n3f.d.cts} +1 -1
  41. package/dist/mod.cjs +4 -4
  42. package/dist/mod.d.cts +2 -2
  43. package/dist/mod.d.ts +2 -2
  44. package/dist/mod.js +4 -4
  45. package/dist/nodeinfo/handler.test.mjs +1 -1
  46. package/dist/{owner-DFzwGoyv.mjs → owner-Cf55GD32.mjs} +2 -2
  47. package/dist/{proof-DJGBYtRT.mjs → proof-BAVwiUPt.mjs} +4 -4
  48. package/dist/{proof-3rlJfM0Z.js → proof-CqV_aPhu.js} +1 -1
  49. package/dist/{proof-BVpjHUMS.cjs → proof-DSohcbCt.cjs} +1 -1
  50. package/dist/{send-BOXP7DyW.mjs → send-DL5nBv54.mjs} +3 -3
  51. package/dist/sig/http.test.mjs +2 -2
  52. package/dist/sig/key.test.mjs +1 -1
  53. package/dist/sig/ld.test.mjs +2 -2
  54. package/dist/sig/mod.cjs +2 -2
  55. package/dist/sig/mod.js +2 -2
  56. package/dist/sig/owner.test.mjs +1 -1
  57. package/dist/sig/proof.test.mjs +1 -1
  58. package/dist/{temporal-D6yzxQ23.mjs → temporal-C_3AI99D.mjs} +1 -1
  59. package/dist/testing/mod.d.mts +1 -70
  60. package/dist/testing/mod.mjs +2 -4
  61. package/dist/{tasks-dbCShlCb.mjs → testing-D13ymFKy.mjs} +1 -0
  62. package/dist/utils/docloader.test.mjs +2 -2
  63. package/dist/utils/kv-cache.test.mjs +1 -1
  64. package/dist/utils/mod.cjs +1 -1
  65. package/dist/utils/mod.js +1 -1
  66. package/package.json +7 -7
  67. package/dist/kv-DBRWVx3Q.mjs +0 -104
  68. package/dist/testing/kv.test.d.mts +0 -2
  69. package/dist/testing/kv.test.mjs +0 -101
  70. package/dist/testing-hbky2gMN.mjs +0 -8
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-6TI0tI03.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-r_waTiQj.cjs";
5
- import { $ as MessageQueueDepth, A as OutboxListenerSetters, At as ObjectAuthorizePredicate, B as TaskEnqueueOptions, Bt as SendActivityError, C as FederationStartQueueOptions, Ct as CustomCollectionCounter, D as InboxListenerSetters, Dt as InboxListener, E as InboxChallengePolicy, Et as InboxErrorHandler, F as createFederation, Ft as OutboxPermanentFailureHandler, G as RetryPolicy, Gt as ActivityTransformer, H as TaskRegistry, Ht as PageItems, I as Message, It as SharedInboxKeyDispatcher, J as respondWithObject, K as createExponentialBackoffPolicy, L as createFederationBuilder, Lt as UnverifiedActivityHandler, M as FederationKvPrefixes, Mt as OutboxErrorHandler, N as FederationOrigin, Nt as OutboxListener, O as MediaUploaderSetters, Ot as MediaUploaderCallback, P as FederationQueueOptions, Pt as OutboxListenerErrorHandler, Q as MessageQueue, R as TaskDefinition, Rt as UnverifiedActivityReason, S as FederationOptions, St as CollectionDispatcher, T as IdempotencyStrategy, Tt as CustomCollectionDispatcher, U as CreateExponentialBackoffPolicyOptions, Ut as buildCollectionSynchronizationHeader, V as TaskHandler, Vt as SenderKeyPair, W as RetryContext, Wt as digest, X as InProcessMessageQueue, Y as respondWithObjectIfAcceptable, Z as InProcessMessageQueueOptions, _ as Federatable, _t as ActorHandleMapper, a as GetSignedKeyOptions, at as CircuitBreakerBeforeSendDecision, b as FederationBuilder, bt as CollectionCounter, c as ParseUriResult, ct as CircuitBreakerKvState, d as SendActivityOptions, dt as CircuitBreakerStateChange, et as MessageQueueEnqueueOptions, f as SendActivityOptionsForCollection, ft as NormalizedCircuitBreakerOptions, g as CustomCollectionCallbackSetters, gt as ActorDispatcher, h as ConstructorWithTypeId, ht as ActorAliasMapper, i as GetActorOptions, it as CircuitBreakerActivityDrop, j as Rfc6570Expression, jt as ObjectDispatcher, k as ObjectCallbackSetters, kt as NodeInfoDispatcher, l as RequestContext, lt as CircuitBreakerOptions, m as CollectionCallbackSetters, mt as parseCircuitBreakerKvState, n as Context, nt as ParallelMessageQueue, o as InboxContext, ot as CircuitBreakerCreateOptions, p as ActorCallbackSetters, pt as normalizeCircuitBreakerOptions, q as RespondWithObjectOptions, r as ForwardActivityOptions, rt as CircuitBreaker, s as OutboxContext, st as CircuitBreakerFailurePolicy, t as ActorKeyPair, tt as MessageQueueListenOptions, u as RouteActivityOptions, ut as CircuitBreakerState, v as Federation, vt as ActorKeyPairsDispatcher, w as IdempotencyKeyCallback, wt as CustomCollectionCursor, x as FederationFetchOptions, xt as CollectionCursor, y as FederationBenchmarkOptions, yt as AuthorizePredicate, z as TaskDefinitionOptions, zt as WebFingerLinksDispatcher } from "./context-COLwHogJ.cjs";
5
+ import { $ as MessageQueueDepth, A as OutboxListenerSetters, At as ObjectAuthorizePredicate, B as TaskEnqueueOptions, Bt as SendActivityError, C as FederationStartQueueOptions, Ct as CustomCollectionCounter, D as InboxListenerSetters, Dt as InboxListener, E as InboxChallengePolicy, Et as InboxErrorHandler, F as createFederation, Ft as OutboxPermanentFailureHandler, G as RetryPolicy, Gt as ActivityTransformer, H as TaskRegistry, Ht as PageItems, I as Message, It as SharedInboxKeyDispatcher, J as respondWithObject, K as createExponentialBackoffPolicy, L as createFederationBuilder, Lt as UnverifiedActivityHandler, M as FederationKvPrefixes, Mt as OutboxErrorHandler, N as FederationOrigin, Nt as OutboxListener, O as MediaUploaderSetters, Ot as MediaUploaderCallback, P as FederationQueueOptions, Pt as OutboxListenerErrorHandler, Q as MessageQueue, R as TaskDefinition, Rt as UnverifiedActivityReason, S as FederationOptions, St as CollectionDispatcher, T as IdempotencyStrategy, Tt as CustomCollectionDispatcher, U as CreateExponentialBackoffPolicyOptions, Ut as buildCollectionSynchronizationHeader, V as TaskHandler, Vt as SenderKeyPair, W as RetryContext, Wt as digest, X as InProcessMessageQueue, Y as respondWithObjectIfAcceptable, Z as InProcessMessageQueueOptions, _ as Federatable, _t as ActorHandleMapper, a as GetSignedKeyOptions, at as CircuitBreakerBeforeSendDecision, b as FederationBuilder, bt as CollectionCounter, c as ParseUriResult, ct as CircuitBreakerKvState, d as SendActivityOptions, dt as CircuitBreakerStateChange, et as MessageQueueEnqueueOptions, f as SendActivityOptionsForCollection, ft as NormalizedCircuitBreakerOptions, g as CustomCollectionCallbackSetters, gt as ActorDispatcher, h as ConstructorWithTypeId, ht as ActorAliasMapper, i as GetActorOptions, it as CircuitBreakerActivityDrop, j as Rfc6570Expression, jt as ObjectDispatcher, k as ObjectCallbackSetters, kt as NodeInfoDispatcher, l as RequestContext, lt as CircuitBreakerOptions, m as CollectionCallbackSetters, mt as parseCircuitBreakerKvState, n as Context, nt as ParallelMessageQueue, o as InboxContext, ot as CircuitBreakerCreateOptions, p as ActorCallbackSetters, pt as normalizeCircuitBreakerOptions, q as RespondWithObjectOptions, r as ForwardActivityOptions, rt as CircuitBreaker, s as OutboxContext, st as CircuitBreakerFailurePolicy, t as ActorKeyPair, tt as MessageQueueListenOptions, u as RouteActivityOptions, ut as CircuitBreakerState, v as Federation, vt as ActorKeyPairsDispatcher, w as IdempotencyKeyCallback, wt as CustomCollectionCursor, x as FederationFetchOptions, xt as CollectionCursor, y as FederationBenchmarkOptions, yt as AuthorizePredicate, z as TaskDefinitionOptions, zt as WebFingerLinksDispatcher } from "./context-BOnn653X.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-BZldCEU0.cjs";
8
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-kUSY5n3f.cjs";
9
9
  import { C as verifyJsonLd, S as signJsonLd, _ as VerifySignatureOptions, a as VerifyPortableObjectProofOptions, b as detachSignature, c as createProof, d as verifyObject, f as verifyPortableObjectProof, g as VerifyJsonLdOptions, h as SignJsonLdOptions, i as VerifyPortableObjectProofFailureReason, l as hasProofLike, m as CreateSignatureOptions, n as SignObjectOptions, o as VerifyPortableObjectProofResult, p as verifyProof, r as VerifyObjectOptions, s as VerifyProofOptions, t as CreateProofOptions, u as signObject, v as attachSignature, w as verifySignature, x as hasSignatureLike, y as createSignature } from "./mod-CnGLNoVw.cjs";
10
10
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CLHkCwLm.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-CdrSn2ip.js";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-DGSfntI-.js";
5
- import { $ as MessageQueueDepth, A as OutboxListenerSetters, At as ObjectAuthorizePredicate, B as TaskEnqueueOptions, Bt as SendActivityError, C as FederationStartQueueOptions, Ct as CustomCollectionCounter, D as InboxListenerSetters, Dt as InboxListener, E as InboxChallengePolicy, Et as InboxErrorHandler, F as createFederation, Ft as OutboxPermanentFailureHandler, G as RetryPolicy, Gt as ActivityTransformer, H as TaskRegistry, Ht as PageItems, I as Message, It as SharedInboxKeyDispatcher, J as respondWithObject, K as createExponentialBackoffPolicy, L as createFederationBuilder, Lt as UnverifiedActivityHandler, M as FederationKvPrefixes, Mt as OutboxErrorHandler, N as FederationOrigin, Nt as OutboxListener, O as MediaUploaderSetters, Ot as MediaUploaderCallback, P as FederationQueueOptions, Pt as OutboxListenerErrorHandler, Q as MessageQueue, R as TaskDefinition, Rt as UnverifiedActivityReason, S as FederationOptions, St as CollectionDispatcher, T as IdempotencyStrategy, Tt as CustomCollectionDispatcher, U as CreateExponentialBackoffPolicyOptions, Ut as buildCollectionSynchronizationHeader, V as TaskHandler, Vt as SenderKeyPair, W as RetryContext, Wt as digest, X as InProcessMessageQueue, Y as respondWithObjectIfAcceptable, Z as InProcessMessageQueueOptions, _ as Federatable, _t as ActorHandleMapper, a as GetSignedKeyOptions, at as CircuitBreakerBeforeSendDecision, b as FederationBuilder, bt as CollectionCounter, c as ParseUriResult, ct as CircuitBreakerKvState, d as SendActivityOptions, dt as CircuitBreakerStateChange, et as MessageQueueEnqueueOptions, f as SendActivityOptionsForCollection, ft as NormalizedCircuitBreakerOptions, g as CustomCollectionCallbackSetters, gt as ActorDispatcher, h as ConstructorWithTypeId, ht as ActorAliasMapper, i as GetActorOptions, it as CircuitBreakerActivityDrop, j as Rfc6570Expression, jt as ObjectDispatcher, k as ObjectCallbackSetters, kt as NodeInfoDispatcher, l as RequestContext, lt as CircuitBreakerOptions, m as CollectionCallbackSetters, mt as parseCircuitBreakerKvState, n as Context, nt as ParallelMessageQueue, o as InboxContext, ot as CircuitBreakerCreateOptions, p as ActorCallbackSetters, pt as normalizeCircuitBreakerOptions, q as RespondWithObjectOptions, r as ForwardActivityOptions, rt as CircuitBreaker, s as OutboxContext, st as CircuitBreakerFailurePolicy, t as ActorKeyPair, tt as MessageQueueListenOptions, u as RouteActivityOptions, ut as CircuitBreakerState, v as Federation, vt as ActorKeyPairsDispatcher, w as IdempotencyKeyCallback, wt as CustomCollectionCursor, x as FederationFetchOptions, xt as CollectionCursor, y as FederationBenchmarkOptions, yt as AuthorizePredicate, z as TaskDefinitionOptions, zt as WebFingerLinksDispatcher } from "./context-DiiCt4S7.js";
5
+ import { $ as MessageQueueDepth, A as OutboxListenerSetters, At as ObjectAuthorizePredicate, B as TaskEnqueueOptions, Bt as SendActivityError, C as FederationStartQueueOptions, Ct as CustomCollectionCounter, D as InboxListenerSetters, Dt as InboxListener, E as InboxChallengePolicy, Et as InboxErrorHandler, F as createFederation, Ft as OutboxPermanentFailureHandler, G as RetryPolicy, Gt as ActivityTransformer, H as TaskRegistry, Ht as PageItems, I as Message, It as SharedInboxKeyDispatcher, J as respondWithObject, K as createExponentialBackoffPolicy, L as createFederationBuilder, Lt as UnverifiedActivityHandler, M as FederationKvPrefixes, Mt as OutboxErrorHandler, N as FederationOrigin, Nt as OutboxListener, O as MediaUploaderSetters, Ot as MediaUploaderCallback, P as FederationQueueOptions, Pt as OutboxListenerErrorHandler, Q as MessageQueue, R as TaskDefinition, Rt as UnverifiedActivityReason, S as FederationOptions, St as CollectionDispatcher, T as IdempotencyStrategy, Tt as CustomCollectionDispatcher, U as CreateExponentialBackoffPolicyOptions, Ut as buildCollectionSynchronizationHeader, V as TaskHandler, Vt as SenderKeyPair, W as RetryContext, Wt as digest, X as InProcessMessageQueue, Y as respondWithObjectIfAcceptable, Z as InProcessMessageQueueOptions, _ as Federatable, _t as ActorHandleMapper, a as GetSignedKeyOptions, at as CircuitBreakerBeforeSendDecision, b as FederationBuilder, bt as CollectionCounter, c as ParseUriResult, ct as CircuitBreakerKvState, d as SendActivityOptions, dt as CircuitBreakerStateChange, et as MessageQueueEnqueueOptions, f as SendActivityOptionsForCollection, ft as NormalizedCircuitBreakerOptions, g as CustomCollectionCallbackSetters, gt as ActorDispatcher, h as ConstructorWithTypeId, ht as ActorAliasMapper, i as GetActorOptions, it as CircuitBreakerActivityDrop, j as Rfc6570Expression, jt as ObjectDispatcher, k as ObjectCallbackSetters, kt as NodeInfoDispatcher, l as RequestContext, lt as CircuitBreakerOptions, m as CollectionCallbackSetters, mt as parseCircuitBreakerKvState, n as Context, nt as ParallelMessageQueue, o as InboxContext, ot as CircuitBreakerCreateOptions, p as ActorCallbackSetters, pt as normalizeCircuitBreakerOptions, q as RespondWithObjectOptions, r as ForwardActivityOptions, rt as CircuitBreaker, s as OutboxContext, st as CircuitBreakerFailurePolicy, t as ActorKeyPair, tt as MessageQueueListenOptions, u as RouteActivityOptions, ut as CircuitBreakerState, v as Federation, vt as ActorKeyPairsDispatcher, w as IdempotencyKeyCallback, wt as CustomCollectionCursor, x as FederationFetchOptions, xt as CollectionCursor, y as FederationBenchmarkOptions, yt as AuthorizePredicate, z as TaskDefinitionOptions, zt as WebFingerLinksDispatcher } from "./context-CmjP-cgJ.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-CSH1Ee-I.js";
8
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-BYuZ0WXt.js";
9
9
  import { C as verifyJsonLd, S as signJsonLd, _ as VerifySignatureOptions, a as VerifyPortableObjectProofOptions, b as detachSignature, c as createProof, d as verifyObject, f as verifyPortableObjectProof, g as VerifyJsonLdOptions, h as SignJsonLdOptions, i as VerifyPortableObjectProofFailureReason, l as hasProofLike, m as CreateSignatureOptions, n as SignObjectOptions, o as VerifyPortableObjectProofResult, p as verifyProof, r as VerifyObjectOptions, s as VerifyProofOptions, t as CreateProofOptions, u as signObject, v as attachSignature, w as verifySignature, x as hasSignatureLike, y as createSignature } from "./mod-DzRXACM5.js";
10
10
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DypxPS9H.js";
11
11
  export * from "@fedify/vocab-runtime";
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ 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 { A as formatAcceptSignature, M as parseAcceptSignature, N as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, j as fulfillAcceptSignature, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk } from "./http-Bh37_81O.js";
7
- import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-CF539vn2.js";
8
- import { C as verifyJsonLd, a as verifyPortableObjectProof, c as doesActorOwnKey, f as attachSignature, h as detachSignature, i as verifyObject, l as getKeyOwner, m as createSignature, n as hasProofLike, o as verifyProof, r as signObject, t as createProof, v as hasSignatureLike, w as verifySignature, x as signJsonLd } from "./proof-3rlJfM0Z.js";
6
+ import { A as formatAcceptSignature, M as parseAcceptSignature, N as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, j as fulfillAcceptSignature, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk } from "./http-CcFURGbR.js";
7
+ import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-CBO16r56.js";
8
+ import { C as verifyJsonLd, a as verifyPortableObjectProof, c as doesActorOwnKey, f as attachSignature, h as detachSignature, i as verifyObject, l as getKeyOwner, m as createSignature, n as hasProofLike, o as verifyProof, r as signObject, t as createProof, v as hasSignatureLike, w as verifySignature, x as signJsonLd } from "./proof-CqV_aPhu.js";
9
9
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-Dtyf8lVj.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DjFxdXjk.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CocB_ME8.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";
@@ -5,7 +5,7 @@ import { r as createRequestContext } from "../context-CbS35fLr.mjs";
5
5
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
7
7
  import "../std__assert-CxFT0MNt.mjs";
8
- import { _ as handleNodeInfo, o as createFederation, v as handleNodeInfoJrd } from "../middleware-DB_evWhA.mjs";
8
+ import { _ as handleNodeInfo, o as createFederation, v as handleNodeInfoJrd } from "../middleware--nGmJXXx.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -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-Xg7DR4LS.mjs";
5
- import "./key-CXsAkAt6.mjs";
4
+ import { n as version, t as name } from "./deno-tSRHKXbU.mjs";
5
+ import "./key-CEDlSMK7.mjs";
6
6
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,12 +1,12 @@
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-Xg7DR4LS.mjs";
5
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-B7-JxJSv.mjs";
6
- import { n as fetchKey, o as validateCryptoKey } from "./key-CXsAkAt6.mjs";
4
+ import { n as version, t as name } from "./deno-tSRHKXbU.mjs";
5
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-CIK7ZY_B.mjs";
6
+ import { n as fetchKey, o as validateCryptoKey } from "./key-CEDlSMK7.mjs";
7
+ import { c as getNormalizationContextLoader } from "./ld-B8k-089e.mjs";
7
8
  import { n as preloadedOnlyDocumentLoader } from "./public-audience-Cc2YJ3ip.mjs";
8
9
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-B5Ne7JoL.mjs";
9
- import { c as getNormalizationContextLoader } from "./ld-C5Qv0_xn.mjs";
10
10
  import { getLogger } from "@logtape/logtape";
11
11
  import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
12
12
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { F as version, P as name, _ as measureSignatureKeyFetch, d as validateCryptoKey, f as getDurationMs, p as getFederationMetrics, s as fetchKey } from "./http-Bh37_81O.js";
3
+ import { F as version, P as name, _ as measureSignatureKeyFetch, d as validateCryptoKey, f as getDurationMs, p as getFederationMetrics, s as fetchKey } from "./http-CcFURGbR.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, PUBLIC_COLLECTION, getTypeId, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,6 +1,6 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-Dmm3t92W.cjs");
3
- const require_http = require("./http-BuOvqNbW.cjs");
3
+ const require_http = require("./http-DBbZNv2i.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,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-Xg7DR4LS.mjs";
5
- import { n as getDurationMs, r as getFederationMetrics } from "./metrics-B7-JxJSv.mjs";
6
- import { n as doubleKnock } from "./http-DyXZdUng.mjs";
4
+ import { n as version, t as name } from "./deno-tSRHKXbU.mjs";
5
+ import { n as getDurationMs, r as getFederationMetrics } from "./metrics-CIK7ZY_B.mjs";
6
+ import { n as doubleKnock } from "./http-Cp_Byhf8.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  import { FetchError } from "@fedify/vocab-runtime";
@@ -10,8 +10,8 @@ import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
10
10
  import "../std__assert-CxFT0MNt.mjs";
11
11
  import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
12
12
  import { t as assert } from "../assert-CebeUf0C.mjs";
13
- import { t as exportJwk } from "../key-CXsAkAt6.mjs";
14
- import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-DyXZdUng.mjs";
13
+ import { t as exportJwk } from "../key-CEDlSMK7.mjs";
14
+ import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-Cp_Byhf8.mjs";
15
15
  import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
16
16
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
17
17
  import { FetchError, exportSpki } from "@fedify/vocab-runtime";
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
5
5
  import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
6
6
  import "../std__assert-CxFT0MNt.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
8
- import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-CXsAkAt6.mjs";
8
+ import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-CEDlSMK7.mjs";
9
9
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
10
10
  import { CryptographicKey, Multikey } from "@fedify/vocab";
11
11
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -7,9 +7,9 @@ import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BApOTh1h.m
7
7
  import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
8
8
  import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
9
9
  import { t as assert } from "../assert-CebeUf0C.mjs";
10
- import { i as generateCryptoKeyPair } from "../key-CXsAkAt6.mjs";
10
+ import { i as generateCryptoKeyPair } from "../key-CEDlSMK7.mjs";
11
11
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.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-C5Qv0_xn.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-B8k-089e.mjs";
13
13
  import { CryptographicKey } from "@fedify/vocab";
14
14
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
15
15
  import { encodeBase64 } from "byte-encodings/base64";
package/dist/sig/mod.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_http = require("../http-BuOvqNbW.cjs");
4
- const require_proof = require("../proof-BVpjHUMS.cjs");
3
+ const require_http = require("../http-DBbZNv2i.cjs");
4
+ const require_proof = require("../proof-DSohcbCt.cjs");
5
5
  exports.attachSignature = require_proof.attachSignature;
6
6
  exports.createProof = require_proof.createProof;
7
7
  exports.createSignature = require_proof.createSignature;
package/dist/sig/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { A as formatAcceptSignature, M as parseAcceptSignature, N as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, j as fulfillAcceptSignature, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk } from "../http-Bh37_81O.js";
4
- import { C as verifyJsonLd, a as verifyPortableObjectProof, c as doesActorOwnKey, f as attachSignature, h as detachSignature, i as verifyObject, l as getKeyOwner, m as createSignature, n as hasProofLike, o as verifyProof, r as signObject, t as createProof, v as hasSignatureLike, w as verifySignature, x as signJsonLd } from "../proof-3rlJfM0Z.js";
3
+ import { A as formatAcceptSignature, M as parseAcceptSignature, N as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, j as fulfillAcceptSignature, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk } from "../http-CcFURGbR.js";
4
+ import { C as verifyJsonLd, a as verifyPortableObjectProof, c as doesActorOwnKey, f as attachSignature, h as detachSignature, i as verifyObject, l as getKeyOwner, m as createSignature, n as hasProofLike, o as verifyProof, r as signObject, t as createProof, v as hasSignatureLike, w as verifySignature, x as signJsonLd } from "../proof-CqV_aPhu.js";
5
5
  export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
@@ -6,7 +6,7 @@ import { t as assertFalse } from "../assert_false-3pLLLsO4.mjs";
6
6
  import "../std__assert-CxFT0MNt.mjs";
7
7
  import { t as assert } from "../assert-CebeUf0C.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-DFzwGoyv.mjs";
9
+ import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-Cf55GD32.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
@@ -10,7 +10,7 @@ import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
10
10
  import { t as assert } from "../assert-CebeUf0C.mjs";
11
11
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
12
12
  import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-B5Ne7JoL.mjs";
13
- import { a as verifyPortableObjectProof, i as verifyObject, n as hasProofLike, o as verifyProof, r as signObject, t as createProof } from "../proof-DJGBYtRT.mjs";
13
+ import { a as verifyPortableObjectProof, i as verifyObject, n as hasProofLike, o as verifyProof, r as signObject, t as createProof } from "../proof-BAVwiUPt.mjs";
14
14
  import { Create, DataIntegrityProof, Document, Multikey, Note, PUBLIC_COLLECTION, Place } from "@fedify/vocab";
15
15
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
16
16
  import { decodeMultibase, encodeMultibase, exportDidKey, exportMultibaseKey, formatIri, importMultibaseKey, parseIri } from "@fedify/vocab-runtime";
@@ -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-C5Qv0_xn.mjs";
4
+ import { c as getNormalizationContextLoader } from "./ld-B8k-089e.mjs";
5
5
  import jsonld from "@fedify/vocab-runtime/jsonld";
6
6
  //#region src/federation/temporal.ts
7
7
  function isPlainObject(value) {
@@ -1943,33 +1943,6 @@ interface FederationOptions<TContextData> {
1943
1943
  * are prefixed with `["_fedify"]`.
1944
1944
  */
1945
1945
  kvPrefixes?: Partial<FederationKvPrefixes>;
1946
- /**
1947
- * The time-to-live for a remote actor's public key cached under
1948
- * {@link FederationKvPrefixes.publicKey}. Once it expires, the next
1949
- * signature verification that needs the key refetches it from the remote
1950
- * server and caches it again.
1951
- *
1952
- * Shortening it bounds how long a revoked or rotated key stays in the cache,
1953
- * at the cost of more requests to remote servers; refetching an expired key
1954
- * fails while the peer is unavailable, so a very short value makes
1955
- * verification depend on the peer being reachable.
1956
- * @default `{ days: 30 }`
1957
- * @since 2.4.0
1958
- */
1959
- publicKeyTtl?: Temporal.DurationLike;
1960
- /**
1961
- * The time-to-live for a remote origin's remembered HTTP Message Signatures
1962
- * spec cached under {@link FederationKvPrefixes.httpMessageSignaturesSpec}.
1963
- * Once it expires, the next delivery to that origin relearns the spec by
1964
- * double-knocking and remembers it again.
1965
- *
1966
- * Shortening it makes Fedify notice a peer's spec upgrade sooner, at the
1967
- * cost of an extra signed request per delivery whenever the first spec tried
1968
- * is rejected.
1969
- * @default `{ days: 90 }`
1970
- * @since 2.4.0
1971
- */
1972
- httpMessageSignaturesSpecTtl?: Temporal.DurationLike;
1973
1946
  /**
1974
1947
  * The message queue for sending and receiving activities. If not provided,
1975
1948
  * activities will not be queued and will be processed immediately.
@@ -3591,48 +3564,6 @@ declare function createOutboxContext<TContextData>(args: Partial<OutboxContext<T
3591
3564
  federation: Federation<TContextData>;
3592
3565
  }): OutboxContext<TContextData>;
3593
3566
  //#endregion
3594
- //#region src/testing/kv.d.ts
3595
- /**
3596
- * A {@link KvStore} decorator whose entry expiry is driven by a virtual clock
3597
- * instead of wall-clock time.
3598
- *
3599
- * {@link MemoryKvStore} decides expiry by comparing timestamps rather than by
3600
- * scheduling timers, so a test that wants to observe a TTL elapsing would
3601
- * otherwise have to sleep for longer than the TTL and hope the runner keeps
3602
- * up. That makes such tests both slow and load-sensitive.
3603
- *
3604
- * This decorator keeps the TTLs itself and never passes them to the store it
3605
- * wraps, so nothing expires until {@link advance} moves the clock. Cache
3606
- * hits, expiry, and repopulation therefore all become deterministic, without
3607
- * patching any global and without a test-only entry point in the library
3608
- * itself. The clock starts at the Unix epoch and only ever moves forward.
3609
- */
3610
- declare class ManualClockKvStore implements KvStore {
3611
- #private;
3612
- /**
3613
- * Present only when the wrapped store has its own `cas()`. Callers such as
3614
- * the task deduplication planner test `kv.cas != null` to decide whether a
3615
- * conditional write is available, so the decorator must not advertise a
3616
- * capability the wrapped store lacks.
3617
- */
3618
- readonly cas?: (key: KvKey, expectedValue: unknown, newValue: unknown, options?: KvStoreSetOptions) => Promise<boolean>;
3619
- constructor(inner?: KvStore);
3620
- /**
3621
- * The current reading of the virtual clock.
3622
- */
3623
- get now(): Temporal.Instant;
3624
- /**
3625
- * Moves the virtual clock forward. Any entry whose TTL has elapsed by the
3626
- * new time reads as missing from this point on, exactly as it would once a
3627
- * real `KvStore` had let it expire.
3628
- */
3629
- advance(duration: Temporal.DurationLike): void;
3630
- get<T = unknown>(key: KvKey): Promise<T | undefined>;
3631
- set(key: KvKey, value: unknown, options?: KvStoreSetOptions): Promise<void>;
3632
- delete(key: KvKey): Promise<void>;
3633
- list(prefix?: KvKey): AsyncIterable<KvStoreListEntry>;
3634
- }
3635
- //#endregion
3636
3567
  //#region src/testing/tasks.d.ts
3637
3568
  /** Federation options (sans `queue`) shared by the task suites. */
3638
3569
  declare const baseOptions: Omit<FederationOptions<void>, "queue">;
@@ -3719,4 +3650,4 @@ interface TestDefinition {
3719
3650
  }
3720
3651
  declare const testDefinitions: TestDefinition[];
3721
3652
  //#endregion
3722
- export { type Envelope, ManualClockKvStore, MockQueue, type MockQueueOptions, baseOptions, createInboxContext, createOutboxContext, createRequestContext, envelopeSchema, makeSchema, numberSchema, stringSchema, testDefinitions };
3653
+ export { type Envelope, MockQueue, type MockQueueOptions, baseOptions, createInboxContext, createOutboxContext, createRequestContext, envelopeSchema, makeSchema, numberSchema, stringSchema, testDefinitions };
@@ -3,7 +3,5 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { r as testDefinitions } from "../dist-BQvArojP.mjs";
5
5
  import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-CbS35fLr.mjs";
6
- import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
7
- import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, r as envelopeSchema, t as MockQueue } from "../tasks-dbCShlCb.mjs";
8
- import "../testing-hbky2gMN.mjs";
9
- export { ManualClockKvStore, MockQueue, baseOptions, createInboxContext, createOutboxContext, createRequestContext, envelopeSchema, makeSchema, numberSchema, stringSchema, testDefinitions };
6
+ import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, r as envelopeSchema, t as MockQueue } from "../testing-D13ymFKy.mjs";
7
+ export { MockQueue, baseOptions, createInboxContext, createOutboxContext, createRequestContext, envelopeSchema, makeSchema, numberSchema, stringSchema, testDefinitions };
@@ -2,6 +2,7 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as mockDocumentLoader } from "./dist-BQvArojP.mjs";
5
+ import "./context-CbS35fLr.mjs";
5
6
  import { t as MemoryKvStore } from "./kv-DCHkaJ9-.mjs";
6
7
  import { Note } from "@fedify/vocab";
7
8
  //#region src/testing/tasks.ts
@@ -5,9 +5,9 @@ import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
6
6
  import "../std__assert-CxFT0MNt.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
8
- import { l as verifyRequest } from "../http-DyXZdUng.mjs";
8
+ import { l as verifyRequest } from "../http-Cp_Byhf8.mjs";
9
9
  import { i as rsaPrivateKey2 } from "../keys-DIJNHW-Y.mjs";
10
- import { t as getAuthenticatedDocumentLoader } from "../docloader-4YqMWBpt.mjs";
10
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-BAO-cgto.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { 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-BubmP7z9.mjs";
4
+ import { n as kvCache, t as MockKvStore } from "../kv-cache-C7qYJ4To.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";
@@ -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-Btl0s7i7.cjs");
3
+ const require_kv_cache = require("../kv-cache-B-JFZafn.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-DjFxdXjk.js";
3
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-CocB_ME8.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.1959+0da7be03",
3
+ "version": "2.4.0-pr.1006.44+7feb05c5",
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.1959+0da7be03",
155
- "@fedify/vocab-runtime": "2.4.0-dev.1959+0da7be03",
156
- "@fedify/webfinger": "2.4.0-dev.1959+0da7be03",
157
- "@fedify/vocab": "2.4.0-dev.1959+0da7be03"
154
+ "@fedify/uri-template": "2.4.0-pr.1006.44+7feb05c5",
155
+ "@fedify/vocab": "2.4.0-pr.1006.44+7feb05c5",
156
+ "@fedify/webfinger": "2.4.0-pr.1006.44+7feb05c5",
157
+ "@fedify/vocab-runtime": "2.4.0-pr.1006.44+7feb05c5"
158
158
  },
159
159
  "devDependencies": {
160
160
  "@std/assert": "npm:@jsr/std__assert@^0.226.0",
@@ -166,8 +166,8 @@
166
166
  "tsx": "^4.21.0",
167
167
  "typescript": "^6.0.0",
168
168
  "wrangler": "^4.17.0",
169
- "@fedify/fixture": "2.0.0",
170
- "@fedify/vocab-tools": "^2.4.0-dev.1959+0da7be03"
169
+ "@fedify/vocab-tools": "^2.4.0-pr.1006.44+7feb05c5",
170
+ "@fedify/fixture": "2.0.0"
171
171
  },
172
172
  "scripts": {
173
173
  "build:self": "tsdown",
@@ -1,104 +0,0 @@
1
- import { Temporal } from "temporal-polyfill";
2
- import "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
4
- import { t as MemoryKvStore } from "./kv-DCHkaJ9-.mjs";
5
- //#region src/testing/kv.ts
6
- /**
7
- * A {@link KvStore} decorator whose entry expiry is driven by a virtual clock
8
- * instead of wall-clock time.
9
- *
10
- * {@link MemoryKvStore} decides expiry by comparing timestamps rather than by
11
- * scheduling timers, so a test that wants to observe a TTL elapsing would
12
- * otherwise have to sleep for longer than the TTL and hope the runner keeps
13
- * up. That makes such tests both slow and load-sensitive.
14
- *
15
- * This decorator keeps the TTLs itself and never passes them to the store it
16
- * wraps, so nothing expires until {@link advance} moves the clock. Cache
17
- * hits, expiry, and repopulation therefore all become deterministic, without
18
- * patching any global and without a test-only entry point in the library
19
- * itself. The clock starts at the Unix epoch and only ever moves forward.
20
- */
21
- var ManualClockKvStore = class {
22
- #inner;
23
- #expirations = /* @__PURE__ */ new Map();
24
- #now = Temporal.Instant.fromEpochMilliseconds(0);
25
- /**
26
- * Present only when the wrapped store has its own `cas()`. Callers such as
27
- * the task deduplication planner test `kv.cas != null` to decide whether a
28
- * conditional write is available, so the decorator must not advertise a
29
- * capability the wrapped store lacks.
30
- */
31
- cas;
32
- constructor(inner = new MemoryKvStore()) {
33
- this.#inner = inner;
34
- const innerCas = inner.cas;
35
- if (innerCas != null) this.cas = async (key, expectedValue, newValue, options) => {
36
- await this.#evictIfExpired(key);
37
- const swapped = await innerCas.call(inner, key, expectedValue, newValue);
38
- if (swapped) this.#recordTtl(key, options);
39
- return swapped;
40
- };
41
- }
42
- /**
43
- * The current reading of the virtual clock.
44
- */
45
- get now() {
46
- return this.#now;
47
- }
48
- /**
49
- * Moves the virtual clock forward. Any entry whose TTL has elapsed by the
50
- * new time reads as missing from this point on, exactly as it would once a
51
- * real `KvStore` had let it expire.
52
- */
53
- advance(duration) {
54
- this.#now = this.#now.add(Temporal.Duration.from(duration).round({ largestUnit: "hour" }));
55
- }
56
- #encodeKey(key) {
57
- return JSON.stringify(key);
58
- }
59
- /**
60
- * Drops the entry if its TTL has elapsed. Mirrors {@link MemoryKvStore},
61
- * which treats an entry as live up to and including its expiration instant.
62
- */
63
- async #evictIfExpired(key) {
64
- const encodedKey = this.#encodeKey(key);
65
- const expiration = this.#expirations.get(encodedKey);
66
- if (expiration == null) return;
67
- if (this.#now.until(expiration).sign >= 0) return;
68
- this.#expirations.delete(encodedKey);
69
- await this.#inner.delete(key);
70
- }
71
- async #evictAllExpired() {
72
- for (const [encodedKey, expiration] of [...this.#expirations]) {
73
- if (this.#now.until(expiration).sign >= 0) continue;
74
- this.#expirations.delete(encodedKey);
75
- await this.#inner.delete(JSON.parse(encodedKey));
76
- }
77
- }
78
- #recordTtl(key, options) {
79
- const encodedKey = this.#encodeKey(key);
80
- if (options?.ttl == null) {
81
- this.#expirations.delete(encodedKey);
82
- return;
83
- }
84
- this.#expirations.set(encodedKey, this.#now.add(options.ttl.round({ largestUnit: "hour" })));
85
- }
86
- async get(key) {
87
- await this.#evictIfExpired(key);
88
- return await this.#inner.get(key);
89
- }
90
- async set(key, value, options) {
91
- this.#recordTtl(key, options);
92
- await this.#inner.set(key, value);
93
- }
94
- async delete(key) {
95
- this.#expirations.delete(this.#encodeKey(key));
96
- await this.#inner.delete(key);
97
- }
98
- async *list(prefix) {
99
- await this.#evictAllExpired();
100
- yield* this.#inner.list(prefix);
101
- }
102
- };
103
- //#endregion
104
- export { ManualClockKvStore as t };
@@ -1,2 +0,0 @@
1
- import { Temporal } from "temporal-polyfill";
2
- import { URLPattern } from "urlpattern-polyfill";