@fedify/fedify 1.10.7 → 1.10.8
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/{actor-Cujbx4Zv.js → actor-BtdqoffI.js} +187 -187
- package/dist/{actor-BGIAXtRd.cjs → actor-CHbT9hXW.cjs} +187 -187
- package/dist/{actor-C-_2S5Mn.mjs → actor-stZ3L5bm.mjs} +1 -1
- package/dist/{authdocloader-D4Y6iyTF.js → authdocloader-BjFtWv8Q.js} +3 -3
- package/dist/{authdocloader-1Sk2bqFx.mjs → authdocloader-DiNlCuEL.mjs} +3 -3
- package/dist/{authdocloader-DQfruCir.cjs → authdocloader-qSZCRtME.cjs} +3 -3
- package/dist/{builder-CZbrDRl7.mjs → builder-C06p3NRV.mjs} +4 -4
- package/dist/{client-Dyb8MI3u.mjs → client-aAP3RFq_.mjs} +1 -1
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +3 -3
- package/dist/{context-PfghnHYj.d.cts → context-BzSr5FCW.d.cts} +4 -1
- package/dist/{context-C6n2yrj0.d.ts → context-CyacVopT.d.ts} +4 -1
- package/dist/{docloader-Q3DfzuUi.cjs → docloader--HMTXXhM.cjs} +1 -1
- package/dist/{docloader-Dtaju6oI.js → docloader-Cms83CjK.js} +1 -1
- package/dist/{esm-DOJg552-.mjs → esm-CfjSLJ-h.mjs} +1 -1
- package/dist/federation/builder.test.mjs +3 -3
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +6 -6
- package/dist/federation/idempotency.test.mjs +5 -5
- package/dist/federation/inbox.test.mjs +3 -3
- package/dist/federation/keycache.test.mjs +3 -3
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +39 -33
- package/dist/federation/mod.cjs +2 -2
- package/dist/federation/mod.d.cts +1 -1
- package/dist/federation/mod.d.ts +1 -1
- package/dist/federation/mod.js +1 -1
- package/dist/federation/mq.test.mjs +1 -1
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/router.test.mjs +2 -2
- package/dist/federation/send.test.mjs +7 -7
- package/dist/{http-BRwSVBn1.mjs → http-BPQ_zPRB.mjs} +2 -2
- package/dist/{http-DCrun8ql.cjs → http-Bg-OkZtX.cjs} +3 -3
- package/dist/{http-DRnRwr3i.js → http-CDZB3DBW.js} +3 -3
- package/dist/{inbox-pD1nbb_5.mjs → inbox-Cnih7u27.mjs} +1 -1
- package/dist/{key-vIzWPiil.js → key-ASS7oK8n.js} +2 -2
- package/dist/{key-DMO0TgTa.mjs → key-B0qYOng3.mjs} +1 -1
- package/dist/{key-DEYIxAFs.cjs → key-Bbf-ITpM.cjs} +2 -2
- package/dist/{key-DdL5Oc59.mjs → key-C16D-kud.mjs} +2 -2
- package/dist/{key-Cmbps6xt.cjs → key-DGuUMBsU.cjs} +1 -1
- package/dist/{keycache-BVR9f06Y.mjs → keycache-CBPbgb7d.mjs} +1 -1
- package/dist/{keys-Co-0pK8a.mjs → keys-Br4iedk3.mjs} +1 -1
- package/dist/{ld-BFaDk5gX.mjs → ld-7nQ68-rS.mjs} +2 -2
- package/dist/{lookup-CZGJqSjm.cjs → lookup-CA5RreoS.cjs} +1 -1
- package/dist/{lookup-CMYXdjVH.mjs → lookup-CCcDhxO2.mjs} +1 -1
- package/dist/{lookup-jlmCTRsO.js → lookup-CpMB-hV5.js} +1 -1
- package/dist/{middleware-CmA2E9Bu.js → middleware-BDTuu7QY.js} +46 -21
- package/dist/{middleware-BWlZ-wms.cjs → middleware-BPTDstS-.cjs} +1 -1
- package/dist/{middleware-H3Ce7yn3.mjs → middleware-Bi5LcEMF.mjs} +1 -1
- package/dist/{middleware-BhMQrJXH.cjs → middleware-C90kKt44.cjs} +48 -23
- package/dist/{middleware-BXD5WJbj.mjs → middleware-Crs1EVL7.mjs} +52 -27
- package/dist/mod.cjs +10 -10
- package/dist/mod.d.cts +1 -1
- package/dist/mod.d.ts +1 -1
- package/dist/mod.js +9 -9
- package/dist/nodeinfo/client.test.mjs +3 -3
- package/dist/nodeinfo/handler.test.mjs +2 -2
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/nodeinfo/semver.test.mjs +1 -1
- package/dist/nodeinfo/types.test.mjs +1 -1
- package/dist/otel/exporter.test.mjs +1 -1
- package/dist/otel/mod.cjs +1 -1
- package/dist/{owner-CNdS8zxf.mjs → owner-ncOJW9jU.mjs} +3 -3
- package/dist/{proof-DcPdtve2.cjs → proof-BYdxNk_7.cjs} +3 -3
- package/dist/{proof-Co7YmDpv.mjs → proof-Bd732W1s.mjs} +2 -2
- package/dist/{proof-DHPbi_Mx.js → proof-JCn_Nftz.js} +3 -3
- package/dist/runtime/authdocloader.test.mjs +6 -6
- package/dist/runtime/docloader.test.mjs +3 -3
- package/dist/runtime/key.test.mjs +3 -3
- package/dist/runtime/langstr.test.mjs +2 -2
- package/dist/runtime/link.test.mjs +2 -2
- package/dist/runtime/mod.cjs +3 -3
- package/dist/runtime/mod.js +3 -3
- package/dist/runtime/multibase/multibase.test.mjs +2 -2
- package/dist/runtime/url.test.mjs +2 -2
- package/dist/{send-BRCWNcMa.mjs → send-BUUNtAjI.mjs} +2 -2
- package/dist/sig/http.test.mjs +6 -6
- package/dist/sig/key.test.mjs +4 -4
- package/dist/sig/ld.test.mjs +5 -5
- package/dist/sig/mod.cjs +3 -3
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.mjs +5 -5
- package/dist/sig/proof.test.mjs +4 -4
- package/dist/testing/docloader.test.mjs +1 -1
- package/dist/testing/mod.d.mts +4 -1
- package/dist/testing/mod.mjs +1 -1
- package/dist/{testing-BLIh1cXz.mjs → testing-CvmsaHLW.mjs} +2 -2
- package/dist/{transformers-CLtJ5H8o.cjs → transformers-Cd6Tdn3M.cjs} +1 -1
- package/dist/{types-B34v-m2N.cjs → types-BVCtDIwE.cjs} +1 -1
- package/dist/{types-CXZk86AG.js → types-Dy8sMtkH.js} +1 -1
- package/dist/vocab/actor.test.mjs +4 -4
- package/dist/vocab/cjs.test.mjs +1 -1
- package/dist/vocab/lookup.test.mjs +4 -4
- package/dist/vocab/mod.cjs +3 -3
- package/dist/vocab/mod.js +3 -3
- package/dist/vocab/type.test.mjs +2 -2
- package/dist/vocab/vocab.test.mjs +3 -3
- package/dist/{vocab-rT_94Pke.mjs → vocab-DcYXFzyR.mjs} +186 -186
- package/dist/webfinger/handler.test.mjs +3 -3
- package/dist/webfinger/lookup.test.mjs +3 -3
- package/dist/webfinger/mod.cjs +1 -1
- package/dist/webfinger/mod.js +1 -1
- package/dist/x/cfworkers.cjs +1 -1
- package/dist/x/cfworkers.test.mjs +1 -1
- package/dist/x/hono.cjs +1 -1
- package/dist/x/hono.d.cts +1 -1
- package/dist/x/hono.d.ts +1 -1
- package/dist/x/sveltekit.cjs +1 -1
- package/dist/x/sveltekit.d.cts +1 -1
- package/dist/x/sveltekit.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_docloader = require("./docloader
|
|
4
|
-
const require_actor = require("./actor-
|
|
3
|
+
const require_docloader = require("./docloader--HMTXXhM.cjs");
|
|
4
|
+
const require_actor = require("./actor-CHbT9hXW.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
7
7
|
//#region src/sig/key.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { J as getDocumentLoader, ot as name, s as CryptographicKey, st as version, v as Object$1 } from "./vocab-
|
|
5
|
-
import { i as isActor } from "./actor-
|
|
4
|
+
import { J as getDocumentLoader, ot as name, s as CryptographicKey, st as version, v as Object$1 } from "./vocab-DcYXFzyR.mjs";
|
|
5
|
+
import { i as isActor } from "./actor-stZ3L5bm.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
//#region src/sig/key.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_key = require("./key-
|
|
3
|
+
const require_key = require("./key-Bbf-ITpM.cjs");
|
|
4
4
|
exports.validateCryptoKey = require_key.validateCryptoKey;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { g as Multikey, s as CryptographicKey } from "./vocab-
|
|
4
|
+
import { g as Multikey, s as CryptographicKey } from "./vocab-DcYXFzyR.mjs";
|
|
5
5
|
//#region src/federation/keycache.ts
|
|
6
6
|
const NULL_KEY_CACHE_VALUE = { _fedify: "key-unavailable" };
|
|
7
7
|
const NULL_KEY_CACHE_TTL = Temporal.Duration.from({ minutes: 5 });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { I as importSpki, g as Multikey, s as CryptographicKey } from "./vocab-
|
|
4
|
+
import { I as importSpki, g as Multikey, s as CryptographicKey } from "./vocab-DcYXFzyR.mjs";
|
|
5
5
|
//#region src/testing/keys.ts
|
|
6
6
|
const rsaPublicKey1 = new CryptographicKey({
|
|
7
7
|
id: new URL("https://example.com/key"),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { J as getDocumentLoader, U as getTypeId, ot as name, s as CryptographicKey, st as version, t as Activity, v as Object$1 } from "./vocab-
|
|
5
|
-
import { a as validateCryptoKey, n as fetchKey } from "./key-
|
|
4
|
+
import { J as getDocumentLoader, U as getTypeId, ot as name, s as CryptographicKey, st as version, t as Activity, v as Object$1 } from "./vocab-DcYXFzyR.mjs";
|
|
5
|
+
import { a as validateCryptoKey, n as fetchKey } from "./key-C16D-kud.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import jsonld from "jsonld";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_docloader = require("./docloader
|
|
3
|
+
const require_docloader = require("./docloader--HMTXXhM.cjs");
|
|
4
4
|
let _logtape_logtape = require("@logtape/logtape");
|
|
5
5
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
6
6
|
//#region src/webfinger/lookup.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { J as getDocumentLoader, U as getTypeId, W as lookupWebFinger, ot as name, st as version, v as Object$1 } from "./vocab-
|
|
4
|
+
import { J as getDocumentLoader, U as getTypeId, W as lookupWebFinger, ot as name, st as version, v as Object$1 } from "./vocab-DcYXFzyR.mjs";
|
|
5
5
|
import { getLogger } from "@logtape/logtape";
|
|
6
6
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { cloneDeep, delay } from "es-toolkit";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { d as name, f as version, l as UrlError, o as getUserAgent, u as validatePublicUrl } from "./docloader-
|
|
3
|
+
import { d as name, f as version, l as UrlError, o as getUserAgent, u as validatePublicUrl } from "./docloader-Cms83CjK.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
6
6
|
//#region src/webfinger/lookup.ts
|
|
@@ -2,14 +2,14 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
import { t as __exportAll } from "./rolldown-runtime-C7fyD9f2.js";
|
|
4
4
|
import { r as getDefaultActivityTransformers } from "./transformers-BV4OeK9o.js";
|
|
5
|
-
import { d as name, f as version, i as getDocumentLoader, s as kvCache } from "./docloader-
|
|
6
|
-
import { G as Multikey, Tt as getTypeId, V as Link, X as OrderedCollectionPage, Y as OrderedCollection, _ as CollectionPage, g as Collection, q as Object$1, s as Activity, y as CryptographicKey } from "./actor-
|
|
7
|
-
import { t as lookupWebFinger } from "./lookup-
|
|
8
|
-
import { i as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-
|
|
9
|
-
import { r as verifyRequest, t as doubleKnock } from "./http-
|
|
10
|
-
import { a as doesActorOwnKey, d as signJsonLd, f as verifyJsonLd, l as detachSignature, n as signObject, o as getKeyOwner, r as verifyObject, u as hasSignature } from "./proof-
|
|
11
|
-
import { n as getNodeInfo, t as nodeInfoToJson } from "./types-
|
|
12
|
-
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
5
|
+
import { d as name, f as version, i as getDocumentLoader, s as kvCache } from "./docloader-Cms83CjK.js";
|
|
6
|
+
import { G as Multikey, Tt as getTypeId, V as Link, X as OrderedCollectionPage, Y as OrderedCollection, _ as CollectionPage, g as Collection, q as Object$1, s as Activity, y as CryptographicKey } from "./actor-BtdqoffI.js";
|
|
7
|
+
import { t as lookupWebFinger } from "./lookup-CpMB-hV5.js";
|
|
8
|
+
import { i as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-ASS7oK8n.js";
|
|
9
|
+
import { r as verifyRequest, t as doubleKnock } from "./http-CDZB3DBW.js";
|
|
10
|
+
import { a as doesActorOwnKey, d as signJsonLd, f as verifyJsonLd, l as detachSignature, n as signObject, o as getKeyOwner, r as verifyObject, u as hasSignature } from "./proof-JCn_Nftz.js";
|
|
11
|
+
import { n as getNodeInfo, t as nodeInfoToJson } from "./types-Dy8sMtkH.js";
|
|
12
|
+
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-BjFtWv8Q.js";
|
|
13
13
|
import { lookupObject, traverseCollection } from "./vocab/mod.js";
|
|
14
14
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
15
15
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -2839,14 +2839,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2839
2839
|
let rsaKey = null;
|
|
2840
2840
|
for (const { keyId, privateKey } of keys) {
|
|
2841
2841
|
validateCryptoKey(privateKey, "private");
|
|
2842
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2842
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
2843
|
+
keyId,
|
|
2844
|
+
privateKey
|
|
2845
|
+
};
|
|
2846
|
+
}
|
|
2847
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2848
|
+
proofCreated = true;
|
|
2849
|
+
break;
|
|
2850
|
+
}
|
|
2851
|
+
if (!proofCreated) {
|
|
2852
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2850
2853
|
activity = await signObject(activity, privateKey, keyId, {
|
|
2851
2854
|
contextLoader,
|
|
2852
2855
|
tracerProvider: this.tracerProvider
|
|
@@ -3479,6 +3482,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3479
3482
|
}
|
|
3480
3483
|
const owner = this.getActorUri(identifier);
|
|
3481
3484
|
const result = [];
|
|
3485
|
+
let i = 1;
|
|
3482
3486
|
for (const keyPair of keyPairs) {
|
|
3483
3487
|
const newPair = {
|
|
3484
3488
|
...keyPair,
|
|
@@ -3488,12 +3492,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3488
3492
|
publicKey: keyPair.publicKey
|
|
3489
3493
|
}),
|
|
3490
3494
|
multikey: new Multikey({
|
|
3491
|
-
id:
|
|
3495
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
3492
3496
|
controller: owner,
|
|
3493
3497
|
publicKey: keyPair.publicKey
|
|
3494
3498
|
})
|
|
3495
3499
|
};
|
|
3496
3500
|
result.push(newPair);
|
|
3501
|
+
i++;
|
|
3497
3502
|
}
|
|
3498
3503
|
return result;
|
|
3499
3504
|
}
|
|
@@ -3640,6 +3645,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3640
3645
|
]);
|
|
3641
3646
|
let keys;
|
|
3642
3647
|
let identifier = null;
|
|
3648
|
+
let actorKeyPairs = null;
|
|
3643
3649
|
if ("identifier" in sender || "username" in sender || "handle" in sender) {
|
|
3644
3650
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
3645
3651
|
else {
|
|
@@ -3657,8 +3663,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3657
3663
|
}
|
|
3658
3664
|
}
|
|
3659
3665
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
3660
|
-
|
|
3661
|
-
|
|
3666
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
3667
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3668
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3669
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3670
|
+
keyId: kp.keyId,
|
|
3671
|
+
privateKey: kp.privateKey
|
|
3672
|
+
}));
|
|
3662
3673
|
} else if (Array.isArray(sender)) {
|
|
3663
3674
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
3664
3675
|
keys = sender;
|
|
@@ -3689,6 +3700,16 @@ var ContextImpl = class ContextImpl {
|
|
|
3689
3700
|
});
|
|
3690
3701
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3691
3702
|
}
|
|
3703
|
+
if (actorKeyPairs != null) {
|
|
3704
|
+
const contextLoader = this.contextLoader;
|
|
3705
|
+
for (const kp of actorKeyPairs) {
|
|
3706
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
3707
|
+
activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
3708
|
+
contextLoader,
|
|
3709
|
+
tracerProvider: this.tracerProvider
|
|
3710
|
+
});
|
|
3711
|
+
}
|
|
3712
|
+
}
|
|
3692
3713
|
const inboxes = extractInboxes({
|
|
3693
3714
|
recipients: expandedRecipients,
|
|
3694
3715
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -4010,8 +4031,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4010
4031
|
identifier = mapped;
|
|
4011
4032
|
}
|
|
4012
4033
|
}
|
|
4013
|
-
|
|
4014
|
-
if (
|
|
4034
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
4035
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
4036
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
4037
|
+
keyId: kp.keyId,
|
|
4038
|
+
privateKey: kp.privateKey
|
|
4039
|
+
}));
|
|
4015
4040
|
} else if (Array.isArray(forwarder)) {
|
|
4016
4041
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
4017
4042
|
keys = forwarder;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_middleware = require("./middleware-
|
|
3
|
+
const require_middleware = require("./middleware-C90kKt44.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_docloader = require("./docloader
|
|
4
|
-
const require_transformers = require("./transformers-
|
|
5
|
-
const require_actor = require("./actor-
|
|
6
|
-
const require_lookup = require("./lookup-
|
|
7
|
-
const require_key = require("./key-
|
|
8
|
-
const require_http = require("./http-
|
|
9
|
-
const require_proof = require("./proof-
|
|
10
|
-
const require_types = require("./types-
|
|
11
|
-
const require_authdocloader = require("./authdocloader-
|
|
3
|
+
const require_docloader = require("./docloader--HMTXXhM.cjs");
|
|
4
|
+
const require_transformers = require("./transformers-Cd6Tdn3M.cjs");
|
|
5
|
+
const require_actor = require("./actor-CHbT9hXW.cjs");
|
|
6
|
+
const require_lookup = require("./lookup-CA5RreoS.cjs");
|
|
7
|
+
const require_key = require("./key-Bbf-ITpM.cjs");
|
|
8
|
+
const require_http = require("./http-Bg-OkZtX.cjs");
|
|
9
|
+
const require_proof = require("./proof-BYdxNk_7.cjs");
|
|
10
|
+
const require_types = require("./types-BVCtDIwE.cjs");
|
|
11
|
+
const require_authdocloader = require("./authdocloader-qSZCRtME.cjs");
|
|
12
12
|
const require_vocab_mod = require("./vocab/mod.cjs");
|
|
13
13
|
let _logtape_logtape = require("@logtape/logtape");
|
|
14
14
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -335,7 +335,7 @@ var FederationBuilderImpl = class {
|
|
|
335
335
|
this.collectionTypeIds = {};
|
|
336
336
|
}
|
|
337
337
|
async build(options) {
|
|
338
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
338
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-BPTDstS-.cjs"));
|
|
339
339
|
const f = new FederationImpl(options);
|
|
340
340
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
341
341
|
f.router = this.router.clone();
|
|
@@ -2831,14 +2831,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2831
2831
|
let rsaKey = null;
|
|
2832
2832
|
for (const { keyId, privateKey } of keys) {
|
|
2833
2833
|
require_key.validateCryptoKey(privateKey, "private");
|
|
2834
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2834
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
2835
|
+
keyId,
|
|
2836
|
+
privateKey
|
|
2837
|
+
};
|
|
2838
|
+
}
|
|
2839
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2840
|
+
proofCreated = true;
|
|
2841
|
+
break;
|
|
2842
|
+
}
|
|
2843
|
+
if (!proofCreated) {
|
|
2844
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2842
2845
|
activity = await require_proof.signObject(activity, privateKey, keyId, {
|
|
2843
2846
|
contextLoader,
|
|
2844
2847
|
tracerProvider: this.tracerProvider
|
|
@@ -3471,6 +3474,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3471
3474
|
}
|
|
3472
3475
|
const owner = this.getActorUri(identifier);
|
|
3473
3476
|
const result = [];
|
|
3477
|
+
let i = 1;
|
|
3474
3478
|
for (const keyPair of keyPairs) {
|
|
3475
3479
|
const newPair = {
|
|
3476
3480
|
...keyPair,
|
|
@@ -3480,12 +3484,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3480
3484
|
publicKey: keyPair.publicKey
|
|
3481
3485
|
}),
|
|
3482
3486
|
multikey: new require_actor.Multikey({
|
|
3483
|
-
id:
|
|
3487
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
3484
3488
|
controller: owner,
|
|
3485
3489
|
publicKey: keyPair.publicKey
|
|
3486
3490
|
})
|
|
3487
3491
|
};
|
|
3488
3492
|
result.push(newPair);
|
|
3493
|
+
i++;
|
|
3489
3494
|
}
|
|
3490
3495
|
return result;
|
|
3491
3496
|
}
|
|
@@ -3632,6 +3637,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3632
3637
|
]);
|
|
3633
3638
|
let keys;
|
|
3634
3639
|
let identifier = null;
|
|
3640
|
+
let actorKeyPairs = null;
|
|
3635
3641
|
if ("identifier" in sender || "username" in sender || "handle" in sender) {
|
|
3636
3642
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
3637
3643
|
else {
|
|
@@ -3649,8 +3655,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3649
3655
|
}
|
|
3650
3656
|
}
|
|
3651
3657
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
3652
|
-
|
|
3653
|
-
|
|
3658
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
3659
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3660
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3661
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3662
|
+
keyId: kp.keyId,
|
|
3663
|
+
privateKey: kp.privateKey
|
|
3664
|
+
}));
|
|
3654
3665
|
} else if (Array.isArray(sender)) {
|
|
3655
3666
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
3656
3667
|
keys = sender;
|
|
@@ -3681,6 +3692,16 @@ var ContextImpl = class ContextImpl {
|
|
|
3681
3692
|
});
|
|
3682
3693
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3683
3694
|
}
|
|
3695
|
+
if (actorKeyPairs != null) {
|
|
3696
|
+
const contextLoader = this.contextLoader;
|
|
3697
|
+
for (const kp of actorKeyPairs) {
|
|
3698
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
3699
|
+
activity = await require_proof.signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
3700
|
+
contextLoader,
|
|
3701
|
+
tracerProvider: this.tracerProvider
|
|
3702
|
+
});
|
|
3703
|
+
}
|
|
3704
|
+
}
|
|
3684
3705
|
const inboxes = extractInboxes({
|
|
3685
3706
|
recipients: expandedRecipients,
|
|
3686
3707
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -4002,8 +4023,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4002
4023
|
identifier = mapped;
|
|
4003
4024
|
}
|
|
4004
4025
|
}
|
|
4005
|
-
|
|
4006
|
-
if (
|
|
4026
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
4027
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
4028
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
4029
|
+
keyId: kp.keyId,
|
|
4030
|
+
privateKey: kp.privateKey
|
|
4031
|
+
}));
|
|
4007
4032
|
} else if (Array.isArray(forwarder)) {
|
|
4008
4033
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
4009
4034
|
keys = forwarder;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { J as getDocumentLoader, U as getTypeId, W as lookupWebFinger, Z as kvCache, a as CollectionPage, b as OrderedCollection, g as Multikey, h as Link, i as Collection, ot as name, s as CryptographicKey, st as version, t as Activity, v as Object$1, x as OrderedCollectionPage } from "./vocab-
|
|
5
|
-
import { i as RouterError, n as traverseCollection, t as lookupObject } from "./lookup-
|
|
6
|
-
import { t as getNodeInfo } from "./client-
|
|
4
|
+
import { J as getDocumentLoader, U as getTypeId, W as lookupWebFinger, Z as kvCache, a as CollectionPage, b as OrderedCollection, g as Multikey, h as Link, i as Collection, ot as name, s as CryptographicKey, st as version, t as Activity, v as Object$1, x as OrderedCollectionPage } from "./vocab-DcYXFzyR.mjs";
|
|
5
|
+
import { i as RouterError, n as traverseCollection, t as lookupObject } from "./lookup-CCcDhxO2.mjs";
|
|
6
|
+
import { t as getNodeInfo } from "./client-aAP3RFq_.mjs";
|
|
7
7
|
import { t as nodeInfoToJson } from "./types-CAnkAQGM.mjs";
|
|
8
|
-
import "./actor-
|
|
9
|
-
import { a as validateCryptoKey, i as importJwk, t as exportJwk } from "./key-
|
|
10
|
-
import { l as verifyRequest } from "./http-
|
|
11
|
-
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
12
|
-
import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-
|
|
13
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
14
|
-
import { n as signObject, r as verifyObject } from "./proof-
|
|
15
|
-
import { n as routeActivity } from "./inbox-
|
|
16
|
-
import { t as FederationBuilderImpl } from "./builder-
|
|
8
|
+
import "./actor-stZ3L5bm.mjs";
|
|
9
|
+
import { a as validateCryptoKey, i as importJwk, t as exportJwk } from "./key-C16D-kud.mjs";
|
|
10
|
+
import { l as verifyRequest } from "./http-BPQ_zPRB.mjs";
|
|
11
|
+
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-DiNlCuEL.mjs";
|
|
12
|
+
import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-7nQ68-rS.mjs";
|
|
13
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-ncOJW9jU.mjs";
|
|
14
|
+
import { n as signObject, r as verifyObject } from "./proof-Bd732W1s.mjs";
|
|
15
|
+
import { n as routeActivity } from "./inbox-Cnih7u27.mjs";
|
|
16
|
+
import { t as FederationBuilderImpl } from "./builder-C06p3NRV.mjs";
|
|
17
17
|
import { t as buildCollectionSynchronizationHeader } from "./collection-BD6-SZ6O.mjs";
|
|
18
|
-
import { t as KvKeyCache } from "./keycache-
|
|
18
|
+
import { t as KvKeyCache } from "./keycache-CBPbgb7d.mjs";
|
|
19
19
|
import { t as createExponentialBackoffPolicy } from "./retry-Ddbq3AcK.mjs";
|
|
20
|
-
import { n as sendActivity, t as extractInboxes } from "./send-
|
|
20
|
+
import { n as sendActivity, t as extractInboxes } from "./send-BUUNtAjI.mjs";
|
|
21
21
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
22
22
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
23
23
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
@@ -1852,14 +1852,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
1852
1852
|
let rsaKey = null;
|
|
1853
1853
|
for (const { keyId, privateKey } of keys) {
|
|
1854
1854
|
validateCryptoKey(privateKey, "private");
|
|
1855
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1855
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
1856
|
+
keyId,
|
|
1857
|
+
privateKey
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
1861
|
+
proofCreated = true;
|
|
1862
|
+
break;
|
|
1863
|
+
}
|
|
1864
|
+
if (!proofCreated) {
|
|
1865
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
1863
1866
|
activity = await signObject(activity, privateKey, keyId, {
|
|
1864
1867
|
contextLoader,
|
|
1865
1868
|
tracerProvider: this.tracerProvider
|
|
@@ -2492,6 +2495,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2492
2495
|
}
|
|
2493
2496
|
const owner = this.getActorUri(identifier);
|
|
2494
2497
|
const result = [];
|
|
2498
|
+
let i = 1;
|
|
2495
2499
|
for (const keyPair of keyPairs) {
|
|
2496
2500
|
const newPair = {
|
|
2497
2501
|
...keyPair,
|
|
@@ -2501,12 +2505,13 @@ var ContextImpl = class ContextImpl {
|
|
|
2501
2505
|
publicKey: keyPair.publicKey
|
|
2502
2506
|
}),
|
|
2503
2507
|
multikey: new Multikey({
|
|
2504
|
-
id:
|
|
2508
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
2505
2509
|
controller: owner,
|
|
2506
2510
|
publicKey: keyPair.publicKey
|
|
2507
2511
|
})
|
|
2508
2512
|
};
|
|
2509
2513
|
result.push(newPair);
|
|
2514
|
+
i++;
|
|
2510
2515
|
}
|
|
2511
2516
|
return result;
|
|
2512
2517
|
}
|
|
@@ -2653,6 +2658,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2653
2658
|
]);
|
|
2654
2659
|
let keys;
|
|
2655
2660
|
let identifier = null;
|
|
2661
|
+
let actorKeyPairs = null;
|
|
2656
2662
|
if ("identifier" in sender || "username" in sender || "handle" in sender) {
|
|
2657
2663
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
2658
2664
|
else {
|
|
@@ -2670,8 +2676,13 @@ var ContextImpl = class ContextImpl {
|
|
|
2670
2676
|
}
|
|
2671
2677
|
}
|
|
2672
2678
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
2673
|
-
|
|
2674
|
-
|
|
2679
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
2680
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
2681
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
2682
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
2683
|
+
keyId: kp.keyId,
|
|
2684
|
+
privateKey: kp.privateKey
|
|
2685
|
+
}));
|
|
2675
2686
|
} else if (Array.isArray(sender)) {
|
|
2676
2687
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
2677
2688
|
keys = sender;
|
|
@@ -2702,6 +2713,16 @@ var ContextImpl = class ContextImpl {
|
|
|
2702
2713
|
});
|
|
2703
2714
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
2704
2715
|
}
|
|
2716
|
+
if (actorKeyPairs != null) {
|
|
2717
|
+
const contextLoader = this.contextLoader;
|
|
2718
|
+
for (const kp of actorKeyPairs) {
|
|
2719
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
2720
|
+
activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
2721
|
+
contextLoader,
|
|
2722
|
+
tracerProvider: this.tracerProvider
|
|
2723
|
+
});
|
|
2724
|
+
}
|
|
2725
|
+
}
|
|
2705
2726
|
const inboxes = extractInboxes({
|
|
2706
2727
|
recipients: expandedRecipients,
|
|
2707
2728
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -3023,8 +3044,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3023
3044
|
identifier = mapped;
|
|
3024
3045
|
}
|
|
3025
3046
|
}
|
|
3026
|
-
|
|
3027
|
-
if (
|
|
3047
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3048
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3049
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3050
|
+
keyId: kp.keyId,
|
|
3051
|
+
privateKey: kp.privateKey
|
|
3052
|
+
}));
|
|
3028
3053
|
} else if (Array.isArray(forwarder)) {
|
|
3029
3054
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
3030
3055
|
keys = forwarder;
|
package/dist/mod.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const require_docloader = require("./docloader
|
|
5
|
-
const require_transformers = require("./transformers-
|
|
4
|
+
const require_docloader = require("./docloader--HMTXXhM.cjs");
|
|
5
|
+
const require_transformers = require("./transformers-Cd6Tdn3M.cjs");
|
|
6
6
|
require("./compat/mod.cjs");
|
|
7
|
-
const require_actor = require("./actor-
|
|
8
|
-
const require_middleware = require("./middleware-
|
|
9
|
-
const require_lookup = require("./lookup-
|
|
10
|
-
const require_key = require("./key-
|
|
11
|
-
const require_http = require("./http-
|
|
12
|
-
const require_proof = require("./proof-
|
|
13
|
-
const require_types = require("./types-
|
|
14
|
-
const require_authdocloader = require("./authdocloader-
|
|
7
|
+
const require_actor = require("./actor-CHbT9hXW.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-C90kKt44.cjs");
|
|
9
|
+
const require_lookup = require("./lookup-CA5RreoS.cjs");
|
|
10
|
+
const require_key = require("./key-Bbf-ITpM.cjs");
|
|
11
|
+
const require_http = require("./http-Bg-OkZtX.cjs");
|
|
12
|
+
const require_proof = require("./proof-BYdxNk_7.cjs");
|
|
13
|
+
const require_types = require("./types-BVCtDIwE.cjs");
|
|
14
|
+
const require_authdocloader = require("./authdocloader-qSZCRtME.cjs");
|
|
15
15
|
const require_vocab_mod = require("./vocab/mod.cjs");
|
|
16
16
|
const require_federation_mod = require("./federation/mod.cjs");
|
|
17
17
|
require("./nodeinfo/mod.cjs");
|
package/dist/mod.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryp
|
|
|
7
7
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-0yNTyGMb.cjs";
|
|
8
8
|
import { a as toAcctUrl, c as TraverseCollectionOptions, i as parseFediverseHandle, l as lookupObject, n as FediverseHandle, o as PUBLIC_COLLECTION, r as isFediverseHandle, s as LookupObjectOptions, t as getTypeId, u as traverseCollection } from "./mod-BQ3lrlXU.cjs";
|
|
9
9
|
import { i as ResourceDescriptor, n as lookupWebFinger } from "./mod-CDbqB60V.cjs";
|
|
10
|
-
import { $ as CustomCollectionCursor, A as createFederation, B as RouterRouteResult, C as InboxListenerSetters, D as FederationKvPrefixes, E as CreateFederationOptions, F as Message, G as ActorDispatcher, H as respondWithObject, I as createFederationBuilder, J as AuthorizePredicate, K as ActorHandleMapper, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as CustomCollectionCounter, R as RouterError, S as IdempotencyStrategy, T as Rfc6570Expression, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as FederationBuilder, a as InboxContext, at as ObjectDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as WebFingerLinksDispatcher, d as ActorCallbackSetters, dt as buildCollectionSynchronizationHeader, et as CustomCollectionDispatcher, f as CollectionCallbackSetters, ft as digest, g as Federation, h as Federatable, i as GetSignedKeyOptions, it as ObjectAuthorizePredicate, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as SenderKeyPair, m as CustomCollectionCallbackSetters, n as Context, nt as InboxListener, o as ParseUriResult, ot as OutboxErrorHandler, p as ConstructorWithTypeId, pt as ActivityTransformer, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as RequestContext, st as SharedInboxKeyDispatcher, t as ActorKeyPair, tt as InboxErrorHandler, u as SendActivityOptionsForCollection, ut as PageItems, v as FederationFetchOptions, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, z as RouterOptions } from "./context-
|
|
10
|
+
import { $ as CustomCollectionCursor, A as createFederation, B as RouterRouteResult, C as InboxListenerSetters, D as FederationKvPrefixes, E as CreateFederationOptions, F as Message, G as ActorDispatcher, H as respondWithObject, I as createFederationBuilder, J as AuthorizePredicate, K as ActorHandleMapper, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as CustomCollectionCounter, R as RouterError, S as IdempotencyStrategy, T as Rfc6570Expression, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as FederationBuilder, a as InboxContext, at as ObjectDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as WebFingerLinksDispatcher, d as ActorCallbackSetters, dt as buildCollectionSynchronizationHeader, et as CustomCollectionDispatcher, f as CollectionCallbackSetters, ft as digest, g as Federation, h as Federatable, i as GetSignedKeyOptions, it as ObjectAuthorizePredicate, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as SenderKeyPair, m as CustomCollectionCallbackSetters, n as Context, nt as InboxListener, o as ParseUriResult, ot as OutboxErrorHandler, p as ConstructorWithTypeId, pt as ActivityTransformer, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as RequestContext, st as SharedInboxKeyDispatcher, t as ActorKeyPair, tt as InboxErrorHandler, u as SendActivityOptionsForCollection, ut as PageItems, v as FederationFetchOptions, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, z as RouterOptions } from "./context-BzSr5FCW.cjs";
|
|
11
11
|
import { a as MessageQueueListenOptions, i as MessageQueueEnqueueOptions, n as InProcessMessageQueueOptions, o as ParallelMessageQueue, r as MessageQueue, t as InProcessMessageQueue } from "./mq-CrItclRD.cjs";
|
|
12
12
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
13
13
|
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./runtime/mod.cjs";
|
package/dist/mod.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryp
|
|
|
9
9
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CPEbNpnZ.js";
|
|
10
10
|
import { a as toAcctUrl, c as TraverseCollectionOptions, i as parseFediverseHandle, l as lookupObject, n as FediverseHandle, o as PUBLIC_COLLECTION, r as isFediverseHandle, s as LookupObjectOptions, t as getTypeId, u as traverseCollection } from "./mod-Lj0W1nnG.js";
|
|
11
11
|
import { i as ResourceDescriptor, n as lookupWebFinger } from "./mod-lHd-Zdd_.js";
|
|
12
|
-
import { $ as CustomCollectionCursor, A as createFederation, B as RouterRouteResult, C as InboxListenerSetters, D as FederationKvPrefixes, E as CreateFederationOptions, F as Message, G as ActorDispatcher, H as respondWithObject, I as createFederationBuilder, J as AuthorizePredicate, K as ActorHandleMapper, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as CustomCollectionCounter, R as RouterError, S as IdempotencyStrategy, T as Rfc6570Expression, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as FederationBuilder, a as InboxContext, at as ObjectDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as WebFingerLinksDispatcher, d as ActorCallbackSetters, dt as buildCollectionSynchronizationHeader, et as CustomCollectionDispatcher, f as CollectionCallbackSetters, ft as digest, g as Federation, h as Federatable, i as GetSignedKeyOptions, it as ObjectAuthorizePredicate, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as SenderKeyPair, m as CustomCollectionCallbackSetters, n as Context, nt as InboxListener, o as ParseUriResult, ot as OutboxErrorHandler, p as ConstructorWithTypeId, pt as ActivityTransformer, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as RequestContext, st as SharedInboxKeyDispatcher, t as ActorKeyPair, tt as InboxErrorHandler, u as SendActivityOptionsForCollection, ut as PageItems, v as FederationFetchOptions, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, z as RouterOptions } from "./context-
|
|
12
|
+
import { $ as CustomCollectionCursor, A as createFederation, B as RouterRouteResult, C as InboxListenerSetters, D as FederationKvPrefixes, E as CreateFederationOptions, F as Message, G as ActorDispatcher, H as respondWithObject, I as createFederationBuilder, J as AuthorizePredicate, K as ActorHandleMapper, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as CustomCollectionCounter, R as RouterError, S as IdempotencyStrategy, T as Rfc6570Expression, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as FederationBuilder, a as InboxContext, at as ObjectDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as WebFingerLinksDispatcher, d as ActorCallbackSetters, dt as buildCollectionSynchronizationHeader, et as CustomCollectionDispatcher, f as CollectionCallbackSetters, ft as digest, g as Federation, h as Federatable, i as GetSignedKeyOptions, it as ObjectAuthorizePredicate, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as SenderKeyPair, m as CustomCollectionCallbackSetters, n as Context, nt as InboxListener, o as ParseUriResult, ot as OutboxErrorHandler, p as ConstructorWithTypeId, pt as ActivityTransformer, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as RequestContext, st as SharedInboxKeyDispatcher, t as ActorKeyPair, tt as InboxErrorHandler, u as SendActivityOptionsForCollection, ut as PageItems, v as FederationFetchOptions, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, z as RouterOptions } from "./context-CyacVopT.js";
|
|
13
13
|
import { a as MessageQueueListenOptions, i as MessageQueueEnqueueOptions, n as InProcessMessageQueueOptions, o as ParallelMessageQueue, r as MessageQueue, t as InProcessMessageQueue } from "./mq-D_ZZRdby.js";
|
|
14
14
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
15
15
|
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./runtime/mod.js";
|
package/dist/mod.js
CHANGED
|
@@ -2,15 +2,15 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BV4OeK9o.js";
|
|
4
4
|
import "./compat/mod.js";
|
|
5
|
-
import { i as getDocumentLoader, o as getUserAgent, r as fetchDocumentLoader, s as kvCache, t as FetchError } from "./docloader-
|
|
6
|
-
import { $ as Person, A as Flag, B as Like, C as Dislike, Ct as importPkcs1, D as Endpoints, E as EmojiReact, F as Image, G as Multikey, H as Listen, I as IntransitiveActivity, J as Offer, K as Note, L as Invite, M as Group, N as Hashtag, O as Event, P as Ignore, Q as Page, R as Join, S as DidService, St as importPem, T as Emoji, Tt as getTypeId, U as Mention, V as Link, W as Move, X as OrderedCollectionPage, Y as OrderedCollection, Z as Organization, _ as CollectionPage, _t as View, a as normalizeActorHandle, at as Reject, b as DataIntegrityProof, bt as exportSpki, c as Add, ct as Service, d as Arrive, dt as TentativeReject, et as Place, f as Article, ft as Tombstone, g as Collection, gt as Video, h as ChatMessage, ht as Update, i as isActor, it as Read, j as Follow, k as Export, l as Announce, lt as Source, m as Block, mt as Undo, n as getActorHandle, nt as PropertyValue, o as Accept, ot as Relationship, p as Audio, pt as Travel, q as Object$1, r as getActorTypeName, rt as Question, s as Activity, st as Remove, t as getActorClassByTypeName, tt as Profile, u as Application, ut as TentativeAccept, v as Create, vt as LanguageString, w as Document, wt as importSpki, x as Delete, xt as importMultibaseKey, y as CryptographicKey, yt as exportMultibaseKey, z as Leave } from "./actor-
|
|
7
|
-
import { a as respondWithObjectIfAcceptable, c as createFederationBuilder, i as respondWithObject, l as Router, o as buildCollectionSynchronizationHeader, r as createExponentialBackoffPolicy, s as digest, t as createFederation, u as RouterError } from "./middleware-
|
|
8
|
-
import { t as lookupWebFinger } from "./lookup-
|
|
9
|
-
import { i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "./key-
|
|
10
|
-
import { n as signRequest, r as verifyRequest } from "./http-
|
|
11
|
-
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "./proof-
|
|
12
|
-
import { a as parseSemVer, i as formatSemVer, n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-
|
|
13
|
-
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
5
|
+
import { i as getDocumentLoader, o as getUserAgent, r as fetchDocumentLoader, s as kvCache, t as FetchError } from "./docloader-Cms83CjK.js";
|
|
6
|
+
import { $ as Person, A as Flag, B as Like, C as Dislike, Ct as importPkcs1, D as Endpoints, E as EmojiReact, F as Image, G as Multikey, H as Listen, I as IntransitiveActivity, J as Offer, K as Note, L as Invite, M as Group, N as Hashtag, O as Event, P as Ignore, Q as Page, R as Join, S as DidService, St as importPem, T as Emoji, Tt as getTypeId, U as Mention, V as Link, W as Move, X as OrderedCollectionPage, Y as OrderedCollection, Z as Organization, _ as CollectionPage, _t as View, a as normalizeActorHandle, at as Reject, b as DataIntegrityProof, bt as exportSpki, c as Add, ct as Service, d as Arrive, dt as TentativeReject, et as Place, f as Article, ft as Tombstone, g as Collection, gt as Video, h as ChatMessage, ht as Update, i as isActor, it as Read, j as Follow, k as Export, l as Announce, lt as Source, m as Block, mt as Undo, n as getActorHandle, nt as PropertyValue, o as Accept, ot as Relationship, p as Audio, pt as Travel, q as Object$1, r as getActorTypeName, rt as Question, s as Activity, st as Remove, t as getActorClassByTypeName, tt as Profile, u as Application, ut as TentativeAccept, v as Create, vt as LanguageString, w as Document, wt as importSpki, x as Delete, xt as importMultibaseKey, y as CryptographicKey, yt as exportMultibaseKey, z as Leave } from "./actor-BtdqoffI.js";
|
|
7
|
+
import { a as respondWithObjectIfAcceptable, c as createFederationBuilder, i as respondWithObject, l as Router, o as buildCollectionSynchronizationHeader, r as createExponentialBackoffPolicy, s as digest, t as createFederation, u as RouterError } from "./middleware-BDTuu7QY.js";
|
|
8
|
+
import { t as lookupWebFinger } from "./lookup-CpMB-hV5.js";
|
|
9
|
+
import { i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "./key-ASS7oK8n.js";
|
|
10
|
+
import { n as signRequest, r as verifyRequest } from "./http-CDZB3DBW.js";
|
|
11
|
+
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "./proof-JCn_Nftz.js";
|
|
12
|
+
import { a as parseSemVer, i as formatSemVer, n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-Dy8sMtkH.js";
|
|
13
|
+
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-BjFtWv8Q.js";
|
|
14
14
|
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab/mod.js";
|
|
15
15
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
16
16
|
import "./nodeinfo/mod.js";
|