@fedify/fedify 2.4.0-dev.2157 → 2.4.0-dev.2164
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-CLaS4-yA.mjs → builder-BqRmnx7p.mjs} +2 -2
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-D7K94KPz.mjs → compound-proof-CxDBdtNz.mjs} +2 -2
- package/dist/{context-exYu7gDU.d.ts → context-BykNUf04.d.ts} +120 -3
- package/dist/{context-BMggDR-l.d.cts → context-L0Fnib9j.d.cts} +120 -3
- package/dist/{deno-D1gcWWqB.mjs → deno-CizGaYeG.mjs} +1 -1
- package/dist/{docloader-BMqr3hji.mjs → docloader-BBFAItNB.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/keycache.test.mjs +67 -1
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +7 -7
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +5 -5
- package/dist/federation/portable-actor.test.mjs +3 -3
- package/dist/federation/portable-chain.test.mjs +3 -3
- package/dist/federation/portable-collection.test.mjs +4 -4
- package/dist/federation/portable-gateway-keys.test.mjs +180 -6
- package/dist/federation/portable-inbox.test.mjs +4 -4
- package/dist/federation/portable-parse-uri.test.d.mts +2 -0
- package/dist/federation/portable-parse-uri.test.mjs +348 -0
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-2e8XrN7q.cjs → federation-DFCnp94y.cjs} +103 -29
- package/dist/{http-Dgtt45-K.js → http-Baovr6xq.js} +161 -7
- package/dist/{http-CjezPjFX.d.cts → http-Cok5-vIC.d.ts} +6 -1
- package/dist/{http-C-x_OLSp.d.ts → http-DC1cqAQ2.d.cts} +6 -1
- package/dist/{http-CGcLv8rh.mjs → http-DRH0n8TD.mjs} +7 -5
- package/dist/{http-BObQoB0j.cjs → http-R4g1McwE.cjs} +185 -11
- package/dist/{key-CPM4r6tP.mjs → key-D5awqp7u.mjs} +58 -7
- package/dist/key-owner-evidence-Bo3yaeL5.mjs +108 -0
- package/dist/{keycache-BInaECGj.mjs → keycache-PiOM9pM0.mjs} +46 -21
- package/dist/{kv-cache-bdPqTR1k.mjs → kv-cache-C7RWL7hz.mjs} +1 -1
- package/dist/{kv-cache-BweyIZTb.js → kv-cache-CZiBDLPi.js} +1 -1
- package/dist/{kv-cache-D2fnB8qu.cjs → kv-cache-Ct-KWRta.cjs} +1 -1
- package/dist/{ld-lU_ZqzsQ.mjs → ld-CyliEU48.mjs} +3 -3
- package/dist/{metrics-B41pRPfd.mjs → metrics-CFBEehTc.mjs} +1 -1
- package/dist/{middleware-xdukzV3x.mjs → middleware-B99JjvFn.mjs} +70 -20
- package/dist/{middleware-TrCVULgs.mjs → middleware-BmqEWsWP.mjs} +1 -1
- package/dist/{middleware-BYWyYjmX.js → middleware-CdpTFsa2.js} +103 -29
- package/dist/{mod-Bz9tFXI2.d.ts → mod--jv6vyrP.d.ts} +1 -1
- package/dist/{mod-DaiBrWDW.d.ts → mod-B5z_q9TH.d.ts} +1 -1
- package/dist/{mod-Mt4aO3DX.d.cts → mod-BA_F2x53.d.cts} +1 -1
- package/dist/{mod-Decmur1U.d.cts → mod-BLOXGs6m.d.cts} +1 -1
- package/dist/{mod-S--JxYjo.d.cts → mod-CPPqkyV_.d.cts} +1 -1
- package/dist/{mod-CnGtADvO.d.ts → mod-DK0y9fd-.d.ts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +7 -7
- package/dist/mod.d.ts +7 -7
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-D63yPo_i.mjs → owner-DKdtsrEq.mjs} +18 -3
- package/dist/{portable-collection-_lZg-osX.mjs → portable-collection-Cb5cdPIU.mjs} +2 -2
- package/dist/{portable-collection-B8ojoQ50.cjs → portable-collection-UajqDrSL.cjs} +15 -1
- package/dist/{portable-collection-C3xEzYri.js → portable-collection-uv4CuQXm.js} +15 -1
- package/dist/{portable-key-D8uWZF7b.mjs → portable-key-Bv1RdQ0n.mjs} +2 -1
- package/dist/{proof-C2YwD8a_.mjs → proof-CRTPWbVh.mjs} +4 -4
- package/dist/{send-D9SGhxTB.mjs → send-2dULlZc8.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +2 -2
- package/dist/sig/compound-proof.test.mjs +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key-owner-evidence.test.d.mts +2 -0
- package/dist/sig/key-owner-evidence.test.mjs +100 -0
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +2 -2
- package/dist/sig/mod.d.ts +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +1 -1
- package/dist/sig/portable-key.test.mjs +6 -6
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/{temporal-q6FSekcN.mjs → temporal-Dhsk6aUT.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +118 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
|
@@ -2,10 +2,10 @@ import { Temporal } from "temporal-polyfill";
|
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { t as __exportAll } from "./rolldown-runtime-BC-Eo5Mj.js";
|
|
4
4
|
import { r as getDefaultActivityTransformers } from "./transformers-DAtXl_Kc.js";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as isAbortError, A as hasSignatureLike, C as assertSafeJsonLd, Ct as isPortableId, D as detachSignature, Dt as name, K as MAX_PORTABLE_KEY_TTL, L as wrapContextLoaderForJsonLd, M as isInvalidUrlTypeError, N as signJsonLd, O as getNormalizationContextLoader, Ot as version, P as verifyCompactJsonLd, Q as instrumentDocumentLoader, R as exportJwk, S as InvalidContextReferenceError, St as isCompatibleKeyId, T as compactJsonLd, Tt as isPortableUri, U as importJwk, W as validateCryptoKey, X as getFederationMetrics, Y as getDurationMs, Z as getRemoteHost, _ as verifyPortableObjectProof, _t as getCanonicalPortableId, bt as getRawCanonicalPortableId, ct as recordOutboxActivity, d as classifyFep2277CoreType, dt as registerQueueDepthGauge, et as recordCircuitBreakerStateChange, ft as preloadedOnlyDocumentLoader, g as verifyObject, h as verifyMapLocalProof, i as selectRequestSignature, it as recordCollectionTotalItems, j as isClearlyMalformedContextReference, k as hasSignature, lt as recordOutboxEnqueue, m as signObject, n as listRequestSignatures, nt as recordCollectionPageItems, o as verifyRequest, ot as recordFanoutRecipients, p as hasProofLike, pt as formatAcceptSignature, r as parseRfc9421SignatureInput, rt as recordCollectionRequest, s as verifyRequestDetailed, st as recordInboxActivity, t as doubleKnock, tt as recordCollectionDispatchDuration, u as InvalidPortableObjectIdError, ut as recordWebFingerHandle, v as verifyPortableObjectProofPolicy, vt as getGatewayKeyBase, wt as isPortableKeyId, x as normalizeOutgoingActivityJsonLd, xt as hasPortableActor, y as verifyPortableObjectProofWithRoot, yt as getPortableDid } from "./http-Baovr6xq.js";
|
|
6
6
|
import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-_S2_MeLF.js";
|
|
7
|
-
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
7
|
+
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-uv4CuQXm.js";
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CZiBDLPi.js";
|
|
9
9
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
10
10
|
import { Router, RouterError, assertPath } from "@fedify/uri-template";
|
|
11
11
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, isActor, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
@@ -2494,10 +2494,13 @@ async function routeActivity({ context: ctx, json, originalJson, normalizedActiv
|
|
|
2494
2494
|
//#region src/federation/keycache.ts
|
|
2495
2495
|
const KEY_CACHE_GENERATION = "2";
|
|
2496
2496
|
const COMPATIBLE_KEY_SEGMENT = "__compatible";
|
|
2497
|
-
const
|
|
2497
|
+
const MAX_OWNER_BYTES = 32 * 1024;
|
|
2498
2498
|
function isCompatibleKeyEntry(value) {
|
|
2499
2499
|
return value != null && typeof value === "object" && "key" in value && "expires" in value && typeof value.expires === "number";
|
|
2500
2500
|
}
|
|
2501
|
+
function isJsonObject(value) {
|
|
2502
|
+
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
2503
|
+
}
|
|
2501
2504
|
var KvKeyCache = class {
|
|
2502
2505
|
kv;
|
|
2503
2506
|
prefix;
|
|
@@ -2579,30 +2582,48 @@ var KvKeyCache = class {
|
|
|
2579
2582
|
keyId.href
|
|
2580
2583
|
];
|
|
2581
2584
|
const isExpired = (entry) => entry.expires <= now().epochMilliseconds;
|
|
2582
|
-
const keyTtl = Math.min(this.keyTtl.total("millisecond"),
|
|
2585
|
+
const keyTtl = Math.min(this.keyTtl.total("millisecond"), MAX_PORTABLE_KEY_TTL.total("millisecond"));
|
|
2583
2586
|
const unavailableKeyTtl = this.unavailableKeyTtl.total("millisecond");
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2587
|
+
const getEntry = async (keyId) => {
|
|
2588
|
+
const entry = await this.kv.get(entryKey(keyId));
|
|
2589
|
+
if (entry === void 0) return void 0;
|
|
2590
|
+
if (!isCompatibleKeyEntry(entry) || isExpired(entry)) {
|
|
2591
|
+
await this.kv.delete(entryKey(keyId));
|
|
2592
|
+
return;
|
|
2593
|
+
}
|
|
2594
|
+
if (entry.key === null) return null;
|
|
2595
|
+
let expires;
|
|
2596
|
+
try {
|
|
2597
|
+
expires = Temporal.Instant.fromEpochMilliseconds(entry.expires);
|
|
2598
|
+
} catch (error) {
|
|
2599
|
+
if (!(error instanceof RangeError)) throw error;
|
|
2600
|
+
await this.kv.delete(entryKey(keyId));
|
|
2601
|
+
return;
|
|
2602
|
+
}
|
|
2603
|
+
let key;
|
|
2604
|
+
try {
|
|
2605
|
+
key = await CryptographicKey.fromJsonLd(entry.key, this.options);
|
|
2606
|
+
} catch {
|
|
2594
2607
|
try {
|
|
2595
|
-
key = await
|
|
2608
|
+
key = await Multikey.fromJsonLd(entry.key, this.options);
|
|
2596
2609
|
} catch {
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
} catch {
|
|
2600
|
-
await this.kv.delete(entryKey(keyId));
|
|
2601
|
-
return;
|
|
2602
|
-
}
|
|
2610
|
+
await this.kv.delete(entryKey(keyId));
|
|
2611
|
+
return;
|
|
2603
2612
|
}
|
|
2604
|
-
|
|
2613
|
+
}
|
|
2614
|
+
if (isExpired(entry)) return void 0;
|
|
2615
|
+
return {
|
|
2616
|
+
key,
|
|
2617
|
+
...isJsonObject(entry.owner) ? { owner: entry.owner } : {},
|
|
2618
|
+
expires
|
|
2619
|
+
};
|
|
2620
|
+
};
|
|
2621
|
+
return {
|
|
2622
|
+
get: async (keyId) => {
|
|
2623
|
+
const entry = await getEntry(keyId);
|
|
2624
|
+
return entry == null ? entry : entry.key;
|
|
2605
2625
|
},
|
|
2626
|
+
getEntry,
|
|
2606
2627
|
set: async (keyId, key, options) => {
|
|
2607
2628
|
const serialized = key == null ? null : await key.toJsonLd(this.options);
|
|
2608
2629
|
const current = now();
|
|
@@ -2613,10 +2634,13 @@ var KvKeyCache = class {
|
|
|
2613
2634
|
await this.kv.delete(entryKey(keyId));
|
|
2614
2635
|
return;
|
|
2615
2636
|
}
|
|
2637
|
+
const owner = key == null || options?.owner == null || new TextEncoder().encode(JSON.stringify(options.owner)).length > MAX_OWNER_BYTES ? void 0 : options.owner;
|
|
2616
2638
|
await this.kv.set(entryKey(keyId), {
|
|
2617
2639
|
key: serialized,
|
|
2618
|
-
expires
|
|
2640
|
+
expires,
|
|
2641
|
+
...owner == null ? {} : { owner }
|
|
2619
2642
|
}, { ttl: Temporal.Duration.from({ milliseconds: ttl }) });
|
|
2643
|
+
return key == null ? void 0 : Temporal.Instant.fromEpochMilliseconds(expires);
|
|
2620
2644
|
},
|
|
2621
2645
|
delete: async (keyId) => {
|
|
2622
2646
|
await this.kv.delete(entryKey(keyId));
|
|
@@ -2820,6 +2844,43 @@ function parsePortableGatewayRequest(url) {
|
|
|
2820
2844
|
};
|
|
2821
2845
|
}
|
|
2822
2846
|
/**
|
|
2847
|
+
* Recognizes an FEP-ef61 portable ID, i.e., an `ap:` or `ap+ef61:` URI, or
|
|
2848
|
+
* a compatible identifier on any gateway, and splits it into its DID and
|
|
2849
|
+
* the object path to route.
|
|
2850
|
+
*
|
|
2851
|
+
* It accepts the same IDs as the gateway endpoint does: the query, e.g.,
|
|
2852
|
+
* location hints, and the fragment are ignored, and a malformed DID, or
|
|
2853
|
+
* a `did:key` DID that is not encoded in base58-btc, is refused.
|
|
2854
|
+
*
|
|
2855
|
+
* @param uri The ID to recognize.
|
|
2856
|
+
* @returns The DID normalized as an FEP-fe34 origin, and the object path,
|
|
2857
|
+
* or `null` if the ID is not a portable ID or is malformed.
|
|
2858
|
+
*/
|
|
2859
|
+
function parsePortableId(uri) {
|
|
2860
|
+
if (uri.username !== "" || uri.password !== "") return null;
|
|
2861
|
+
if (uri.protocol !== "ap:" && uri.protocol !== "ap+ef61:") {
|
|
2862
|
+
const request = parsePortableGatewayRequest(uri);
|
|
2863
|
+
if (request?.type !== "object") return null;
|
|
2864
|
+
return {
|
|
2865
|
+
authority: request.portableRequest.authority,
|
|
2866
|
+
path: request.path
|
|
2867
|
+
};
|
|
2868
|
+
}
|
|
2869
|
+
try {
|
|
2870
|
+
const id = parseIri(uri);
|
|
2871
|
+
canonicalizePortableUri(formatIri(id));
|
|
2872
|
+
const authority = getFe34Origin(id);
|
|
2873
|
+
assertBase58BtcDidKey(authority);
|
|
2874
|
+
return {
|
|
2875
|
+
authority,
|
|
2876
|
+
path: id.pathname
|
|
2877
|
+
};
|
|
2878
|
+
} catch (error) {
|
|
2879
|
+
if (error instanceof TypeError) return null;
|
|
2880
|
+
throw error;
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
/**
|
|
2823
2884
|
* Builds a portable ID from a DID authority and an object path.
|
|
2824
2885
|
* @param authority The bare DID, e.g., `did:key:z6Mk...`.
|
|
2825
2886
|
* @param path The object path, e.g., `/notes/123`.
|
|
@@ -9387,12 +9448,25 @@ var ContextImpl = class ContextImpl {
|
|
|
9387
9448
|
if (path === null) throw new RouterError(`No collection dispatcher registered for "${String(name)}".`);
|
|
9388
9449
|
return buildPortableUri(requirePortableAuthority(authority), path);
|
|
9389
9450
|
}
|
|
9390
|
-
parseUri(uri) {
|
|
9451
|
+
parseUri(uri, options = {}) {
|
|
9391
9452
|
if (uri == null) return null;
|
|
9392
|
-
if (uri.origin
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9453
|
+
if (uri.origin === this.origin || uri.origin === this.canonicalOrigin) {
|
|
9454
|
+
const route = this.federation.router.route(uri.pathname);
|
|
9455
|
+
if (route != null) return this.#parseRoute(route);
|
|
9456
|
+
}
|
|
9457
|
+
if (!options.portable) return null;
|
|
9458
|
+
const portable = parsePortableId(uri);
|
|
9459
|
+
if (portable == null) return null;
|
|
9460
|
+
const route = this.federation.router.route(portable.path);
|
|
9461
|
+
if (route == null || route.name === "sharedInbox") return null;
|
|
9462
|
+
const result = this.#parseRoute(route);
|
|
9463
|
+
return result == null ? null : {
|
|
9464
|
+
...result,
|
|
9465
|
+
authority: portable.authority
|
|
9466
|
+
};
|
|
9467
|
+
}
|
|
9468
|
+
#parseRoute(route) {
|
|
9469
|
+
if (route.name === "sharedInbox") return {
|
|
9396
9470
|
type: "inbox",
|
|
9397
9471
|
identifier: void 0
|
|
9398
9472
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { S as KeyCache } from "./http-
|
|
2
|
+
import { S as KeyCache } from "./http-Cok5-vIC.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, PortableObjectVerifier, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
2
|
+
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-Cok5-vIC.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 { n as HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
2
|
+
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DC1cqAQ2.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 {
|
|
2
|
+
import { bt as ActorDispatcher, f as RequestContext, qt as WebFingerLinksDispatcher, xt as ActorHandleMapper, yt as ActorAliasMapper } from "./context-L0Fnib9j.cjs";
|
|
3
3
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
4
4
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
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-DC1cqAQ2.cjs";
|
|
3
3
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
4
4
|
import { DocumentLoader, PortableObjectVerifier, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import {
|
|
2
|
+
import { bt as ActorDispatcher, f as RequestContext, qt as WebFingerLinksDispatcher, xt as ActorHandleMapper, yt as ActorAliasMapper } from "./context-BykNUf04.js";
|
|
3
3
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
4
4
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
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-
|
|
6
|
+
const require_http = require("./http-R4g1McwE.cjs");
|
|
7
|
+
const require_federation = require("./federation-DFCnp94y.cjs");
|
|
8
8
|
const require_types = require("./types-poIao40f.cjs");
|
|
9
|
-
const require_portable_collection = require("./portable-collection-
|
|
10
|
-
const require_kv_cache = require("./kv-cache-
|
|
9
|
+
const require_portable_collection = require("./portable-collection-UajqDrSL.cjs");
|
|
10
|
+
const require_kv_cache = require("./kv-cache-Ct-KWRta.cjs");
|
|
11
11
|
require("./nodeinfo/mod.cjs");
|
|
12
12
|
require("./runtime/mod.cjs");
|
|
13
13
|
require("./sig/mod.cjs");
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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-
|
|
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-DC1cqAQ2.cjs";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BF0L9cMt.cjs";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as respondWithObjectIfAcceptable, $t as ActivityTransformer, A as InboxListenerSetters, At as HashlinkMediaDispatcher, B as Message, Bt as OutboxListenerErrorHandler, C as FederationBuilder, Ct as AuthorizePredicate, D as IdempotencyKeyCallback, Dt as CustomCollectionCounter, E as FederationStartQueueOptions, Et as CollectionDispatcher, F as Rfc6570Expression, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as FederationKvPrefixes, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationOrigin, Lt as ObjectDispatcher, M as ObjectCallbackSetters, Mt as InboxErrorHandler, N as OutboxListenerSetters, Nt as InboxListener, O as IdempotencyStrategy, Ot as CustomCollectionCursor, P as PortableInboxForwardingOptions, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as digest, R as FederationQueueOptions, Rt as OutboxErrorHandler, S as FederationBenchmarkOptions, St as ActorKeyPairsDispatcher, T as FederationOptions, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as PageItems, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as buildCollectionSynchronizationHeader, _ as CollectionCallbackSetters, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, at as MessageQueueListenOptions, b as Federatable, bt as ActorDispatcher, c as OutboxContext, ct as CircuitBreakerActivityDrop, d as PortableRequest, dt as CircuitBreakerFailurePolicy, et as InProcessMessageQueue, f as RequestContext, ft as CircuitBreakerKvState, g as ActorCallbackSetters, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptionsForCollection, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as MediaUploaderSetters, jt as HashlinkMediaRequest, k as InboxChallengePolicy, kt as CustomCollectionDispatcher, l as ParseUriOptions, lt as CircuitBreakerBeforeSendDecision, m as SendActivityOptions, mt as CircuitBreakerState, n as Context, nt as MessageQueue, o as GetSignedKeyOptions, ot as ParallelMessageQueue, p as RouteActivityOptions, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rt as MessageQueueDepth, s as InboxContext, st as CircuitBreaker, t as ActorKeyPair, tt as InProcessMessageQueueOptions, u as ParseUriResult, ut as CircuitBreakerCreateOptions, v as ConstructorWithTypeId, vt as parseCircuitBreakerKvState, w as FederationFetchOptions, wt as CollectionCounter, x as Federation, xt as ActorHandleMapper, y as CustomCollectionCallbackSetters, yt as ActorAliasMapper, z as createFederation, zt as OutboxListener } from "./context-L0Fnib9j.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 createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-
|
|
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-BLOXGs6m.cjs";
|
|
9
|
+
import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-CPPqkyV_.cjs";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BA_F2x53.cjs";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
|
14
14
|
declare namespace mod_d_exports {
|
|
15
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
15
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
18
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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-
|
|
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-Cok5-vIC.js";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BSzr5-I8.js";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as respondWithObjectIfAcceptable, $t as ActivityTransformer, A as InboxListenerSetters, At as HashlinkMediaDispatcher, B as Message, Bt as OutboxListenerErrorHandler, C as FederationBuilder, Ct as AuthorizePredicate, D as IdempotencyKeyCallback, Dt as CustomCollectionCounter, E as FederationStartQueueOptions, Et as CollectionDispatcher, F as Rfc6570Expression, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as FederationKvPrefixes, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationOrigin, Lt as ObjectDispatcher, M as ObjectCallbackSetters, Mt as InboxErrorHandler, N as OutboxListenerSetters, Nt as InboxListener, O as IdempotencyStrategy, Ot as CustomCollectionCursor, P as PortableInboxForwardingOptions, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as digest, R as FederationQueueOptions, Rt as OutboxErrorHandler, S as FederationBenchmarkOptions, St as ActorKeyPairsDispatcher, T as FederationOptions, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as PageItems, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as buildCollectionSynchronizationHeader, _ as CollectionCallbackSetters, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, at as MessageQueueListenOptions, b as Federatable, bt as ActorDispatcher, c as OutboxContext, ct as CircuitBreakerActivityDrop, d as PortableRequest, dt as CircuitBreakerFailurePolicy, et as InProcessMessageQueue, f as RequestContext, ft as CircuitBreakerKvState, g as ActorCallbackSetters, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptionsForCollection, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as MediaUploaderSetters, jt as HashlinkMediaRequest, k as InboxChallengePolicy, kt as CustomCollectionDispatcher, l as ParseUriOptions, lt as CircuitBreakerBeforeSendDecision, m as SendActivityOptions, mt as CircuitBreakerState, n as Context, nt as MessageQueue, o as GetSignedKeyOptions, ot as ParallelMessageQueue, p as RouteActivityOptions, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rt as MessageQueueDepth, s as InboxContext, st as CircuitBreaker, t as ActorKeyPair, tt as InProcessMessageQueueOptions, u as ParseUriResult, ut as CircuitBreakerCreateOptions, v as ConstructorWithTypeId, vt as parseCircuitBreakerKvState, w as FederationFetchOptions, wt as CollectionCounter, x as Federation, xt as ActorHandleMapper, y as CustomCollectionCallbackSetters, yt as ActorAliasMapper, z as createFederation, zt as OutboxListener } from "./context-BykNUf04.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 createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod
|
|
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-DK0y9fd-.js";
|
|
9
|
+
import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod--jv6vyrP.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-B5z_q9TH.js";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
|
14
14
|
declare namespace mod_d_exports {
|
|
15
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
15
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
18
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetObjectOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriOptions, ParseUriResult, PortableActorIdMapper, PortableCollectionOwnerMapper, PortableInboxForwardingOptions, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/mod.js
CHANGED
|
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "./rolldown-runtime-BC-Eo5Mj.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-DAtXl_Kc.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import { A as hasSignatureLike, B as fetchKey, D as detachSignature, E as createSignature, F as verifyJsonLd, H as generateCryptoKeyPair, I as verifySignature, N as signJsonLd, R as exportJwk, U as importJwk, V as fetchKeyDetailed, _ as verifyPortableObjectProof, a as signRequest, b as verifyProof,
|
|
7
|
-
import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-
|
|
6
|
+
import { A as hasSignatureLike, B as fetchKey, D as detachSignature, E as createSignature, F as verifyJsonLd, H as generateCryptoKeyPair, I as verifySignature, N as signJsonLd, R as exportJwk, U as importJwk, V as fetchKeyDetailed, _ as verifyPortableObjectProof, a as signRequest, b as verifyProof, f as createProof, g as verifyObject, gt as validateAcceptSignature, ht as parseAcceptSignature, m as signObject, mt as fulfillAcceptSignature, o as verifyRequest, p as hasProofLike, pt as formatAcceptSignature, s as verifyRequestDetailed, w as attachSignature } from "./http-Baovr6xq.js";
|
|
7
|
+
import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-CdpTFsa2.js";
|
|
8
8
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-_S2_MeLF.js";
|
|
9
|
-
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
9
|
+
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-uv4CuQXm.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CZiBDLPi.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -5,7 +5,7 @@ import { r as createRequestContext } from "../context-B2rlkkyJ.mjs";
|
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
|
-
import { C as handleNodeInfo, o as createFederation, w as handleNodeInfoJrd } from "../middleware-
|
|
8
|
+
import { C as handleNodeInfo, o as createFederation, w as handleNodeInfoJrd } from "../middleware-B99JjvFn.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-CizGaYeG.mjs";
|
|
5
5
|
import { c as isPortableId, d as isSamePublicKey$1, o as isCompatibleKeyId, t as getCanonicalPortableId, u as isPortableUri } from "./portable-key-id-Bg259c4Z.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
6
|
+
import { i as parseKeyOwnerEvidence, r as getVerifiedKeyOwnerEvidence } from "./key-owner-evidence-Bo3yaeL5.mjs";
|
|
7
|
+
import { l as verifyKeyOwnership, n as exportJwk, r as fetchActorDocument } from "./key-D5awqp7u.mjs";
|
|
8
|
+
import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-Bv1RdQ0n.mjs";
|
|
8
9
|
import { getLogger } from "@logtape/logtape";
|
|
9
10
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
10
11
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -44,6 +45,13 @@ async function doesActorOwnKey(activity, key, options) {
|
|
|
44
45
|
span.setAttribute("activitypub.key_ownership.method", "none");
|
|
45
46
|
return false;
|
|
46
47
|
}
|
|
48
|
+
const evidence = getVerifiedKeyOwnerEvidence(key);
|
|
49
|
+
if (evidence != null) {
|
|
50
|
+
const verified = getCanonicalPortableId(actorId) === evidence.ownerId;
|
|
51
|
+
span.setAttribute("activitypub.key_ownership.verified", verified);
|
|
52
|
+
span.setAttribute("activitypub.key_ownership.method", key.id != null && isPortableUri(key.id) ? "portable_actor_key" : "portable_gateway_key");
|
|
53
|
+
return verified;
|
|
54
|
+
}
|
|
47
55
|
if (key.id != null && isPortableUri(key.id)) {
|
|
48
56
|
const owner = await getPortableActorKeyOwner(key, options);
|
|
49
57
|
const ownerId = owner?.id == null ? null : getCanonicalPortableId(owner.id);
|
|
@@ -150,6 +158,13 @@ async function getKeyOwner(keyId, options) {
|
|
|
150
158
|
contextLoader: options.contextLoader ?? getDocumentLoader(),
|
|
151
159
|
tracerProvider
|
|
152
160
|
};
|
|
161
|
+
if (keyId instanceof CryptographicKey) {
|
|
162
|
+
const evidence = getVerifiedKeyOwnerEvidence(keyId);
|
|
163
|
+
if (evidence != null) {
|
|
164
|
+
const owner = await parseKeyOwnerEvidence(evidence, fetchOptions);
|
|
165
|
+
if (owner != null) return owner;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
153
168
|
const id = keyId instanceof CryptographicKey ? keyId.id : keyId;
|
|
154
169
|
if (id != null && isPortableUri(id)) return await getPortableActorKeyOwner(keyId, fetchOptions);
|
|
155
170
|
if (id != null && isCompatibleKeyId(id)) {
|
|
@@ -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 { c as verifyPortableObjectProof, u as verifyPortableObjectProofWithRoot } from "./proof-
|
|
4
|
+
import { n as version, t as name } from "./deno-CizGaYeG.mjs";
|
|
5
|
+
import { c as verifyPortableObjectProof, u as verifyPortableObjectProofWithRoot } from "./proof-CRTPWbVh.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { CollectionPage, Object as Object$1, isActor } from "@fedify/vocab";
|
|
8
8
|
import { trace } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
|
-
const require_http = require("./http-
|
|
2
|
+
const require_http = require("./http-R4g1McwE.cjs");
|
|
3
3
|
let _logtape_logtape = require("@logtape/logtape");
|
|
4
4
|
let _fedify_vocab = require("@fedify/vocab");
|
|
5
5
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -40,6 +40,13 @@ async function doesActorOwnKey(activity, key, options) {
|
|
|
40
40
|
span.setAttribute("activitypub.key_ownership.method", "none");
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
|
+
const evidence = require_http.getVerifiedKeyOwnerEvidence(key);
|
|
44
|
+
if (evidence != null) {
|
|
45
|
+
const verified = require_http.getCanonicalPortableId(actorId) === evidence.ownerId;
|
|
46
|
+
span.setAttribute("activitypub.key_ownership.verified", verified);
|
|
47
|
+
span.setAttribute("activitypub.key_ownership.method", key.id != null && require_http.isPortableUri(key.id) ? "portable_actor_key" : "portable_gateway_key");
|
|
48
|
+
return verified;
|
|
49
|
+
}
|
|
43
50
|
if (key.id != null && require_http.isPortableUri(key.id)) {
|
|
44
51
|
const owner = await getPortableActorKeyOwner(key, options);
|
|
45
52
|
const ownerId = owner?.id == null ? null : require_http.getCanonicalPortableId(owner.id);
|
|
@@ -146,6 +153,13 @@ async function getKeyOwner(keyId, options) {
|
|
|
146
153
|
contextLoader: options.contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)(),
|
|
147
154
|
tracerProvider
|
|
148
155
|
};
|
|
156
|
+
if (keyId instanceof _fedify_vocab.CryptographicKey) {
|
|
157
|
+
const evidence = require_http.getVerifiedKeyOwnerEvidence(keyId);
|
|
158
|
+
if (evidence != null) {
|
|
159
|
+
const owner = await require_http.parseKeyOwnerEvidence(evidence, fetchOptions);
|
|
160
|
+
if (owner != null) return owner;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
149
163
|
const id = keyId instanceof _fedify_vocab.CryptographicKey ? keyId.id : keyId;
|
|
150
164
|
if (id != null && require_http.isPortableUri(id)) return await getPortableActorKeyOwner(keyId, fetchOptions);
|
|
151
165
|
if (id != null && require_http.isCompatibleKeyId(id)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { Ct as isSamePublicKey$1, G as verifyKeyOwnership, R as exportJwk, St as
|
|
3
|
+
import { Ct as isPortableId, Dt as name, Et as isSamePublicKey$1, G as verifyKeyOwnership, J as parseKeyOwnerEvidence, Ot as version, R as exportJwk, St as isCompatibleKeyId, Tt as isPortableUri, _ as verifyPortableObjectProof, _t as getCanonicalPortableId, c as fetchPortableGatewayKey, l as resolvePortableActorKey, q as getVerifiedKeyOwnerEvidence, y as verifyPortableObjectProofWithRoot, z as fetchActorDocument } from "./http-Baovr6xq.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { CollectionPage, CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -41,6 +41,13 @@ async function doesActorOwnKey(activity, key, options) {
|
|
|
41
41
|
span.setAttribute("activitypub.key_ownership.method", "none");
|
|
42
42
|
return false;
|
|
43
43
|
}
|
|
44
|
+
const evidence = getVerifiedKeyOwnerEvidence(key);
|
|
45
|
+
if (evidence != null) {
|
|
46
|
+
const verified = getCanonicalPortableId(actorId) === evidence.ownerId;
|
|
47
|
+
span.setAttribute("activitypub.key_ownership.verified", verified);
|
|
48
|
+
span.setAttribute("activitypub.key_ownership.method", key.id != null && isPortableUri(key.id) ? "portable_actor_key" : "portable_gateway_key");
|
|
49
|
+
return verified;
|
|
50
|
+
}
|
|
44
51
|
if (key.id != null && isPortableUri(key.id)) {
|
|
45
52
|
const owner = await getPortableActorKeyOwner(key, options);
|
|
46
53
|
const ownerId = owner?.id == null ? null : getCanonicalPortableId(owner.id);
|
|
@@ -147,6 +154,13 @@ async function getKeyOwner(keyId, options) {
|
|
|
147
154
|
contextLoader: options.contextLoader ?? getDocumentLoader(),
|
|
148
155
|
tracerProvider
|
|
149
156
|
};
|
|
157
|
+
if (keyId instanceof CryptographicKey) {
|
|
158
|
+
const evidence = getVerifiedKeyOwnerEvidence(keyId);
|
|
159
|
+
if (evidence != null) {
|
|
160
|
+
const owner = await parseKeyOwnerEvidence(evidence, fetchOptions);
|
|
161
|
+
if (owner != null) return owner;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
150
164
|
const id = keyId instanceof CryptographicKey ? keyId.id : keyId;
|
|
151
165
|
if (id != null && isPortableUri(id)) return await getPortableActorKeyOwner(keyId, fetchOptions);
|
|
152
166
|
if (id != null && isCompatibleKeyId(id)) {
|
|
@@ -2,7 +2,7 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { d as isSamePublicKey, i as getRawCanonicalPortableId, s as isPortableActorDocument, t as getCanonicalPortableId, u as isPortableUri } from "./portable-key-id-Bg259c4Z.mjs";
|
|
5
|
-
import { u as verifyPortableObjectProofWithRoot } from "./proof-
|
|
5
|
+
import { u as verifyPortableObjectProofWithRoot } from "./proof-CRTPWbVh.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { CryptographicKey, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
8
8
|
import { FetchError, formatIri, getDocumentLoader, isGatewayUrl, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
|
|
@@ -175,6 +175,7 @@ async function verifyPortableKeyDocument(document, actor, keyId, isGatewayKey, o
|
|
|
175
175
|
type: "verified",
|
|
176
176
|
actor,
|
|
177
177
|
key,
|
|
178
|
+
document: root,
|
|
178
179
|
...expires == null ? {} : { expires }
|
|
179
180
|
};
|
|
180
181
|
}
|