@fedify/fedify 1.9.8 → 1.9.9
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-DxfJk4lY.cjs → actor-DILKT_HU.cjs} +187 -187
- package/dist/{actor-DGa1EWaV.mjs → actor-DVET8NhO.mjs} +1 -1
- package/dist/{actor-BTA45fXF.js → actor-MDInzRdc.js} +187 -187
- package/dist/{authdocloader-BC2rYCy1.mjs → authdocloader-DLvikTbR.mjs} +3 -3
- package/dist/{authdocloader-CqtNsX_N.js → authdocloader-DRG9qnz7.js} +3 -3
- package/dist/{authdocloader-BrhFB421.cjs → authdocloader-hwjRHw8X.cjs} +3 -3
- package/dist/{builder-CIkAhIGC.mjs → builder-DfInnU0K.mjs} +4 -4
- package/dist/{client-MXqit6c-.mjs → client-DuRbuCIQ.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-K4cCphQj.d.ts → context-Cf8s07xm.d.ts} +4 -1
- package/dist/{context-CACMqDzl.d.cts → context-Crmwowsw.d.cts} +4 -1
- package/dist/{docloader-BVuUhBLI.cjs → docloader-BZfjD0Xt.cjs} +1 -1
- package/dist/{docloader-BoXhusJ1.js → docloader-ivt5xNwJ.js} +1 -1
- package/dist/{esm-BHJ7sdNg.mjs → esm-D0urVWqo.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-DKw-O_VY.cjs → http-8jvVkJos.cjs} +3 -3
- package/dist/{http-Bu5ZNlhZ.mjs → http-CsSHezSz.mjs} +2 -2
- package/dist/{http-VJbz6sKD.js → http-Dbj7ZT3b.js} +3 -3
- package/dist/{inbox-DkbTULXE.mjs → inbox-D7U8Ysvc.mjs} +1 -1
- package/dist/{key-BNMK_IVr.mjs → key-Bbuzt358.mjs} +2 -2
- package/dist/{key-4fu6v0Jf.mjs → key-Bg3Rr_bi.mjs} +1 -1
- package/dist/{key-CancShOo.cjs → key-Bl8yte5W.cjs} +1 -1
- package/dist/{key-DK3o0FEH.js → key-C2e_Yz1s.js} +2 -2
- package/dist/{key-B-wFdaPB.cjs → key-CUorXS6k.cjs} +2 -2
- package/dist/{keycache-D-Vj8z88.mjs → keycache-Dpm1JlAw.mjs} +1 -1
- package/dist/{keys-B27nVeIs.mjs → keys-CZlvPl27.mjs} +1 -1
- package/dist/{ld-6jAVu3jV.mjs → ld-iU-MUtGB.mjs} +2 -2
- package/dist/{lookup-BaU75j-d.js → lookup-BOFQeNi_.js} +1 -1
- package/dist/{lookup-BiIPmTwB.cjs → lookup-BnvWOvmD.cjs} +1 -1
- package/dist/{lookup-DmeJ8WUw.mjs → lookup-DhIULso8.mjs} +1 -1
- package/dist/{middleware-Db1yZQaT.mjs → middleware-BBjNkISH.mjs} +52 -27
- package/dist/{middleware-C188G4Go.cjs → middleware-BD8iV5GL.cjs} +48 -23
- package/dist/{middleware-Do06X21v.js → middleware-D0zludVl.js} +46 -21
- package/dist/{middleware-DrfZEjyc.mjs → middleware-DauQ1R8p.mjs} +1 -1
- package/dist/{middleware-9ByEpBvV.cjs → middleware-TO6qMFz0.cjs} +1 -1
- 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/{owner-CKuGt_T9.mjs → owner-CAvCysNj.mjs} +3 -3
- package/dist/{proof-DLOy7HYU.cjs → proof-2V3jxAdE.cjs} +3 -3
- package/dist/{proof-CmTtG_t-.js → proof-C99DO0SE.js} +3 -3
- package/dist/{proof-mJLL2gSA.mjs → proof-DkUAJViu.mjs} +2 -2
- 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-BsQbGuw4.mjs → send-BxjL4pnG.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-DS3gcq8V.mjs → testing-eYbMkj5P.mjs} +2 -2
- package/dist/{transformers-BM0M8hnW.cjs → transformers-DW7EyHh4.cjs} +1 -1
- package/dist/{types-DpM4FhjW.cjs → types-B0U2QC2Q.cjs} +1 -1
- package/dist/{types-BXfL-dsX.js → types-dHLDn_7H.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-DuW9rL1h.mjs → vocab-CG-IqKPs.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,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-CUorXS6k.cjs");
|
|
4
4
|
exports.validateCryptoKey = require_key.validateCryptoKey;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
import { t as __exportAll } from "./rolldown-runtime-C7fyD9f2.js";
|
|
4
|
-
import { d as name, f as version, i as getDocumentLoader } from "./docloader-
|
|
5
|
-
import { i as isActor, q as Object$1, y as CryptographicKey } from "./actor-
|
|
4
|
+
import { d as name, f as version, i as getDocumentLoader } from "./docloader-ivt5xNwJ.js";
|
|
5
|
+
import { i as isActor, q as Object$1, y as CryptographicKey } from "./actor-MDInzRdc.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
//#region src/sig/key.ts
|
|
@@ -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-BZfjD0Xt.cjs");
|
|
4
|
+
const require_actor = require("./actor-DILKT_HU.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,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-CG-IqKPs.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-CG-IqKPs.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-CG-IqKPs.mjs";
|
|
5
|
+
import { a as validateCryptoKey, n as fetchKey } from "./key-Bbuzt358.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
|
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-ivt5xNwJ.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
6
6
|
//#region src/webfinger/lookup.ts
|
|
@@ -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-BZfjD0Xt.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-CG-IqKPs.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,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-CG-IqKPs.mjs";
|
|
5
|
+
import { i as RouterError, n as traverseCollection, t as lookupObject } from "./lookup-DhIULso8.mjs";
|
|
6
|
+
import { t as getNodeInfo } from "./client-DuRbuCIQ.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-DVET8NhO.mjs";
|
|
9
|
+
import { a as validateCryptoKey, i as importJwk, t as exportJwk } from "./key-Bbuzt358.mjs";
|
|
10
|
+
import { l as verifyRequest } from "./http-CsSHezSz.mjs";
|
|
11
|
+
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-DLvikTbR.mjs";
|
|
12
|
+
import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-iU-MUtGB.mjs";
|
|
13
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CAvCysNj.mjs";
|
|
14
|
+
import { n as signObject, r as verifyObject } from "./proof-DkUAJViu.mjs";
|
|
15
|
+
import { n as routeActivity } from "./inbox-D7U8Ysvc.mjs";
|
|
16
|
+
import { t as FederationBuilderImpl } from "./builder-DfInnU0K.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-Dpm1JlAw.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-BxjL4pnG.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";
|
|
@@ -1845,14 +1845,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
1845
1845
|
let rsaKey = null;
|
|
1846
1846
|
for (const { keyId, privateKey } of keys) {
|
|
1847
1847
|
validateCryptoKey(privateKey, "private");
|
|
1848
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1848
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
1849
|
+
keyId,
|
|
1850
|
+
privateKey
|
|
1851
|
+
};
|
|
1852
|
+
}
|
|
1853
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
1854
|
+
proofCreated = true;
|
|
1855
|
+
break;
|
|
1856
|
+
}
|
|
1857
|
+
if (!proofCreated) {
|
|
1858
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
1856
1859
|
activity = await signObject(activity, privateKey, keyId, {
|
|
1857
1860
|
contextLoader,
|
|
1858
1861
|
tracerProvider: this.tracerProvider
|
|
@@ -2485,6 +2488,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2485
2488
|
}
|
|
2486
2489
|
const owner = this.getActorUri(identifier);
|
|
2487
2490
|
const result = [];
|
|
2491
|
+
let i = 1;
|
|
2488
2492
|
for (const keyPair of keyPairs) {
|
|
2489
2493
|
const newPair = {
|
|
2490
2494
|
...keyPair,
|
|
@@ -2494,12 +2498,13 @@ var ContextImpl = class ContextImpl {
|
|
|
2494
2498
|
publicKey: keyPair.publicKey
|
|
2495
2499
|
}),
|
|
2496
2500
|
multikey: new Multikey({
|
|
2497
|
-
id:
|
|
2501
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
2498
2502
|
controller: owner,
|
|
2499
2503
|
publicKey: keyPair.publicKey
|
|
2500
2504
|
})
|
|
2501
2505
|
};
|
|
2502
2506
|
result.push(newPair);
|
|
2507
|
+
i++;
|
|
2503
2508
|
}
|
|
2504
2509
|
return result;
|
|
2505
2510
|
}
|
|
@@ -2646,6 +2651,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2646
2651
|
]);
|
|
2647
2652
|
let keys;
|
|
2648
2653
|
let identifier = null;
|
|
2654
|
+
let actorKeyPairs = null;
|
|
2649
2655
|
if ("identifier" in sender || "username" in sender || "handle" in sender) {
|
|
2650
2656
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
2651
2657
|
else {
|
|
@@ -2663,8 +2669,13 @@ var ContextImpl = class ContextImpl {
|
|
|
2663
2669
|
}
|
|
2664
2670
|
}
|
|
2665
2671
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
2666
|
-
|
|
2667
|
-
|
|
2672
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
2673
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
2674
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
2675
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
2676
|
+
keyId: kp.keyId,
|
|
2677
|
+
privateKey: kp.privateKey
|
|
2678
|
+
}));
|
|
2668
2679
|
} else if (Array.isArray(sender)) {
|
|
2669
2680
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
2670
2681
|
keys = sender;
|
|
@@ -2695,6 +2706,16 @@ var ContextImpl = class ContextImpl {
|
|
|
2695
2706
|
});
|
|
2696
2707
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
2697
2708
|
}
|
|
2709
|
+
if (actorKeyPairs != null) {
|
|
2710
|
+
const contextLoader = this.contextLoader;
|
|
2711
|
+
for (const kp of actorKeyPairs) {
|
|
2712
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
2713
|
+
activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
2714
|
+
contextLoader,
|
|
2715
|
+
tracerProvider: this.tracerProvider
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2698
2719
|
const inboxes = extractInboxes({
|
|
2699
2720
|
recipients: expandedRecipients,
|
|
2700
2721
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -3016,8 +3037,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3016
3037
|
identifier = mapped;
|
|
3017
3038
|
}
|
|
3018
3039
|
}
|
|
3019
|
-
|
|
3020
|
-
if (
|
|
3040
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3041
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3042
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3043
|
+
keyId: kp.keyId,
|
|
3044
|
+
privateKey: kp.privateKey
|
|
3045
|
+
}));
|
|
3021
3046
|
} else if (Array.isArray(forwarder)) {
|
|
3022
3047
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
3023
3048
|
keys = forwarder;
|
|
@@ -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-BZfjD0Xt.cjs");
|
|
4
|
+
const require_transformers = require("./transformers-DW7EyHh4.cjs");
|
|
5
|
+
const require_actor = require("./actor-DILKT_HU.cjs");
|
|
6
|
+
const require_lookup = require("./lookup-BnvWOvmD.cjs");
|
|
7
|
+
const require_key = require("./key-CUorXS6k.cjs");
|
|
8
|
+
const require_http = require("./http-8jvVkJos.cjs");
|
|
9
|
+
const require_proof = require("./proof-2V3jxAdE.cjs");
|
|
10
|
+
const require_types = require("./types-B0U2QC2Q.cjs");
|
|
11
|
+
const require_authdocloader = require("./authdocloader-hwjRHw8X.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-TO6qMFz0.cjs"));
|
|
339
339
|
const f = new FederationImpl(options);
|
|
340
340
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
341
341
|
f.router = this.router.clone();
|
|
@@ -2819,14 +2819,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2819
2819
|
let rsaKey = null;
|
|
2820
2820
|
for (const { keyId, privateKey } of keys) {
|
|
2821
2821
|
require_key.validateCryptoKey(privateKey, "private");
|
|
2822
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2822
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
2823
|
+
keyId,
|
|
2824
|
+
privateKey
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2828
|
+
proofCreated = true;
|
|
2829
|
+
break;
|
|
2830
|
+
}
|
|
2831
|
+
if (!proofCreated) {
|
|
2832
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2830
2833
|
activity = await require_proof.signObject(activity, privateKey, keyId, {
|
|
2831
2834
|
contextLoader,
|
|
2832
2835
|
tracerProvider: this.tracerProvider
|
|
@@ -3459,6 +3462,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3459
3462
|
}
|
|
3460
3463
|
const owner = this.getActorUri(identifier);
|
|
3461
3464
|
const result = [];
|
|
3465
|
+
let i = 1;
|
|
3462
3466
|
for (const keyPair of keyPairs) {
|
|
3463
3467
|
const newPair = {
|
|
3464
3468
|
...keyPair,
|
|
@@ -3468,12 +3472,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3468
3472
|
publicKey: keyPair.publicKey
|
|
3469
3473
|
}),
|
|
3470
3474
|
multikey: new require_actor.Multikey({
|
|
3471
|
-
id:
|
|
3475
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
3472
3476
|
controller: owner,
|
|
3473
3477
|
publicKey: keyPair.publicKey
|
|
3474
3478
|
})
|
|
3475
3479
|
};
|
|
3476
3480
|
result.push(newPair);
|
|
3481
|
+
i++;
|
|
3477
3482
|
}
|
|
3478
3483
|
return result;
|
|
3479
3484
|
}
|
|
@@ -3620,6 +3625,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3620
3625
|
]);
|
|
3621
3626
|
let keys;
|
|
3622
3627
|
let identifier = null;
|
|
3628
|
+
let actorKeyPairs = null;
|
|
3623
3629
|
if ("identifier" in sender || "username" in sender || "handle" in sender) {
|
|
3624
3630
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
3625
3631
|
else {
|
|
@@ -3637,8 +3643,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3637
3643
|
}
|
|
3638
3644
|
}
|
|
3639
3645
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
3640
|
-
|
|
3641
|
-
|
|
3646
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
3647
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3648
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3649
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3650
|
+
keyId: kp.keyId,
|
|
3651
|
+
privateKey: kp.privateKey
|
|
3652
|
+
}));
|
|
3642
3653
|
} else if (Array.isArray(sender)) {
|
|
3643
3654
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
3644
3655
|
keys = sender;
|
|
@@ -3669,6 +3680,16 @@ var ContextImpl = class ContextImpl {
|
|
|
3669
3680
|
});
|
|
3670
3681
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3671
3682
|
}
|
|
3683
|
+
if (actorKeyPairs != null) {
|
|
3684
|
+
const contextLoader = this.contextLoader;
|
|
3685
|
+
for (const kp of actorKeyPairs) {
|
|
3686
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
3687
|
+
activity = await require_proof.signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
3688
|
+
contextLoader,
|
|
3689
|
+
tracerProvider: this.tracerProvider
|
|
3690
|
+
});
|
|
3691
|
+
}
|
|
3692
|
+
}
|
|
3672
3693
|
const inboxes = extractInboxes({
|
|
3673
3694
|
recipients: expandedRecipients,
|
|
3674
3695
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -3990,8 +4011,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3990
4011
|
identifier = mapped;
|
|
3991
4012
|
}
|
|
3992
4013
|
}
|
|
3993
|
-
|
|
3994
|
-
if (
|
|
4014
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
4015
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
4016
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
4017
|
+
keyId: kp.keyId,
|
|
4018
|
+
privateKey: kp.privateKey
|
|
4019
|
+
}));
|
|
3995
4020
|
} else if (Array.isArray(forwarder)) {
|
|
3996
4021
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
3997
4022
|
keys = forwarder;
|
|
@@ -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-ivt5xNwJ.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-MDInzRdc.js";
|
|
7
|
+
import { t as lookupWebFinger } from "./lookup-BOFQeNi_.js";
|
|
8
|
+
import { i as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-C2e_Yz1s.js";
|
|
9
|
+
import { r as verifyRequest, t as doubleKnock } from "./http-Dbj7ZT3b.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-C99DO0SE.js";
|
|
11
|
+
import { n as getNodeInfo, t as nodeInfoToJson } from "./types-dHLDn_7H.js";
|
|
12
|
+
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-DRG9qnz7.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";
|
|
@@ -2827,14 +2827,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2827
2827
|
let rsaKey = null;
|
|
2828
2828
|
for (const { keyId, privateKey } of keys) {
|
|
2829
2829
|
validateCryptoKey(privateKey, "private");
|
|
2830
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2830
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
2831
|
+
keyId,
|
|
2832
|
+
privateKey
|
|
2833
|
+
};
|
|
2834
|
+
}
|
|
2835
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2836
|
+
proofCreated = true;
|
|
2837
|
+
break;
|
|
2838
|
+
}
|
|
2839
|
+
if (!proofCreated) {
|
|
2840
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2838
2841
|
activity = await signObject(activity, privateKey, keyId, {
|
|
2839
2842
|
contextLoader,
|
|
2840
2843
|
tracerProvider: this.tracerProvider
|
|
@@ -3467,6 +3470,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3467
3470
|
}
|
|
3468
3471
|
const owner = this.getActorUri(identifier);
|
|
3469
3472
|
const result = [];
|
|
3473
|
+
let i = 1;
|
|
3470
3474
|
for (const keyPair of keyPairs) {
|
|
3471
3475
|
const newPair = {
|
|
3472
3476
|
...keyPair,
|
|
@@ -3476,12 +3480,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3476
3480
|
publicKey: keyPair.publicKey
|
|
3477
3481
|
}),
|
|
3478
3482
|
multikey: new Multikey({
|
|
3479
|
-
id:
|
|
3483
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
3480
3484
|
controller: owner,
|
|
3481
3485
|
publicKey: keyPair.publicKey
|
|
3482
3486
|
})
|
|
3483
3487
|
};
|
|
3484
3488
|
result.push(newPair);
|
|
3489
|
+
i++;
|
|
3485
3490
|
}
|
|
3486
3491
|
return result;
|
|
3487
3492
|
}
|
|
@@ -3628,6 +3633,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3628
3633
|
]);
|
|
3629
3634
|
let keys;
|
|
3630
3635
|
let identifier = null;
|
|
3636
|
+
let actorKeyPairs = null;
|
|
3631
3637
|
if ("identifier" in sender || "username" in sender || "handle" in sender) {
|
|
3632
3638
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
3633
3639
|
else {
|
|
@@ -3645,8 +3651,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3645
3651
|
}
|
|
3646
3652
|
}
|
|
3647
3653
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
3648
|
-
|
|
3649
|
-
|
|
3654
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
3655
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3656
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3657
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3658
|
+
keyId: kp.keyId,
|
|
3659
|
+
privateKey: kp.privateKey
|
|
3660
|
+
}));
|
|
3650
3661
|
} else if (Array.isArray(sender)) {
|
|
3651
3662
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
3652
3663
|
keys = sender;
|
|
@@ -3677,6 +3688,16 @@ var ContextImpl = class ContextImpl {
|
|
|
3677
3688
|
});
|
|
3678
3689
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3679
3690
|
}
|
|
3691
|
+
if (actorKeyPairs != null) {
|
|
3692
|
+
const contextLoader = this.contextLoader;
|
|
3693
|
+
for (const kp of actorKeyPairs) {
|
|
3694
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
3695
|
+
activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
3696
|
+
contextLoader,
|
|
3697
|
+
tracerProvider: this.tracerProvider
|
|
3698
|
+
});
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3680
3701
|
const inboxes = extractInboxes({
|
|
3681
3702
|
recipients: expandedRecipients,
|
|
3682
3703
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -3998,8 +4019,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3998
4019
|
identifier = mapped;
|
|
3999
4020
|
}
|
|
4000
4021
|
}
|
|
4001
|
-
|
|
4002
|
-
if (
|
|
4022
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
4023
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
4024
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
4025
|
+
keyId: kp.keyId,
|
|
4026
|
+
privateKey: kp.privateKey
|
|
4027
|
+
}));
|
|
4003
4028
|
} else if (Array.isArray(forwarder)) {
|
|
4004
4029
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
4005
4030
|
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-BD8iV5GL.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
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-BZfjD0Xt.cjs");
|
|
5
|
+
const require_transformers = require("./transformers-DW7EyHh4.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-DILKT_HU.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-BD8iV5GL.cjs");
|
|
9
|
+
const require_lookup = require("./lookup-BnvWOvmD.cjs");
|
|
10
|
+
const require_key = require("./key-CUorXS6k.cjs");
|
|
11
|
+
const require_http = require("./http-8jvVkJos.cjs");
|
|
12
|
+
const require_proof = require("./proof-2V3jxAdE.cjs");
|
|
13
|
+
const require_types = require("./types-B0U2QC2Q.cjs");
|
|
14
|
+
const require_authdocloader = require("./authdocloader-hwjRHw8X.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-_rFs0ik_.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-HElaq2UB.cjs";
|
|
9
9
|
import { i as ResourceDescriptor, n as lookupWebFinger } from "./mod-DIMx6YjJ.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-Crmwowsw.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-DPAPnB0R.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-BSwc3_rD.js";
|
|
11
11
|
import { i as ResourceDescriptor, n as lookupWebFinger } from "./mod-BTNpXcPj.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-Cf8s07xm.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-ivt5xNwJ.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-MDInzRdc.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-D0zludVl.js";
|
|
8
|
+
import { t as lookupWebFinger } from "./lookup-BOFQeNi_.js";
|
|
9
|
+
import { i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "./key-C2e_Yz1s.js";
|
|
10
|
+
import { n as signRequest, r as verifyRequest } from "./http-Dbj7ZT3b.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-C99DO0SE.js";
|
|
12
|
+
import { a as parseSemVer, i as formatSemVer, n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-dHLDn_7H.js";
|
|
13
|
+
import { t as getAuthenticatedDocumentLoader } from "./authdocloader-DRG9qnz7.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";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { t as test } from "../testing-eYbMkj5P.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-2v7gYiZp.mjs";
|
|
7
|
-
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-
|
|
8
|
-
import { t as esm_default } from "../esm-
|
|
7
|
+
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-DuRbuCIQ.mjs";
|
|
8
|
+
import { t as esm_default } from "../esm-D0urVWqo.mjs";
|
|
9
9
|
//#region src/nodeinfo/client.test.ts
|
|
10
10
|
test("getNodeInfo()", async (t) => {
|
|
11
11
|
esm_default.spyGlobal();
|