@fedify/fedify 2.4.0-dev.1668 → 2.4.0-dev.1727
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{assert-CJ1KXcvv.mjs → assert-CebeUf0C.mjs} +1 -1
- package/dist/assert_exists-DtzkXC47.mjs +28 -0
- package/dist/assert_false-3pLLLsO4.mjs +23 -0
- package/dist/assert_greater_or_equal-BApOTh1h.mjs +30 -0
- package/dist/{assert_instance_of-Q9KTBnrf.mjs → assert_instance_of-g3WcyYNR.mjs} +1 -1
- package/dist/{assert_not_equals-EPJPoxuf.mjs → assert_not_equals-BN7yDMWe.mjs} +1 -1
- package/dist/assert_rejects-wFbSPn1O.mjs +39 -0
- package/dist/{assert_strict_equals-Ec20AUwa.mjs → assert_strict_equals-Bpjl4Psw.mjs} +1 -1
- package/dist/{assert_throws-NiFfqbnH.mjs → assert_throws-BJ5wuvR2.mjs} +1 -1
- package/dist/{builder-iXZ5jNVg.mjs → builder-f5-YwHfj.mjs} +5 -3
- package/dist/{circuit-breaker-CBGyz5F7.mjs → circuit-breaker-BT7CiPbz.mjs} +191 -9
- package/dist/circuit-breaker-test-utils-BYIHoliq.mjs +14 -0
- package/dist/{client-CjF5IYQS.mjs → client-CtxvmazV.mjs} +63 -5
- package/dist/{collection-BIhlldqK.mjs → collection-CnnP1UAv.mjs} +1 -1
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/mod.js +1 -1
- package/dist/compat/outgoing-jsonld.test.mjs +3 -3
- package/dist/compat/public-audience.test.mjs +3 -3
- package/dist/compat/transformers.test.mjs +5 -5
- package/dist/{context-C05Rgxmu.d.cts → context-B-dsBjZ9.d.cts} +281 -7
- package/dist/{context-Cjnr0ig1.d.ts → context-DrLXudbA.d.ts} +281 -7
- package/dist/{deno-DtHcfB0f.mjs → deno-Deyoxesx.mjs} +1 -1
- package/dist/{docloader-0vAfF6XW.mjs → docloader-B3kuDBg9.mjs} +2 -2
- package/dist/{esm-yYQfPhIY.mjs → esm-BHXXx4Wx.mjs} +13 -6
- package/dist/federation/builder.test.mjs +18 -5
- package/dist/federation/circuit-breaker.test.mjs +626 -7
- package/dist/federation/collection.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +14 -13
- package/dist/federation/idempotency.test.mjs +6 -6
- package/dist/federation/inbox.test.mjs +3 -3
- package/dist/federation/keycache.test.mjs +5 -5
- package/dist/federation/kv.test.mjs +3 -3
- package/dist/federation/metrics.test.mjs +4 -4
- package/dist/federation/middleware.test.mjs +37 -28
- package/dist/federation/mod.cjs +18 -540
- package/dist/federation/mod.d.cts +3 -4
- package/dist/federation/mod.d.ts +3 -4
- package/dist/federation/mod.js +1 -1
- package/dist/federation/mq.test.mjs +32 -5
- package/dist/federation/negotiation.test.mjs +4 -4
- package/dist/federation/retry.test.mjs +3 -3
- package/dist/federation/router.test.mjs +7 -7
- package/dist/federation/send.test.mjs +28 -26
- package/dist/federation/tasks/codec.test.mjs +4 -4
- package/dist/federation/tasks/enqueue.test.mjs +4 -4
- package/dist/federation/tasks/tasks.test.mjs +6 -6
- package/dist/federation/temporal.test.mjs +4 -4
- package/dist/federation/webfinger.test.mjs +74 -12
- package/dist/{middleware-DzIUFRO2.cjs → federation-BzRjeOky.cjs} +855 -114
- package/dist/{temporal-polyfill-BCdTHexd.cjs → http-AyKngJ_h.cjs} +2801 -104
- package/dist/{http-BbnOMQoy.js → http-Bw6s_dOB.js} +3 -3
- package/dist/{http-DUmWq5Pw.mjs → http-TjhZfiSN.mjs} +5 -5
- package/dist/{key-CM7wDnZG.mjs → key-b4kf4yZT.mjs} +2 -2
- package/dist/{kv-cache-zmgG1HUp.cjs → kv-cache-BTVaZrf-.cjs} +2 -4
- package/dist/{kv-cache-ZQ22hm44.js → kv-cache-CQsh-KUw.js} +1 -1
- package/dist/{kv-cache-DEXKemJ9.mjs → kv-cache-CpILvhUV.mjs} +1 -1
- package/dist/{ld-BttH_-8K.mjs → ld-CKujkAfG.mjs} +5 -5
- package/dist/{metrics-DT-CnD1g.mjs → metrics-AlCGTDrr.mjs} +2 -2
- package/dist/metrics-DVKYY6K1.d.cts +36 -0
- package/dist/metrics-DoRtI0qU.d.ts +36 -0
- package/dist/{middleware-DrroX3aD.mjs → middleware-C9Y5lLZN.mjs} +60 -43
- package/dist/{middleware-D3IAVMcT.js → middleware-CZcuedl-.js} +241 -40
- package/dist/{middleware-ChlYS0Af.mjs → middleware-LPbZz6-1.mjs} +1 -1
- package/dist/{mod-BrpVsSfY.d.cts → mod-CLHkCwLm.d.cts} +3 -3
- package/dist/{mod-B0hW12_O.d.cts → mod-CuDDaIIt.d.cts} +1 -1
- package/dist/{mod-COIAjwRS.d.ts → mod-D-IhOEOP.d.ts} +1 -1
- package/dist/{mod-DdONo-ep.d.cts → mod-D-abvu2C.d.cts} +1 -1
- package/dist/{mod-BsCE5Ihq.d.ts → mod-D6O8C7eN.d.ts} +1 -1
- package/dist/{mod-CNef4in0.d.ts → mod-DypxPS9H.d.ts} +3 -3
- package/dist/mod.cjs +24 -25
- package/dist/mod.d.cts +8 -9
- package/dist/mod.d.ts +8 -9
- package/dist/mod.js +7 -7
- package/dist/nodeinfo/client.test.mjs +64 -4
- package/dist/nodeinfo/handler.test.mjs +5 -5
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.d.cts +1 -1
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/nodeinfo/types.test.mjs +4 -4
- package/dist/otel/exporter.test.mjs +3 -3
- package/dist/otel/mod.cjs +0 -1
- package/dist/otel/mod.d.cts +1 -1
- package/dist/otel/mod.d.ts +1 -1
- package/dist/{outgoing-jsonld-URuqsICz.mjs → outgoing-jsonld-BQSHRLhg.mjs} +2 -2
- package/dist/{owner-DZALmhdl.mjs → owner-D1O8v8FB.mjs} +2 -2
- package/dist/{proof-CqA-2nfW.js → proof-BTBolSnd.js} +6 -6
- package/dist/{proof-a60oVJ_4.cjs → proof-DcSm-2eG.cjs} +10 -11
- package/dist/{proof-DiQ0uBal.mjs → proof-DeMR7Akd.mjs} +6 -6
- package/dist/{public-audience-Cr5MsnMq.mjs → public-audience--9hx7IGx.mjs} +1 -1
- package/dist/runtime/mod.cjs +1 -1
- package/dist/runtime/mod.js +1 -1
- package/dist/{send-DcwZnQWG.mjs → send-DG7JG280.mjs} +3 -3
- package/dist/sig/accept.test.mjs +1 -1
- package/dist/sig/http.test.mjs +37 -11
- package/dist/sig/key.test.mjs +6 -6
- package/dist/sig/ld.test.mjs +9 -7
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +6 -6
- package/dist/sig/proof.test.mjs +10 -8
- package/dist/std__assert-CxFT0MNt.mjs +8 -0
- package/dist/{temporal-Bpxpsl2k.mjs → temporal-DA3jx8x1.mjs} +3 -3
- package/dist/testing/mod.d.mts +10 -0
- package/dist/testing/mod.mjs +2 -2
- package/dist/{testing-CO7ftO8A.mjs → testing-BX0Nicyq.mjs} +2 -2
- package/dist/{transformers-DGwl-hD1.cjs → transformers-BalCrSsr.cjs} +0 -1
- package/dist/{types-DC1pNgJA.js → types-Dtyf8lVj.js} +63 -5
- package/dist/{types-CPym83zc.cjs → types-RXm5YxpC.cjs} +62 -5
- package/dist/utils/docloader.test.mjs +7 -7
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +7 -7
- package/skills/fedify/SKILL.md +462 -0
- package/dist/assert_rejects-EgstcQy5.mjs +0 -82
- package/dist/http-BpT5cE6r.cjs +0 -2694
- package/dist/metrics-DN13mCAw.d.cts +0 -294
- package/dist/metrics-v_e0n5GQ.d.ts +0 -294
- package/dist/std__assert-B2NnY9bq.mjs +0 -79
- /package/dist/{accept-8PiolDP7.mjs → accept-CPVqki78.mjs} +0 -0
- /package/dist/{activity-listener-BtTSxZWA.mjs → activity-listener-C-BSbKI7.mjs} +0 -0
- /package/dist/{assert_equals-BV7oLMxm.mjs → assert_equals-CBlRfA-_.mjs} +0 -0
- /package/dist/{client-CAM_bQXx.d.cts → client-D-XP_Ccb.d.cts} +0 -0
- /package/dist/{client-CSddvgWN.d.ts → client-D-XP_Ccb.d.ts} +0 -0
- /package/dist/{codec-BBga-FWI.mjs → codec-peqOdBaE.mjs} +0 -0
- /package/dist/{context-BJXxPElm.mjs → context-Dt36KFEJ.mjs} +0 -0
- /package/dist/{http-VyDTd4G3.d.cts → http-6TI0tI03.d.cts} +0 -0
- /package/dist/{http-lf8Hsd91.d.ts → http-CdrSn2ip.d.ts} +0 -0
- /package/dist/{keycache-_DHqz5z_.mjs → keycache-0Jk78XmB.mjs} +0 -0
- /package/dist/{keys-Dbyd7bhl.mjs → keys-DIJNHW-Y.mjs} +0 -0
- /package/dist/{kv-D6hNiMTK.d.ts → kv-BhNbN8Ed.d.cts} +0 -0
- /package/dist/{kv-gJ8LYbxX.d.cts → kv-BhNbN8Ed.d.ts} +0 -0
- /package/dist/{kv-CXBAok3k.mjs → kv-DCHkaJ9-.mjs} +0 -0
- /package/dist/{mq-Bo7Etgh6.mjs → mq-Dm1Wmtm-.mjs} +0 -0
- /package/dist/{negotiation-RuwrPFqi.mjs → negotiation-CCocWT_N.mjs} +0 -0
- /package/dist/{owner-CnngXDNJ.d.ts → owner-DGSfntI-.d.ts} +0 -0
- /package/dist/{owner-DEvZuyOE.d.cts → owner-r_waTiQj.d.cts} +0 -0
- /package/dist/{retry-DgFqeS5k.mjs → retry-zX5xw5e0.mjs} +0 -0
- /package/dist/{chunk-D5IdezsZ.js → rolldown-runtime-BC-Eo5Mj.js} +0 -0
- /package/dist/{chunk-Czpeue4M.cjs → rolldown-runtime-Dmm3t92W.cjs} +0 -0
- /package/dist/{transformers-DXze6FUB.js → transformers-DAtXl_Kc.js} +0 -0
- /package/dist/{types-CrtdVuDP.mjs → types-DE_LV1JB.mjs} +0 -0
package/dist/mod.d.cts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
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-
|
|
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-
|
|
4
|
-
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-
|
|
5
|
-
import { $ as
|
|
6
|
-
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-
|
|
7
|
-
import { a as MessageQueueDepth, c as ParallelMessageQueue, i as MessageQueue, n as InProcessMessageQueue, o as MessageQueueEnqueueOptions, r as InProcessMessageQueueOptions, s as MessageQueueListenOptions } from "./metrics-DN13mCAw.cjs";
|
|
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
|
+
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
|
+
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-B-dsBjZ9.cjs";
|
|
6
|
+
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.cjs";
|
|
8
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
9
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-
|
|
10
|
-
import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-
|
|
11
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-
|
|
8
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-D-abvu2C.cjs";
|
|
9
|
+
import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-CuDDaIIt.cjs";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CLHkCwLm.cjs";
|
|
12
11
|
export * from "@fedify/vocab-runtime";
|
|
13
12
|
|
|
14
13
|
//#region src/mod.d.ts
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
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-
|
|
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-
|
|
4
|
-
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-
|
|
5
|
-
import { $ as
|
|
6
|
-
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-
|
|
7
|
-
import { a as MessageQueueDepth, c as ParallelMessageQueue, i as MessageQueue, n as InProcessMessageQueue, o as MessageQueueEnqueueOptions, r as InProcessMessageQueueOptions, s as MessageQueueListenOptions } from "./metrics-v_e0n5GQ.js";
|
|
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
|
+
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
|
+
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-DrLXudbA.js";
|
|
6
|
+
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.js";
|
|
8
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
9
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-
|
|
10
|
-
import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-
|
|
11
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-
|
|
8
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-D6O8C7eN.js";
|
|
9
|
+
import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-D-IhOEOP.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DypxPS9H.js";
|
|
12
11
|
export * from "@fedify/vocab-runtime";
|
|
13
12
|
|
|
14
13
|
//#region src/mod.d.ts
|
package/dist/mod.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import "./
|
|
4
|
-
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-
|
|
3
|
+
import "./rolldown-runtime-BC-Eo5Mj.js";
|
|
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-
|
|
7
|
-
import { a as
|
|
8
|
-
import { C as verifySignature, S as verifyJsonLd, _ as hasSignatureLike, a as verifyProof, b as signJsonLd, c as getKeyOwner, d as attachSignature, i as verifyObject, m as detachSignature, n as hasProofLike, p as createSignature, r as signObject, s as doesActorOwnKey, t as createProof } from "./proof-
|
|
9
|
-
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
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-Bw6s_dOB.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-CZcuedl-.js";
|
|
8
|
+
import { C as verifySignature, S as verifyJsonLd, _ as hasSignatureLike, a as verifyProof, b as signJsonLd, c as getKeyOwner, d as attachSignature, i as verifyObject, m as detachSignature, n as hasProofLike, p as createSignature, r as signObject, s as doesActorOwnKey, t as createProof } from "./proof-BTBolSnd.js";
|
|
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-CQsh-KUw.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";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as esm_default } from "../esm-
|
|
5
|
-
import { t as assertEquals } from "../assert_equals-
|
|
6
|
-
import "../std__assert-
|
|
7
|
-
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-
|
|
4
|
+
import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
5
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
6
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
7
|
+
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-CtxvmazV.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/client.test.ts
|
|
10
10
|
test("getNodeInfo()", async (t) => {
|
|
@@ -62,6 +62,66 @@ test("getNodeInfo()", async (t) => {
|
|
|
62
62
|
});
|
|
63
63
|
esm_default.hardReset();
|
|
64
64
|
});
|
|
65
|
+
test("getNodeInfo() blocks SSRF", async (t) => {
|
|
66
|
+
esm_default.spyGlobal();
|
|
67
|
+
await t.step("link href pointing to a loopback address", async () => {
|
|
68
|
+
esm_default.removeRoutes();
|
|
69
|
+
esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
|
|
70
|
+
rel: "http://nodeinfo.diaspora.software/ns/schema/2.1",
|
|
71
|
+
href: "http://127.0.0.1:8080/internal"
|
|
72
|
+
}] } });
|
|
73
|
+
let internalFetched = false;
|
|
74
|
+
esm_default.get("http://127.0.0.1:8080/internal", () => {
|
|
75
|
+
internalFetched = true;
|
|
76
|
+
return { body: { secret: "INTERNAL_DATA_LEAKED" } };
|
|
77
|
+
});
|
|
78
|
+
assertEquals(await getNodeInfo("https://example.com/", { parse: "none" }), void 0);
|
|
79
|
+
assertEquals(internalFetched, false);
|
|
80
|
+
});
|
|
81
|
+
await t.step("link href using a data: URL", async () => {
|
|
82
|
+
esm_default.removeRoutes();
|
|
83
|
+
esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
|
|
84
|
+
rel: "http://nodeinfo.diaspora.software/ns/schema/2.0",
|
|
85
|
+
href: "data:application/json,{\"software\":{\"name\":\"x\"}}"
|
|
86
|
+
}] } });
|
|
87
|
+
assertEquals(await getNodeInfo("https://example.com/", { parse: "none" }), void 0);
|
|
88
|
+
});
|
|
89
|
+
await t.step("redirect to a private address", async () => {
|
|
90
|
+
esm_default.removeRoutes();
|
|
91
|
+
esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
|
|
92
|
+
rel: "http://nodeinfo.diaspora.software/ns/schema/2.1",
|
|
93
|
+
href: "https://example.com/nodeinfo/2.1"
|
|
94
|
+
}] } });
|
|
95
|
+
esm_default.get("https://example.com/nodeinfo/2.1", {
|
|
96
|
+
status: 302,
|
|
97
|
+
headers: { Location: "https://127.0.0.1:8080/internal" }
|
|
98
|
+
});
|
|
99
|
+
let internalFetched = false;
|
|
100
|
+
esm_default.get("https://127.0.0.1:8080/internal", () => {
|
|
101
|
+
internalFetched = true;
|
|
102
|
+
return { body: { secret: "INTERNAL_DATA_LEAKED" } };
|
|
103
|
+
});
|
|
104
|
+
assertEquals(await getNodeInfo("https://example.com/", { parse: "none" }), void 0);
|
|
105
|
+
assertEquals(internalFetched, false);
|
|
106
|
+
});
|
|
107
|
+
await t.step("direct fetch of a private address", async () => {
|
|
108
|
+
esm_default.removeRoutes();
|
|
109
|
+
let internalFetched = false;
|
|
110
|
+
esm_default.get("http://127.0.0.1:8080/nodeinfo", () => {
|
|
111
|
+
internalFetched = true;
|
|
112
|
+
return { body: { software: {
|
|
113
|
+
name: "x",
|
|
114
|
+
version: "1.0.0"
|
|
115
|
+
} } };
|
|
116
|
+
});
|
|
117
|
+
assertEquals(await getNodeInfo("http://127.0.0.1:8080/nodeinfo", {
|
|
118
|
+
direct: true,
|
|
119
|
+
parse: "none"
|
|
120
|
+
}), void 0);
|
|
121
|
+
assertEquals(internalFetched, false);
|
|
122
|
+
});
|
|
123
|
+
esm_default.hardReset();
|
|
124
|
+
});
|
|
65
125
|
test("parseNodeInfo()", () => {
|
|
66
126
|
const input = {
|
|
67
127
|
software: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { r as createRequestContext } from "../context-
|
|
5
|
-
import { t as MemoryKvStore } from "../kv-
|
|
6
|
-
import { t as assertEquals } from "../assert_equals-
|
|
7
|
-
import "../std__assert-
|
|
8
|
-
import { _ as handleNodeInfo, o as createFederation, v as handleNodeInfoJrd } from "../middleware-
|
|
4
|
+
import { r as createRequestContext } from "../context-Dt36KFEJ.mjs";
|
|
5
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
7
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
8
|
+
import { _ as handleNodeInfo, o as createFederation, v as handleNodeInfoJrd } from "../middleware-C9Y5lLZN.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
package/dist/nodeinfo/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_types = require("../types-
|
|
3
|
+
const require_types = require("../types-RXm5YxpC.cjs");
|
|
4
4
|
exports.getNodeInfo = require_types.getNodeInfo;
|
|
5
5
|
exports.nodeInfoToJson = require_types.nodeInfoToJson;
|
|
6
6
|
exports.parseNodeInfo = require_types.parseNodeInfo;
|
package/dist/nodeinfo/mod.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
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-
|
|
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
|
export { type GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, type ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo };
|
package/dist/nodeinfo/mod.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
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-
|
|
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
|
export { type GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, type ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo };
|
package/dist/nodeinfo/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 getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "../types-
|
|
3
|
+
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "../types-Dtyf8lVj.js";
|
|
4
4
|
export { getNodeInfo, nodeInfoToJson, parseNodeInfo };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as assertEquals } from "../assert_equals-
|
|
5
|
-
import "../
|
|
6
|
-
import
|
|
7
|
-
import { t as nodeInfoToJson } from "../types-
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
5
|
+
import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
|
|
6
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
7
|
+
import { t as nodeInfoToJson } from "../types-DE_LV1JB.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/types.test.ts
|
|
10
10
|
test("nodeInfoToJson()", () => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as MemoryKvStore } from "../kv-
|
|
5
|
-
import { t as assertEquals } from "../assert_equals-
|
|
6
|
-
import "../std__assert-
|
|
4
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
6
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { ExportResultCode } from "@opentelemetry/core";
|
|
9
9
|
import { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
|
package/dist/otel/mod.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
require("../chunk-Czpeue4M.cjs");
|
|
4
3
|
let _logtape_logtape = require("@logtape/logtape");
|
|
5
4
|
let _opentelemetry_core = require("@opentelemetry/core");
|
|
6
5
|
//#region src/otel/exporter.ts
|
package/dist/otel/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as KvStore, t as KvKey } from "../kv-
|
|
2
|
+
import { n as KvStore, t as KvKey } from "../kv-BhNbN8Ed.cjs";
|
|
3
3
|
import { ReadableSpan, SpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
4
4
|
import { ExportResultCode } from "@opentelemetry/core";
|
|
5
5
|
|
package/dist/otel/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as KvStore, t as KvKey } from "../kv-
|
|
2
|
+
import { n as KvStore, t as KvKey } from "../kv-BhNbN8Ed.js";
|
|
3
3
|
import { ExportResultCode } from "@opentelemetry/core";
|
|
4
4
|
import { ReadableSpan, SpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as preloadedOnlyDocumentLoader, t as normalizePublicAudience } from "./public-audience
|
|
4
|
+
import { n as preloadedOnlyDocumentLoader, t as normalizePublicAudience } from "./public-audience--9hx7IGx.mjs";
|
|
5
5
|
import { getLogger } from "@logtape/logtape";
|
|
6
6
|
import { preloadedContexts } from "@fedify/vocab-runtime";
|
|
7
7
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
@@ -11,7 +11,7 @@ const logger = getLogger([
|
|
|
11
11
|
"compat",
|
|
12
12
|
"outgoing-jsonld"
|
|
13
13
|
]);
|
|
14
|
-
const ATTACHMENT_FIELDS = new Set(["attachment", "https://www.w3.org/ns/activitystreams#attachment"]);
|
|
14
|
+
const ATTACHMENT_FIELDS = /* @__PURE__ */ new Set(["attachment", "https://www.w3.org/ns/activitystreams#attachment"]);
|
|
15
15
|
const AS_CONTEXT_URL = "https://www.w3.org/ns/activitystreams";
|
|
16
16
|
const KNOWN_SAFE_CONTEXT_URLS = getKnownSafeContextUrls();
|
|
17
17
|
const MAX_TRAVERSAL_DEPTH = 64;
|
|
@@ -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 "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-Deyoxesx.mjs";
|
|
5
|
+
import "./key-b4kf4yZT.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,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-
|
|
3
|
+
import { F as version, P as name, _ as measureSignatureKeyFetch, d as validateCryptoKey, f as getDurationMs, p as getFederationMetrics, s as fetchKey } from "./http-Bw6s_dOB.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";
|
|
@@ -23,7 +23,7 @@ const localContext = [
|
|
|
23
23
|
];
|
|
24
24
|
const localContextUrls = new Set(localContext);
|
|
25
25
|
const builtInContextLoader = getDocumentLoader();
|
|
26
|
-
const disallowedJsonLdKeywords = new Set([
|
|
26
|
+
const disallowedJsonLdKeywords = /* @__PURE__ */ new Set([
|
|
27
27
|
"@graph",
|
|
28
28
|
"@included",
|
|
29
29
|
"@reverse"
|
|
@@ -523,7 +523,7 @@ async function verifySignature(jsonLd, options = {}) {
|
|
|
523
523
|
* only from external documents and are dropped from the metric attribute to
|
|
524
524
|
* avoid attacker-controlled cardinality.
|
|
525
525
|
*/
|
|
526
|
-
const LD_KNOWN_SIGNATURE_TYPES = new Set(["RsaSignature2017"]);
|
|
526
|
+
const LD_KNOWN_SIGNATURE_TYPES = /* @__PURE__ */ new Set(["RsaSignature2017"]);
|
|
527
527
|
/**
|
|
528
528
|
* Reports only whether a `signature` key is present on the document, with
|
|
529
529
|
* no shape check on its value. This is intentionally looser than
|
|
@@ -757,7 +757,7 @@ const logger$2 = getLogger([
|
|
|
757
757
|
"compat",
|
|
758
758
|
"public-audience"
|
|
759
759
|
]);
|
|
760
|
-
const PUBLIC_ADDRESSING_FIELDS = new Set([
|
|
760
|
+
const PUBLIC_ADDRESSING_FIELDS = /* @__PURE__ */ new Set([
|
|
761
761
|
"to",
|
|
762
762
|
"cc",
|
|
763
763
|
"bto",
|
|
@@ -922,7 +922,7 @@ const logger$1 = getLogger([
|
|
|
922
922
|
"compat",
|
|
923
923
|
"outgoing-jsonld"
|
|
924
924
|
]);
|
|
925
|
-
const ATTACHMENT_FIELDS = new Set(["attachment", "https://www.w3.org/ns/activitystreams#attachment"]);
|
|
925
|
+
const ATTACHMENT_FIELDS = /* @__PURE__ */ new Set(["attachment", "https://www.w3.org/ns/activitystreams#attachment"]);
|
|
926
926
|
const AS_CONTEXT_URL = "https://www.w3.org/ns/activitystreams";
|
|
927
927
|
const KNOWN_SAFE_CONTEXT_URLS = getKnownSafeContextUrls();
|
|
928
928
|
const MAX_TRAVERSAL_DEPTH = 64;
|
|
@@ -1120,7 +1120,7 @@ async function normalizeOutgoingActivityJsonLd(jsonLd, contextLoader) {
|
|
|
1120
1120
|
* dropped from the metric attribute to avoid attacker-controlled
|
|
1121
1121
|
* cardinality.
|
|
1122
1122
|
*/
|
|
1123
|
-
const OIP_KNOWN_CRYPTOSUITES = new Set(["eddsa-jcs-2022"]);
|
|
1123
|
+
const OIP_KNOWN_CRYPTOSUITES = /* @__PURE__ */ new Set(["eddsa-jcs-2022"]);
|
|
1124
1124
|
const logger = getLogger([
|
|
1125
1125
|
"fedify",
|
|
1126
1126
|
"sig",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
|
-
const
|
|
3
|
-
const require_http = require("./http-
|
|
4
|
-
const require_temporal_polyfill = require("./temporal-polyfill-BCdTHexd.cjs");
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Dmm3t92W.cjs");
|
|
3
|
+
const require_http = require("./http-AyKngJ_h.cjs");
|
|
5
4
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
5
|
let _fedify_vocab = require("@fedify/vocab");
|
|
7
6
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -9,9 +8,9 @@ let byte_encodings_hex = require("byte-encodings/hex");
|
|
|
9
8
|
let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
|
|
10
9
|
let byte_encodings_base64 = require("byte-encodings/base64");
|
|
11
10
|
let _fedify_vocab_runtime_jsonld = require("@fedify/vocab-runtime/jsonld");
|
|
12
|
-
_fedify_vocab_runtime_jsonld =
|
|
11
|
+
_fedify_vocab_runtime_jsonld = require_rolldown_runtime.__toESM(_fedify_vocab_runtime_jsonld, 1);
|
|
13
12
|
let json_canon = require("json-canon");
|
|
14
|
-
json_canon =
|
|
13
|
+
json_canon = require_rolldown_runtime.__toESM(json_canon, 1);
|
|
15
14
|
//#region src/sig/ld.ts
|
|
16
15
|
const logger$3 = (0, _logtape_logtape.getLogger)([
|
|
17
16
|
"fedify",
|
|
@@ -26,7 +25,7 @@ const localContext = [
|
|
|
26
25
|
];
|
|
27
26
|
const localContextUrls = new Set(localContext);
|
|
28
27
|
const builtInContextLoader = (0, _fedify_vocab_runtime.getDocumentLoader)();
|
|
29
|
-
const disallowedJsonLdKeywords = new Set([
|
|
28
|
+
const disallowedJsonLdKeywords = /* @__PURE__ */ new Set([
|
|
30
29
|
"@graph",
|
|
31
30
|
"@included",
|
|
32
31
|
"@reverse"
|
|
@@ -526,7 +525,7 @@ async function verifySignature(jsonLd, options = {}) {
|
|
|
526
525
|
* only from external documents and are dropped from the metric attribute to
|
|
527
526
|
* avoid attacker-controlled cardinality.
|
|
528
527
|
*/
|
|
529
|
-
const LD_KNOWN_SIGNATURE_TYPES = new Set(["RsaSignature2017"]);
|
|
528
|
+
const LD_KNOWN_SIGNATURE_TYPES = /* @__PURE__ */ new Set(["RsaSignature2017"]);
|
|
530
529
|
/**
|
|
531
530
|
* Reports only whether a `signature` key is present on the document, with
|
|
532
531
|
* no shape check on its value. This is intentionally looser than
|
|
@@ -760,7 +759,7 @@ const logger$2 = (0, _logtape_logtape.getLogger)([
|
|
|
760
759
|
"compat",
|
|
761
760
|
"public-audience"
|
|
762
761
|
]);
|
|
763
|
-
const PUBLIC_ADDRESSING_FIELDS = new Set([
|
|
762
|
+
const PUBLIC_ADDRESSING_FIELDS = /* @__PURE__ */ new Set([
|
|
764
763
|
"to",
|
|
765
764
|
"cc",
|
|
766
765
|
"bto",
|
|
@@ -925,7 +924,7 @@ const logger$1 = (0, _logtape_logtape.getLogger)([
|
|
|
925
924
|
"compat",
|
|
926
925
|
"outgoing-jsonld"
|
|
927
926
|
]);
|
|
928
|
-
const ATTACHMENT_FIELDS = new Set(["attachment", "https://www.w3.org/ns/activitystreams#attachment"]);
|
|
927
|
+
const ATTACHMENT_FIELDS = /* @__PURE__ */ new Set(["attachment", "https://www.w3.org/ns/activitystreams#attachment"]);
|
|
929
928
|
const AS_CONTEXT_URL = "https://www.w3.org/ns/activitystreams";
|
|
930
929
|
const KNOWN_SAFE_CONTEXT_URLS = getKnownSafeContextUrls();
|
|
931
930
|
const MAX_TRAVERSAL_DEPTH = 64;
|
|
@@ -1115,7 +1114,7 @@ async function normalizeOutgoingActivityJsonLd(jsonLd, contextLoader) {
|
|
|
1115
1114
|
}
|
|
1116
1115
|
//#endregion
|
|
1117
1116
|
//#region src/sig/proof.ts
|
|
1118
|
-
const Temporal =
|
|
1117
|
+
const Temporal = require_http.Temporal;
|
|
1119
1118
|
/**
|
|
1120
1119
|
* Known Object Integrity Proof `cryptosuite` values, used to keep
|
|
1121
1120
|
* `object_integrity_proofs.cryptosuite` on a bounded set of spec-defined
|
|
@@ -1124,7 +1123,7 @@ const Temporal = require_temporal_polyfill.Temporal;
|
|
|
1124
1123
|
* dropped from the metric attribute to avoid attacker-controlled
|
|
1125
1124
|
* cardinality.
|
|
1126
1125
|
*/
|
|
1127
|
-
const OIP_KNOWN_CRYPTOSUITES = new Set(["eddsa-jcs-2022"]);
|
|
1126
|
+
const OIP_KNOWN_CRYPTOSUITES = /* @__PURE__ */ new Set(["eddsa-jcs-2022"]);
|
|
1128
1127
|
const logger = (0, _logtape_logtape.getLogger)([
|
|
1129
1128
|
"fedify",
|
|
1130
1129
|
"sig",
|
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
6
|
-
import { n as fetchKey, o as validateCryptoKey } from "./key-
|
|
7
|
-
import { n as preloadedOnlyDocumentLoader } from "./public-audience
|
|
8
|
-
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-
|
|
4
|
+
import { n as version, t as name } from "./deno-Deyoxesx.mjs";
|
|
5
|
+
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-AlCGTDrr.mjs";
|
|
6
|
+
import { n as fetchKey, o as validateCryptoKey } from "./key-b4kf4yZT.mjs";
|
|
7
|
+
import { n as preloadedOnlyDocumentLoader } from "./public-audience--9hx7IGx.mjs";
|
|
8
|
+
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-BQSHRLhg.mjs";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
11
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -21,7 +21,7 @@ import serialize from "json-canon";
|
|
|
21
21
|
* dropped from the metric attribute to avoid attacker-controlled
|
|
22
22
|
* cardinality.
|
|
23
23
|
*/
|
|
24
|
-
const OIP_KNOWN_CRYPTOSUITES = new Set(["eddsa-jcs-2022"]);
|
|
24
|
+
const OIP_KNOWN_CRYPTOSUITES = /* @__PURE__ */ new Set(["eddsa-jcs-2022"]);
|
|
25
25
|
const logger = getLogger([
|
|
26
26
|
"fedify",
|
|
27
27
|
"sig",
|
package/dist/runtime/mod.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
|
-
require("../
|
|
2
|
+
require("../rolldown-runtime-Dmm3t92W.cjs");
|
|
3
3
|
var _fedify_vocab_runtime = require("@fedify/vocab-runtime");
|
|
4
4
|
Object.keys(_fedify_vocab_runtime).forEach(function(k) {
|
|
5
5
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/runtime/mod.js
CHANGED
|
@@ -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-Deyoxesx.mjs";
|
|
5
|
+
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-AlCGTDrr.mjs";
|
|
6
|
+
import { n as doubleKnock } from "./http-TjhZfiSN.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";
|
package/dist/sig/accept.test.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature, t as formatAcceptSignature } from "../accept-
|
|
4
|
+
import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature, t as formatAcceptSignature } from "../accept-CPVqki78.mjs";
|
|
5
5
|
import { test } from "@fedify/fixture";
|
|
6
6
|
import { deepStrictEqual, strictEqual } from "node:assert/strict";
|
|
7
7
|
//#region src/sig/accept.test.ts
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -1,18 +1,44 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as esm_default } from "../esm-
|
|
5
|
-
import { t as assertEquals } from "../assert_equals-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
4
|
+
import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
5
|
+
import { l as AssertionError, t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
6
|
+
import { t as assertExists } from "../assert_exists-DtzkXC47.mjs";
|
|
7
|
+
import { t as assertFalse } from "../assert_false-3pLLLsO4.mjs";
|
|
8
|
+
import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BApOTh1h.mjs";
|
|
9
|
+
import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
|
|
10
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
11
|
+
import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
|
|
12
|
+
import { t as assert } from "../assert-CebeUf0C.mjs";
|
|
13
|
+
import { t as exportJwk } from "../key-b4kf4yZT.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-TjhZfiSN.mjs";
|
|
15
|
+
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
16
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
17
|
import { FetchError, exportSpki } from "@fedify/vocab-runtime";
|
|
15
18
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
19
|
+
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_string_includes.js
|
|
20
|
+
/**
|
|
21
|
+
* Make an assertion that actual includes expected. If not
|
|
22
|
+
* then throw.
|
|
23
|
+
*
|
|
24
|
+
* @example Usage
|
|
25
|
+
* ```ts no-eval
|
|
26
|
+
* import { assertStringIncludes } from "@std/assert/assert-string-includes";
|
|
27
|
+
*
|
|
28
|
+
* assertStringIncludes("Hello", "ello"); // Doesn't throw
|
|
29
|
+
* assertStringIncludes("Hello", "world"); // Throws
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @param actual The actual string to check for inclusion.
|
|
33
|
+
* @param expected The expected string to check for inclusion.
|
|
34
|
+
* @param msg The optional message to display if the assertion fails.
|
|
35
|
+
*/ function assertStringIncludes(actual, expected, msg) {
|
|
36
|
+
if (!actual.includes(expected)) {
|
|
37
|
+
msg = `Expected actual: "${actual}" to contain: "${expected}"${msg ? `: ${msg}` : "."}`;
|
|
38
|
+
throw new AssertionError(msg);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
16
42
|
//#region src/sig/http.test.ts
|
|
17
43
|
test("signRequest() [draft-cavage]", async () => {
|
|
18
44
|
assertEquals(await verifyRequest(await signRequest(new Request("https://example.com/", {
|
|
@@ -737,7 +763,7 @@ test("verifyRequest() [rfc9421] error cases and edge cases", async () => {
|
|
|
737
763
|
contextLoader: mockDocumentLoader,
|
|
738
764
|
documentLoader: mockDocumentLoader,
|
|
739
765
|
spec: "rfc9421",
|
|
740
|
-
currentTime: Temporal.Instant.from(`${(/* @__PURE__ */ new Date(
|
|
766
|
+
currentTime: Temporal.Instant.from(`${(/* @__PURE__ */ new Date(1712218184 * 1e3)).toISOString()}`),
|
|
741
767
|
timeWindow: { hours: 1 }
|
|
742
768
|
}), null, "Should fail verification when signature timestamp is too old");
|
|
743
769
|
assertEquals(await verifyRequest(new Request("https://example.com/api/resource", {
|
|
@@ -769,7 +795,7 @@ test("verifyRequest() [rfc9421] error cases and edge cases", async () => {
|
|
|
769
795
|
contextLoader: mockDocumentLoader,
|
|
770
796
|
documentLoader: mockDocumentLoader,
|
|
771
797
|
spec: "rfc9421",
|
|
772
|
-
currentTime: Temporal.Instant.from(`${(/* @__PURE__ */ new Date(
|
|
798
|
+
currentTime: Temporal.Instant.from(`${(/* @__PURE__ */ new Date(1741162184 * 1e3)).toISOString()}`),
|
|
773
799
|
timeWindow: false
|
|
774
800
|
}), rsaPublicKey2, "Should verify signature when time checking is disabled");
|
|
775
801
|
const freshSignedPostRequest = await signRequest(new Request("https://example.com/api/resource", {
|