@fedify/fedify 2.4.0-dev.1964 → 2.4.0-dev.1995
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{builder-B4zpKIFU.mjs → builder-D0DxgOV5.mjs} +2 -2
- package/dist/{client-CtxvmazV.mjs → client-DpnpgjyX.mjs} +78 -4
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/compound-proof-CJnWc6c-.mjs +495 -0
- package/dist/{context-COLwHogJ.d.cts → context-BeDnDuF3.d.cts} +4 -3
- package/dist/{context-DiiCt4S7.d.ts → context-uyRUWoZQ.d.ts} +4 -3
- package/dist/{deno-CtG93ohj.mjs → deno-CABhzCb_.mjs} +1 -1
- package/dist/{docloader-dk_k3S8d.mjs → docloader-BbGSL0Xq.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler-compound-proof.test.d.mts +2 -0
- package/dist/federation/handler-compound-proof.test.mjs +152 -0
- package/dist/federation/handler.test.mjs +122 -4
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/keycache.test.mjs +52 -9
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +111 -15
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/send.test.mjs +139 -4
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-Drjlrrax.cjs → federation-DCEHQk4G.cjs} +632 -57
- package/dist/{http-6TI0tI03.d.cts → http-65PYi9jY.d.ts} +34 -2
- package/dist/{http-Dj4s1UQ0.js → http-9WyuldYh.js} +170 -8
- package/dist/{http-CdrSn2ip.d.ts → http-CP-7OdSq.d.cts} +34 -2
- package/dist/{http-B3skRvGo.cjs → http-CRFns-UE.cjs} +181 -7
- package/dist/{http-D7LX-BL9.mjs → http-D9urSO2D.mjs} +3 -3
- package/dist/{key-BVjgbs_9.mjs → key-Ccs8cnd7.mjs} +169 -7
- package/dist/{keycache-ZLqIfrkL.mjs → keycache-BUDHB5rY.mjs} +12 -4
- package/dist/{kv-cache-DtsjH_bY.cjs → kv-cache-DXT9vmIg.cjs} +2 -2
- package/dist/{kv-cache-tGNbvDCF.js → kv-cache-DtmXhPXG.js} +2 -2
- package/dist/{kv-cache-xRcC_xxP.mjs → kv-cache-lKyFn_Dn.mjs} +1 -1
- package/dist/{ld-OuCeQFny.mjs → ld-qup__MAW.mjs} +3 -3
- package/dist/map-local-context-conflict-DOYEEJ3u.mjs +204 -0
- package/dist/map-local-create-note-B0SeXJms.mjs +214 -0
- package/dist/{metrics-B9N27cCB.mjs → metrics-CISXCvB1.mjs} +1 -1
- package/dist/{middleware-TeLjzoxn.mjs → middleware-CzvJvPHK.mjs} +58 -15
- package/dist/{middleware-Cd_vPqDH.mjs → middleware-DkrU2WhY.mjs} +1 -1
- package/dist/{middleware-CPTDFMmJ.js → middleware-DsfWajaD.js} +593 -18
- package/dist/{mod-DypxPS9H.d.ts → mod-C0BYc0OU.d.ts} +1 -1
- package/dist/{mod-CnGLNoVw.d.cts → mod-CbKDOnCt.d.cts} +1 -1
- package/dist/{mod-CLHkCwLm.d.cts → mod-CyiSjRkk.d.cts} +1 -1
- package/dist/{mod-CSH1Ee-I.d.ts → mod-D882_Xsg.d.ts} +1 -1
- package/dist/{mod-DzRXACM5.d.ts → mod-UDwMjuHM.d.ts} +1 -1
- package/dist/{mod-BZldCEU0.d.cts → mod-x9W0d0Pk.d.cts} +1 -1
- package/dist/mod.cjs +20 -20
- package/dist/mod.d.cts +6 -6
- package/dist/mod.d.ts +6 -6
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/client.test.mjs +28 -1
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/{owner-DGSfntI-.d.ts → owner-BF0L9cMt.d.cts} +12 -1
- package/dist/{proof-BO_esQii.js → owner-BIPEZGiU.js} +1255 -1098
- package/dist/{owner-r_waTiQj.d.cts → owner-BSzr5-I8.d.ts} +12 -1
- package/dist/owner-CRoq8Spb.mjs +175 -0
- package/dist/{proof-Dua0d906.cjs → owner-CVA7L9MA.cjs} +1266 -1097
- package/dist/{proof-D5Ajk4DJ.mjs → proof-BDxNVZ3E.mjs} +186 -83
- package/dist/{send-DVXyUqhO.mjs → send-BzM5GLyn.mjs} +68 -11
- package/dist/sig/compound-proof-discovery.test.d.mts +2 -0
- package/dist/sig/compound-proof-discovery.test.mjs +331 -0
- package/dist/sig/compound-proof-verification.test.d.mts +2 -0
- package/dist/sig/compound-proof-verification.test.mjs +465 -0
- package/dist/sig/compound-proof.test.d.mts +2 -0
- package/dist/sig/compound-proof.test.mjs +324 -0
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +169 -2
- package/dist/sig/ld.test.mjs +55 -2
- package/dist/sig/mod.cjs +17 -17
- 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 +103 -4
- package/dist/sig/proof.test.mjs +120 -1
- package/dist/{temporal-BoDw51A-.mjs → temporal-Dv6Qv-8k.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +2 -1
- package/dist/{types-RXm5YxpC.cjs → types-Be2zbyeG.cjs} +94 -2
- package/dist/{types-Dtyf8lVj.js → types-C_cNlNVK.js} +78 -4
- package/dist/utils/docloader.test.mjs +27 -3
- 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 +6 -6
- package/dist/owner-DTEqTzSr.mjs +0 -120
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
2
|
+
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-65PYi9jY.js";
|
|
3
3
|
import { n as KvStore, t as KvKey } from "./kv-BhNbN8Ed.js";
|
|
4
4
|
import { t as DocumentFetchKind } from "./metrics-DoRtI0qU.js";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { S as KeyCache } from "./http-
|
|
2
|
+
import { S as KeyCache } from "./http-CP-7OdSq.cjs";
|
|
3
3
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
4
4
|
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
2
|
+
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-CP-7OdSq.cjs";
|
|
3
3
|
import { n as KvStore, t as KvKey } from "./kv-BhNbN8Ed.cjs";
|
|
4
4
|
import { t as DocumentFetchKind } from "./metrics-DVKYY6K1.cjs";
|
|
5
5
|
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { _t as ActorHandleMapper, gt as ActorDispatcher, ht as ActorAliasMapper, l as RequestContext, zt as WebFingerLinksDispatcher } from "./context-
|
|
2
|
+
import { _t as ActorHandleMapper, gt as ActorDispatcher, ht as ActorAliasMapper, l as RequestContext, zt as WebFingerLinksDispatcher } from "./context-uyRUWoZQ.js";
|
|
3
3
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
4
4
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { S as KeyCache } from "./http-
|
|
2
|
+
import { S as KeyCache } from "./http-65PYi9jY.js";
|
|
3
3
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
4
4
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { _t as ActorHandleMapper, gt as ActorDispatcher, ht as ActorAliasMapper, l as RequestContext, zt as WebFingerLinksDispatcher } from "./context-
|
|
2
|
+
import { _t as ActorHandleMapper, gt as ActorDispatcher, ht as ActorAliasMapper, l as RequestContext, zt as WebFingerLinksDispatcher } from "./context-BeDnDuF3.cjs";
|
|
3
3
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
4
4
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
5
5
|
|
package/dist/mod.cjs
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("./rolldown-runtime-Dmm3t92W.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-BalCrSsr.cjs");
|
|
5
5
|
require("./compat/mod.cjs");
|
|
6
|
-
const require_http = require("./http-
|
|
7
|
-
const require_federation = require("./federation-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const require_kv_cache = require("./kv-cache-
|
|
6
|
+
const require_http = require("./http-CRFns-UE.cjs");
|
|
7
|
+
const require_federation = require("./federation-DCEHQk4G.cjs");
|
|
8
|
+
const require_types = require("./types-Be2zbyeG.cjs");
|
|
9
|
+
const require_owner = require("./owner-CVA7L9MA.cjs");
|
|
10
|
+
const require_kv_cache = require("./kv-cache-DXT9vmIg.cjs");
|
|
11
11
|
require("./nodeinfo/mod.cjs");
|
|
12
12
|
require("./runtime/mod.cjs");
|
|
13
13
|
require("./sig/mod.cjs");
|
|
@@ -21,17 +21,17 @@ exports.Router = require_federation.Router;
|
|
|
21
21
|
exports.RouterError = require_federation.RouterError;
|
|
22
22
|
exports.SendActivityError = require_federation.SendActivityError;
|
|
23
23
|
exports.actorDehydrator = require_transformers.actorDehydrator;
|
|
24
|
-
exports.attachSignature =
|
|
24
|
+
exports.attachSignature = require_owner.attachSignature;
|
|
25
25
|
exports.autoIdAssigner = require_transformers.autoIdAssigner;
|
|
26
26
|
exports.buildCollectionSynchronizationHeader = require_federation.buildCollectionSynchronizationHeader;
|
|
27
27
|
exports.createExponentialBackoffPolicy = require_federation.createExponentialBackoffPolicy;
|
|
28
28
|
exports.createFederation = require_federation.createFederation;
|
|
29
29
|
exports.createFederationBuilder = require_federation.createFederationBuilder;
|
|
30
|
-
exports.createProof =
|
|
31
|
-
exports.createSignature =
|
|
32
|
-
exports.detachSignature =
|
|
30
|
+
exports.createProof = require_owner.createProof;
|
|
31
|
+
exports.createSignature = require_owner.createSignature;
|
|
32
|
+
exports.detachSignature = require_owner.detachSignature;
|
|
33
33
|
exports.digest = require_federation.digest;
|
|
34
|
-
exports.doesActorOwnKey =
|
|
34
|
+
exports.doesActorOwnKey = require_owner.doesActorOwnKey;
|
|
35
35
|
exports.exportJwk = require_http.exportJwk;
|
|
36
36
|
exports.fetchKey = require_http.fetchKey;
|
|
37
37
|
exports.fetchKeyDetailed = require_http.fetchKeyDetailed;
|
|
@@ -40,11 +40,11 @@ exports.fulfillAcceptSignature = require_http.fulfillAcceptSignature;
|
|
|
40
40
|
exports.generateCryptoKeyPair = require_http.generateCryptoKeyPair;
|
|
41
41
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
|
42
42
|
exports.getDefaultActivityTransformers = require_transformers.getDefaultActivityTransformers;
|
|
43
|
-
exports.getKeyOwner =
|
|
43
|
+
exports.getKeyOwner = require_owner.getKeyOwner;
|
|
44
44
|
exports.getNodeInfo = require_types.getNodeInfo;
|
|
45
45
|
exports.handleWebFinger = require_federation.handleWebFinger;
|
|
46
|
-
exports.hasProofLike =
|
|
47
|
-
exports.hasSignatureLike =
|
|
46
|
+
exports.hasProofLike = require_owner.hasProofLike;
|
|
47
|
+
exports.hasSignatureLike = require_owner.hasSignatureLike;
|
|
48
48
|
exports.importJwk = require_http.importJwk;
|
|
49
49
|
exports.kvCache = require_kv_cache.kvCache;
|
|
50
50
|
exports.nodeInfoToJson = require_types.nodeInfoToJson;
|
|
@@ -54,17 +54,17 @@ exports.parseCircuitBreakerKvState = require_federation.parseCircuitBreakerKvSta
|
|
|
54
54
|
exports.parseNodeInfo = require_types.parseNodeInfo;
|
|
55
55
|
exports.respondWithObject = require_federation.respondWithObject;
|
|
56
56
|
exports.respondWithObjectIfAcceptable = require_federation.respondWithObjectIfAcceptable;
|
|
57
|
-
exports.signJsonLd =
|
|
58
|
-
exports.signObject =
|
|
57
|
+
exports.signJsonLd = require_owner.signJsonLd;
|
|
58
|
+
exports.signObject = require_owner.signObject;
|
|
59
59
|
exports.signRequest = require_http.signRequest;
|
|
60
60
|
exports.validateAcceptSignature = require_http.validateAcceptSignature;
|
|
61
|
-
exports.verifyJsonLd =
|
|
62
|
-
exports.verifyObject =
|
|
63
|
-
exports.verifyPortableObjectProof =
|
|
64
|
-
exports.verifyProof =
|
|
61
|
+
exports.verifyJsonLd = require_owner.verifyJsonLd;
|
|
62
|
+
exports.verifyObject = require_owner.verifyObject;
|
|
63
|
+
exports.verifyPortableObjectProof = require_owner.verifyPortableObjectProof;
|
|
64
|
+
exports.verifyProof = require_owner.verifyProof;
|
|
65
65
|
exports.verifyRequest = require_http.verifyRequest;
|
|
66
66
|
exports.verifyRequestDetailed = require_http.verifyRequestDetailed;
|
|
67
|
-
exports.verifySignature =
|
|
67
|
+
exports.verifySignature = require_owner.verifySignature;
|
|
68
68
|
var _fedify_vocab_runtime = require("@fedify/vocab-runtime");
|
|
69
69
|
Object.keys(_fedify_vocab_runtime).forEach(function(k) {
|
|
70
70
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
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
|
-
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 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-
|
|
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-CP-7OdSq.cjs";
|
|
4
|
+
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BF0L9cMt.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-BeDnDuF3.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-
|
|
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-
|
|
10
|
-
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-x9W0d0Pk.cjs";
|
|
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-CbKDOnCt.cjs";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CyiSjRkk.cjs";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
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
|
-
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 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-
|
|
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-65PYi9jY.js";
|
|
4
|
+
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BSzr5-I8.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-uyRUWoZQ.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-
|
|
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-
|
|
10
|
-
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-D882_Xsg.js";
|
|
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-UDwMjuHM.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-C0BYc0OU.js";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
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 {
|
|
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-
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
6
|
+
import { F as validateAcceptSignature, M as formatAcceptSignature, N as fulfillAcceptSignature, P as parseAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, i as verifyRequest, l as fetchKeyDetailed, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-9WyuldYh.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-DsfWajaD.js";
|
|
8
|
+
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-C_cNlNVK.js";
|
|
9
|
+
import { S as signJsonLd, T as verifySignature, a as signObject, c as verifyPortableObjectProof, g as detachSignature, h as createSignature, i as hasProofLike, n as getKeyOwner, p as attachSignature, r as createProof, s as verifyObject, t as doesActorOwnKey, u as verifyProof, w as verifyJsonLd, y as hasSignatureLike } from "./owner-BIPEZGiU.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DtmXhPXG.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";
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
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
|
-
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-
|
|
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-DpnpgjyX.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/client.test.ts
|
|
10
10
|
test("getNodeInfo()", async (t) => {
|
|
@@ -967,5 +967,32 @@ test("parseUsage()", () => {
|
|
|
967
967
|
localComments: 456
|
|
968
968
|
});
|
|
969
969
|
});
|
|
970
|
+
test("getNodeInfo() bounds both discovery and document responses", async () => {
|
|
971
|
+
esm_default.mockGlobal();
|
|
972
|
+
const base = "https://8.8.8.8";
|
|
973
|
+
const descriptor = { links: [{
|
|
974
|
+
rel: "http://nodeinfo.diaspora.software/ns/schema/2.1",
|
|
975
|
+
href: `${base}/nodeinfo`
|
|
976
|
+
}] };
|
|
977
|
+
let oversizedDescriptor = true;
|
|
978
|
+
let oversizedDocument = true;
|
|
979
|
+
const data = { padding: "a".repeat(256) };
|
|
980
|
+
try {
|
|
981
|
+
esm_default.get(`${base}/.well-known/nodeinfo`, () => new Response(JSON.stringify(descriptor), { headers: oversizedDescriptor ? { "Content-Length": String(16777217) } : {} }));
|
|
982
|
+
esm_default.get(`${base}/nodeinfo`, () => new Response(JSON.stringify(data), { headers: oversizedDocument ? { "Content-Length": String(16777217) } : {} }));
|
|
983
|
+
assertEquals(await getNodeInfo(base), void 0);
|
|
984
|
+
assertEquals(esm_default.callHistory.calls(`${base}/nodeinfo`).length, 0);
|
|
985
|
+
oversizedDescriptor = false;
|
|
986
|
+
assertEquals(await getNodeInfo(base), void 0);
|
|
987
|
+
assertEquals(await getNodeInfo(`${base}/nodeinfo`, {
|
|
988
|
+
direct: true,
|
|
989
|
+
parse: "none"
|
|
990
|
+
}), void 0);
|
|
991
|
+
oversizedDocument = false;
|
|
992
|
+
assertEquals(await getNodeInfo(base, { parse: "none" }), data);
|
|
993
|
+
} finally {
|
|
994
|
+
esm_default.hardReset();
|
|
995
|
+
}
|
|
996
|
+
});
|
|
970
997
|
//#endregion
|
|
971
998
|
export {};
|
|
@@ -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-
|
|
8
|
+
import { _ as handleNodeInfo, o as createFederation, v as handleNodeInfoJrd } from "../middleware-CzvJvPHK.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-Be2zbyeG.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.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-C_cNlNVK.js";
|
|
4
4
|
export { getNodeInfo, nodeInfoToJson, parseNodeInfo };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { Activity, Actor, CryptographicKey } from "@fedify/vocab";
|
|
3
|
-
import { TracerProvider } from "@opentelemetry/api";
|
|
4
3
|
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
4
|
+
import { TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/sig/owner.d.ts
|
|
7
7
|
/**
|
|
@@ -26,6 +26,13 @@ interface DoesActorOwnKeyOptions {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Checks if the actor of the given activity owns the specified key.
|
|
29
|
+
*
|
|
30
|
+
* Ownership is never taken from what the activity or the key say about
|
|
31
|
+
* themselves, as both are written by whoever sent the activity. It is
|
|
32
|
+
* established from a document that the owner itself serves: either the key's
|
|
33
|
+
* claimed owner links back to the key, or the actor the activity claims lists
|
|
34
|
+
* the key as its own.
|
|
35
|
+
*
|
|
29
36
|
* @param activity The activity to check.
|
|
30
37
|
* @param key The public key to check.
|
|
31
38
|
* @param options Options for checking the key ownership.
|
|
@@ -56,6 +63,10 @@ interface GetKeyOwnerOptions {
|
|
|
56
63
|
* Gets the actor that owns the specified key. Returns `null` if the key has no
|
|
57
64
|
* known owner.
|
|
58
65
|
*
|
|
66
|
+
* The owner is only returned when the key and the owner link to each other:
|
|
67
|
+
* a document that merely claims to own a key is not enough, as the claim and
|
|
68
|
+
* the key can come from the same host.
|
|
69
|
+
*
|
|
59
70
|
* @param keyId The ID of the key to check, or the key itself.
|
|
60
71
|
* @param options Options for getting the key owner.
|
|
61
72
|
* @returns The actor that owns the key, or `null` if the key has no known
|